Skip to content

Commit 0911372

Browse files
feat: add nx 20.x support
BREAKING CHANGE: migrate nx workspace to 20.x re #253
1 parent 95cd71e commit 0911372

File tree

23 files changed

+696
-410
lines changed

23 files changed

+696
-410
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ reports/
4343

4444
.nx/cache
4545
.nx/workspace-data
46+
47+
vite.config.*.timestamp*

migrations.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"migrations": [
3+
{
4+
"version": "20.0.0-beta.7",
5+
"description": "Migration for v20.0.0-beta.7",
6+
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
7+
"package": "nx",
8+
"name": "move-use-daemon-process"
9+
},
10+
{
11+
"version": "20.0.1",
12+
"description": "Set `useLegacyCache` to true for migrating workspaces",
13+
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
14+
"x-repair-skip": true,
15+
"package": "nx",
16+
"name": "use-legacy-cache"
17+
},
18+
{
19+
"version": "20.0.4-beta.0",
20+
"description": "Add gitignore entry for temporary vite config files.",
21+
"implementation": "./src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore",
22+
"package": "@nx/vite",
23+
"name": "update-20-0-4"
24+
},
25+
{
26+
"version": "20.0.6-beta.0",
27+
"description": "Add gitignore entry for temporary vite config files and remove previous incorrect glob.",
28+
"implementation": "./src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore",
29+
"package": "@nx/vite",
30+
"name": "update-20-0-6"
31+
}
32+
]
33+
}

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646
"!{projectRoot}/src/test-setup.[jt]s",
4747
"!{projectRoot}/test-setup.[jt]s"
4848
]
49-
}
49+
},
50+
"useLegacyCache": true
5051
}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
"@commitlint/config-conventional": "^19.2.2",
1313
"@commitlint/cz-commitlint": "^19.4.0",
1414
"@commitlint/types": "^19.0.3",
15-
"@nx/devkit": "19.7.3",
16-
"@nx/eslint": "19.7.3",
17-
"@nx/eslint-plugin": "19.7.3",
18-
"@nx/js": "19.7.3",
19-
"@nx/plugin": "19.7.3",
20-
"@nx/vite": "19.7.3",
21-
"@nx/web": "19.7.3",
22-
"@nx/workspace": "19.7.3",
15+
"@nx/devkit": "20.1.2",
16+
"@nx/eslint": "20.1.2",
17+
"@nx/eslint-plugin": "20.1.2",
18+
"@nx/js": "20.1.2",
19+
"@nx/plugin": "20.1.2",
20+
"@nx/vite": "20.1.2",
21+
"@nx/web": "20.1.2",
22+
"@nx/workspace": "20.1.2",
2323
"@semantic-release/changelog": "^6.0.3",
2424
"@semantic-release/exec": "^6.0.3",
2525
"@semantic-release/git": "^10.0.1",
@@ -46,7 +46,7 @@
4646
"jsonc-eslint-parser": "^2.4.0",
4747
"lint-staged": "^15.2.2",
4848
"memfs": "^4.11.1",
49-
"nx": "19.7.3",
49+
"nx": "20.1.2",
5050
"nx-cloud": "19.1.0",
5151
"prettier": "^3.2.5",
5252
"semantic-release-npm": "^0.0.5",

packages/data-migration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"tslib": "^2.3.0",
20-
"@nx/devkit": "^19.0.0",
20+
"@nx/devkit": "^20.0.0",
2121
"glob": "^10.2.6",
2222
"@aws-sdk/client-dynamodb": "^3.525.0",
2323
"@aws-sdk/client-dynamodb-streams": "^3.525.0",

packages/data-migration/src/generators/migration/generator.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('migration generator', () => {
3737
await libraryGenerator(appTree, {
3838
name: 'test',
3939
tags: 'scope:test,type:lib',
40+
directory: 'libs/test',
4041
});
4142

4243
vi.useFakeTimers().setSystemTime(new Date('2023-01-01 12:00:00').getTime());

packages/nx-python/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ Example:
3636
}
3737
```
3838

39+
for Nx 20.x or higher, use the following pattern:
40+
41+
```json
42+
{
43+
...
44+
"plugins": [
45+
{
46+
"plugin": "@nxlv/python"
47+
}
48+
]
49+
...
50+
}
51+
```
52+
3953
#### Add a new Python Project
4054

4155
```shell

packages/nx-python/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"cross-spawn": "^7.0.3",
2222
"command-exists": "^1.2.9",
2323
"lodash": "^4.17.21",
24-
"@nx/devkit": "^19.0.0",
25-
"nx": "^19.0.0",
24+
"@nx/devkit": "^20.0.0",
25+
"nx": "20.1.2",
2626
"ora": "5.3.0",
2727
"semver": "^7.5.3"
2828
},

0 commit comments

Comments
 (0)