Skip to content

Commit

Permalink
chore(deps): update dependency lerna to v7 (#554)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency lerna to v7

* Migrate scripts to use lerna 7 and update ci yaml

* update docs as well

---------

Co-authored-by: Aaron Abbott <[email protected]>
  • Loading branch information
renovate-bot and aabmass authored Jun 23, 2023
1 parent 37f91b2 commit 9f7eaa9
Show file tree
Hide file tree
Showing 8 changed files with 6,754 additions and 8,544 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# TODO: remove once node 14 is dropped
- name: Upgrade to latest npm to support lockfile v2
run: npm install -g npm@${{ matrix.npm-version }}
- run: npm install --ignore-scripts
- run: npx lerna bootstrap --no-ci
- run: npm install
- run: npm test
- run: npm run codecov
if: matrix.node == 19
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-e2e-cloud-functions-gen2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
# bootstrap and compile only the packages needed for e2e test server
npm install --workspace=./e2e-test-server
npx lerna@^6 run compile --scope=@google-cloud/e2e-test-server --include-dependencies
npx lerna@^7 run compile --scope=@google-cloud/e2e-test-server --include-dependencies
# builds a small self contained bundle with @vercel/ncc under dist/
cd e2e-test-server
Expand Down
6 changes: 1 addition & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,4 @@ Guidelines](https://opensource.google/conduct/).

## Running the tests

The command `npm test` tests code the same way that our CI will test it.
This is a convenience command for a number of steps, which can run separately if needed:

- `npm run compile` compiles the code, checking for type errors.
- `npm run bootstrap` Bootstrap the packages in the current Lerna repo. Installs all of their dependencies and links any cross-dependencies.
After checking out the repo, run `npm install`. Then run `npm test` to test code the same way that our CI will test it.
2 changes: 1 addition & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ are not, re-run the command without `--conventional-commits` and lerna will
interactively ask you to input the correct bumps. You may need to do this when
first releasing a 0.X package as 1.0.0.

## Run `npm install`
## Run `npm install && npm run compile`

Don't forget this step! This will build everything and regenerate the
`src/version.ts` files in each subpackage.
Expand Down
2 changes: 1 addition & 1 deletion e2e-test-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FROM node-base as build-base
COPY . ./
# bootstrap and compile only the packages needed for e2e test server
RUN npm install --workspace=./e2e-test-server
RUN npx lerna@^6 run compile --scope=@google-cloud/e2e-test-server --include-dependencies
RUN npx lerna@^7 run compile --scope=@google-cloud/e2e-test-server --include-dependencies
# builds a small self contained bundle with @vercel/ncc under dist/
RUN cd e2e-test-server && npm run bundle

Expand Down
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"packages": ["packages/*", "samples/*", "e2e-test-server"],
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"ignoreChanges": ["**/test/**", "**/*.md", "**/package-lock.json"],
"version": "independent",
"useWorkspaces": true,
"command": {
"publish": {
"registry": "https://wombat-dressing-room.appspot.com"
Expand Down
Loading

0 comments on commit 9f7eaa9

Please sign in to comment.