From ef85fceca082696709d66d5eccc2ec5a999584f0 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Fri, 30 Aug 2024 10:19:29 -0700 Subject: [PATCH] chore: nx migrate @nativescript/plugin-tools --- .eslintrc.json | 18 +++++--- .gitignore | 3 ++ .prettierignore | 3 ++ apps/demo-angular/package.json | 4 +- apps/demo-angular/project.json | 11 ++--- apps/demo-vue/package.json | 4 +- apps/demo-vue/project.json | 11 ++--- apps/demo/package.json | 4 +- apps/demo/project.json | 11 ++--- jest.config.ts | 2 +- migrations.json | 7 ++++ nx.json | 33 +++++++++------ package.json | 42 +++++++++---------- .../firebase-admob/angular/.eslintrc.json | 2 +- packages/firebase-admob/project.json | 14 +++---- packages/firebase-analytics/project.json | 14 +++---- .../firebase-app-check-debug/project.json | 14 +++---- packages/firebase-app-check/project.json | 14 +++---- packages/firebase-auth/project.json | 14 +++---- packages/firebase-core/project.json | 14 +++---- packages/firebase-crashlytics/project.json | 14 +++---- packages/firebase-database/project.json | 14 +++---- packages/firebase-dynamic-links/project.json | 14 +++---- packages/firebase-firestore/index.ios.ts | 4 +- packages/firebase-firestore/project.json | 14 +++---- packages/firebase-functions/project.json | 14 +++---- .../firebase-in-app-messaging/project.json | 14 +++---- packages/firebase-installations/project.json | 14 +++---- packages/firebase-messaging-core/project.json | 16 +++---- packages/firebase-messaging/project.json | 14 +++---- packages/firebase-performance/project.json | 14 +++---- packages/firebase-remote-config/project.json | 14 +++---- packages/firebase-storage/index.ios.ts | 10 ++--- packages/firebase-storage/project.json | 14 +++---- packages/firebase-ui/project.json | 18 ++++---- tools/assets/App_Resources/iOS/build.xcconfig | 1 + tools/scripts/build-finish.ts | 25 ++++++++++- 37 files changed, 216 insertions(+), 251 deletions(-) create mode 100644 migrations.json diff --git a/.eslintrc.json b/.eslintrc.json index 5b7d0096..bf3518c1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "root": true, "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], + "plugins": ["@nx"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/enforce-module-boundaries": [ "error", { "enforceBuildableLibDependency": true, @@ -23,13 +23,19 @@ }, { "files": ["*.ts", "*.tsx"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"], - "rules": {} + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"], + "rules": { + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } }, { "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], - "rules": {} + "extends": ["plugin:@nx/javascript"], + "rules": { + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } }, { "files": ["references.d.ts"], diff --git a/.gitignore b/.gitignore index f009c443..7a900755 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ Thumbs.db *.tgz packages/**/angular/dist + +.nx/cache +.nx/workspace-data \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 413ca148..342760ab 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,6 @@ /dist /coverage native-src + +/.nx/cache +/.nx/workspace-data \ No newline at end of file diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json index 397556b2..7b018474 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -23,7 +23,7 @@ "@nativescript/firebase-ui": "file:../../dist/packages/firebase-ui" }, "devDependencies": { - "@nativescript/android": "~8.4.0", - "@nativescript/ios": "~8.4.0" + "@nativescript/android": "~8.8.0", + "@nativescript/ios": "~8.8.0" } } diff --git a/apps/demo-angular/project.json b/apps/demo-angular/project.json index 0d6bb29f..2e7235ab 100644 --- a/apps/demo-angular/project.json +++ b/apps/demo-angular/project.json @@ -17,7 +17,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -30,7 +30,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -43,7 +43,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -54,10 +54,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/demo-angular/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/apps/demo-vue/package.json b/apps/demo-vue/package.json index ebb00ace..c4208bba 100644 --- a/apps/demo-vue/package.json +++ b/apps/demo-vue/package.json @@ -24,7 +24,7 @@ "@nativescript/firebase-ui": "file:../../packages/firebase-ui" }, "devDependencies": { - "@nativescript/android": "~8.4.0", - "@nativescript/ios": "~8.4.0" + "@nativescript/android": "~8.8.0", + "@nativescript/ios": "~8.8.0" } } diff --git a/apps/demo-vue/project.json b/apps/demo-vue/project.json index acab24a6..b39ca6a6 100644 --- a/apps/demo-vue/project.json +++ b/apps/demo-vue/project.json @@ -16,7 +16,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -29,7 +29,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -42,7 +42,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -53,10 +53,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/demo-vue/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/apps/demo/package.json b/apps/demo/package.json index faa22f78..f692a586 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -27,7 +27,7 @@ "@nativescript/firebase-ui": "file:../../packages/firebase-ui" }, "devDependencies": { - "@nativescript/android": "~8.5.3", - "@nativescript/ios": "~8.5.2" + "@nativescript/android": "~8.8.0", + "@nativescript/ios": "~8.8.0" } } diff --git a/apps/demo/project.json b/apps/demo/project.json index cd8b9ce2..f8f4a97f 100644 --- a/apps/demo/project.json +++ b/apps/demo/project.json @@ -17,7 +17,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -30,7 +30,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -43,7 +43,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -54,10 +54,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/demo/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/jest.config.ts b/jest.config.ts index 3eeb77b3..5f64584c 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,3 +1,3 @@ -const { getJestProjects } = require('@nrwl/jest'); +const { getJestProjects } = require('@nx/jest'); export default { projects: [...getJestProjects()] }; diff --git a/migrations.json b/migrations.json new file mode 100644 index 00000000..b38e8f1b --- /dev/null +++ b/migrations.json @@ -0,0 +1,7 @@ +{ + "migrations": [ + { "cli": "nx", "version": "5.2.0", "description": "Migrate tools to 5.2.0", "implementation": "./src/migrations/update-5-2-0/update-5-2-0", "package": "@nativescript/plugin-tools", "name": "update-to-5.2.0" }, + { "cli": "nx", "version": "5.3.0", "description": "Migrate tools to 5.3.0", "implementation": "./src/migrations/update-5-3-0/update-5-3-0", "package": "@nativescript/plugin-tools", "name": "update-to-5.3.0" }, + { "cli": "nx", "version": "5.4.0", "description": "Migrate tools to 5.4.0", "implementation": "./src/migrations/update-5-4-0/update-5-4-0", "package": "@nativescript/plugin-tools", "name": "update-to-5.4.0" } + ] +} diff --git a/nx.json b/nx.json index 360129b0..20acf75d 100644 --- a/nx.json +++ b/nx.json @@ -1,20 +1,12 @@ { - "npmScope": "nativescript", - "affected": { - "defaultBase": "master" - }, "workspaceLayout": { "appsDir": "apps", "libsDir": "packages" }, "tasksRunnerOptions": { "default": { - "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": ["build", "build.all", "lint", "test", "e2e"], - "runtimeCacheInputs": ["node -v"], - "parallel": 1, - "useDaemonProcess": false + "runtimeCacheInputs": ["node -v"] } } }, @@ -22,14 +14,29 @@ "namedInputs": { "default": ["{projectRoot}/**/*", "sharedGlobals"], "sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tslint.json", "{workspaceRoot}/nx.json"], - "production": ["default", "!{projectRoot}/.eslintrc.json"] + "production": ["default", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/src/test-setup.[jt]s"] }, "targetDefaults": { "build": { - "inputs": ["production", "^production"] + "inputs": ["production", "^production"], + "cache": true }, "lint": { - "inputs": ["default", "{workspaceRoot}/.eslintrc.json"] + "inputs": ["default", "{workspaceRoot}/.eslintrc.json"], + "cache": true + }, + "build.all": { + "cache": true + }, + "test": { + "cache": true + }, + "e2e": { + "cache": true } - } + }, + "useDaemonProcess": false, + "parallel": 1, + "useInferencePlugins": false, + "defaultBase": "master" } diff --git a/package.json b/package.json index 1e0b3104..0873810e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "3.3.1", "license": "MIT", "scripts": { - "postinstall": "husky install && npx ts-patch install", + "postinstall": "husky && npx ts-patch install", "setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn", "start": "nps", "add": "nx g @nativescript/plugin-tools:add-package", @@ -17,32 +17,32 @@ }, "private": true, "devDependencies": { - "@angular-devkit/build-angular": "^15.0.0", - "@angular/animations": "^15.0.0", - "@angular/common": "^15.0.0", - "@angular/compiler": "^15.0.0", - "@angular/compiler-cli": "^15.0.0", - "@angular/core": "^15.0.0", - "@angular/forms": "^15.0.0", - "@angular/platform-browser": "^15.0.0", - "@angular/platform-browser-dynamic": "^15.0.0", - "@angular/router": "^15.0.0", - "@nativescript/angular": "^15.0.0", - "@nativescript/core": "~8.4.0", - "@nativescript/plugin-tools": "5.1.0", - "@nativescript/types": "~8.4.0", + "@angular-devkit/build-angular": "^18.0.0", + "@angular/animations": "^18.0.0", + "@angular/common": "^18.0.0", + "@angular/compiler": "^18.0.0", + "@angular/compiler-cli": "^18.0.0", + "@angular/core": "^18.0.0", + "@angular/forms": "^18.0.0", + "@angular/platform-browser": "^18.0.0", + "@angular/platform-browser-dynamic": "^18.0.0", + "@angular/router": "^18.0.0", + "@nativescript/angular": "^18.0.0", + "@nativescript/core": "~8.8.0", + "@nativescript/plugin-tools": "5.4.1", + "@nativescript/types": "~8.8.0", "@nativescript/webpack": "~5.0.5", - "@ngtools/webpack": "^15.0.0", + "@ngtools/webpack": "^18.0.0", "conventional-changelog-cli": "^2.2.2", - "husky": "^8.0.0", + "husky": "~9.0.0", "nativescript-vue": "~2.9.0", "nativescript-vue-template-compiler": "~2.9.0", - "ng-packagr": "^15.0.0", - "rxjs": "~7.6.0", + "ng-packagr": "^18.0.0", + "rxjs": "~7.8.0", "stacktrace-js": "~2.0.2", - "typescript": "~4.8.0", + "typescript": "~5.5.0", "vue": "~2.6.12", - "zone.js": "~0.13.0" + "zone.js": "~0.14.0" }, "lint-staged": { "**/*.{js,ts,scss,json,html}": [ diff --git a/packages/firebase-admob/angular/.eslintrc.json b/packages/firebase-admob/angular/.eslintrc.json index a129a9f3..47e8b721 100644 --- a/packages/firebase-admob/angular/.eslintrc.json +++ b/packages/firebase-admob/angular/.eslintrc.json @@ -8,7 +8,7 @@ { "files": ["*.ts", "*.tsx"], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/enforce-module-boundaries": [ "error", { "allowCircularSelfDependency": true diff --git a/packages/firebase-admob/project.json b/packages/firebase-admob/project.json index e15d80d9..c97b9a5d 100644 --- a/packages/firebase-admob/project.json +++ b/packages/firebase-admob/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-admob", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-admob", "tsConfig": "packages/firebase-admob/tsconfig.json", @@ -36,7 +36,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -50,11 +50,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -66,10 +65,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-admob/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-analytics/project.json b/packages/firebase-analytics/project.json index 25817c07..e7ea5aac 100644 --- a/packages/firebase-analytics/project.json +++ b/packages/firebase-analytics/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-analytics", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-analytics", "tsConfig": "packages/firebase-analytics/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-analytics/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-app-check-debug/project.json b/packages/firebase-app-check-debug/project.json index 3cea1283..830e7408 100644 --- a/packages/firebase-app-check-debug/project.json +++ b/packages/firebase-app-check-debug/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-app-check-debug", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-app-check-debug", "tsConfig": "packages/firebase-app-check-debug/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-app-check-debug/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-app-check/project.json b/packages/firebase-app-check/project.json index 2d738b06..1b58e385 100644 --- a/packages/firebase-app-check/project.json +++ b/packages/firebase-app-check/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-app-check", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-app-check", "tsConfig": "packages/firebase-app-check/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-app-check/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-auth/project.json b/packages/firebase-auth/project.json index 03aef289..636f6401 100644 --- a/packages/firebase-auth/project.json +++ b/packages/firebase-auth/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-auth", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-auth", "tsConfig": "packages/firebase-auth/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-auth/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-core/project.json b/packages/firebase-core/project.json index a6b58e2a..7f4d1cff 100644 --- a/packages/firebase-core/project.json +++ b/packages/firebase-core/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-core", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-core", "tsConfig": "packages/firebase-core/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-core/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-crashlytics/project.json b/packages/firebase-crashlytics/project.json index 4d9400ec..cc5cdb8b 100644 --- a/packages/firebase-crashlytics/project.json +++ b/packages/firebase-crashlytics/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-crashlytics", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-crashlytics", "tsConfig": "packages/firebase-crashlytics/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-crashlytics/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-database/project.json b/packages/firebase-database/project.json index c03bc0a3..8f807a09 100644 --- a/packages/firebase-database/project.json +++ b/packages/firebase-database/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-database", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-database", "tsConfig": "packages/firebase-database/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-database/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-dynamic-links/project.json b/packages/firebase-dynamic-links/project.json index 2dd632d6..540166b9 100644 --- a/packages/firebase-dynamic-links/project.json +++ b/packages/firebase-dynamic-links/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-dynamic-links", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-dynamic-links", "tsConfig": "packages/firebase-dynamic-links/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-dynamic-links/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-firestore/index.ios.ts b/packages/firebase-firestore/index.ios.ts index dbfba59d..24fd8ed0 100644 --- a/packages/firebase-firestore/index.ios.ts +++ b/packages/firebase-firestore/index.ios.ts @@ -1304,7 +1304,7 @@ export class Bytes implements IBytes { b64 = base64.split(',')[1]; } const bytes = new Bytes(); - bytes._native = NSData.alloc().initWithBase64EncodedStringOptions(b64, 0); + bytes._native = NSData.alloc().initWithBase64EncodedStringOptions(b64, NSDataBase64DecodingOptions.IgnoreUnknownCharacters); return bytes; } return null; @@ -1321,7 +1321,7 @@ export class Bytes implements IBytes { } toBase64(): string { - return this.native.base64EncodedStringWithOptions(0); + return this.native.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength); } toUint8Array(): Uint8Array { diff --git a/packages/firebase-firestore/project.json b/packages/firebase-firestore/project.json index 14f34a4c..afe3bddc 100644 --- a/packages/firebase-firestore/project.json +++ b/packages/firebase-firestore/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-firestore", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-firestore", "tsConfig": "packages/firebase-firestore/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-firestore/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-functions/project.json b/packages/firebase-functions/project.json index 796725dc..dc24ac7f 100644 --- a/packages/firebase-functions/project.json +++ b/packages/firebase-functions/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-functions", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-functions", "tsConfig": "packages/firebase-functions/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-functions/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-in-app-messaging/project.json b/packages/firebase-in-app-messaging/project.json index 68949f02..131a5f05 100644 --- a/packages/firebase-in-app-messaging/project.json +++ b/packages/firebase-in-app-messaging/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-in-app-messaging", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-in-app-messaging", "tsConfig": "packages/firebase-in-app-messaging/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-in-app-messaging/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-installations/project.json b/packages/firebase-installations/project.json index 98e97aaf..70dc808a 100644 --- a/packages/firebase-installations/project.json +++ b/packages/firebase-installations/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-installations", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-installations", "tsConfig": "packages/firebase-installations/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-installations/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-messaging-core/project.json b/packages/firebase-messaging-core/project.json index 1ff2d7ba..2a691f31 100644 --- a/packages/firebase-messaging-core/project.json +++ b/packages/firebase-messaging-core/project.json @@ -3,9 +3,10 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "sourceRoot": "packages/firebase-messaging-core", + "tags": [], "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-messaging-core", "tsConfig": "packages/firebase-messaging-core/tsconfig.json", @@ -39,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -55,11 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-messaging-core/**/*.ts"] - } + "executor": "@nx/eslint:lint" } - }, - "tags": [] + } } diff --git a/packages/firebase-messaging/project.json b/packages/firebase-messaging/project.json index 735c2988..578beb17 100644 --- a/packages/firebase-messaging/project.json +++ b/packages/firebase-messaging/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-messaging", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-messaging", "tsConfig": "packages/firebase-messaging/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-messaging/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-performance/project.json b/packages/firebase-performance/project.json index d37e879c..fbd85b95 100644 --- a/packages/firebase-performance/project.json +++ b/packages/firebase-performance/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-performance", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-performance", "tsConfig": "packages/firebase-performance/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-performance/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-remote-config/project.json b/packages/firebase-remote-config/project.json index 661ca9b7..f47c58c6 100644 --- a/packages/firebase-remote-config/project.json +++ b/packages/firebase-remote-config/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-remote-config", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-remote-config", "tsConfig": "packages/firebase-remote-config/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-remote-config/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-storage/index.ios.ts b/packages/firebase-storage/index.ios.ts index 8515ccce..335324c5 100644 --- a/packages/firebase-storage/index.ios.ts +++ b/packages/firebase-storage/index.ios.ts @@ -486,7 +486,7 @@ export class Reference implements IReference { let nsData; switch (format) { case StringFormat.BASE64: - nsData = NSData.alloc().initWithBase64EncodedStringOptions(data, 0); + nsData = NSData.alloc().initWithBase64EncodedStringOptions(data, NSDataBase64DecodingOptions.IgnoreUnknownCharacters); break; case StringFormat.BASE64URL: { @@ -495,7 +495,7 @@ export class Reference implements IReference { while (base64Encoded.length % 4 != 0) { base64Encoded = base64Encoded + '='; } - nsData = NSData.alloc().initWithBase64EncodedStringOptions(data, 0); + nsData = NSData.alloc().initWithBase64EncodedStringOptions(data, NSDataBase64DecodingOptions.IgnoreUnknownCharacters); } break; case StringFormat.DATA_URL: { @@ -506,13 +506,13 @@ export class Reference implements IReference { if (!metadata.contentType) { meta.contentType = mime; } - return Task.fromNative(this.native.putDataMetadata(NSData.alloc().initWithBase64EncodedStringOptions(base64, 0), meta.native)); + return Task.fromNative(this.native.putDataMetadata(NSData.alloc().initWithBase64EncodedStringOptions(base64, NSDataBase64DecodingOptions.IgnoreUnknownCharacters), meta.native)); } default: { const text = NSString.stringWithString(data); const nativeData = text.dataUsingEncoding(NSUTF8StringEncoding); - const encodedString = nativeData.base64EncodedStringWithOptions(0); - nsData = NSData.alloc().initWithBase64EncodedStringOptions(encodedString, 0); + const encodedString = nativeData.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength); + nsData = NSData.alloc().initWithBase64EncodedStringOptions(encodedString, NSDataBase64DecodingOptions.IgnoreUnknownCharacters); break; } } diff --git a/packages/firebase-storage/project.json b/packages/firebase-storage/project.json index 899fb52e..6fd1a4b4 100644 --- a/packages/firebase-storage/project.json +++ b/packages/firebase-storage/project.json @@ -5,7 +5,7 @@ "sourceRoot": "packages/firebase-storage", "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-storage", "tsConfig": "packages/firebase-storage/tsconfig.json", @@ -26,7 +26,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -40,11 +40,10 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,10 +55,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-storage/**/*.ts"] - } + "executor": "@nx/eslint:lint" } } } diff --git a/packages/firebase-ui/project.json b/packages/firebase-ui/project.json index 190c875b..ca75e20f 100644 --- a/packages/firebase-ui/project.json +++ b/packages/firebase-ui/project.json @@ -3,9 +3,10 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "sourceRoot": "packages/firebase-ui", + "tags": [], "targets": { "build": { - "executor": "@nrwl/js:tsc", + "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/firebase-ui", "tsConfig": "packages/firebase-ui/tsconfig.json", @@ -36,15 +37,14 @@ "commands": ["node tools/scripts/build-finish.ts firebase-ui"], "parallel": false }, - "outputs": ["dist/packages/firebase-ui"], + "outputs": ["{workspaceRoot}/dist/packages/firebase-ui"], "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true }, { - "target": "build", - "projects": "self" + "target": "build" } ] }, @@ -56,11 +56,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/firebase-ui/**/*.ts"] - } + "executor": "@nx/eslint:lint" } - }, - "tags": [] + } } diff --git a/tools/assets/App_Resources/iOS/build.xcconfig b/tools/assets/App_Resources/iOS/build.xcconfig index 7cfc6d05..8e949b05 100644 --- a/tools/assets/App_Resources/iOS/build.xcconfig +++ b/tools/assets/App_Resources/iOS/build.xcconfig @@ -4,3 +4,4 @@ // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html DEVELOPMENT_TEAM = TG7LSJHB64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +IPHONEOS_DEPLOYMENT_TARGET = 13.0; diff --git a/tools/scripts/build-finish.ts b/tools/scripts/build-finish.ts index 398d1df9..7b10ce60 100644 --- a/tools/scripts/build-finish.ts +++ b/tools/scripts/build-finish.ts @@ -1,6 +1,7 @@ const ngPackage = require('ng-packagr'); const path = require('path'); const fs = require('fs-extra'); +const { serializeJson, parseJson } = require('@nx/devkit'); const rootDir = path.resolve(path.join(__dirname, '..', '..')); const nxConfigPath = path.resolve(path.join(rootDir, 'nx.json')); @@ -44,9 +45,31 @@ function copyAngularDist() { .catch((err) => console.error(err)); } +function cleanPackage() { + // helps remove unwanted properties which may be added by other tooling + const packageJsonPath = path.resolve(rootDir, 'dist', 'packages', packageName, 'package.json'); + let packageJson = fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }); + if (packageJson) { + packageJson = parseJson(packageJson); + // we don't need module or type properties at the moment + delete packageJson['module']; + delete packageJson['type']; + fs.writeFileSync(packageJsonPath, serializeJson(packageJson)); + + const angularNpmIgnorePath = path.resolve(rootDir, 'dist', 'packages', packageName, 'angular', '.npmignore'); + // remove .npmignore as we don't need it in angular folder if found + if (fs.existsSync(angularNpmIgnorePath)) { + fs.unlinkSync(angularNpmIgnorePath); + } + } +} + function finishPreparation() { fs.copy(path.join('tools', 'assets', 'publishing'), path.join('dist', 'packages', packageName)) - .then(() => console.log(`${npmPackageName} ready to publish.`)) + .then(() => { + cleanPackage(); + console.log(`${npmPackageName} ready to publish.`); + }) .catch((err) => console.error(err)); }