-
Notifications
You must be signed in to change notification settings - Fork 108
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
fix: node.js publish #502
fix: node.js publish #502
Conversation
@@ -1,10 +1,10 @@ | |||
{ | |||
"name": "c-kzg", | |||
"version": "4.0.0", | |||
"version": "4.0.1", |
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.
Found the issue after running the publish command with 4.0.0 so needed to bump the minor. Not sure why this showed up now though.
# Bundle the distribution, also helpful for cross compatibility checks | ||
.PHONY: bundle | ||
bundle: build | ||
@mkdir dist | ||
@mv deps dist | ||
@cp -r lib dist/lib | ||
@cp -r src dist/src | ||
@cp README.md dist/README.md | ||
@cp package.json dist/package.json | ||
@cp binding.gyp dist/binding.gyp |
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.
The files
key in the package.json
is what controls this behavior. There is no need to build the dist
folder. Went with this before because you guys seemed to like it so rode the wave but the error showed up so switched this to the canonical method of using the files
key to control what gets bundled in the npm tarball
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.
LGTM. Thank you!
When publishing 4.0.0 there was an error and the bundle published without the
deps
folder. Themake command
did not correctly switch directories and published the root folder, not thedist
folder. I updated the process to use the canonical method that node uses to avoid future issues.I also updated the supported/tested versions of node that are run in CI