Skip to content

Rebuild dist before publish so it reports the new version - #2732

Merged
mathiasrw merged 1 commit into
developfrom
fix/2731
Oct 20, 2026
Merged

mathiasrw merged 1 commit into
developfrom
fix/2731

Conversation

@mathiasrw

Copy link
Copy Markdown
Member

Fixes #2731

yarn release runs yarn version: preversion builds dist/ with the old version in package.json, then the version is bumped, and postversion runs npm publish on that dist/. So [email protected] on npm reports alasql.version as 4.20.0.

prepublishOnly runs right before npm publish packs the files, after the bump, so it rebuilds dist/ with the new version. </dev/null is there because build.sh waits on stdin otherwise (rexreplace).

dist/ is not in git, so the commit and tag are unchanged. The build runs twice per release (once in preversion for the tests, once here).

Not tested with a real publish; check alasql.version of the next release from npm.

@mathiasrw
mathiasrw merged commit 5dfa1af into develop Oct 20, 2026
10 checks passed
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.

Published dist reports the previous version

1 participant