Skip to content

Commit d3a0f2c

Browse files
authored
chore: TypeScript 5.1 with Nx 16.6 migrations (#10338)
1 parent 7a353ec commit d3a0f2c

File tree

61 files changed

+731
-473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+731
-473
lines changed

.eslintrc.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
88
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
9+
"@nx/enforce-module-boundaries": [
1010
"error",
1111
{
1212
"enforceBuildableLibDependency": true,
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"files": ["*.ts", "*.tsx"],
26-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"],
26+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"],
2727
"rules": {
2828
"no-empty": "off",
2929
"no-useless-escape": "off",
@@ -43,14 +43,19 @@
4343
},
4444
{
4545
"files": ["*.js", "*.jsx"],
46-
"extends": ["plugin:@nrwl/nx/javascript"],
46+
"extends": ["plugin:@nx/javascript"],
4747
"rules": {}
4848
},
4949
{
5050
"files": ["references.d.ts"],
5151
"rules": {
5252
"@typescript-eslint/triple-slash-reference": "off"
5353
}
54+
},
55+
{
56+
"files": "*.json",
57+
"parser": "jsonc-eslint-parser",
58+
"rules": {}
5459
}
5560
]
5661
}

.vscode/settings.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Place your settings in this file to overwrite default and user settings.
21
{
3-
"search.exclude": {
4-
"**/node_modules": true,
5-
"**/bower_components": true,
6-
"**/platforms": true,
7-
"**/*.js": true,
8-
"**/*.js.map": true
9-
}
10-
}
2+
"search.exclude": {
3+
"**/node_modules": true,
4+
"**/bower_components": true,
5+
"**/platforms": true,
6+
"**/*.js": true,
7+
"**/*.js.map": true
8+
},
9+
"eslint.validate": ["json"]
10+
}

apps/automated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@nativescript/ios": "~8.5.0",
1616
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
1717
"circular-dependency-plugin": "^5.2.2",
18-
"typescript": "~4.9.5"
18+
"typescript": "5.1.6"
1919
},
2020
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
2121
"readme": "NativeScript Application"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "testsapp",
3-
"main": "app.js"
2+
"name": "testsapp",
3+
"main": "app.js"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"main": "lifecycle-tests"
2+
"main": "lifecycle-tests"
33
}

apps/automated/src/ui/repeater/repeater-tests.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,15 @@ export var test_RepeaterItemsGestureBindings = function () {
474474
helper.navigateToModuleAndRunTest('ui/repeater/repeaterItems-bindingToGestures-page', null, testFunc);
475475
};
476476

477-
export var test_RepeaterItemsParentBindingsShouldWork = function () {
477+
export var test_RepeaterItemsBindingsShouldWork = function () {
478478
var testFunc = function (page: Page) {
479479
var repeater = <Repeater>page.getViewById('repeater');
480-
var expectedText = page.bindingContext['parentViewProperty'];
481-
var testPass = false;
480+
var expectedText = page.bindingContext['items'];
481+
var testPass: string;
482482
var eachChildCallback = function (childItem: View) {
483483
if (childItem instanceof Label) {
484-
testPass = (<Label>childItem).text === expectedText;
485-
if (testPass === false) {
484+
testPass = (<Label>childItem).text;
485+
if (!testPass) {
486486
return false;
487487
}
488488
} else if (childItem instanceof LayoutBase) {
@@ -494,7 +494,7 @@ export var test_RepeaterItemsParentBindingsShouldWork = function () {
494494

495495
repeater.eachChildView(eachChildCallback);
496496

497-
TKUnit.assertEqual(testPass, true, 'Every item should have text bound to Page binding context!');
497+
TKUnit.assertEqual(!!testPass, true, 'Every item should have text bound to binding context!');
498498
};
499499

500500
helper.navigateToModuleAndRunTest('ui/repeater/repeaterItems-bindingToGestures-page', null, testFunc);

apps/automated/src/ui/repeater/repeaterItems-bindingToGestures-page.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function pageLoaded(args) {
1+
export function pageLoaded(args) {
22
var page = args.object;
33
page.bindingContext = {
44
items: [
@@ -18,8 +18,3 @@ function pageLoaded(args) {
1818
parentViewProperty: 'Parent View Property',
1919
};
2020
}
21-
exports.pageLoaded = pageLoaded;
22-
23-
exports.tapPage = function (args) {
24-
console.log('Tap! ' + args + ' ' + args.object);
25-
};

apps/automated/src/ui/repeater/repeaterItems-bindingToGestures-page.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded">
22
<Repeater id="repeater" items="{{ items }}">
33
<Repeater.itemTemplate>
4-
<GridLayout width="94" height="94" >
5-
<Label text="{{ $parents['Page'].parentViewProperty }}" tap="{{ tapItem }}" />
4+
<GridLayout width="94" height="94">
5+
<Label text="{{ text }}" tap="{{ tapItem }}" />
66
</GridLayout>
77
</Repeater.itemTemplate>
88
</Repeater>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "MyControl",
3-
"main": "MyControl.js"
2+
"name": "MyControl",
3+
"main": "MyControl.js"
44
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "MyControl",
3-
"main": "MyControl.js"
2+
"name": "MyControl",
3+
"main": "MyControl.js"
44
}

0 commit comments

Comments
 (0)