knocklabs / javascript

Official JavaScript packages for interacting with Knock
https://knock.app/
MIT License
14 stars 3 forks source link

fix: Add correct release script to pkg json #72

Closed kylemcd closed 7 months ago

kylemcd commented 7 months ago

The release process was utilizing changeset publish which isn't compatible with yarn workspaces.

See notes: Changeset runs npm publish under the hood, can see here: https://github.com/changesets/changesets/blob/418551020e9ff409878ca2c06944f03098d0f126/packages/cli/src/commands/publish/npm-utils.ts#L191

Which would run this: https://yarnpkg.com/cli/npm/publish

This cli command isn't aware of workspaces. So to publish with workspaces context you need to run yarn workspaces foreach . This command goes into each workspace (with the context of the other workspaces), so if you run yarn npm publish within that command then yarn can successfully swap workspace:^ for the correct version number. Contrary to what changeset does which is cd into the package folder and runs yarn npm publish.

changeset-bot[bot] commented 7 months ago

⚠️ No Changeset found

Latest commit: c62ab9f64c3e55026fdd0b71b05a4fb780b98c4f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
javascript-slack-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 4:26pm