Skip to content
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

chore: Upgrade to Lerna v7 #12605

Merged
merged 7 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/push-preid-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
push:
branches:
# Change this to your branch name where "example-preid" corresponds to the preid you want your changes released on
- feat/example-preid-branch/main
- chore/lerna-v7

jobs:
e2e:
Expand All @@ -26,13 +26,13 @@ jobs:
outputs:
preid: ${{ steps.output_preid.outputs.preid }}

preid-release:
needs:
- e2e
- parse-preid
secrets: inherit
uses: ./.github/workflows/callable-npm-publish-preid.yml
# The preid should be detected from the branch name recommending feat/{PREID}/whatever as branch naming pattern
# if your branch doesn't follow this pattern, you can override it here for your branch.
with:
preid: ${{ needs.parse-preid.outputs.preid }}
# preid-release:
# needs:
# - e2e
# - parse-preid
# secrets: inherit
# uses: ./.github/workflows/callable-npm-publish-preid.yml
# # The preid should be detected from the branch name recommending feat/{PREID}/whatever as branch naming pattern
# # if your branch doesn't follow this pattern, you can override it here for your branch.
# with:
# preid: ${{ needs.parse-preid.outputs.preid }}
24 changes: 0 additions & 24 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lerna v7 will defer entirely to the Yarn workspace configuration.

"packages/core",
"packages/auth",
"packages/analytics",
"packages/predictions",
"packages/storage",
"packages/aws-amplify",
"packages/adapter-nextjs",
"packages/geo",
"packages/api",
"packages/api-rest",
"packages/api-graphql",
"packages/datastore",
"packages/datastore-storage-adapter",
"packages/interactions",
"packages/pubsub",
"packages/rtn-web-browser",
"packages/notifications",
"packages/rtn-push-notification",
"packages/react-native",
"packages/react-native/example",
"scripts/tsc-compliance-test"
],
"exact": true,
"version": "independent",
"useNx": false,
Expand Down
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,26 @@
"ts-coverage": "lerna run ts-coverage",
"prepare": "./scripts/set-preid-versions.sh"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"workspaces": {
"packages": [
"packages/core",
"packages/auth",
"packages/analytics",
"packages/predictions",
"packages/storage",
"packages/aws-amplify",
"packages/adapter-nextjs",
"packages/geo",
"packages/api",
"packages/api-rest",
"packages/api-graphql",
"packages/api",
"packages/datastore",
"packages/datastore-storage-adapter",
"packages/interactions",
"packages/pubsub",
"packages/rtn-web-browser",
"packages/notifications",
"packages/rtn-push-notification",
"packages/aws-amplify",
"packages/rtn-web-browser",
"packages/react-native",
"packages/react-native/example",
"scripts/tsc-compliance-test"
Expand All @@ -84,6 +79,7 @@
"@babel/core": "7.17.2",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@lerna/legacy-package-management": "^7.4.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required to support the bootstrap command as described here: https://lerna.js.org/docs/legacy-package-management#temporarily-polyfilling-legacy-package-management-commands

Long term, we'll want to migrate to Yarn 2 or 3 and entirely use the Yarn workspace feature.

"@size-limit/dual-publish": "^8.1.0",
"@size-limit/file": "^8.1.0",
"@size-limit/webpack": "^8.1.0",
Expand All @@ -96,14 +92,12 @@
"babel-loader": "^8.3.0",
"codecov": "^3.6.5",
"glob": "^10.3.10",
"husky": "^3.0.5",
"jest": "^24.x.x",
"jest-config": "24.8.0",
"json-loader": "^0.5.7",
"lerna": "^6.6.1",
"lerna": "^7.4.2",
"license-check-and-add": "^4.0.5",
"prettier": "^2.4.1",
"pretty-quick": "^1.11.1",
"rimraf": "^2.6.2",
"rollup": "^0.67.4",
"rollup-plugin-commonjs": "^9.2.0",
Expand Down
Loading
Loading