-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: organize types, errors, and imports (#275)
* refactor: re-organize types and errors * style: remove extra empty line * chore(deps): update dependencies * style: sort imports via @trivago/prettier-plugin-sort-imports * docs: fix undesired automatic formatting [skip ci] * style: ignore files Co-authored-by: Lucie <[email protected]>
- Loading branch information
1 parent
a3a6609
commit 90245e2
Showing
181 changed files
with
7,931 additions
and
5,567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
CHANGELOG.md | ||
|
||
# .gitignore copy | ||
|
||
# custom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
CHANGELOG.md | ||
|
||
# .gitignore copy | ||
|
||
# custom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
const pkg = require("./package.json"); | ||
|
||
module.exports = [pkg.module, pkg.main].filter(Boolean).map(path => ({ path })); | ||
module.exports = [ | ||
...new Set([ | ||
pkg.main, | ||
pkg.module, | ||
...Object.values(pkg.exports).flatMap((exportTypes) => { | ||
if (typeof exportTypes === "string") { | ||
return exportTypes; | ||
} else { | ||
return Object.values(exportTypes); | ||
} | ||
}), | ||
]), | ||
] | ||
.filter((path) => { | ||
return path && path !== "./package.json"; | ||
}) | ||
.map((path) => { | ||
return { path }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.