Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: test imports with npm package contents #425

Merged
merged 3 commits into from
Apr 29, 2020
Merged

Conversation

ctavan
Copy link
Member

@ctavan ctavan commented Apr 28, 2020

Especially for publishing CommonJS/ESM/Browser dual packages a lot can go wrong in the actual build and release step, see: https://medium.com/javascript-in-plain-english/is-promise-post-mortem-cab807f18dcc

In order to catch regressions with respect to the supported ways of importing this library it makes sense to test this using npm pack.

Fixes #424

@ctavan ctavan force-pushed the node-esm-wrapper branch from a39089a to 5c133ff Compare April 29, 2020 11:35
This simplifies using npm pack in CI tests.
@ctavan ctavan force-pushed the test-with-nmp-pack branch from 88884ec to ce69bdf Compare April 29, 2020 11:43
ctavan added 2 commits April 29, 2020 13:43
Especially for publishing CommonJS/ESM/Browser dual packages a lot can
go wrong in the actual build and release step, see:
https://medium.com/javascript-in-plain-english/is-promise-post-mortem-cab807f18dcc

In order to catch regressions with respect to the supported ways of
importing this library it makes sense to test this using `npm pack`.

Fixes #424
@ctavan ctavan force-pushed the test-with-nmp-pack branch from ce69bdf to 0912b9b Compare April 29, 2020 11:44
@ctavan ctavan changed the base branch from node-esm-wrapper to master April 29, 2020 11:46
@ctavan ctavan marked this pull request as ready for review April 29, 2020 11:46
@ctavan ctavan requested review from broofa and LinusU April 29, 2020 11:47
@ctavan
Copy link
Member Author

ctavan commented Apr 29, 2020

@LinusU since you brought up the blog post about the failed s-promise update I thought it might be a good idea to add a test for the import and require API using npm pack as well.

@ctavan
Copy link
Member Author

ctavan commented Apr 29, 2020

The last commit I just added is only to show that this would actually catch problems with the npm package contents that are not caught in the tests that run on the source files. I will obviously revert it before merging.

Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ctavan ctavan force-pushed the test-with-nmp-pack branch from 62938b1 to 0912b9b Compare April 29, 2020 12:32
@ctavan ctavan merged commit 57d7597 into master Apr 29, 2020
@ctavan ctavan deleted the test-with-nmp-pack branch April 29, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests using npm pack
2 participants