Skip to content

Commit 0b063b0

Browse files
fix(workspace): migrate nx
1 parent 2df8c1c commit 0b063b0

File tree

14 files changed

+118
-42023
lines changed

14 files changed

+118
-42023
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ testem.log
3939
.DS_Store
4040
Thumbs.db
4141

42-
.nx/cache
42+
.nx
4343

4444
.env
4545
.code-pushup

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/dist
44
/coverage
55

6-
/.nx/cache
6+
/.nx/cache
7+
/.nx/workspace-data

global-setup.e2e.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import startLocalRegistry from './tools/scripts/start-local-registry';
33
import stopLocalRegistry from './tools/scripts/stop-local-registry';
44

55
export async function setup() {
6+
console.log('Starting local registry...');
67
await startLocalRegistry();
78
execSync('npm install -D @push-based/[email protected]');
89
}
910

1011
export async function teardown() {
12+
console.log('Teardown registry')
1113
stopLocalRegistry();
1214
execSync('npm uninstall @push-based/user-flow');
1315
}

migrations.json

+58-88
Original file line numberDiff line numberDiff line change
@@ -2,126 +2,96 @@
22
"migrations": [
33
{
44
"cli": "nx",
5-
"version": "16.6.0-beta.6",
6-
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
7-
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
5+
"version": "17.3.0-beta.6",
6+
"description": "Updates the nx wrapper.",
7+
"implementation": "./src/migrations/update-17-3-0/update-nxw",
88
"package": "nx",
9-
"name": "16.6.0-prefix-outputs"
9+
"name": "17.3.0-update-nx-wrapper"
1010
},
1111
{
1212
"cli": "nx",
13-
"version": "16.8.0-beta.3",
14-
"description": "Escape $ in env variables",
15-
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
13+
"version": "18.0.0-beta.2",
14+
"description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
15+
"implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
16+
"x-repair-skip": true,
1617
"package": "nx",
17-
"name": "16.8.0-escape-dollar-sign-env"
18+
"name": "18.0.0-disable-adding-plugins-for-existing-workspaces"
1819
},
1920
{
20-
"cli": "nx",
21-
"version": "17.0.0-beta.1",
22-
"description": "Updates the default cache directory to .nx/cache",
23-
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
21+
"version": "18.1.0-beta.3",
22+
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
23+
"implementation": "./src/migrations/update-17-2-0/move-default-base",
2424
"package": "nx",
25-
"name": "17.0.0-move-cache-directory"
25+
"name": "move-default-base-to-nx-json-root"
2626
},
2727
{
2828
"cli": "nx",
29-
"version": "17.0.0-beta.3",
30-
"description": "Use minimal config for tasksRunnerOptions",
31-
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
32-
"package": "nx",
33-
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
34-
},
35-
{
36-
"version": "17.0.0-rc.1",
37-
"description": "Migration for v17.0.0-rc.1",
38-
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
29+
"version": "19.2.0-beta.2",
30+
"description": "Updates the default workspace data directory to .nx/workspace-data",
31+
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
3932
"package": "nx",
40-
"name": "rm-default-collection-npm-scope"
33+
"name": "19-2-0-move-graph-cache-directory"
4134
},
4235
{
4336
"cli": "nx",
44-
"version": "16.5.0-beta.2",
45-
"description": "Add test-setup.ts to ignored files in production input",
46-
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
47-
"package": "@nx/jest",
48-
"name": "add-test-setup-to-inputs-ignore"
37+
"version": "19.2.2-beta.0",
38+
"description": "Updates the nx wrapper.",
39+
"implementation": "./src/migrations/update-17-3-0/update-nxw",
40+
"package": "nx",
41+
"name": "19-2-2-update-nx-wrapper"
4942
},
5043
{
51-
"version": "17.1.0-beta.2",
52-
"description": "Move jest executor options to nx.json targetDefaults",
53-
"implementation": "./src/migrations/update-17-1-0/move-options-to-target-defaults",
54-
"package": "@nx/jest",
55-
"name": "move-options-to-target-defaults"
44+
"version": "19.2.4-beta.0",
45+
"description": "Set project name in nx.json explicitly",
46+
"implementation": "./src/migrations/update-19-2-4/set-project-name",
47+
"x-repair-skip": true,
48+
"package": "nx",
49+
"name": "19-2-4-set-project-name"
5650
},
5751
{
58-
"cli": "nx",
59-
"version": "16.4.0-beta.10",
60-
"description": "Remove tsconfig.e2e.json and add settings to project tsconfig.json. tsConfigs executor option is now deprecated. The project level tsconfig.json file should be used instead.",
61-
"implementation": "./src/migrations/update-16-4-0/tsconfig-sourcemaps",
62-
"package": "@nx/cypress",
63-
"name": "update-16-3-0-remove-old-tsconfigs"
52+
"version": "19.6.0-beta.0",
53+
"description": "Add dependsOn: [build] to preview targets using preview-server",
54+
"implementation": "./src/migrations/update-19-6-0/add-depends-on-for-preview",
55+
"package": "@nx/vite",
56+
"name": "update-19-6-0-add-depends-on-for-preview-server"
6457
},
6558
{
66-
"cli": "nx",
67-
"version": "16.8.0-beta.4",
68-
"description": "Update to Cypress v13. Most noteable change is video recording is off by default. This migration will only update if the workspace is already on Cypress v12. https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-130",
69-
"implementation": "./src/migrations/update-16-8-0/cypress-13",
70-
"package": "@nx/cypress",
71-
"name": "update-16-8-0-cypress-13"
59+
"version": "17.2.0-beta.0",
60+
"description": "Simplify eslintFilePatterns",
61+
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
62+
"package": "@nx/eslint",
63+
"name": "simplify-eslint-patterns"
7264
},
7365
{
74-
"cli": "nx",
75-
"version": "16.9.0-beta.1",
76-
"description": "Replace imports of Module Federation utils frm @nx/devkit to @nx/webpack",
77-
"implementation": "./src/migrations/update-16-9-0/migrate-mf-util-usage",
78-
"package": "@nx/devkit",
79-
"name": "update-16-9-0-migrate-mf-usage-to-webpack"
66+
"version": "17.2.9",
67+
"description": "Move executor options to target defaults",
68+
"implementation": "./src/migrations/update-17-2-9/move-options-to-target-defaults",
69+
"package": "@nx/eslint",
70+
"name": "move-options-to-target-defaults"
8071
},
8172
{
8273
"cli": "nx",
83-
"version": "16.6.0-beta.0",
84-
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
85-
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
86-
"package": "@nx/js",
87-
"name": "explicitly-set-projects-to-update-buildable-deps"
74+
"version": "17.2.6-beta.1",
75+
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
76+
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
77+
"package": "@nx/eslint-plugin",
78+
"name": "update-17-2-6-rename-workspace-rules"
8879
},
8980
{
9081
"cli": "nx",
91-
"version": "16.8.2-beta.0",
92-
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
93-
"factory": "./src/migrations/update-16-8-2/update-swcrc",
94-
"package": "@nx/js",
95-
"name": "16-8-2-update-swcrc"
82+
"version": "19.1.0-beta.6",
83+
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
84+
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
85+
"package": "@nx/eslint-plugin",
86+
"name": "update-19-1-0-rename-no-extra-semi"
9687
},
9788
{
9889
"cli": "nx",
99-
"version": "17.0.2",
100-
"description": "Remove deprecated build options",
101-
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
102-
"package": "@nx/js",
103-
"name": "update-17-0-0-remove-deprecated-build-options"
104-
},
105-
{
106-
"version": "16.8.0",
107-
"description": "update-16-8-0-add-ignored-files",
108-
"implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
109-
"package": "@nx/eslint",
110-
"name": "update-16-8-0-add-ignored-files"
111-
},
112-
{
113-
"version": "17.0.0-beta.7",
114-
"description": "update-17-0-0-rename-to-eslint",
115-
"implementation": "./src/migrations/update-17-0-0-rename-to-eslint/update-17-0-0-rename-to-eslint",
116-
"package": "@nx/eslint",
117-
"name": "update-17-0-0-rename-to-eslint"
118-
},
119-
{
120-
"version": "17.1.0-beta.1",
121-
"description": "Updates for @typescript-utils/utils v6.9.1+",
122-
"implementation": "./src/migrations/update-17-1-0/update-typescript-eslint",
123-
"package": "@nx/eslint",
124-
"name": "update-typescript-eslint"
90+
"version": "17.2.1-beta.0",
91+
"description": "Add webpack.config.js file when webpackConfig is not defined",
92+
"implementation": "./src/migrations/update-17-2-1/webpack-config-setup",
93+
"package": "@nx/webpack",
94+
"name": "update-17-2-1-webpack-config-setup"
12595
}
12696
]
12797
}

nx.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "nx/presets/core.json",
3-
"affected": {
4-
"defaultBase": "origin/main"
5-
},
63
"pluginsConfig": {
74
"@nx/js": {
85
"analyzeSourceFiles": true
@@ -47,6 +44,10 @@
4744
"@nx/vite:test": {
4845
"cache": true,
4946
"inputs": ["default", "^production"]
47+
},
48+
"@nx/eslint:lint": {
49+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
50+
"cache": true
5051
}
5152
},
5253
"generators": {
@@ -60,5 +61,7 @@
6061
"targetName": "user-flow"
6162
}
6263
},
63-
"nxCloudAccessToken": "MDlmODg4OTQtYWVlZC00OGVkLTgyMjktMDc3OWQ5ZjU1ZTAxfHJlYWQtd3JpdGU="
64+
"nxCloudAccessToken": "MDlmODg4OTQtYWVlZC00OGVkLTgyMjktMDc3OWQ5ZjU1ZTAxfHJlYWQtd3JpdGU=",
65+
"useInferencePlugins": false,
66+
"defaultBase": "origin/main"
6467
}

0 commit comments

Comments
 (0)