nativescript 9.1.0-rc.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,7 @@ export declare class MigrateController extends UpdateControllerBase implements I
56
56
  private migrateConfigs;
57
57
  private migrateUnitTestRunner;
58
58
  private migrateTSConfig;
59
+ private migrateTSConfigForTypeScript6;
59
60
  private checkOrCreatePolyfillsTS;
60
61
  private migrateNativeScriptAngular;
61
62
  private migrateNativeScriptVue;
@@ -40,7 +40,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
40
40
  {
41
41
  packageName: "@nativescript/core",
42
42
  minVersion: "6.5.0",
43
- desiredVersion: "~9.0.0",
43
+ desiredVersion: "~9.1.0",
44
44
  shouldAddIfMissing: true,
45
45
  },
46
46
  {
@@ -50,7 +50,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
50
50
  {
51
51
  packageName: "@nativescript/types",
52
52
  minVersion: "7.0.0",
53
- desiredVersion: "~9.0.0",
53
+ desiredVersion: "~9.1.0",
54
54
  isDev: true,
55
55
  },
56
56
  {
@@ -100,7 +100,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
100
100
  {
101
101
  packageName: "@nativescript/angular",
102
102
  minVersion: "10.0.0",
103
- desiredVersion: "^20.0.0",
103
+ desiredVersion: "~22.0.0",
104
104
  async shouldMigrateAction(dependency, projectData, loose) {
105
105
  if (!this.hasDependency(dependency, projectData)) {
106
106
  return false;
@@ -134,7 +134,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
134
134
  {
135
135
  packageName: "@nativescript/unit-test-runner",
136
136
  minVersion: "1.0.0",
137
- desiredVersion: "~3.0.0",
137
+ desiredVersion: "~4.0.1",
138
138
  async shouldMigrateAction(dependency, projectData, loose) {
139
139
  if (!this.hasDependency(dependency, projectData)) {
140
140
  return false;
@@ -147,7 +147,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
147
147
  packageName: "typescript",
148
148
  isDev: true,
149
149
  minVersion: "3.7.0",
150
- desiredVersion: "~5.8.0",
150
+ desiredVersion: "~6.0.0",
151
151
  },
152
152
  {
153
153
  packageName: "node-sass",
@@ -176,13 +176,13 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
176
176
  {
177
177
  packageName: "@nativescript/ios",
178
178
  minVersion: "6.5.3",
179
- desiredVersion: "~9.0.0",
179
+ desiredVersion: "~9.1.0",
180
180
  isDev: true,
181
181
  },
182
182
  {
183
183
  packageName: "@nativescript/android",
184
184
  minVersion: "7.0.0",
185
- desiredVersion: "~9.0.0",
185
+ desiredVersion: "~9.1.0",
186
186
  isDev: true,
187
187
  },
188
188
  ];
@@ -680,6 +680,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
680
680
  configContents.compilerOptions.lib = [
681
681
  ...new Set([...(configContents.compilerOptions.lib || []), "ESNext"]),
682
682
  ];
683
+ this.migrateTSConfigForTypeScript6(configContents.compilerOptions);
683
684
  if (isAngular) {
684
685
  if (configContents.files) {
685
686
  configContents.files = [
@@ -698,6 +699,32 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
698
699
  return false;
699
700
  }
700
701
  }
702
+ migrateTSConfigForTypeScript6(compilerOptions) {
703
+ var _a, _b, _c;
704
+ const baseUrl = (_a = compilerOptions.baseUrl) !== null && _a !== void 0 ? _a : ".";
705
+ delete compilerOptions.baseUrl;
706
+ delete compilerOptions.downlevelIteration;
707
+ const toRelative = (target) => {
708
+ if (path.posix.isAbsolute(target)) {
709
+ return target;
710
+ }
711
+ const rebased = path.posix.join(baseUrl, target);
712
+ return rebased.startsWith(".") ? rebased : `./${rebased}`;
713
+ };
714
+ if (compilerOptions.paths) {
715
+ compilerOptions.paths = _.mapValues(compilerOptions.paths, (targets) => targets.map(toRelative));
716
+ }
717
+ if (compilerOptions.typeRoots) {
718
+ compilerOptions.typeRoots = [
719
+ ...new Set([
720
+ ...compilerOptions.typeRoots.map(toRelative),
721
+ "./node_modules/@types",
722
+ ]),
723
+ ];
724
+ }
725
+ compilerOptions.strict = (_b = compilerOptions.strict) !== null && _b !== void 0 ? _b : false;
726
+ compilerOptions.skipLibCheck = (_c = compilerOptions.skipLibCheck) !== null && _c !== void 0 ? _c : true;
727
+ }
701
728
  async checkOrCreatePolyfillsTS(projectData) {
702
729
  const { projectDir, appDirectoryPath } = projectData;
703
730
  const possiblePaths = [
@@ -720,7 +747,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
720
747
  }
721
748
  async migrateNativeScriptAngular() {
722
749
  const minVersion = "10.0.0";
723
- const desiredVersion = "~20.2.0";
750
+ const desiredVersion = "~22.0.0";
724
751
  const dependencies = [
725
752
  {
726
753
  packageName: "@angular/animations",
@@ -779,7 +806,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
779
806
  {
780
807
  packageName: "zone.js",
781
808
  minVersion: "0.11.1",
782
- desiredVersion: "~0.15.0",
809
+ desiredVersion: "~0.16.0",
783
810
  shouldAddIfMissing: true,
784
811
  },
785
812
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nativescript",
3
3
  "main": "./lib/nativescript-cli-lib.js",
4
- "version": "9.1.0-rc.0",
4
+ "version": "9.1.0",
5
5
  "author": "NativeScript <oss@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {