-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression where main was ignored on browser object packages (#528)
* fix regression where main was ignored on browser object packages * fix test output * fix test output
- Loading branch information
1 parent
c83d019
commit 2f30978
Showing
10 changed files
with
26 additions
and
8 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
3 changes: 2 additions & 1 deletion
3
test/integration/dep-browser-entrypoint-object/expected-install/import-map.json
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,5 +1,6 @@ | ||
{ | ||
"imports": { | ||
"mock-test-package": "./mock-test-package.js" | ||
"package-has-valid": "./package-has-valid.js", | ||
"package-no-valid": "./package-no-valid.js" | ||
} | ||
} |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
test/integration/dep-browser-entrypoint-object/expected-install/package-no-valid.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const foobar = 42; | ||
|
||
export { foobar }; |
3 changes: 2 additions & 1 deletion
3
test/integration/dep-browser-entrypoint-object/expected-output.txt
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,4 +1,5 @@ | ||
- snowpack installing... | ||
✔ snowpack install complete. | ||
⦿ web_modules/ size gzip brotli | ||
└─ mock-test-package.js XXXX KB XXXX KB XXXX KB | ||
├─ package-has-valid.js XXXX KB XXXX KB XXXX KB | ||
└─ package-no-valid.js XXXX KB XXXX KB XXXX KB |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...de_modules/mock-test-package/package.json → ...de_modules/package-has-valid/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test/integration/dep-browser-entrypoint-object/node_modules/package-no-valid/entrypoint.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
test/integration/dep-browser-entrypoint-object/node_modules/package-no-valid/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,12 +1,13 @@ | ||
{ | ||
"description": "Test that we can handle a package.json 'browser' object entrypoint", | ||
"description": "Test that we properly handle a package.json 'browser' object.", | ||
"scripts": { | ||
"TEST": "node ../../../pkg/dist-node/index.bin.js" | ||
}, | ||
"snowpack": { | ||
"install": ["mock-test-package"] | ||
"install": ["package-has-valid", "package-no-valid"] | ||
}, | ||
"dependencies": { | ||
"mock-test-package": "^1.2.3" | ||
"package-has-valid": "^1.2.3", | ||
"package-no-valid": "^1.2.3" | ||
} | ||
} |
2f30978
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: