Skip to content

Commit b85b064

Browse files
committed
Merge branch 'main' into feat/web-style-api
2 parents 2934037 + 4844e37 commit b85b064

327 files changed

Lines changed: 21726 additions & 16965 deletions

File tree

Some content is hidden

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

‎.eslintrc.json‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ CLAUDE.local.md
101101
.env.local
102102
.env.*.local
103103
.envrc
104+
105+
.nx/migrate-runs

‎apps/automated/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@nativescript/vite": "file:../../dist/packages/vite",
1818
"@nativescript/webpack": "file:../../dist/packages/webpack5",
1919
"circular-dependency-plugin": "^5.2.2",
20-
"typescript": "~5.9.3"
20+
"typescript": "~6.0.3"
2121
},
2222
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
2323
"readme": "NativeScript Application"

‎apps/automated/project.json‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@
6565
"clean": {
6666
"executor": "@nativescript/nx:clean",
6767
"options": {}
68-
},
69-
"lint": {
70-
"executor": "@nx/eslint:lint",
71-
"options": {
72-
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
73-
}
7468
}
7569
},
7670
"implicitDependencies": ["webpack5", "vite"]

‎apps/automated/src/application-settings/application-settings-tests.ts‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
import { ApplicationSettings as appSettings } from '@nativescript/core';
22
import * as TKUnit from '../tk-unit';
33

4-
var stringKey: string = 'stringKey';
5-
var boolKey: string = 'boolKey';
6-
var numberKey: string = 'numberKey';
7-
var noStringKey: string = 'noStringKey';
8-
var noBoolKey: string = 'noBoolKey';
9-
var noNumberKey: string = 'noNumberKey';
10-
11-
export var testBoolean = function () {
4+
const stringKey: string = 'stringKey';
5+
const boolKey: string = 'boolKey';
6+
const numberKey: string = 'numberKey';
7+
const noStringKey: string = 'noStringKey';
8+
const noBoolKey: string = 'noBoolKey';
9+
const noNumberKey: string = 'noNumberKey';
10+
11+
export const testBoolean = function () {
1212
appSettings.setBoolean(boolKey, false);
13-
var boolValueBefore = appSettings.getBoolean(boolKey);
13+
const boolValueBefore = appSettings.getBoolean(boolKey);
1414
TKUnit.assert(false === boolValueBefore, 'Cannot set boolean to false, currently it is: ' + appSettings.getBoolean(boolKey));
1515

1616
appSettings.setBoolean('boolKey', true);
17-
var boolValue = appSettings.getBoolean('boolKey', false);
17+
const boolValue = appSettings.getBoolean('boolKey', false);
1818

1919
TKUnit.assert(true === boolValue, 'Cannot set boolean to true');
2020

2121
TKUnit.assert(true === appSettings.getBoolean(boolKey), 'Cannot set boolean to true (no default)');
2222
};
2323

24-
export var testString = function () {
24+
export const testString = function () {
2525
appSettings.setString('stringKey', 'String value');
26-
var stringValue = appSettings.getString('stringKey');
26+
const stringValue = appSettings.getString('stringKey');
2727

2828
TKUnit.assert('String value' === stringValue, 'Cannot set string value');
2929
};
3030

31-
export var testNumber = function () {
31+
export const testNumber = function () {
3232
appSettings.setNumber('numberKey', 54.321);
33-
var value = parseFloat(appSettings.getNumber('numberKey').toFixed(3));
33+
const value = parseFloat(appSettings.getNumber('numberKey').toFixed(3));
3434

3535
TKUnit.assert(54.321 === value, 'Cannot set number value 54.321 != ' + value);
3636
};
3737

38-
export var testDefaults = function () {
39-
var defaultValue = appSettings.getString('noStringKey', 'No string value');
38+
export const testDefaults = function () {
39+
const defaultValue = appSettings.getString('noStringKey', 'No string value');
4040
// will return "No string value" if there is no value for "noStringKey"
4141

4242
TKUnit.assert('No string value' === defaultValue, 'Bad default string value');
4343
TKUnit.assert(true === appSettings.getBoolean(noBoolKey, true), 'Bad default boolean value');
4444
TKUnit.assert(123.45 === appSettings.getNumber(noNumberKey, 123.45), 'Bad default number value');
4545
};
4646

47-
export var testDefaultsWithNoDefaultValueProvided = function () {
48-
var defaultValue = appSettings.getString('noStringKey');
47+
export const testDefaultsWithNoDefaultValueProvided = function () {
48+
const defaultValue = appSettings.getString('noStringKey');
4949
// will return undefined if there is no value for "noStringKey"
5050

5151
TKUnit.assertEqual(defaultValue, undefined, 'Default string value is not undefined');
@@ -54,8 +54,8 @@ export var testDefaultsWithNoDefaultValueProvided = function () {
5454
TKUnit.assertEqual(appSettings.getNumber(noNumberKey), undefined, 'Default number value is not undefined');
5555
};
5656

57-
export var testHasKey = function () {
58-
var hasKey = appSettings.hasKey('noBoolKey');
57+
export const testHasKey = function () {
58+
const hasKey = appSettings.hasKey('noBoolKey');
5959
// will return false if there is no value for "noBoolKey"
6060

6161
TKUnit.assert(!hasKey, 'There is a key: ' + noBoolKey);
@@ -67,7 +67,7 @@ export var testHasKey = function () {
6767
TKUnit.assert(!appSettings.hasKey(numberKey), 'There is no key: ' + numberKey);
6868
};
6969

70-
export var testRemove = function () {
70+
export const testRemove = function () {
7171
appSettings.remove('boolKey');
7272

7373
TKUnit.assert(!appSettings.hasKey(boolKey), 'Failed to remove key: ' + boolKey);
@@ -79,36 +79,36 @@ export var testRemove = function () {
7979
TKUnit.assert(!appSettings.hasKey(numberKey), 'Failed to remove key: ' + numberKey);
8080
};
8181

82-
export var testClear = function () {
82+
export const testClear = function () {
8383
appSettings.clear();
8484

8585
TKUnit.assert(!appSettings.hasKey(boolKey), 'Failed to remove key: ' + boolKey);
8686
TKUnit.assert(!appSettings.hasKey(stringKey), 'Failed to remove key: ' + stringKey);
8787
TKUnit.assert(!appSettings.hasKey(numberKey), 'Failed to remove key: ' + numberKey);
8888
};
8989

90-
export var testFlush = function () {
90+
export const testFlush = function () {
9191
appSettings.setString(stringKey, 'String value');
9292

93-
var flushed = appSettings.flush();
93+
const flushed = appSettings.flush();
9494
// will return boolean indicating whether flush to disk was successful
9595

9696
TKUnit.assert(flushed, 'Flush failed: ' + flushed);
9797
TKUnit.assert(appSettings.hasKey(stringKey), 'There is no key: ' + stringKey);
9898
};
9999

100-
export var testAllKeys = function () {
100+
export const testAllKeys = function () {
101101
appSettings.setString(stringKey, 'String value');
102102
appSettings.setBoolean(boolKey, true);
103103
appSettings.setNumber(numberKey, 22);
104104

105-
var allKeys = appSettings.getAllKeys();
105+
const allKeys = appSettings.getAllKeys();
106106
TKUnit.assert(allKeys.indexOf(stringKey) !== -1, `${stringKey} is missing from .allKeys()`);
107107
TKUnit.assert(allKeys.indexOf(boolKey) !== -1, `${boolKey} is missing from .allKeys()`);
108108
TKUnit.assert(allKeys.indexOf(numberKey) !== -1, `${numberKey} is missing from .allKeys()`);
109109
};
110110

111-
export var testInvalidKey = function () {
111+
export const testInvalidKey = function () {
112112
try {
113113
appSettings.hasKey(undefined);
114114
TKUnit.assert(false, 'There is a key undefined');
@@ -134,7 +134,7 @@ export var testInvalidKey = function () {
134134
appSettings.hasKey('string');
135135
};
136136

137-
export var testInvalidValue = function () {
137+
export const testInvalidValue = function () {
138138
try {
139139
// @ts-ignore
140140
appSettings.setBoolean(boolKey, 'str');

‎apps/automated/src/application/application-tests.android.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import * as TKUnit from '../tk-unit';
55
export * from './application-tests-common';
66

77
// >> application-app-android
8-
let androidApp = Application.android;
8+
const androidApp = Application.android;
99
// << application-app-android
1010

1111
// >> application-app-android-context
12-
let context = Application.android.context;
12+
const context = Application.android.context;
1313
//// get the Files (Documents) folder (directory)
14-
let dir = context.getFilesDir();
14+
const dir = context.getFilesDir();
1515
// << application-app-android-context
1616

1717
// >> application-app-android-current

‎apps/automated/src/application/application-tests.ios.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ export * from './application-tests-common';
55

66
// >> application-ios-observer
77
//// Add the notification observer
8+
let observer;
89
if (Application.ios) {
9-
var observer = Application.ios.addNotificationObserver(UIDeviceBatteryLevelDidChangeNotification, function onReceiveCallback(notification: NSNotification) {
10-
var percent = UIDevice.currentDevice.batteryLevel * 100;
11-
var message = 'Battery: ' + percent + '%';
10+
observer = Application.ios.addNotificationObserver(UIDeviceBatteryLevelDidChangeNotification, function onReceiveCallback(notification: NSNotification) {
11+
const percent = UIDevice.currentDevice.batteryLevel * 100;
12+
const message = 'Battery: ' + percent + '%';
1213
////console.log(message);
1314
});
1415
}

0 commit comments

Comments
 (0)