-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📝 modify changeset format and publish internal packages #673
Conversation
If it is not in dependencies, it is not possible to bump using dependencies by changeset.
|
Name | Type |
---|---|
@liam-hq/erd-core | Patch |
@liam-hq/ui | Patch |
@liam-hq/cli | Patch |
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
"@liam-hq/db-structure": "workspace:*", | ||
"@liam-hq/erd-core": "workspace:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To receive dependency updates, we had to go to dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't quite sure if npm i @liam-hq/cli
would work with this setup. I'll give it a try locally using pnpm pack
. Hang tight!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't quite sure if
npm i @liam-hq/cli
would work with this setup. I'll give it a try locally usingpnpm pack
. Hang tight!
As expected, the verification didn't go smoothly.
I'm testing this on macOS using Docker for Mac.
Here are the steps I followed—please review them!
Steps
# Navigate to the CLI package
[liam]$ cd ./frontend/packages/cli
# Pack the CLI package
[cli]$ npm pack
# ...snip...
# Output file
liam-hq-cli-0.3.3.tgz
# Create a temporary working directory on macOS (this does not have a package.json)
[cli]$ rm -rf /tmp/work1
[cli]$ mkdir -p /tmp/work1
[cli]$ mv liam-hq-cli-0.3.3.tgz /tmp/work1
[cli]$ cd /tmp/work1
# Run Docker with a Node environment
[work1]$ docker run --rm -it -v $(pwd):/app -w /app node:20-bullseye bash
# Inside the Docker container, verify the package exists
root@8ab6f9d75ac0:/app# ls -alF
total 2176
drwxr-xr-x 3 root root 96 Feb 5 07:50 ./
drwxr-xr-x 1 root root 4096 Feb 5 07:50 ../
-rw-r--r-- 1 root root 2223693 Feb 5 07:50 liam-hq-cli-0.3.3.tgz
# Try installing the package
root@8ab6f9d75ac0:/app# npm i ./liam-hq-cli-0.3.3.tgz
# ...snip...
# Check the exit code
root@8ab6f9d75ac0:/app# echo $?
Result: On the main branch
The installation succeeds.
Result: On this branch
The installation fails.
root@8ab6f9d75ac0:/app# npm i ./liam-hq-cli-0.3.3.tgz
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2025-02-05T07_50_37_405Z-debug-0.log
root@8ab6f9d75ac0:/app# echo $?
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I are investigating now.
📝
Since npm does not support the workspace protocol, I thought perhaps a pnpm pack
would solve the problem, but it did not.
❯ pnpm pack
liam-hq-cli-0.3.3.tgz
❯ rm -rf /tmp/work1
❯ mkdir -p /tmp/work1
❯ mv liam-hq-cli-0.3.3.tgz /tmp/work1
❯ cd /tmp/work1
❯ docker run --rm -it -v $(pwd):/app -w /app node:20-bullseye bash
root@bfbc8629420b:/app# ls -alF
total 2152
drwxr-xr-x 3 root root 96 Feb 5 08:21 ./
drwxr-xr-x 1 root root 4096 Feb 5 08:21 ../
-rw-r--r-- 1 root root 2198601 Feb 5 08:20 liam-hq-cli-0.3.3.tgz
root@bfbc8629420b:/app# npm i liam-hq-cli-0.3.3.tgz
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@liam-hq%2fdb-structure - Not found
npm error 404
npm error 404 '@liam-hq/[email protected]' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.1.0
npm notice To update run: npm install -g [email protected]
npm notice
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-02-05T08_21_34_881Z-debug-0.log
However, I think it would be better if we could publish a pre-release version to npm and install it.
Try the following documentation on changeset.
changesets/docs/prereleases.md at main · changesets/changesets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❯ pnpm changeset pre enter next
🦋 success Entered pre mode with tag next
🦋 info Run `changeset version` to version packages with prerelease versions
❯ git add .
❯ git commit -m "Enter prerelease mode and version packages"
[modify-changeset-format 4788f5b4] Enter prerelease mode and version packages
1 file changed, 17 insertions(+)
create mode 100644 .changeset/pre.json
❯ pnpm build --filter @liam-hq/cli
... snip ...
❯ pnpm changeset publish
🦋 warn ===============================IMPORTANT!===============================
🦋 warn You are in prerelease mode so packages will be published to the next
🦋 warn dist tag except for packages that have not had normal releases which will be published to latest
🦋 warn ----------------------------------------------------------------------
🦋 info npm info @liam-hq/cli
🦋 info @liam-hq/cli is being published because our local version (0.3.3) has not been published on npm
🦋 info Publishing "@liam-hq/cli" at "0.3.3"
🦋 info This operation requires a one-time password from your authenticator.
🦋 Enter one-time password: · 806699
🦋 success packages published successfully:
🦋 @liam-hq/[email protected]
🦋 Creating git tag...
🦋 New tag: @liam-hq/[email protected]
https://www.npmjs.com/package/@liam-hq/cli/v/0.3.3
I wanted to suffix it as a prerelease version, but failed.
It is likely to cause problems in the next publish because It cannot publish the version with the same name, but I think it will be OK if we publish 0.3.4 immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoshinotsuyoshi You're right. They are internal packages and I don't intend to document them.
I'll try to proceed that way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 For this case, snapshot release seems to be more convenient than prerelease. This will create a version called 0.0.0-bulbasaur-THE_TIME_YOU_DID_THIS
.
diff --git a/.changeset/rich-goats-design.md b/.changeset/rich-goats-design.md
deleted file mode 100644
index e502a1bd..00000000
--- a/.changeset/rich-goats-design.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@liam-hq/erd-core": patch
----
-
-🐛 Adjust the item height calculation in the Columns component.
diff --git a/.changeset/wise-pears-lie.md b/.changeset/wise-pears-lie.md
deleted file mode 100644
index 107900c9..00000000
--- a/.changeset/wise-pears-lie.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@liam-hq/ui": patch
----
-
-🐛 fix: ONE_TO_ONE cardinality inconsistency between left and right
diff --git a/frontend/packages/cli/CHANGELOG.md b/frontend/packages/cli/CHANGELOG.md
index e004cc2c..53e8250a 100644
--- a/frontend/packages/cli/CHANGELOG.md
+++ b/frontend/packages/cli/CHANGELOG.md
@@ -1,5 +1,11 @@
# @liam-hq/cli
+## 0.0.0-next-20250205091437
+
+### Patch Changes
+
+- [#665](https://github.com/liam-hq/liam/pull/665) - 🐛 Adjust the item height calculation in the Columns component. / Thanks [@FunamaYukina](https://github.com/FunamaYukina)!
+
## 0.3.3
### Patch Changes
diff --git a/frontend/packages/cli/package.json b/frontend/packages/cli/package.json
index 1256eb72..3ab5ffcd 100644
--- a/frontend/packages/cli/package.json
+++ b/frontend/packages/cli/package.json
@@ -15,7 +15,7 @@
},
"license": "Apache-2.0",
"private": false,
- "version": "0.3.3",
+ "version": "0.0.0-next-20250205091437",
"type": "module",
"publishConfig": {
"access": "public"
diff --git a/frontend/packages/erd-core/CHANGELOG.md b/frontend/packages/erd-core/CHANGELOG.md
index 2543f289..df3fe031 100644
--- a/frontend/packages/erd-core/CHANGELOG.md
+++ b/frontend/packages/erd-core/CHANGELOG.md
@@ -1,5 +1,12 @@
# @liam-hq/erd-core
+## 0.0.0-next-20250205091437
+
+### Patch Changes
+
+- [#665](https://github.com/liam-hq/liam/pull/665) - 🐛 Adjust the item height calculation in the Columns component. / Thanks [@FunamaYukina](https://github.com/FunamaYukina)!
+- [#666](https://github.com/liam-hq/liam/pull/666) - 🐛 fix: ONE_TO_ONE cardinality inconsistency between left and right / Thanks [@kumanoayumi](https://github.com/kumanoayumi)!
+
## 0.0.24
### Patch Changes
diff --git a/frontend/packages/erd-core/package.json b/frontend/packages/erd-core/package.json
index f9f3c2f1..bf579f74 100644
--- a/frontend/packages/erd-core/package.json
+++ b/frontend/packages/erd-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@liam-hq/erd-core",
- "version": "0.0.24",
+ "version": "0.0.0-next-20250205091437",
"type": "module",
"publishConfig": {
"access": "public"
diff --git a/frontend/packages/ui/CHANGELOG.md b/frontend/packages/ui/CHANGELOG.md
index fa8c50f2..4690cc96 100644
--- a/frontend/packages/ui/CHANGELOG.md
+++ b/frontend/packages/ui/CHANGELOG.md
@@ -1,5 +1,11 @@
# @liam-hq/ui
+## 0.0.0-next-20250205091437
+
+### Patch Changes
+
+- [#666](https://github.com/liam-hq/liam/pull/666) - 🐛 fix: ONE_TO_ONE cardinality inconsistency between left and right / Thanks [@kumanoayumi](https://github.com/kumanoayumi)!
+
## 0.0.11
### Patch Changes
diff --git a/frontend/packages/ui/package.json b/frontend/packages/ui/package.json
index 1b5ed87c..df17c459 100644
--- a/frontend/packages/ui/package.json
+++ b/frontend/packages/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@liam-hq/ui",
- "version": "0.0.11",
+ "version": "0.0.0-next-20250205091437",
"publishConfig": {
"access": "public"
},
ref: https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can now be executed successfully!
❯ pnpm changeset publish --no-git-tag --snapshot
🦋 warn ===============================IMPORTANT!===============================
🦋 warn You are in prerelease mode so packages will be published to the next
🦋 warn dist tag except for packages that have not had normal releases which will be published to latest
🦋 warn ----------------------------------------------------------------------
🦋 info npm info @liam-hq/cli
🦋 info npm info @liam-hq/db-structure
🦋 info npm info @liam-hq/erd-core
🦋 info npm info @liam-hq/ui
🦋 info @liam-hq/cli is being published because our local version (0.0.0-next-20250205094432) has not been published on npm
🦋 info @liam-hq/db-structure is being published because our local version (0.0.0-next-20250205094432) has not been published on npm
🦋 warn @liam-hq/erd-core is not being published because version 0.0.0-next-20250205093225 is already published on npm
🦋 warn @liam-hq/ui is not being published because version 0.0.0-next-20250205093225 is already published on npm
🦋 info Publishing "@liam-hq/cli" at "0.0.0-next-20250205094432"
🦋 info Publishing "@liam-hq/db-structure" at "0.0.0-next-20250205094432"
🦋 info This operation requires a one-time password from your authenticator.
🦋 Enter one-time password: · 154921
🦋 success packages published successfully:
🦋 @liam-hq/[email protected]
🦋 @liam-hq/[email protected]
❯ cd /tmp/work1
❯ docker run --rm -it -v $(pwd):/app -w /app node:20-bullseye bash
root@68eda61bfe1b:/app# npm i -g @liam-hq/[email protected]
added 218 packages in 11s
19 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.1.0
npm notice To update run: npm install -g [email protected]
npm notice
root@68eda61bfe1b:/app# liam --version
0.0.0-next-20250205094432
root@68eda61bfe1b:/app# liam erd
Usage: liam erd [options] [command]
ERD commands
Options:
-h, --help display help for command
Commands:
build [options] Build ERD html assets
help [command] display help for command
root@68eda61bfe1b:/app# liam erd build --input https://github.com/mastodon/mastodon/blob/main/db/schema.rb --format schemarb
(node:53) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
ERD has been generated successfully in the `dist/` directory.
Note: You cannot open this file directly using `file://`.
Please serve the `dist/` directory with an HTTP server and access it via `http://`.
Example:
$ npx http-server dist/
root@68eda61bfe1b:/app# ls
dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the CI issue is resolved, I will send a re-review request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description was also rewritten. Please review! @hoshinotsuyoshi
@@ -59,7 +59,6 @@ Please try to create bug reports that are: | |||
4. **Write a clear and concise changeset description** | |||
- If your changes include modifications to any packages within the `frontend/packages` directory: | |||
- Use `pnpm changeset` at the top level of this project. | |||
- **Always select the @liam-hq/cli package**, in addition to any other modified packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I want to do this time is to delete this line.
"gen": "pnpm run '/^gen:.*/'", | ||
"gen:cp-prism": "cp node_modules/@ruby/prism/src/prism.wasm src/parser/schemarb/prism.wasm", | ||
"gen:gen-tbls-schema": "node scripts/tblsJsonSchemaToZod.mjs", | ||
"lint": "pnpm run '/^lint:.*/'", | ||
"lint:biome": "biome check .", | ||
"lint:tsc": "tsc --noEmit", | ||
"postinstall": "pnpm run '/^postinstall:.*/'", | ||
"postinstall:cp-prism": "cp node_modules/@ruby/prism/src/prism.wasm src/parser/schemarb/prism.wasm", | ||
"postinstall:gen-tbls-schema": "node scripts/tblsJsonSchemaToZod.mjs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If postinstall is set up, it will also be executed when downloading via npm.
Since this is a development use, I changed it to the gen command.
gen
is automatically executed by turborepo when necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still reviewing, but I wanted to quickly share one thing I noticed. 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
@MH4GF please check LISENCE comment #673 (comment)
"gen": "pnpm run '/^gen:.*/'", | ||
"gen:cp-prism": "cp node_modules/@ruby/prism/src/prism.wasm src/parser/schemarb/prism.wasm", | ||
"gen:gen-tbls-schema": "node scripts/tblsJsonSchemaToZod.mjs", | ||
"lint": "pnpm run '/^lint:.*/'", | ||
"lint:biome": "biome check .", | ||
"lint:tsc": "tsc --noEmit", | ||
"postinstall": "pnpm run '/^postinstall:.*/'", | ||
"postinstall:cp-prism": "cp node_modules/@ruby/prism/src/prism.wasm src/parser/schemarb/prism.wasm", | ||
"postinstall:gen-tbls-schema": "node scripts/tblsJsonSchemaToZod.mjs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested. good!
- ✔️
GITHUB_TOKEN=$(gh auth token) pnpm changeset version
- ✔️
git clean -fdx && asdf local nodejs 22.11.0 && pnpm i && pnpm dev
- (asdf local nodejs 22.11.0
is specific to my local setup 🙏 ) - ✔️
docker run --rm -it node:20-bullseye npx @liam-hq/[email protected] --version
worked
@hoshinotsuyoshi Thank you for your review! |
Description
The format of changeset has been changed.
And, We will also publish internal packages. Please check this thread: #673 (comment)
FIXME
It was not possible for changeset to read in changes under grandchildren(transitive dependency).
Specifically, the dependency of
cli → erd-core → ui
prevents ui changes from being included in the cli changelog.But it's not a big problem, so we'll let it go for now.
Testing
GITHUB_TOKEN=$(gh auth token) pnpm changeset version