Skip to content

Commit 2abccb5

Browse files
Merge pull request #4365 from NativeScript/vladimirov/merge-rel-master
chore: merge release in master
2 parents eb97d21 + a697c16 commit 2abccb5

File tree

9 files changed

+50
-51
lines changed

9 files changed

+50
-51
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
NativeScript CLI Changelog
22
================
33

4+
5+
5.2.0 (2018, February 13)
6+
==
7+
8+
### Implemented
9+
* [Implemented #3807](https://github.com/NativeScript/nativescript-cli/issues/3807): Enable app Podfile
10+
* [Implemented #4243](https://github.com/NativeScript/nativescript-cli/issues/4243): CLI command steps profiling and performance analytics
11+
* [Implemented #4305](https://github.com/NativeScript/nativescript-cli/issues/4305): Add official support for Node.js 11
12+
* [Implemented #4313](https://github.com/NativeScript/nativescript-cli/issues/4313): Track how many users used {N} CLI and Playground
13+
* [Implemented #4323](https://github.com/NativeScript/nativescript-cli/issues/4323): Skip CLI's postinstall in case it is not installed globally
14+
* [Implemented #4325](https://github.com/NativeScript/nativescript-cli/issues/4325): Angular apps should work with HMR out of the box
15+
* [Implemented #4343](https://github.com/NativeScript/nativescript-cli/issues/4343): Support Objective-C code in App Resources for iOS applications
16+
17+
### Fixed
18+
* [Fixed #3122](https://github.com/NativeScript/nativescript-cli/issues/3122): `tns debug ios --debug-brk` fails the majority of the time
19+
* [Fixed #3161](https://github.com/NativeScript/nativescript-cli/issues/3161): `tns test` command fails to find a running iOS simulator
20+
* [Fixed #4232](https://github.com/NativeScript/nativescript-cli/issues/4232): Unit testing for freshly created angular project is broken on Android emulator
21+
* [Fixed #4253](https://github.com/NativeScript/nativescript-cli/issues/4253): LiveSync stops working in Preview app when make change in scss file
22+
* [Fixed #4255](https://github.com/NativeScript/nativescript-cli/issues/4255): Uninstalling NativeScript should also remove its extensions
23+
* [Fixed #4283](https://github.com/NativeScript/nativescript-cli/issues/4283): `tns run android` fails with private npm registry
24+
* [Fixed #4300](https://github.com/NativeScript/nativescript-cli/issues/4300): Strange logs after project built for Android
25+
* [Fixed #4311](https://github.com/NativeScript/nativescript-cli/issues/4311): [iOS] Build with nativescript-plugin-firebase requires legacy build system
26+
* [Fixed #4324](https://github.com/NativeScript/nativescript-cli/issues/4324): High CPU utilization during `tns run`
27+
* [Fixed #4327](https://github.com/NativeScript/nativescript-cli/issues/4327): `tns devices --availableDevices` prompts to install Xcode command line tools
28+
* [Fixed #4347](https://github.com/NativeScript/nativescript-cli/issues/4347): `tns resources generate splashes <path to image>` fails for newly created project
29+
30+
431
5.1.1 (2019, January 17)
532
==
633

docs/man_pages/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Command | Description
3333
[platform list](project/configuration/platform.html) | Lists all platforms that the project currently targets.
3434
[platform remove `<Platform>`](project/configuration/platform-remove.html) | Removes the selected platform from the platforms that the project currently targets. This operation deletes all platform-specific files and subdirectories from your project.
3535
[platform update `<Platform>`](project/configuration/platform-update.html) | Updates the NativeScript runtime for the specified platform.
36-
[resources update](project/configuration/resources-update.html) | Updates the App_Resources/<platform>'s internal folder structure to conform to that of an Android Studio project.
36+
[resources update](project/configuration/resources/resources-update.html) | Updates the App_Resources/<platform>'s internal folder structure to conform to that of an Android Studio project.
37+
[resources generate splashes](project/configuration/resources/resources-generate-splashes.html) | Generates all splashscreens for Android and iOS platforms and places the generated images in the correct directories under `App_Resources/<platform>` directory.
38+
[resources generate icons](project/configuration/resources/resources-generate-icons.html) | Generates all icons for Android and iOS platforms and places the generated images in the correct directories under `App_Resources/<platform>` directory.
3739
[prepare `<Platform>`](project/configuration/prepare.html) | Copies relevant content from the app directory to the subdirectory for the selected target platform to let you build the project.
3840
[build `<Platform>`](project/testing/build.html) | Builds the project for the selected target platform and produces an application package or an emulator package.
3941
[deploy `<Platform>`](project/testing/deploy.html) | Deploys the project to a connected physical or virtual device.

lib/config.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ export class StaticConfig implements IStaticConfig {
156156
$hostInfo: IHostInfo = this.$injector.resolve("$hostInfo");
157157

158158
// prepare the directory to host our copy of adb
159-
const defaultAdbDirPath = path.join(__dirname, `resources/platform-tools/android/${process.platform}`);
160-
const pathToPackageJson = path.join(__dirname, "..", "..", "package.json");
161-
const commonLibVersion = require(pathToPackageJson).version;
162-
const tmpDir = path.join(os.tmpdir(), `telerik-common-lib-${commonLibVersion}`);
159+
const defaultAdbDirPath = path.join(__dirname, "common", "resources", "platform-tools", "android", process.platform);
160+
const pathToPackageJson = path.join(__dirname, "..", "package.json");
161+
const nsCliVersion = require(pathToPackageJson).version;
162+
const tmpDir = path.join(os.tmpdir(), `nativescript-cli-${nsCliVersion}`);
163163
$fs.createDirectory(tmpDir);
164164

165165
// copy the adb and associated files

lib/definitions/platform.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ interface INodeModulesBuilderData {
284284
interface INodeModulesBuilder {
285285
prepareNodeModules(opts: INodeModulesBuilderData): Promise<void>;
286286
prepareJSNodeModules(opts: INodeModulesBuilderData): Promise<void>;
287-
cleanNodeModules(absoluteOutputPath: string): void;
288287
}
289288

290289
interface INodeModulesDependenciesBuilder {

lib/services/livesync/ios-device-livesync-service.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
2424
}
2525

2626
const appId = projectData.projectIdentifiers.ios;
27-
this.socket = await this.device.getDebugSocket(appId, projectData.projectName);
27+
try {
28+
this.socket = await this.device.getDebugSocket(appId, projectData.projectName);
29+
} catch (err) {
30+
this.$logger.trace(`Error while connecting to the debug socket. Error is:`, err);
31+
}
32+
2833
if (!this.socket) {
2934
return false;
3035
}

lib/tools/node-modules/node-modules-builder.ts

+6-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as shelljs from "shelljs";
21
import { TnsModulesCopy, NpmPluginPrepare } from "./node-modules-dest-copy";
32

43
export class NodeModulesBuilder implements INodeModulesBuilder {
@@ -23,37 +22,26 @@ export class NodeModulesBuilder implements INodeModulesBuilder {
2322
const { nodeModulesData } = opts;
2423
const productionDependencies = this.$nodeModulesDependenciesBuilder.getProductionDependencies(nodeModulesData.projectData.projectDir);
2524

26-
if (opts.copyNodeModules) {
25+
if (opts.copyNodeModules && !nodeModulesData.appFilesUpdaterOptions.bundle) {
2726
this.initialPrepareNodeModules(opts, productionDependencies);
28-
} else if (nodeModulesData.appFilesUpdaterOptions.bundle) {
29-
this.cleanNodeModules(nodeModulesData.absoluteOutputPath);
3027
}
3128

3229
return productionDependencies;
3330
}
3431

35-
public cleanNodeModules(absoluteOutputPath: string): void {
36-
shelljs.rm("-rf", absoluteOutputPath);
37-
}
38-
39-
private initialPrepareNodeModules(opts: INodeModulesBuilderData, productionDependencies: IDependencyData[]): IDependencyData[] {
32+
private initialPrepareNodeModules(opts: INodeModulesBuilderData, productionDependencies: IDependencyData[]): void {
4033
const { nodeModulesData, release } = opts;
4134

4235
if (!this.$fs.exists(nodeModulesData.absoluteOutputPath)) {
4336
// Force copying if the destination doesn't exist.
4437
nodeModulesData.lastModifiedTime = null;
4538
}
4639

47-
if (!nodeModulesData.appFilesUpdaterOptions.bundle) {
48-
const tnsModulesCopy: TnsModulesCopy = this.$injector.resolve(TnsModulesCopy, {
49-
outputRoot: nodeModulesData.absoluteOutputPath
50-
});
51-
tnsModulesCopy.copyModules({ dependencies: productionDependencies, release });
52-
} else {
53-
this.cleanNodeModules(nodeModulesData.absoluteOutputPath);
54-
}
40+
const tnsModulesCopy: TnsModulesCopy = this.$injector.resolve(TnsModulesCopy, {
41+
outputRoot: nodeModulesData.absoluteOutputPath
42+
});
5543

56-
return productionDependencies;
44+
tnsModulesCopy.copyModules({ dependencies: productionDependencies, release });
5745
}
5846
}
5947

npm-shrinkwrap.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"istextorbinary": "2.2.1",
5151
"jimp": "0.2.28",
5252
"lockfile": "1.0.3",
53-
"lodash": "4.17.10",
53+
"lodash": "4.17.11",
5454
"log4js": "1.0.1",
5555
"marked": "0.5.1",
5656
"marked-terminal": "3.1.1",

test/npm-support.ts

-22
Original file line numberDiff line numberDiff line change
@@ -294,28 +294,6 @@ describe("Npm support tests", () => {
294294

295295
assert.isTrue(filteredResults.length === 1);
296296
});
297-
298-
it("Ensures that tns_modules absent when bundling", async () => {
299-
const fs = testInjector.resolve("fs");
300-
const options = testInjector.resolve("options");
301-
const tnsModulesFolderPath = path.join(appDestinationFolderPath, "app", "tns_modules");
302-
303-
try {
304-
options.bundle = false;
305-
await preparePlatform(testInjector);
306-
assert.isTrue(fs.exists(tnsModulesFolderPath), "tns_modules created first");
307-
308-
options.bundle = true;
309-
await preparePlatform(testInjector);
310-
assert.isFalse(fs.exists(tnsModulesFolderPath), "tns_modules deleted when bundling");
311-
312-
options.bundle = false;
313-
await preparePlatform(testInjector);
314-
assert.isTrue(fs.exists(tnsModulesFolderPath), "tns_modules recreated");
315-
} finally {
316-
options.bundle = false;
317-
}
318-
});
319297
});
320298

321299
describe("Flatten npm modules tests", () => {

0 commit comments

Comments
 (0)