Skip to content

Commit 9d8df5f

Browse files
committed
Merge remote-tracking branch 'nativescript/main'
# Conflicts: # lib/base-package-manager.ts # lib/controllers/build-controller.ts # lib/nativescript-cli.ts # lib/package-installation-manager.ts # lib/package-manager.ts # lib/services/android-plugin-build-service.ts # lib/services/device/device-install-app-service.ts # lib/services/timeline-profiler-service.ts # lib/yarn2-package-manager.ts # package-lock.json # package.json # yarn.lock
2 parents a32ba3f + eb91801 commit 9d8df5f

File tree

205 files changed

+32454
-17270
lines changed

Some content is hidden

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

205 files changed

+32454
-17270
lines changed

.github/workflows/npm_release_cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'nativescript -> npm'
22

33
on:
44
push:
5-
branches: [ 'master' ]
5+
branches: [ 'main' ]
66
paths-ignore:
77
- 'packages/**'
88
workflow_dispatch:

.github/workflows/npm_release_doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: '@nativescript/doctor -> npm'
22

33
on:
44
push:
5-
branches: [ 'master' ]
5+
branches: [ 'main' ]
66
paths:
77
- 'packages/doctor/**'
88
workflow_dispatch:

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
## [8.5.3](https://github.com/NativeScript/nativescript-cli/compare/v8.5.2...v8.5.3) (2023-04-12)
2+
3+
4+
### Bug Fixes
5+
6+
* correctly merge IPHONEOS_DEPLOYMENT_TARGET in xcconfigs ([#5728](https://github.com/NativeScript/nativescript-cli/issues/5728)) ([e6c09c0](https://github.com/NativeScript/nativescript-cli/commit/e6c09c0048534f6079634291706b0b38ac193a6c))
7+
* hooks not being called ([#5729](https://github.com/NativeScript/nativescript-cli/issues/5729)) ([c35673e](https://github.com/NativeScript/nativescript-cli/commit/c35673eb9ed02116e1286351ca7a711d6ee231e7))
8+
* migrate - safeguard possibly null values ([#5730](https://github.com/NativeScript/nativescript-cli/issues/5730)) ([68d9373](https://github.com/NativeScript/nativescript-cli/commit/68d9373aec1427a71e1f6236fff4f8084c33a421))
9+
10+
11+
12+
## [8.5.2](https://github.com/NativeScript/nativescript-cli/compare/v8.5.1...v8.5.2) (2023-04-06)
13+
14+
15+
### Features
16+
17+
* clean multiple projects ([#5726](https://github.com/NativeScript/nativescript-cli/issues/5726)) ([e39e8db](https://github.com/NativeScript/nativescript-cli/commit/e39e8dbea725bbb541c9f76fc7b8723bf204d423))
18+
19+
20+
21+
## [8.5.1](https://github.com/NativeScript/nativescript-cli/compare/v8.5.0...v8.5.1) (2023-03-29)
22+
23+
24+
### Reverts
25+
26+
* "fix: build plugins using same gradle config structure as apps ([#5671](https://github.com/NativeScript/nativescript-cli/issues/5671))" ([2c2c964](https://github.com/NativeScript/nativescript-cli/commit/2c2c964c791a831f091a5a10432d4b9f6266e5d4))
27+
28+
29+
30+
# [8.5.0](https://github.com/NativeScript/nativescript-cli/compare/v8.4.0...v8.5.0) (2023-03-28)
31+
32+
33+
### Bug Fixes
34+
35+
* **publish:** various apple publish/sign-in fixes ([#5718](https://github.com/NativeScript/nativescript-cli/issues/5718)) ([1c27c2b](https://github.com/NativeScript/nativescript-cli/commit/1c27c2bf17a7df1fcfa434b7c04fda3a41f38a34))
36+
* build plugins using same gradle config structure as apps ([#5671](https://github.com/NativeScript/nativescript-cli/issues/5671)) ([40e459a](https://github.com/NativeScript/nativescript-cli/commit/40e459ac2669bed5a1b661f47336691cc8d0b997))
37+
* **android:** support unsigned apks ([#5706](https://github.com/NativeScript/nativescript-cli/issues/5706)) ([32d3a0f](https://github.com/NativeScript/nativescript-cli/commit/32d3a0fe4a83943c2580b42c1e1536236a3d6164))
38+
* **doctor:** check for python3 instead of python ([f21156c](https://github.com/NativeScript/nativescript-cli/commit/f21156c8d02964308f503dcdf8f9dc2764745b4e))
39+
40+
41+
### Features
42+
43+
* **migrate:** 8.5.0 migrations ([#5725](https://github.com/NativeScript/nativescript-cli/issues/5725)) ([b11357d](https://github.com/NativeScript/nativescript-cli/commit/b11357d1c1c7ee717acd43fbccee568367d77016))
44+
* support generating android adaptive icons ([#5667](https://github.com/NativeScript/nativescript-cli/issues/5667)) ([73694bd](https://github.com/NativeScript/nativescript-cli/commit/73694bd447625f3df91f999c66e13e9ddc6fb01e))
45+
* **profiling:** generate chrome compatible timeline data ([#5686](https://github.com/NativeScript/nativescript-cli/issues/5686)) ([0569873](https://github.com/NativeScript/nativescript-cli/commit/0569873139576c3264c631699d9357a96d2d4dbf))
46+
* experimental SPM support ([#5721](https://github.com/NativeScript/nativescript-cli/issues/5721)) ([1443240](https://github.com/NativeScript/nativescript-cli/commit/14432403857354a8281b8fd1c1d3b4c2f6659403))
47+
* experimental yarn2+ support ([#5701](https://github.com/NativeScript/nativescript-cli/issues/5701)) ([363db96](https://github.com/NativeScript/nativescript-cli/commit/363db96d7a07245cf1635a2dc22b7a2110941f29))
48+
49+
50+
51+
# [8.4.0](https://github.com/NativeScript/nativescript-cli/compare/v8.3.3...v8.4.0) (2022-11-30)
52+
53+
54+
### Bug Fixes
55+
56+
* get `targetSdkVersion` from project ext ([#5656](https://github.com/NativeScript/nativescript-cli/issues/5656)) ([7574be2](https://github.com/NativeScript/nativescript-cli/commit/7574be2f4cd19b3f9ed28bf351f59ed22f11d7ae))
57+
* handle unknown/undefined platform edge case ([#5694](https://github.com/NativeScript/nativescript-cli/issues/5694)) ([aa3de73](https://github.com/NativeScript/nativescript-cli/commit/aa3de73193356eedc8ba1c68c9ae9e62b3902832))
58+
* hmr doesn't work properly in paths with the character '.' ([#5703](https://github.com/NativeScript/nativescript-cli/issues/5703)) ([7a312a2](https://github.com/NativeScript/nativescript-cli/commit/7a312a2113796a75d4fa22541249526bd4ef2dd6))
59+
* only include EXCLUDED_ARCHS workaround in xcode 12 ([#5705](https://github.com/NativeScript/nativescript-cli/issues/5705)) ([3e430cf](https://github.com/NativeScript/nativescript-cli/commit/3e430cffb52e5f210d3e32e293b9f464f2fc75b6))
60+
* **testing:** pin karma-jasmine to 4.0.2 ([#5695](https://github.com/NativeScript/nativescript-cli/issues/5695)) ([a5bbac7](https://github.com/NativeScript/nativescript-cli/commit/a5bbac7d32c0a60ea3426b3fbd9b795402d757d1)), closes [#5690](https://github.com/NativeScript/nativescript-cli/issues/5690)
61+
62+
63+
### Features
64+
65+
* **doctor:** more informative android compile SDK messages ([#5697](https://github.com/NativeScript/nativescript-cli/issues/5697)) ([cfaa882](https://github.com/NativeScript/nativescript-cli/commit/cfaa882dd42d0d2447efb597442359ed19d9665d))
66+
* include-settings.gradle plugin ([#5693](https://github.com/NativeScript/nativescript-cli/issues/5693)) ([6155ff7](https://github.com/NativeScript/nativescript-cli/commit/6155ff7f40c37c1183f9cf66b3ea0a464fb6497c))
67+
* pass in tempPlugin flag during plugin build ([#5691](https://github.com/NativeScript/nativescript-cli/issues/5691)) ([645e9ea](https://github.com/NativeScript/nativescript-cli/commit/645e9ea516063db5da230fbd08db7d9fe37ab971))
68+
* **migrations:** use Angular 14.2 ([3dc0323](https://github.com/NativeScript/nativescript-cli/commit/3dc03231c7edc7efce9f97445a211f7657c8da1e))
69+
70+
71+
172
## [8.3.3](https://github.com/NativeScript/nativescript-cli/compare/v8.3.2...v8.3.3) (2022-08-22)
273

374

config/config.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@
44
"ANDROID_DEBUG_UI_MAC": "Google Chrome",
55
"USE_POD_SANDBOX": false,
66
"DISABLE_HOOKS": false,
7-
"UPLOAD_PLAYGROUND_FILES_ENDPOINT": "https://play.nativescript.org/api/files",
8-
"SHORTEN_URL_ENDPOINT": "https://play.nativescript.org/api/shortenurl?longUrl=%s",
9-
"INSIGHTS_URL_ENDPOINT": "https://play-server.nativescript.org/api/insights?ipAddress=%s",
10-
"WHOAMI_URL_ENDPOINT": "https://play.nativescript.org/api/whoami",
11-
"PREVIEW_APP_ENVIRONMENT": "live",
127
"GA_TRACKING_ID": "UA-111455-51"
138
}

config/test-dependencies.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
},
2626
{
2727
"name": "karma-jasmine",
28-
"framework": "jasmine"
28+
"framework": "jasmine",
29+
"version": "4.0.2"
2930
},
3031
{
3132
"name": "karma-qunit",

docs/man_pages/project/configuration/resources/resources-generate-icons.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Usage | Synopsis
1515
------|-------
1616
`$ tns resources generate icons <Path to image>` | Generate all icons for Android and iOS based on the specified image.
1717

18+
### Options
19+
20+
* `--background` Sets the background color of the icon. When no color is specified, a default value of `transparent` is used. `<Color>` is a valid color and can be represented with string, like `white`, `black`, `blue`, or with HEX representation, for example `#FFFFFF`, `#000000`, `#0000FF`. NOTE: As the `#` is special symbol in some terminals, make sure to place the value in quotes, for example `$ tns resources generate icons ../myImage.png --background "#FF00FF"`.
21+
1822
### Arguments
1923

2024
* `<Path to image>` is a valid path to an image that will be used to generate all icons.

lib/base-package-manager.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ export abstract class BasePackageManager implements INodePackageManager {
130130
protected getFlagsString(config: any, asArray: boolean): any {
131131
const array: Array<string> = [];
132132
for (const flag in config) {
133-
if (flag === "global" && this.packageManager !== "yarn" && this.packageManager !== "yarn2") {
133+
if (
134+
flag === "global" &&
135+
this.packageManager !== "yarn" &&
136+
this.packageManager !== "yarn2"
137+
) {
134138
array.push(`--${flag}`);
135139
array.push(`${config[flag]}`);
136140
} else if (config[flag]) {
@@ -145,7 +149,6 @@ export abstract class BasePackageManager implements INodePackageManager {
145149
array.push(`--fields ${flag}`);
146150
} else {
147151
array.push(` ${flag}`);
148-
149152
}
150153
continue;
151154
}

lib/bootstrap.ts

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ injector.require("iOSProjectService", "./services/ios-project-service");
5858
injector.require("iOSProvisionService", "./services/ios-provision-service");
5959
injector.require("xcconfigService", "./services/xcconfig-service");
6060
injector.require("iOSSigningService", "./services/ios/ios-signing-service");
61+
injector.require("spmService", "./services/ios/spm-service");
6162
injector.require(
6263
"xcodebuildArgsService",
6364
"./services/ios/xcodebuild-args-service"
@@ -100,7 +101,7 @@ injector.require(
100101
"./services/platform/platform-validation-service"
101102
);
102103

103-
injector.require("buildArtefactsService", "./services/build-artefacts-service");
104+
injector.require("buildArtifactsService", "./services/build-artifacts-service");
104105

105106
injector.require(
106107
"deviceInstallAppService",
@@ -119,10 +120,6 @@ injector.requirePublicClass(
119120
"debugController",
120121
"./controllers/debug-controller"
121122
);
122-
injector.requirePublicClass(
123-
"previewAppController",
124-
"./controllers/preview-app-controller"
125-
);
126123
injector.requirePublicClass(
127124
"updateController",
128125
"./controllers/update-controller"
@@ -168,11 +165,6 @@ injector.require(
168165
"googleAnalyticsProvider",
169166
"./services/analytics/google-analytics-provider"
170167
);
171-
injector.requirePublicClass(
172-
"companyInsightsController",
173-
"./controllers/company-insights-controller"
174-
);
175-
176168
injector.require("platformCommandParameter", "./platform-command-param");
177169
injector.requireCommand("create", "./commands/create-project");
178170
injector.requireCommand("clean", "./commands/clean");
@@ -308,34 +300,6 @@ injector.require(
308300
"./services/livesync/ios-livesync-service"
309301
);
310302
injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
311-
injector.require(
312-
"previewAppFilesService",
313-
"./services/livesync/playground/preview-app-files-service"
314-
);
315-
injector.require(
316-
"previewAppLogProvider",
317-
"./services/livesync/playground/preview-app-log-provider"
318-
);
319-
injector.require(
320-
"previewAppPluginsService",
321-
"./services/livesync/playground/preview-app-plugins-service"
322-
);
323-
injector.require(
324-
"previewSdkService",
325-
"./services/livesync/playground/preview-sdk-service"
326-
);
327-
injector.require(
328-
"previewSchemaService",
329-
"./services/livesync/playground/preview-schema-service"
330-
);
331-
injector.requirePublicClass(
332-
"previewDevicesService",
333-
"./services/livesync/playground/devices/preview-devices-service"
334-
);
335-
injector.requirePublic(
336-
"previewQrCodeService",
337-
"./services/livesync/playground/preview-qr-code-service"
338-
);
339303
injector.requirePublic("sysInfo", "./sys-info");
340304

341305
injector.require(
@@ -352,7 +316,6 @@ injector.require(
352316
"./device-sockets/ios/socket-request-executor"
353317
);
354318
injector.require("messages", "./common/messages/messages");
355-
injector.require("xmlValidator", "./xml-validator");
356319

357320
injector.requireCommand("post-install-cli", "./commands/post-install");
358321
injector.requireCommand("migrate", "./commands/migrate");
@@ -395,7 +358,6 @@ injector.require(
395358
"./services/terminal-spinner-service"
396359
);
397360

398-
injector.require("playgroundService", "./services/playground-service");
399361
injector.require(
400362
"platformEnvironmentRequirements",
401363
"./services/platform-environment-requirements"

lib/color.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// using chalk as some of our other dependencies are already using it...
2+
// exporting from here so we can easily refactor to a different color library if needed
3+
import * as chalk from "chalk";
4+
5+
export type Color = typeof chalk.Color;
6+
7+
export const color = chalk;

lib/commands/appstore-upload.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ export class PublishIOS implements ICommand {
4040
}
4141

4242
public async execute(args: string[]): Promise<void> {
43-
await this.$itmsTransporterService.validate();
43+
await this.$itmsTransporterService.validate(
44+
this.$options.appleApplicationSpecificPassword
45+
);
4446

4547
const username =
4648
args[0] ||
4749
(await this.$prompter.getString("Apple ID", { allowEmpty: false }));
50+
4851
const password =
4952
args[1] || (await this.$prompter.getPassword("Apple ID password"));
50-
const mobileProvisionIdentifier = args[2];
51-
const codeSignIdentity = args[3];
5253

5354
const user = await this.$applePortalSessionService.createUserSession(
5455
{ username, password },
@@ -66,6 +67,8 @@ export class PublishIOS implements ICommand {
6667
);
6768
}
6869

70+
const mobileProvisionIdentifier = this.$options.provision ?? args[2];
71+
6972
let ipaFilePath = this.$options.ipa
7073
? path.resolve(this.$options.ipa)
7174
: null;
@@ -76,25 +79,21 @@ export class PublishIOS implements ICommand {
7679
);
7780
}
7881

79-
if (!codeSignIdentity && !ipaFilePath) {
80-
this.$logger.warn(
81-
"No code sign identity set. A default code sign identity will be used. You can set one in app/App_Resources/iOS/build.xcconfig"
82-
);
83-
}
84-
8582
this.$options.release = true;
8683

8784
if (!ipaFilePath) {
8885
const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
8986
// No .ipa path provided, build .ipa on out own.
90-
if (mobileProvisionIdentifier || codeSignIdentity) {
87+
if (mobileProvisionIdentifier) {
9188
// This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
9289
this.$logger.info(
93-
"Building .ipa with the selected mobile provision and/or certificate."
90+
"Building .ipa with the selected mobile provision and/or certificate. " +
91+
mobileProvisionIdentifier
9492
);
9593

9694
// As we need to build the package for device
9795
this.$options.forDevice = true;
96+
this.$options.provision = mobileProvisionIdentifier;
9897

9998
const buildData = new IOSBuildData(
10099
this.$projectData.projectDir,
@@ -124,6 +123,7 @@ export class PublishIOS implements ICommand {
124123
ipaFilePath,
125124
shouldExtractIpa: !!this.$options.ipa,
126125
verboseLogging: this.$logger.getLevel() === "TRACE",
126+
teamId: this.$options.teamId,
127127
});
128128
}
129129

lib/commands/build.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ export class BuildIosCommand extends BuildCommandBase implements ICommand {
142142

143143
super.validatePlatform(platform);
144144

145-
let canExecute = await super.canExecuteCommandBase(platform, {
146-
notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
147-
});
145+
let canExecute = await super.canExecuteCommandBase(platform);
148146
if (canExecute) {
149147
canExecute = await super.validateArgs(args, platform);
150148
}
@@ -213,9 +211,7 @@ export class BuildAndroidCommand extends BuildCommandBase implements ICommand {
213211
this.$androidBundleValidatorHelper.validateRuntimeVersion(
214212
this.$projectData
215213
);
216-
let canExecute = await super.canExecuteCommandBase(platform, {
217-
notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
218-
});
214+
let canExecute = await super.canExecuteCommandBase(platform);
219215
if (canExecute) {
220216
if (this.$options.release && !hasValidAndroidSigning(this.$options)) {
221217
this.$errors.failWithHelp(ANDROID_RELEASE_BUILD_ERROR_MESSAGE);

0 commit comments

Comments
 (0)