Skip to content

Conversation

@remiposo
Copy link
Contributor

Manually bumping the version for each package and triggering the workflow was cumbersome, so I configured pnpm workspace and introduced changesets.

Note: Before actually publishing new versions, we need to update the Trusted Publishing settings for each package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the initial changeset.
Once this PR is merged, a release PR should be created, and merging that will bump the patch version for all packages.

"name": "function",
"private": true,
"scripts": {
"ci:publish": "pnpm publish -r --no-git-checks --access=public"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the command called from changeset/action.
The -r flag attempts to publish all packages, but packages that already have that version published (i.e., packages with no updates) are skipped without errors.

refs:
https://pnpm.io/cli/publish
https://pnpm.io/using-changesets

"check-write": "biome check --write .",
"type-check": "tsc"
"type-check": "tsc",
"prepublishOnly": "pnpm run build"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to run build before publish, we're defining prepublishOnly.

"devDependencies": {
"@biomejs/biome": "1.9.4",
"@tailor-platform/function-types": "0.6.0",
"@tailor-platform/function-types": "workspace:*",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When depending on other packages within the monorepo, changesets will generate a warning if the specified version is outdated, so I'm replacing all of them with workspace:*.
This should be fine since they'll be replaced with the actual latest versions during publishing.
https://pnpm.io/workspaces#publishing-workspace-packages

Comment on lines -36 to -41
"engines": {
"node": "22.x"
},
"packageManager": "pnpm@10.18.0",
"pnpm": {
"onlyBuiltDependencies": ["@biomejs/biome", "esbuild"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved engines.node / packageManager to the root package.json, and onlyBuiltDependencies to pnpm-workspace.yaml.

"prepublishOnly": "pnpm run build"
},
"dependencies": {
"@tailor-platform/function-typeorm-tailordb-codegen": "link:",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed link: since it causes errors when installing with npm as it can't be interpreted. This should be unnecessary, right...?

@remiposo remiposo self-assigned this Oct 21, 2025
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With v5, it seems to try to enable pnpm caching by default and throws an error, so I've updated to v6.
I think this went unnoticed because the workflow probably hasn't been run once since updating to v5...
actions/setup-node#1357

@remiposo remiposo marked this pull request as ready for review October 21, 2025 12:26
@remiposo remiposo requested a review from a team as a code owner October 21, 2025 12:26
Copy link
Contributor

@dragon3 dragon3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@remiposo remiposo merged commit 30c9875 into main Oct 22, 2025
6 checks passed
@remiposo remiposo deleted the remiposo/introduce-changesets branch October 22, 2025 07:03
@github-actions github-actions bot mentioned this pull request Oct 22, 2025
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.

3 participants