-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
…`false` (#427) We [recently shipped](#424) support for the `browser` field, but we discovered an edge case where instead of mapping to another string, the value could be `false` (eg, [`object-inspect`](https://github.com/inspect-js/object-inspect/blob/main/package.json#L82)), which indicates that this module should be treated as an empty object (`{}`) (evidenced by its usage [here](https://github.com/inspect-js/object-inspect/blob/main/index.js#L68-L70)). The code was previously erroring on the string's `startsWith` checks, causing the entire package to be omitted from the file mapping result. This ensures that if the value is `false` we'll continue on. --------- Co-authored-by: Steven <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# include node_modules for testing | ||
!node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('pkg'); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
"package.json", | ||
"test/unit/browser-remappings-false/input.js", | ||
"test/unit/browser-remappings-false/node_modules/pkg/browser.js", | ||
"test/unit/browser-remappings-false/node_modules/pkg/index.js", | ||
"test/unit/browser-remappings-false/node_modules/pkg/package.json" | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"conditions": ["browser"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# include node_modules for testing | ||
!node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('pkg'); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
"package.json", | ||
"test/unit/browser-remappings-string/input.js", | ||
"test/unit/browser-remappings-string/node_modules/pkg/browser.js", | ||
"test/unit/browser-remappings-string/node_modules/pkg/index.js", | ||
"test/unit/browser-remappings-string/node_modules/pkg/package.json" | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"conditions": ["browser"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# include node_modules for testing | ||
!node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('pkg'); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
"package.json", | ||
"test/unit/browser-remappings-undefined/input.js", | ||
"test/unit/browser-remappings-undefined/node_modules/pkg/index.js", | ||
"test/unit/browser-remappings-undefined/node_modules/pkg/package.json", | ||
"test/unit/browser-remappings-undefined/node_modules/pkg/require-main.cjs", | ||
"test/unit/browser-remappings-undefined/node_modules/pkg/subdir/import-main.js", | ||
"test/unit/browser-remappings-undefined/node_modules/pkg/subdir/package.json" | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"conditions": ["browser"] | ||
} |