You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes a package wants to export it's version. To do that, it needs to include something like
// version.js , autogenerated, do not modifyexportconstVERSION='1.2.3';
// index.jsexportVERSIONfrom'./version.js'
in it's output.
But version.js can only be updated after changeset version has bumped package.json. Leading to a situation where the version value in package.json and version.js is different until a separate generate-version-js script has been run.
If for whatever reason these two go out of sync, there could be a release where the VERSION export does not correctly reflect the version of package.json, which would be very confusing at best and lead to hard to track errors at worst.
Proposed solution
improve the version command allow updating other files with the bumped verison. This could be other files like documentation too.
One workaround could be to use a custom version arg with the @changeset/action, but this ties it to github actions.
Background: we are moving svelte to a pnpm monorepo with changesets and need to export the version in unbundled esm.
The text was updated successfully, but these errors were encountered:
Looks like with commit: false option which is the default, it is possible to do this after changeset version and before commiting. The changeset action allows to pass a custom version script so with a bit of scripting effort this is achievable today.
Affected Packages
changesets/cli , version command
Problem
sometimes a package wants to export it's version. To do that, it needs to include something like
in it's output.
But
version.js
can only be updated afterchangeset version
has bumped package.json. Leading to a situation where the version value in package.json and version.js is different until a separategenerate-version-js
script has been run.If for whatever reason these two go out of sync, there could be a release where the VERSION export does not correctly reflect the version of package.json, which would be very confusing at best and lead to hard to track errors at worst.
Proposed solution
improve the version command allow updating other files with the bumped verison. This could be other files like documentation too.
One workaround could be to use a custom
version
arg with the@changeset/action
, but this ties it to github actions.Background: we are moving svelte to a pnpm monorepo with changesets and need to export the version in unbundled esm.
The text was updated successfully, but these errors were encountered: