Skip to content

Commit 7f069a7

Browse files
authored
feat: TypeScript 4.8+ support and NativeClass decorator improvements (#10081)
1 parent 59ca35b commit 7f069a7

File tree

24 files changed

+143
-149
lines changed

24 files changed

+143
-149
lines changed

apps/automated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@nativescript/android": "~8.3.0",
1515
"@nativescript/ios": "~8.3.0",
1616
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
17-
"typescript": "4.7.3"
17+
"typescript": "4.8.4"
1818
},
1919
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
2020
"readme": "NativeScript Application"

apps/automated/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "apps-automated",
23
"$schema": "../../node_modules/nx/schemas/project-schema.json",
34
"sourceRoot": "apps/automated/app",
45
"projectType": "application",

apps/automated/src/ui/styling/style-properties-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ export function test_setting_font_shorthand_property() {
556556
test_font_shorthand_property('normal normal normal 15px/30px Arial', 'Arial', 15, 'normal', 'normal');
557557
}
558558

559-
function test_font_shorthand_property(short: string, family: string, size: number, style: string, weight: string) {
559+
function test_font_shorthand_property(short: string, family: string, size: number, style: string, weight: string | number) {
560560
const testView = new Button();
561561
(<any>testView.style)['font'] = short;
562562

apps/toolbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"@nativescript/android": "~8.3.0",
1616
"@nativescript/ios": "~8.3.0",
1717
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
18-
"typescript": "4.7.3"
18+
"typescript": "4.8.4"
1919
}
2020
}

apps/toolbox/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "apps-toolbox",
23
"$schema": "../../node_modules/nx/schemas/project-schema.json",
34
"sourceRoot": "apps/toolbox/src",
45
"projectType": "application",

apps/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@nativescript/android": "~8.3.0",
1515
"@nativescript/ios": "~8.3.0",
1616
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
17-
"typescript": "4.7.3"
17+
"typescript": "4.8.4"
1818
},
1919
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
2020
"readme": "NativeScript Application",

apps/ui/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "apps-ui",
23
"$schema": "../../node_modules/nx/schemas/project-schema.json",
34
"sourceRoot": "apps/ui/src",
45
"projectType": "application",

nx.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
"appsDir": "apps",
55
"libsDir": "packages"
66
},
7-
"implicitDependencies": {
8-
"workspace.json": "*",
9-
"tsconfig.json": "*",
10-
"tslint.json": "*",
11-
"nx.json": "*",
12-
".eslintrc.json": "*"
13-
},
147
"tasksRunnerOptions": {
158
"default": {
169
"runner": "nx/tasks-runners/default",
@@ -82,5 +75,18 @@
8275
"affected": {
8376
"defaultBase": "master"
8477
},
85-
"$schema": "./node_modules/nx/schemas/nx-schema.json"
78+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
79+
"namedInputs": {
80+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
81+
"sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.json", "{workspaceRoot}/tslint.json", "{workspaceRoot}/nx.json"],
82+
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s"]
83+
},
84+
"targetDefaults": {
85+
"build": {
86+
"inputs": ["production", "^production"]
87+
},
88+
"test": {
89+
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
90+
}
91+
}
8692
}

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
"devDependencies": {
2424
"@nativescript/hook": "^2.0.0",
2525
"@nativescript/nx": "~4.0.0",
26-
"@nrwl/cli": "14.5.4",
27-
"@nrwl/eslint-plugin-nx": "14.5.4",
28-
"@nrwl/jest": "14.5.4",
29-
"@nrwl/node": "14.5.4",
30-
"@nrwl/workspace": "14.5.4",
26+
"@nrwl/cli": "15.0.12",
27+
"@nrwl/eslint-plugin-nx": "15.0.12",
28+
"@nrwl/jest": "15.0.12",
29+
"@nrwl/node": "15.0.12",
30+
"@nrwl/workspace": "15.0.12",
3131
"@nstudio/focus": "^14.3.0",
3232
"@nstudio/nps-i": "~2.0.0",
3333
"@prettier/plugin-xml": "^2.2.0",
3434
"@types/chai": "^4.2.11",
35-
"@types/jest": "27.4.1",
35+
"@types/jest": "28.1.8",
3636
"@types/mocha": "^7.0.2",
37-
"@types/node": "18.0.0",
37+
"@types/node": "18.7.1",
3838
"@typescript-eslint/eslint-plugin": "^5.30.0",
3939
"@typescript-eslint/parser": "^5.30.0",
4040
"chai": "^4.2.0",
@@ -47,7 +47,7 @@
4747
"eslint-config-prettier": "^8.1.0",
4848
"gonzales": "^1.0.7",
4949
"husky": "^8.0.1",
50-
"jest": "27.5.1",
50+
"jest": "28.1.3",
5151
"lint-staged": "^13.0.1",
5252
"mocha": "^8.0.1",
5353
"mocha-typescript": "^1.1.17",
@@ -61,15 +61,15 @@
6161
"sass": "^1.45.2",
6262
"shady-css-parser": "^0.1.0",
6363
"tree-kill": "^1.2.2",
64-
"ts-jest": "27.1.4",
65-
"ts-node": "10.8.1",
64+
"ts-jest": "28.0.8",
65+
"ts-node": "10.9.1",
6666
"ts-patch": "^2.0.1",
6767
"tslint": "6.1.3",
6868
"tslint-to-eslint-config": "^2.13.0",
6969
"typedoc": "^0.22.17",
70-
"typescript": "~4.7.3",
70+
"typescript": "4.8.4",
7171
"zx": "^7.0.5",
72-
"nx": "14.5.4"
72+
"nx": "15.0.12"
7373
},
7474
"lint-staged": {
7575
"**/*": [

packages/core/project.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "core",
23
"$schema": "../../node_modules/nx/schemas/project-schema.json",
34
"sourceRoot": "packages/core",
45
"projectType": "library",
@@ -16,11 +17,11 @@
1617
"jestConfig": "packages/core/jest.config.ts",
1718
"passWithNoTests": true
1819
},
19-
"outputs": ["coverage/packages/core"]
20+
"outputs": ["{workspaceRoot}/coverage/packages/core"]
2021
},
2122
"build": {
22-
"executor": "@nrwl/workspace:run-commands",
23-
"outputs": ["dist/packages"],
23+
"executor": "nx:run-commands",
24+
"outputs": ["{workspaceRoot}/dist/packages"],
2425
"options": {
2526
"commands": [
2627
"npx rimraf dist/packages/core",
@@ -34,15 +35,15 @@
3435
}
3536
},
3637
"unit": {
37-
"executor": "@nrwl/workspace:run-commands",
38+
"executor": "nx:run-commands",
3839
"options": {
3940
"commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --config=.mocharc.yml"],
4041
"cwd": "packages/core/__tests__",
4142
"parallel": false
4243
}
4344
},
4445
"unit.watch": {
45-
"executor": "@nrwl/workspace:run-commands",
46+
"executor": "nx:run-commands",
4647
"options": {
4748
"commands": ["../../../node_modules/.bin/tsc -p tsconfig.json && ../../../node_modules/.bin/mocha --watch --config=.mocharc.yml"],
4849
"cwd": "packages/core/__tests__",

0 commit comments

Comments
 (0)