Skip to content

Derive npm dist-tag from package major in publish workflow - #79

Open
vigneshwerv wants to merge 1 commit into
devfrom
fix/publish-dist-tag
Open

Derive npm dist-tag from package major in publish workflow#79
vigneshwerv wants to merge 1 commit into
devfrom
fix/publish-dist-tag

Conversation

@vigneshwerv

Copy link
Copy Markdown
Contributor

publish.yml ran a bare npm publish, which always moves the latest dist-tag to whatever version is being published.

That is wrong for maintenance releases on an older major: publishing 1.5.1 from the v1 line would point latest at it, pulling every npm install @fragment-dev/node-client back from 2.1.0 to 1.5.1.

This compares the package major against the current latest major and publishes older majors under a v<major> tag instead.

Verified against the live registry:

package version resolved dist-tag
1.5.1 v1
2.2.0 latest
3.0.0 latest

Needed by the pending v1.5.1 backport release (branch release/v1.5.1).

publish.yml ran a bare `npm publish`, which always moves the 'latest' dist-tag
to whatever version is being published. That is wrong for maintenance releases
on an older major: publishing 1.5.1 would have pointed 'latest' at it and
pulled every `npm install @fragment-dev/node-client` back to the v1 line.

Compare the package major against the current 'latest' major and publish older
majors under a 'v<major>' tag instead.
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.

2 participants