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
{{ message }}
Repository navigation
enable updating custom version files with changeset version #1166
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.
Reacted by Simon H, Benjie, Dennis Torres, C V, Robin Genz, Rasso Hilber and Carson McManus
Reacted by Hofer Ivan, Dennis Torres and Rasso Hilber
Activity
bluwy commentedon Oct 6, 2024
Perhaps related to #982 requesting
"postversion"script hook support