-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn on exports browser-ish conflict
closes #58
- Loading branch information
Showing
11 changed files
with
114 additions
and
18 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Some exports condition are known to be similar to the browser condition but | ||
// runs slightly different. Specifically, the `pkg.browser` field will be applied | ||
// even after resolving with these export conditions, which can be confusing at times. | ||
export const knownBrowserishConditions = [ | ||
'worker', | ||
// Cloudflare Workers: https://runtime-keys.proposal.wintercg.org/#workerd | ||
'workerd', | ||
// Vercel Edge: https://runtime-keys.proposal.wintercg.org/#edge-light | ||
'edge-light' | ||
] | ||
|
||
// NOTE: this list is intentionally non-exhaustive and subjective as it's used for | ||
// loose detection purpose for `pkg.files` recommendation only. please dont submit | ||
// a PR to extend it. | ||
export const commonInternalPaths = [ | ||
// directories | ||
'test/', | ||
'tests/', | ||
'__tests__/', | ||
// files | ||
'.prettierrc', | ||
'prettier.config.js', | ||
'.eslintrc', | ||
'.eslintrc.js' | ||
] |
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
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "publint-exports-browser-conflict", | ||
"version": "0.0.1", | ||
"private": true, | ||
"browser": { | ||
"./lib.server.js": "./lib.browser.js" | ||
}, | ||
"exports": { | ||
".": { | ||
"worker": { | ||
"import": "./lib.server.js" | ||
}, | ||
"browser": { | ||
"import": "./lib.browser.js" | ||
}, | ||
"default": "./lib.server.js" | ||
} | ||
} | ||
} |
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