Skip to content

Commit 4710a22

Browse files
authored
chore: update to latest nx and lerna (#7019)
1 parent a9cf44b commit 4710a22

File tree

20 files changed

+919
-357
lines changed

20 files changed

+919
-357
lines changed

.github/renovate.json5

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
'ts-node',
1313
// the nx packages get updated using the nx migrate CLI
1414
'@nrwl/cli',
15+
'@nx/cli',
1516
'@nrwl/devkit',
17+
'@nx/devkit',
1618
'@nrwl/jest',
19+
'@nx/jest',
1720
'@nrwl/nx-cloud',
21+
'nx-cloud',
1822
'@nrwl/tao',
23+
'@nx/tao',
1924
// TODO - once we bump pass the major, we can remove these. Currently renovate is creating broken, immortal PRs
2025
'@rollup/plugin-babel',
2126
'@rollup/plugin-commonjs',

.github/workflows/nx-migrate.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This workflow is used to augment the capabilities of the renovate GitHub app by running a full
2-
# `nx migrate` when renovate opens a PR to change the version of @nrwl/workspace.
2+
# `nx migrate` when renovate opens a PR to change the version of @nx/workspace.
33
#
44
# You will therefore also notice that in the renovate configuration, we ignore any packages which
5-
# Nx will manage for us as part of `nx migrate` such as the remaining @nrwl/* packages and jest.
5+
# Nx will manage for us as part of `nx migrate` such as the remaining @nx/* packages and jest.
66

77
name: Nx Migrate
88

@@ -33,12 +33,12 @@ jobs:
3333
- name: Derive appropriate SHAs for base and head for `nx affected` commands
3434
uses: nrwl/nx-set-shas@v3
3535

36-
- name: Check if @nrwl/workspace was changed as part of the latest commit on the PR
36+
- name: Check if @nx/workspace was changed as part of the latest commit on the PR
3737
id: nrwl-workspace-package-check
3838
run: |
39-
git diff HEAD~1 -G"@nrwl/workspace" --exit-code package.json && echo "@nrwl/workspace unchanged" || echo "::set-output name=was-changed::true"
39+
git diff HEAD~1 -G"@nx/workspace" --exit-code package.json && echo "@nx/workspace unchanged" || echo "::set-output name=was-changed::true"
4040
41-
- name: Run nx migrate if @nrwl/workspace changed and commit the results
41+
- name: Run nx migrate if @nx/workspace changed and commit the results
4242
if: ${{ steps.nrwl-workspace-package-check.outputs.was-changed == 'true' }}
4343
env:
4444
# We cannot use secrets.GITHUB_TOKEN for this because it is not permitted to kick off subsequent actions worfklow runs, so we use a PAT instead
@@ -50,14 +50,14 @@ jobs:
5050
gh pr checkout ${{ github.event.pull_request.number }}
5151
5252
# Get the version of Nx we are migrating to
53-
NX_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@nrwl/workspace'])")
53+
NX_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@nx/workspace'])")
5454
5555
# Revert renovate's changes to package.json and yarn.lock so that it is a clean migrate from the status quo
5656
git checkout HEAD~1 -- package.json yarn.lock
5757
5858
yarn --ignore-scripts
5959
60-
npx nx migrate @nrwl/workspace@$NX_VERSION
60+
npx nx migrate @nx/workspace@$NX_VERSION
6161
6262
# Sometimes Nx can require config formatting changes after a migrate command
6363
yarn --ignore-scripts
@@ -81,5 +81,5 @@ jobs:
8181
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
8282
8383
git add --all
84-
git commit -m "chore: run nx migrate for @nrwl/workspace v$NX_VERSION"
84+
git commit -m "chore: run nx migrate for @nx/workspace v$NX_VERSION"
8585
git push

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { getJestProjects } = require('@nrwl/jest');
1+
const { getJestProjects } = require('@nx/jest');
22

33
module.exports = {
44
projects: getJestProjects(),

lerna.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"version": "5.59.8",
33
"npmClient": "yarn",
4-
"useWorkspaces": true,
54
"stream": true
65
}

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"npmScope": "typescript-eslint",
44
"tasksRunnerOptions": {
55
"default": {
6-
"runner": "@nrwl/nx-cloud",
6+
"runner": "nx-cloud",
77
"options": {
88
"cacheableOperations": ["build", "lint", "package", "prebuild", "test"],
99
"accessToken": "YjIzMmMxMWItMjhiMS00NWY2LTk1NWYtYWU3YWQ0YjE4YjBlfHJlYWQ="

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@
5454
"@babel/eslint-parser": "^7.19.1",
5555
"@babel/parser": "^7.21.2",
5656
"@babel/types": "^7.20.2",
57-
"@nrwl/jest": "15.7.2",
58-
"@nrwl/nx-cloud": "15.0.3",
59-
"@nrwl/workspace": "15.7.2",
57+
"@nx/jest": "16.2.2",
58+
"@nx/linter": "16.2.2",
59+
"@nx/workspace": "16.2.2",
6060
"@swc/core": "^1.3.1",
6161
"@swc/jest": "^0.2.21",
6262
"@types/babel__code-frame": "^7.0.3",
6363
"@types/debug": "^4.1.7",
6464
"@types/eslint-visitor-keys": "^1.0.0",
6565
"@types/glob": "^8.0.0",
6666
"@types/is-glob": "^4.0.2",
67-
"@types/jest": "^29.0.2",
67+
"@types/jest": "29.4.4",
6868
"@types/jest-specific-snapshot": "^0.5.5",
6969
"@types/lodash": "^4.14.182",
7070
"@types/marked": "^4.0.3",
@@ -90,16 +90,17 @@
9090
"execa": "5.1.1",
9191
"glob": "^8.0.1",
9292
"husky": "^8.0.1",
93-
"jest": "^29.0.3",
93+
"jest": "29.4.3",
9494
"jest-diff": "^29.0.3",
9595
"jest-snapshot": "^29.0.3",
9696
"jest-specific-snapshot": "^8.0.0",
97-
"lerna": "6.6.2",
97+
"lerna": "7.0.0-alpha.3",
9898
"lint-staged": "^13.0.0",
9999
"make-dir": "^3.1.0",
100100
"markdownlint-cli": "^0.33.0",
101101
"ncp": "^2.0.0",
102-
"nx": "15.7.2",
102+
"nx": "16.2.2",
103+
"nx-cloud": "16.0.5",
103104
"patch-package": "^6.4.7",
104105
"prettier": "2.8.1",
105106
"pretty-format": "^29.0.3",

packages/ast-spec/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"outputs": ["{projectRoot}/dist/**/*.ts"]
1414
},
1515
"lint": {
16-
"executor": "@nrwl/linter:eslint",
16+
"executor": "@nx/linter:eslint",
1717
"outputs": ["{options.outputFile}"],
1818
"options": {
1919
"lintFilePatterns": ["packages/ast-spec/**/*.ts"]

packages/eslint-plugin-internal/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"implicitDependencies": [],
66
"targets": {
77
"lint": {
8-
"executor": "@nrwl/linter:eslint",
8+
"executor": "@nx/linter:eslint",
99
"outputs": ["{options.outputFile}"],
1010
"options": {
1111
"lintFilePatterns": ["packages/eslint-plugin-internal/**/*.ts"]

packages/eslint-plugin-tslint/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"implicitDependencies": [],
66
"targets": {
77
"lint": {
8-
"executor": "@nrwl/linter:eslint",
8+
"executor": "@nx/linter:eslint",
99
"outputs": ["{options.outputFile}"],
1010
"options": {
1111
"lintFilePatterns": ["packages/eslint-plugin-tslint/**/*.ts"]

packages/eslint-plugin/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"implicitDependencies": [],
66
"targets": {
77
"lint": {
8-
"executor": "@nrwl/linter:eslint",
8+
"executor": "@nx/linter:eslint",
99
"outputs": ["{options.outputFile}"],
1010
"options": {
1111
"lintFilePatterns": ["packages/eslint-plugin/**/*.ts"]

0 commit comments

Comments
 (0)