diff --git a/.eslintrc.json b/.eslintrc.json index 4755c00..0df28d9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,18 +12,13 @@ "files": ["*.ts", "*.tsx"], "extends": ["plugin:@nx/typescript"], "rules": { - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-extra-semi": "error", - "no-extra-semi": "off" + "@typescript-eslint/no-inferrable-types": "off" } }, { "files": ["*.js", "*.jsx"], "extends": ["plugin:@nx/javascript"], - "rules": { - "@typescript-eslint/no-extra-semi": "error", - "no-extra-semi": "off" - } + "rules": {} } ] } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a243ac4..75925e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: lts/* - cache: 'yarn' - uses: nrwl/nx-set-shas@v3 - - name: Setup global dependencies - run: npm i -g yarn - - name: yarn install - run: yarn + - name: npm install + run: npm install --legacy-peer-deps - name: Build.all affected - run: yarn nx affected --target=build --exclude nativescript-demo-ng + run: npx nx affected --target=build --exclude nativescript-demo-ng diff --git a/.gitignore b/.gitignore index 2fb1056..e8cabb7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ # dependencies /node_modules /packages/*/node_modules -package-lock.json .npmrc +yarn.lock # IDEs and editors /.idea @@ -48,4 +48,6 @@ Thumbs.db /.env .nx/cache -.nx/workspace-data \ No newline at end of file +.nx/workspace-data +.cursor/rules/nx-rules.mdc +.github/instructions/nx.instructions.md diff --git a/.husky/pre-commit b/.husky/pre-commit index 4ebab2a..4b60b64 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx lint-staged --allow-empty --relative diff --git a/CHANGELOG.md b/CHANGELOG.md index 41a5645..dac3a59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# [20.0.0](https://github.com/NativeScript/angular/compare/19.0.1...20.0.0) (2025-06-01) + + +### Features + +* Angular 20 ([#151](https://github.com/NativeScript/angular/issues/151)) ([62d9fb5](https://github.com/NativeScript/angular/commit/62d9fb5329efb28b5d595f11bf8732ae56a878f7)) + + + +## [19.0.1](https://github.com/NativeScript/angular/compare/19.0.0...19.0.1) (2025-01-29) + + +### Features + +* apple view filter to cover ios and visionos together ([#148](https://github.com/NativeScript/angular/issues/148)) ([f5431bd](https://github.com/NativeScript/angular/commit/f5431bd2564f389480a14cb7862dd772c3b6af57)) + + + # [19.0.0](https://github.com/NativeScript/angular/compare/18.1.3...19.0.0) (2025-01-02) diff --git a/DevelopmentWorkflow.md b/DevelopmentWorkflow.md index 1755ec1..b2f7064 100644 --- a/DevelopmentWorkflow.md +++ b/DevelopmentWorkflow.md @@ -33,7 +33,7 @@ $ cd angular ``` $ cd angular -$ yarn clean.all +$ npm run clean.all ``` ### Run some of the e2e applications e.g. router-tab-view @@ -43,7 +43,7 @@ $ yarn clean.all Install NPM packages (use the local copy of `@nativescript/angular`): ``` $ cd e2e/router-tab-view -$ yarn install +$ npm install ``` Start the app: diff --git a/apps/nativescript-demo-ng/App_Resources/Android/app.gradle b/apps/nativescript-demo-ng/App_Resources/Android/app.gradle index f995ed2..391032a 100644 --- a/apps/nativescript-demo-ng/App_Resources/Android/app.gradle +++ b/apps/nativescript-demo-ng/App_Resources/Android/app.gradle @@ -6,9 +6,10 @@ //} android { + namespace "org.nativescript.demong" defaultConfig { - minSdkVersion 17 - targetSdkVersion 29 + minSdkVersion 24 + targetSdkVersion 34 generatedDensities = [] applicationId = "org.nativescript.demong" manifestPlaceholders = [isUnitTesting:"${unitTesting}"] diff --git a/apps/nativescript-demo-ng/App_Resources/Android/src/main/AndroidManifest.xml b/apps/nativescript-demo-ng/App_Resources/Android/src/main/AndroidManifest.xml index f82cfbe..1fa4192 100644 --- a/apps/nativescript-demo-ng/App_Resources/Android/src/main/AndroidManifest.xml +++ b/apps/nativescript-demo-ng/App_Resources/Android/src/main/AndroidManifest.xml @@ -26,7 +26,8 @@ android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" - android:theme="@style/LaunchScreenTheme"> + android:theme="@style/LaunchScreenTheme" + android:exported="true"> diff --git a/apps/nativescript-demo-ng/App_Resources/iOS/Info.plist b/apps/nativescript-demo-ng/App_Resources/iOS/Info.plist index 3c0d86f..3fa7c4e 100644 --- a/apps/nativescript-demo-ng/App_Resources/iOS/Info.plist +++ b/apps/nativescript-demo-ng/App_Resources/iOS/Info.plist @@ -1,58 +1,58 @@ - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiresFullScreen - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - ITSAppUsesNonExemptEncryption - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS - NSAllowsArbitraryLoadsInWebContent + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + ITSAppUsesNonExemptEncryption + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSAllowsArbitraryLoadsForMedia + + NSAllowsArbitraryLoadsInWebContent + + - diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png new file mode 100644 index 0000000..3c46f1f Binary files /dev/null and b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png differ diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..b87ebf6 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "filename" : "Back.png", + "idiom" : "reality", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json new file mode 100644 index 0000000..950af4d --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.solidimagestacklayer" + }, + { + "filename" : "Middle.solidimagestacklayer" + }, + { + "filename" : "Back.solidimagestacklayer" + } + ] +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..49f496c --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "filename" : "Front.png", + "idiom" : "reality", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Front.png b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Front.png new file mode 100644 index 0000000..3a5ccaa Binary files /dev/null and b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Front.png differ diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..52a7e86 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "filename" : "Middle.png", + "idiom" : "reality", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png new file mode 100644 index 0000000..2475def Binary files /dev/null and b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png differ diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/Contents.json b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/Info.plist b/apps/nativescript-demo-ng/App_Resources/visionOS/Info.plist new file mode 100644 index 0000000..fcdc9b2 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion∂ + 1.0 + LSRequiresIPhoneOS + + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSHandsTrackingUsageDescription + Use your hands to adjust lighting positions. + NSWorldSensingUsageDescription + To be able to place virtual contents in your surroundings. + UIApplicationSceneManifest + + UIApplicationPreferredDefaultSceneSessionRole + UIWindowSceneSessionRoleApplication + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + + + diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/build.xcconfig b/apps/nativescript-demo-ng/App_Resources/visionOS/build.xcconfig new file mode 100644 index 0000000..8bb8c51 --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/build.xcconfig @@ -0,0 +1,3 @@ +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +IPHONEOS_DEPLOYMENT_TARGET = 17.0; \ No newline at end of file diff --git a/apps/nativescript-demo-ng/App_Resources/visionOS/src/NativeScriptApp.swift b/apps/nativescript-demo-ng/App_Resources/visionOS/src/NativeScriptApp.swift new file mode 100644 index 0000000..f2eda5a --- /dev/null +++ b/apps/nativescript-demo-ng/App_Resources/visionOS/src/NativeScriptApp.swift @@ -0,0 +1,9 @@ +import SwiftUI + +@main +struct NativeScriptApp: App { + + var body: some Scene { + NativeScriptMainWindow() + } +} diff --git a/apps/nativescript-demo-ng/package.json b/apps/nativescript-demo-ng/package.json index 16848d6..270596b 100644 --- a/apps/nativescript-demo-ng/package.json +++ b/apps/nativescript-demo-ng/package.json @@ -3,13 +3,13 @@ "main": "./src/main.ts", "description": "NativeScript Application", "dependencies": { - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "@nativescript-community/ui-material-bottom-navigation": "^7.2.0" + "@nativescript/core": "file:../../node_modules/@nativescript/core" }, "devDependencies": { - "@nativescript/android": "~8.8.0", - "@nativescript/ios": "~8.8.0", + "@nativescript/android": "~8.9.0", + "@nativescript/ios": "~8.9.0", "@nativescript/tailwind": "^2.1.0", - "@nativescript/unit-test-runner": "^3.0.1" + "@nativescript/unit-test-runner": "^3.0.1", + "@nativescript/visionos": "~8.9.0" } } diff --git a/apps/nativescript-demo-ng/src/app/item/items.component.ts b/apps/nativescript-demo-ng/src/app/item/items.component.ts index cd5972d..37c6428 100644 --- a/apps/nativescript-demo-ng/src/app/item/items.component.ts +++ b/apps/nativescript-demo-ng/src/app/item/items.component.ts @@ -12,10 +12,10 @@ import { ModalDialogService, NativeDialogService, NativeScriptCommonModule } fro templateUrl: './items.component.html', imports: [NativeScriptCommonModule], standalone: true, - schemas: [NO_ERRORS_SCHEMA] + schemas: [NO_ERRORS_SCHEMA], }) export class ItemsComponent implements OnInit, OnDestroy { - message = 'Hello Angular 19!'; + message = 'Hello Angular 20.0.0!'; items: Array; constructor( diff --git a/apps/nativescript-demo-ng/src/app/item3/items.component.html b/apps/nativescript-demo-ng/src/app/item3/items.component.html index 79bb513..e1a1312 100644 --- a/apps/nativescript-demo-ng/src/app/item3/items.component.html +++ b/apps/nativescript-demo-ng/src/app/item3/items.component.html @@ -27,8 +27,23 @@ - - + + diff --git a/apps/nativescript-demo-ng/src/app/item3/items.component.ts b/apps/nativescript-demo-ng/src/app/item3/items.component.ts index 0b7ad84..2544750 100644 --- a/apps/nativescript-demo-ng/src/app/item3/items.component.ts +++ b/apps/nativescript-demo-ng/src/app/item3/items.component.ts @@ -4,7 +4,12 @@ import { HttpClient } from '@angular/common/http'; import { Item } from '../item/item'; import { ItemService } from '../item/item.service'; import { ModalComponent } from '../modal/modal.component'; -import { ModalDialogService, NativeDialogService, NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; +import { + ModalDialogService, + NativeDialogService, + NativeScriptCommonModule, + NativeScriptRouterModule, +} from '@nativescript/angular'; @Component({ selector: 'ns-items', @@ -12,10 +17,10 @@ import { ModalDialogService, NativeDialogService, NativeScriptCommonModule, Nati templateUrl: './items.component.html', imports: [NativeScriptCommonModule, NativeScriptRouterModule], standalone: true, - schemas: [NO_ERRORS_SCHEMA] + schemas: [NO_ERRORS_SCHEMA], }) export class ItemsComponent implements OnInit, OnDestroy { - message = 'Hello Angular 19'; + message = 'Hello Angular 20.0.0'; items: Array; borderRadius: number; fontSize: number; diff --git a/apps/nativescript-demo-ng/src/app/modal/modal.component.html b/apps/nativescript-demo-ng/src/app/modal/modal.component.html index c85ab13..f8a92b6 100644 --- a/apps/nativescript-demo-ng/src/app/modal/modal.component.html +++ b/apps/nativescript-demo-ng/src/app/modal/modal.component.html @@ -1,6 +1,6 @@ - +