Skip to content

Conversation

@manuelleduc
Copy link
Contributor

@manuelleduc manuelleduc commented Nov 18, 2025

@manuelleduc manuelleduc self-assigned this Nov 18, 2025

# Update the version with jq on the temp file, and replace the original file with the patch version if no
# problem was encountered.
if ! jq ".version = \"$version\"" "$pkg_path" > "$temp_file"; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The script relied on jq to manipulate json files.
This tool is currently not installed on the release machine, so there is likely something to change to make it available.

Copy link
Member

Choose a reason for hiding this comment

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

Well, just needs to be installed, I guess. I think it's not the first non installed by default tool we are using in this script (even if we usually try to avoid it).

while IFS= read -r pkg_path; do

## private or unnamed packages are skipped
is_skipped=$(jq -r '.private' "$pkg_path")
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'm making sure that all existing packages.json files, that are not meant to be published, are private so that this script doesn't impact the release process of LTS branches?

echo -e "\033[0;32m* Update packages to ${NEXT_SNAPSHOT_VERSION} after release\033[0m"
set_packages_version $NEXT_SNAPSHOT_VERSION
git add .
git commit -m "[release] Update packages after release ${TAG_NAME}" -q
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On LTS branches, set_packages_version will not change any file.
Therefore, git add/commit won't have side effects except for a no changes added to commit message in the log.
Sounds fine to me, but let me know if you see an issue with that.

Copy link
Member

Choose a reason for hiding this comment

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

It's not clear to me why there is a difference between LTS branches and latest branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LTS branches don't contain packages that we want to publish on npm registries.
This new packages.json version patching is only useful for packages we want to publish.
Basically I aim to avoid noise with useless changes in LTS branches.

Copy link
Member

Choose a reason for hiding this comment

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

LTS branches don't contain packages that we want to publish on npm registries.

Well, I still don't understand why. Shouldn't we publish bugfix releases ?

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 expressed myself badly, I don't want to have an impact on versions prior to v18.* (where I introduced the first packages we want to publish). Regardless of the branch, version 18+ will see their package versions updated.

Copy link
Member

Choose a reason for hiding this comment

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

OK, I doubt that log is a big problem, nobody is looking at it anyway :)

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