Skip to content

Commit 4d53a58

Browse files
authored
feat: Nx 19 and Angular 18 support (#75)
1 parent d932ab5 commit 4d53a58

File tree

7 files changed

+2336
-2092
lines changed

7 files changed

+2336
-2092
lines changed

.eslintrc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@
2424
{
2525
"files": ["*.ts", "*.tsx"],
2626
"extends": ["plugin:@nx/typescript"],
27-
"rules": {}
27+
"rules": {
28+
"@typescript-eslint/no-extra-semi": "error",
29+
"no-extra-semi": "off"
30+
}
2831
},
2932
{
3033
"files": ["*.js", "*.jsx"],
3134
"extends": ["plugin:@nx/javascript"],
32-
"rules": {}
35+
"rules": {
36+
"@typescript-eslint/no-extra-semi": "error",
37+
"no-extra-semi": "off"
38+
}
3339
}
3440
]
3541
}

migrations.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"migrations": [
3+
{
4+
"cli": "nx",
5+
"version": "19.1.0-beta.6",
6+
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
7+
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
8+
"package": "@nx/eslint-plugin",
9+
"name": "update-19-1-0-rename-no-extra-semi"
10+
},
11+
{
12+
"cli": "nx",
13+
"version": "19.1.0-beta.2",
14+
"requires": {
15+
"@angular/core": ">=18.0.0"
16+
},
17+
"description": "Update the @angular/cli package version to ~18.0.0.",
18+
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
19+
"package": "@nx/angular",
20+
"name": "update-angular-cli-version-18-0-0"
21+
},
22+
{
23+
"version": "18.0.0",
24+
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
25+
"factory": "./migrations/invalid-two-way-bindings/bundle",
26+
"package": "@angular/core",
27+
"name": "invalid-two-way-bindings"
28+
},
29+
{
30+
"version": "18.0.0",
31+
"description": "Replace deprecated HTTP related modules with provider functions",
32+
"factory": "./migrations/http-providers/bundle",
33+
"package": "@angular/core",
34+
"name": "migration-http-providers"
35+
}
36+
]
37+
}

package.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@
3131
},
3232
"private": true,
3333
"devDependencies": {
34-
"@angular-devkit/schematics": "17.3.3",
35-
"@angular/core": "17.3.3",
36-
"@swc-node/register": "1.9.0",
37-
"@swc/core": "1.4.12",
34+
"@angular-devkit/schematics": "18.0.1",
35+
"@angular/core": "18.0.0",
3836
"@types/fs-extra": "^11.0.3",
3937
"@types/jest": "29.5.12",
4038
"@types/node": "^20.0.0",
@@ -47,28 +45,28 @@
4745
"doctoc": "^2.0.0",
4846
"dotenv": "~16.4.0",
4947
"eslint": "8.57.0",
50-
"eslint-config-prettier": "9.0.0",
48+
"eslint-config-prettier": "9.1.0",
5149
"fs-extra": "^11.2.0",
5250
"jest": "29.7.0",
5351
"jsonc-parser": "3.2.1",
54-
"nx": "18.2.3",
52+
"nx": "19.1.0",
5553
"plist": "^3.1.0",
56-
"prettier": "^2.7.0",
57-
"ts-jest": "29.1.2",
54+
"prettier": "^2.7.1",
55+
"ts-jest": "29.1.3",
5856
"ts-node": "10.9.2",
5957
"tslib": "^2.6.2",
60-
"typescript": "5.4.4",
58+
"typescript": "5.4.5",
6159
"xml2js": "^0.6.2",
62-
"nx-cloud": "18.0.0",
63-
"@nx/devkit": "18.2.3",
64-
"@nx/workspace": "18.2.3",
65-
"@nx/plugin": "18.2.3",
66-
"@nx/web": "18.2.3",
67-
"@nx/js": "18.2.3",
68-
"@nx/eslint-plugin": "18.2.3",
69-
"@nx/jest": "18.2.3",
70-
"@nx/express": "18.2.3",
71-
"@nx/angular": "18.2.3",
72-
"@nx/eslint": "18.2.3"
60+
"nx-cloud": "19.0.0",
61+
"@nx/devkit": "19.1.0",
62+
"@nx/workspace": "19.1.0",
63+
"@nx/plugin": "19.1.0",
64+
"@nx/web": "19.1.0",
65+
"@nx/js": "19.1.0",
66+
"@nx/eslint-plugin": "19.1.0",
67+
"@nx/jest": "19.1.0",
68+
"@nx/express": "19.1.0",
69+
"@nx/angular": "19.1.0",
70+
"@nx/eslint": "19.1.0"
7371
}
7472
}

packages/nx/README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,27 @@
4646

4747
```sh
4848
# Using npm
49-
npx create-nx-workspace@18.3.4
49+
npx create-nx-workspace@latest
5050

5151
# Using yarn
52-
yarn create-nx-workspace@18.3.4
52+
yarn create-nx-workspace@latest
5353
```
5454

5555
At the prompts, you can use:
5656

5757
```sh
5858
✔ Where would you like to create your workspace? · {your-workspace-name}
5959

60-
# Choose "None"
61-
6260
? Which stack do you want to use?
6361
None: Configures a minimal structure without specific frameworks or technologies.
64-
65-
# Choose "Integrated"
62+
# Choose "None"
6663

6764
? Package-based monorepo, integrated monorepo, or standalone project?
6865
Integrated Monorepo: Nx creates a monorepo that contains multiple projects.
66+
# Choose "Integrated"
67+
68+
? Do you want Nx Cloud to make your CI fast?
69+
# Choice is completely up to you
6970
```
7071

7172
### Init workspace
@@ -86,6 +87,16 @@ npm install --save-dev @nativescript/nx
8687
yarn add -D @nativescript/nx
8788
```
8889

90+
*Note: If you get a Warning on peer dependencies you can ignore.* For example:
91+
92+
```bash
93+
npm WARN ERESOLVE overriding peer dependency
94+
npm WARN While resolving: @swc-node/[email protected]
95+
npm WARN Found: @swc/[email protected]
96+
npm WARN node_modules/@swc/core
97+
npm WARN peer @swc/core@">= 1.3" from @swc-node/[email protected]
98+
```
99+
89100
### Create an app
90101

91102
```sh

packages/nx/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@nativescript/nx",
3-
"version": "18.0.0",
3+
"version": "19.0.0",
44
"description": "NativeScript Plugin for Nx",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/nativescript/nx.git"
88
},
99
"keywords": [
10-
"Monorepo",
1110
"Nx",
1211
"NativeScript",
12+
"Monorepo",
1313
"Mobile",
1414
"iOS",
1515
"Android"
@@ -28,15 +28,15 @@
2828
"migrations": "./migrations.json"
2929
},
3030
"dependencies": {
31-
"@angular-devkit/architect": "^0.1700.0",
32-
"@angular-devkit/core": "^17.0.0",
33-
"@angular-devkit/schematics": "^17.0.0",
31+
"@angular-devkit/architect": "^0.1800.0",
32+
"@angular-devkit/core": "^18.0.0",
33+
"@angular-devkit/schematics": "^18.0.0",
3434
"fs-extra": "^11.2.0",
3535
"ignore": "^5.3.0",
3636
"plist": "^3.1.0",
3737
"xml2js": "~0.6.0",
38-
"@nx/devkit": "^18.0.0",
39-
"@nx/js": "^18.0.0",
40-
"@nx/jest": "^18.0.0"
38+
"@nx/devkit": "^19.0.0",
39+
"@nx/js": "^19.0.0",
40+
"@nx/jest": "^19.0.0"
4141
}
4242
}

packages/nx/src/utils/versions.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
export const nxVersion = '^18.0.0';
1+
export const nxVersion = '^19.0.0';
22

3-
export const nsNxPluginVersion = '^18.0.0';
4-
export const nsCoreVersion = '~8.6.0';
5-
export const nsTypesVersion = '~8.6.0';
3+
export const nsNxPluginVersion = '^19.0.0';
4+
export const nsCoreVersion = '~8.7.0';
5+
export const nsTypesVersion = '~8.7.0';
66
export const nsThemeVersion = '~1.0.4';
77
export const nsWebpackVersion = '~5.0.0';
88
export const sassVersion = '^1.32.0';
9-
export const nsIOSRuntimeVersion = '~8.6.0';
10-
export const nsAndroidRuntimeVersion = '~8.6.0';
9+
export const nsIOSRuntimeVersion = '~8.7.0';
10+
export const nsAndroidRuntimeVersion = '~8.7.0';
1111

1212
// Frontend frameworks
13-
export const angularVersion = '^17.0.0';
14-
export const nsAngularVersion = '^17.0.0';
15-
export const nsNgToolsVersion = '^17.0.0';
13+
export const angularVersion = '^18.0.0';
14+
export const nsAngularVersion = '^18.0.0';
15+
export const nsNgToolsVersion = '^18.0.0';
1616
export const rxjsVersion = '~7.8.0';
1717
export const zonejsVersion = '^0.14.0';
1818
export const typescriptVersion = '~5.4.0';

0 commit comments

Comments
 (0)