nativescript 8.3.3 → 8.4.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.
@@ -25,7 +25,8 @@
25
25
  },
26
26
  {
27
27
  "name": "karma-jasmine",
28
- "framework": "jasmine"
28
+ "framework": "jasmine",
29
+ "version": "4.0.2"
29
30
  },
30
31
  {
31
32
  "name": "karma-qunit",
@@ -1 +1 @@
1
- {"@jsdevtools/coverage-istanbul-loader":"3.0.5","karma":"6.4.0","karma-coverage":"2.2.0","karma-nativescript-launcher":"0.4.0","mocha":"10.0.0","karma-mocha":"2.0.1","karma-chai":"0.1.0","karma-jasmine":"5.1.0","karma-qunit":"4.1.2","@types/karma-chai":"0.1.3","@types/mocha":"9.1.1","@types/jasmine":"4.0.3","@types/qunit":"2.19.2","nyc":"15.1.0"}
1
+ {"@jsdevtools/coverage-istanbul-loader":"3.0.5","karma":"6.4.1","karma-coverage":"2.2.0","karma-nativescript-launcher":"0.4.0","mocha":"10.1.0","karma-mocha":"2.0.1","karma-chai":"0.1.0","karma-jasmine":"4.0.2","karma-qunit":"4.1.2","@types/karma-chai":"0.1.3","@types/mocha":"10.0.1","@types/jasmine":"4.3.0","@types/qunit":"2.19.3","nyc":"15.1.0"}
@@ -47,7 +47,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
47
47
  {
48
48
  packageName: "@nativescript/core",
49
49
  minVersion: "6.5.0",
50
- desiredVersion: "~8.3.0",
50
+ desiredVersion: "~8.4.0",
51
51
  shouldAddIfMissing: true,
52
52
  },
53
53
  {
@@ -57,7 +57,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
57
57
  {
58
58
  packageName: "@nativescript/types",
59
59
  minVersion: "7.0.0",
60
- desiredVersion: "~8.3.0",
60
+ desiredVersion: "~8.4.0",
61
61
  isDev: true,
62
62
  },
63
63
  {
@@ -92,7 +92,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
92
92
  {
93
93
  packageName: "nativescript-vue",
94
94
  minVersion: "2.7.0",
95
- desiredVersion: "~2.9.1",
95
+ desiredVersion: "~2.9.2",
96
96
  shouldMigrateAction(dependency, projectData, loose) {
97
97
  return __awaiter(this, void 0, void 0, function* () {
98
98
  if (!this.hasDependency(dependency, projectData)) {
@@ -111,7 +111,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
111
111
  {
112
112
  packageName: "@nativescript/angular",
113
113
  minVersion: "10.0.0",
114
- desiredVersion: "^14.0.0",
114
+ desiredVersion: "~14.2.0",
115
115
  shouldMigrateAction(dependency, projectData, loose) {
116
116
  return __awaiter(this, void 0, void 0, function* () {
117
117
  if (!this.hasDependency(dependency, projectData)) {
@@ -166,7 +166,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
166
166
  packageName: "typescript",
167
167
  isDev: true,
168
168
  minVersion: "3.7.0",
169
- desiredVersion: "~4.5.5",
169
+ desiredVersion: "~4.8.4",
170
170
  },
171
171
  {
172
172
  packageName: "node-sass",
@@ -195,13 +195,13 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
195
195
  {
196
196
  packageName: "@nativescript/ios",
197
197
  minVersion: "6.5.3",
198
- desiredVersion: "~8.3.0",
198
+ desiredVersion: "~8.4.0",
199
199
  isDev: true,
200
200
  },
201
201
  {
202
202
  packageName: "@nativescript/android",
203
203
  minVersion: "7.0.0",
204
- desiredVersion: "~8.3.0",
204
+ desiredVersion: "~8.4.0",
205
205
  isDev: true,
206
206
  },
207
207
  ];
@@ -780,7 +780,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
780
780
  migrateNativeScriptAngular() {
781
781
  return __awaiter(this, void 0, void 0, function* () {
782
782
  const minVersion = "10.0.0";
783
- const desiredVersion = "~14.1.0";
783
+ const desiredVersion = "~14.2.0";
784
784
  const dependencies = [
785
785
  {
786
786
  packageName: "@angular/animations",
@@ -876,7 +876,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
876
876
  {
877
877
  packageName: "nativescript-vue-template-compiler",
878
878
  minVersion: "2.7.0",
879
- desiredVersion: "~2.9.1",
879
+ desiredVersion: "~2.9.2",
880
880
  isDev: true,
881
881
  shouldAddIfMissing: true,
882
882
  },
@@ -251,12 +251,14 @@ class AndroidPluginBuildService {
251
251
  const gradleTemplatePath = path.resolve(path.join(__dirname, "../../vendor/gradle-plugin"));
252
252
  const allGradleTemplateFiles = path.join(gradleTemplatePath, "*");
253
253
  const buildGradlePath = path.join(pluginTempDir, "build.gradle");
254
+ const settingsGradlePath = path.join(pluginTempDir, "settings.gradle");
254
255
  this.$fs.copyFile(allGradleTemplateFiles, pluginTempDir);
255
256
  this.addCompileDependencies(platformsAndroidDirPath, buildGradlePath);
256
257
  const runtimeGradleVersions = yield this.getRuntimeGradleVersions(projectDir);
257
258
  this.replaceGradleVersion(pluginTempDir, runtimeGradleVersions.gradleVersion);
258
259
  this.replaceGradleAndroidPluginVersion(buildGradlePath, runtimeGradleVersions.gradleAndroidPluginVersion);
259
260
  this.replaceFileContent(buildGradlePath, "{{pluginName}}", pluginName);
261
+ this.replaceFileContent(settingsGradlePath, "{{pluginName}}", pluginName);
260
262
  });
261
263
  }
262
264
  getRuntimeGradleVersions(projectDir) {
@@ -449,6 +451,7 @@ class AndroidPluginBuildService {
449
451
  "-p",
450
452
  pluginBuildSettings.pluginDir,
451
453
  "assembleRelease",
454
+ `-PtempBuild=true`,
452
455
  `-PcompileSdk=android-${pluginBuildSettings.androidToolsInfo.compileSdkVersion}`,
453
456
  `-PbuildToolsVersion=${pluginBuildSettings.androidToolsInfo.buildToolsVersion}`,
454
457
  `-PappPath=${this.$projectData.getAppDirectoryPath()}`,
@@ -17,7 +17,7 @@ const constants_1 = require("../constants");
17
17
  const helpers_1 = require("../common/helpers");
18
18
  const yok_1 = require("../common/yok");
19
19
  class CocoaPodsService {
20
- constructor($cocoaPodsPlatformManager, $fs, $childProcess, $errors, $logger, $config, $xcconfigService) {
20
+ constructor($cocoaPodsPlatformManager, $fs, $childProcess, $errors, $logger, $config, $xcconfigService, $xcodeSelectService) {
21
21
  this.$cocoaPodsPlatformManager = $cocoaPodsPlatformManager;
22
22
  this.$fs = $fs;
23
23
  this.$childProcess = $childProcess;
@@ -25,6 +25,7 @@ class CocoaPodsService {
25
25
  this.$logger = $logger;
26
26
  this.$config = $config;
27
27
  this.$xcconfigService = $xcconfigService;
28
+ this.$xcodeSelectService = $xcodeSelectService;
28
29
  this.getCocoaPodsFromPodfile = _.memoize(this._getCocoaPodsFromPodfile, helpers_1.getHash);
29
30
  }
30
31
  getPodfileHeader(targetName) {
@@ -93,6 +94,10 @@ ${versionResolutionHint}`);
93
94
  }
94
95
  applyPodfileArchExclusions(projectData, platformData) {
95
96
  return __awaiter(this, void 0, void 0, function* () {
97
+ const xcodeVersionData = yield this.$xcodeSelectService.getXcodeVersion();
98
+ if (+xcodeVersionData.major !== 12) {
99
+ return;
100
+ }
96
101
  const { projectRoot } = platformData;
97
102
  const exclusionsPodfile = path.join(projectRoot, "Podfile-exclusions");
98
103
  if (!this.$fs.exists(exclusionsPodfile)) {
@@ -74,8 +74,9 @@ class PlatformEnvironmentRequirements {
74
74
  win32: "windows",
75
75
  darwin: "macos",
76
76
  }[process.platform];
77
+ const anchor = platform ? `#${os}-${platform.toLowerCase()}` : '';
77
78
  return (`Verify that your environment is configured according to the system requirements described at\n` +
78
- `https://docs.nativescript.org/environment-setup.html#${os}-${platform.toLowerCase()}.`);
79
+ `https://docs.nativescript.org/environment-setup.html${anchor}.`);
79
80
  }
80
81
  }
81
82
  PlatformEnvironmentRequirements.MISSING_LOCAL_SETUP_MESSAGE = "Your environment is not configured properly and you will not be able to execute local builds.";
@@ -334,11 +334,12 @@ class WebpackCompilerService extends events_1.EventEmitter {
334
334
  const files = message.data.emittedAssets.map((asset) => path.join(platformData.appDestinationDirectoryPath, "app", asset));
335
335
  const staleFiles = message.data.staleAssets.map((asset) => path.join(platformData.appDestinationDirectoryPath, "app", asset));
336
336
  const lastHash = (() => {
337
- const fileWithLastHash = files.find((fileName) => fileName.endsWith("hot-update.js"));
338
- if (!fileWithLastHash) {
337
+ const absoluteFileNameWithLastHash = files.find((fileName) => fileName.endsWith("hot-update.js"));
338
+ if (!absoluteFileNameWithLastHash) {
339
339
  return null;
340
340
  }
341
- const matches = fileWithLastHash.match(/\.(.+).hot-update\.js/);
341
+ const fileNameWithLastHash = path.basename(absoluteFileNameWithLastHash);
342
+ const matches = fileNameWithLastHash.match(/\.(.+).hot-update\.js/);
342
343
  if (matches) {
343
344
  return matches[1];
344
345
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nativescript",
3
3
  "preferGlobal": true,
4
- "version": "8.3.3",
4
+ "version": "8.4.0",
5
5
  "author": "NativeScript <support@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {
@@ -146,6 +146,7 @@ allprojects {
146
146
 
147
147
 
148
148
  def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 31 }
149
+ def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 31 as int }
149
150
  def computeBuildToolsVersion = { ->
150
151
  project.hasProperty("buildToolsVersion") ? buildToolsVersion : "31.0.0"
151
152
  }
@@ -166,7 +167,7 @@ android {
166
167
  buildToolsVersion computeBuildToolsVersion()
167
168
 
168
169
  defaultConfig {
169
- targetSdkVersion 31
170
+ targetSdkVersion computeTargetSdkVersion()
170
171
  versionCode 1
171
172
  versionName "1.0"
172
173
  }
@@ -1 +1,25 @@
1
+ import groovy.json.JsonSlurper
1
2
 
3
+ def USER_PROJECT_ROOT = "$rootDir/../../../"
4
+ def PLATFORMS_ANDROID = "platforms/android"
5
+ def PLUGIN_NAME = "{{pluginName}}"
6
+
7
+ def dependenciesJson = file("${USER_PROJECT_ROOT}/${PLATFORMS_ANDROID}/dependencies.json")
8
+ def appDependencies = new JsonSlurper().parseText(dependenciesJson.text)
9
+ def pluginData = appDependencies.find { it.name == PLUGIN_NAME }
10
+ def nativescriptDependencies = appDependencies.findAll{pluginData.name == it.name}
11
+
12
+ def getDepPlatformDir = { dep ->
13
+ file("$USER_PROJECT_ROOT/$PLATFORMS_ANDROID/${dep.directory}/$PLATFORMS_ANDROID")
14
+ }
15
+
16
+ def applyIncludeSettingsGradlePlugin = {
17
+ nativescriptDependencies.each { dep ->
18
+ def includeSettingsGradlePath = "${getDepPlatformDir(dep)}/include-settings.gradle"
19
+ if (file(includeSettingsGradlePath).exists()) {
20
+ apply from: includeSettingsGradlePath
21
+ }
22
+ }
23
+ }
24
+
25
+ applyIncludeSettingsGradlePlugin()