Skip to content

Commit

Permalink
Tbonnin/package version (#1767)
Browse files Browse the repository at this point in the history
## Describe your changes

We ran several times into a situation where `shared` version was not
upgraded properly when publishing a new version.
I (Thomas) suspect the -w option might be buggy and causes some of the
packages not to upgrade the shared version properly.
This commit gets rid of the -w option in favor of navigating into the
package folder and running npm install there directly.
I am not sure this would fix our problem but it is worth trying imho
  • Loading branch information
TBonnin committed Mar 1, 2024
1 parent ed415b8 commit d7cf723
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/persist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "SEE LICENSE IN LICENSE FILE IN GIT REPOSITORY",
"dependencies": {
"@nangohq/shared": "^0.38.0",
"@nangohq/shared": "^0.38.5",
"dd-trace": "5.2.0",
"express": "^4.18.2",
"zod": "^3.22.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@aws-sdk/client-s3": "^3.348.0",
"@datadog/datadog-api-client": "^1.16.0",
"@hapi/boom": "^10.0.1",
"@nangohq/node": "^0.37.26",
"@nangohq/node": "^0.38.5",
"@sentry/node": "^7.37.2",
"@temporalio/client": "^1.9.1",
"amqplib": "^0.10.3",
Expand Down
12 changes: 10 additions & 2 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# exit when any command fails
set -e
set -x

# function to bump and publish a package
# $1: package name
Expand Down Expand Up @@ -29,16 +30,23 @@ npm install

# Node client
bump_and_npm_publish "@nangohq/node" "$VERSION"
npm install "@nangohq/node@$VERSION" -w @nangohq/shared
pushd "./packages/shared"; npm install "@nangohq/node@$VERSION"; popd;

# Shared
node scripts/flows.js
bump_and_npm_publish "@nangohq/shared" "$VERSION"
npm install "@nangohq/shared@$VERSION" -w nango -w @nangohq/nango-server -w @nangohq/nango-jobs -w @nangohq/nango-runner -w @nangohq/persist
# Update all packages to use the new shared version
package_dirs=("cli" "server" "runner" "jobs" "persist")
for dir in "${package_dirs[@]}"; do
pushd "./packages/$dir"; npm install "@nangohq/shared@$VERSION"; popd;
done

# CLI
bump_and_npm_publish "nango" "$VERSION"

# Frontend
bump_and_npm_publish "@nangohq/frontend" "$VERSION"
pushd ./packages/webapp; npm install "@nangohq/frontend@$VERSION"; popd

# DEBUG: show changes in CI
git diff

0 comments on commit d7cf723

Please sign in to comment.