Follow these steps to publish new versions of the packages (like @corecast/headless and @corecast/ui) to the public NPM registry.
Make all your code changes in the correct package (e.g., packages/headless/src/index.ts).
Commit your feature, bugfix, or chore as you normally would.
# Add all your changes
git add .
# Commit with a clear message
git commit -m "feat: Add new hook to headless package"This is the most important step for versioning. From the root of the project, run:
npx changeset addThis will start an interactive tool:
- It will ask you which packages you want to release. Use the arrow keys to move and spacebar to select the packages you just changed (e.g.,
@corecast/headless). - It will ask you what type of version bump it is (
patch,minor, ormajor). - It will ask for a summary. Write a clear message here, as this will be automatically added to the
CHANGELOG.mdfile.
Run the release script from the root of the project.
npm run releaseWhat this command does:
turbo run build: This correctly runs thebuildscript (liketsup ...) inside all your packages, creating the up-to-datedistfolders.changeset version: This finds the changeset file you just made, deletes it, and automatically updates theversionin yourpackage.jsonfiles and writes your summary into theCHANGELOG.mdfiles.
changeset has just changed a lot of files (package.json, CHANGELOG.md). You must commit these changes.
# Add all the changed package.json and changelog files
git add .
# Commit with a standard message
git commit -m "chore: Bump package versions"Push your feature commit and your version bump commit to the remote repository.
git push origin mainThis is the final step. This will publish only the packages that have a new version number.
- First, check that you are logged in to NPM:
npm whoami
- If that command fails or shows the wrong user, log in:
npm login
- Now, publish:
npx changeset publish
That's it! changeset will find all packages that need to be published, upload them to NPM, and create git tags for the new versions.
Copyright (c) 2025-Present Core Cast.
This project is licensed under the PolyForm Noncommercial License 1.0.0.
This means it is free to use, modify, and distribute for non-commercial purposes only. You may not use this software for any commercial purposes.
See the LICENSE.md file for the full text.