Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 87b289d

Browse files
Merge pull request #905 from NativeScript/merge-release-in-master
chore: merge release in master
2 parents f612fff + 59bc83b commit 87b289d

File tree

3 files changed

+41
-7
lines changed

3 files changed

+41
-7
lines changed

Diff for: CHANGELOG.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<a name="0.22.0"></a>
2+
# [0.22.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.21.0...0.22.0) (2019-05-15)
3+
4+
5+
### Bug Fixes
6+
7+
* ignore the Webpack runtime chunks when sending HMR updates ([be82ab7](https://github.com/NativeScript/nativescript-dev-webpack/commit/be82ab7))
8+
* show proper stack traces from uglified code (split by new line instead of semicolon) ([0ae6030](https://github.com/NativeScript/nativescript-dev-webpack/commit/0ae6030))
9+
* sourceMap not generated with Uglify ([#819](https://github.com/NativeScript/nativescript-dev-webpack/issues/819)) ([b5fd066](https://github.com/NativeScript/nativescript-dev-webpack/commit/b5fd066))
10+
* support platform specific files that are not directly imported anywhere in the app ([#843](https://github.com/NativeScript/nativescript-dev-webpack/issues/843)) ([e1e9463](https://github.com/NativeScript/nativescript-dev-webpack/commit/e1e9463))
11+
* update the css loader in order to fix a bug with leading dashes of css classes ([#847](https://github.com/NativeScript/nativescript-dev-webpack/issues/847)) ([7670e33](https://github.com/NativeScript/nativescript-dev-webpack/commit/7670e33))
12+
* **hmr:** run ts-loader in transpileOnly mode ([#878](https://github.com/NativeScript/nativescript-dev-webpack/issues/878)) ([0317729](https://github.com/NativeScript/nativescript-dev-webpack/commit/0317729))
13+
14+
15+
### Features
16+
17+
* replace UglifyJs with Terser ([621090a](https://github.com/NativeScript/nativescript-dev-webpack/commit/621090a))
18+
* support hidden source maps to map error stack traces from crash reports ([#854](https://github.com/NativeScript/nativescript-dev-webpack/issues/854)) ([dbcfbc2](https://github.com/NativeScript/nativescript-dev-webpack/commit/dbcfbc2))
19+
20+
121
<a name="0.21.2"></a>
222
## [0.21.2](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.21.0...0.21.2) (2019-04-22)
323

@@ -531,7 +551,7 @@ module.exports = env => {
531551
nsWebpack.loadAdditionalPlugins({ projectDir: projectRoot }); // <----- Add this line
532552
533553
// ...
534-
```
554+
```
535555
536556
* The `getAppPath` method expects two arguments now - `platform` and `projectRoot`. The usage inside the project's `webpack.config.js` should be changed in the following way:
537557

Diff for: snapshot/android/snapshot-generator.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require("fs");
2-
const { dirname, join } = require("path");
2+
const { dirname, join, EOL } = require("path");
33
const os = require("os");
44
const child_process = require("child_process");
55

@@ -12,6 +12,7 @@ const BUNDLE_PREAMBLE_PATH = join(__dirname, "snapshot-generator-tools/bundle-pr
1212
const BUNDLE_ENDING_PATH = join(__dirname, "snapshot-generator-tools/bundle-ending.js");
1313
const INCLUDE_GRADLE_PATH = join(__dirname, "snapshot-generator-tools/include.gradle");
1414
const MKSNAPSHOT_TOOLS_DOWNLOAD_ROOT_URL = "https://raw.githubusercontent.com/NativeScript/mksnapshot-tools/production/";
15+
const MKSNAPSHOT_TOOLS_DOWNLOAD_TIMEOUT = 60000;
1516
const SNAPSHOT_BLOB_NAME = "TNSSnapshot";
1617

1718
function shellJsExecuteInDir(dir, action) {
@@ -66,7 +67,20 @@ SnapshotGenerator.prototype.downloadMksnapshotTool = function(snapshotToolsPath,
6667

6768
const downloadUrl = MKSNAPSHOT_TOOLS_DOWNLOAD_ROOT_URL + mksnapshotToolRelativePath;
6869
createDirectory(dirname(mksnapshotToolPath));
69-
snapshotToolsDownloads[mksnapshotToolPath] = downloadFile(downloadUrl, mksnapshotToolPath);
70+
snapshotToolsDownloads[mksnapshotToolPath] = downloadFile(downloadUrl, mksnapshotToolPath, MKSNAPSHOT_TOOLS_DOWNLOAD_TIMEOUT);
71+
snapshotToolsDownloads[mksnapshotToolPath].catch(err => {
72+
const errorMessage = err && err.message ? err.message : "";
73+
let cleanupError = "";
74+
try {
75+
fs.unlinkSync(mksnapshotToolPath);
76+
} catch (unlinkErr) {
77+
if (unlinkErr && unlinkErr.code !== "ENOENT") {
78+
cleanupError = `${EOL}Failed to cleanup mksnapshot tool.`;
79+
}
80+
}
81+
82+
throw new Error(`Failed to download mksnapshot tool. Error: ${errorMessage}.${cleanupError}`);
83+
});
7084
return snapshotToolsDownloads[mksnapshotToolPath];
7185
}
7286

Diff for: snapshot/android/utils.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const CONSTANTS = {
1212

1313
const createDirectory = dir => mkdir('-p', dir);
1414

15-
const downloadFile = (url, destinationFilePath) =>
15+
const downloadFile = (url, destinationFilePath, timeout) =>
1616
new Promise((resolve, reject) => {
17-
getRequestOptions(url)
17+
getRequestOptions(url, timeout)
1818
.then(options =>
1919
get(options)
2020
.on("error", reject)
@@ -49,9 +49,9 @@ const getJsonFile = url =>
4949
).catch(reject);
5050
});
5151

52-
const getRequestOptions = (url) =>
52+
const getRequestOptions = (url, timeout) =>
5353
new Promise((resolve, reject) => {
54-
const options = { url };
54+
const options = { url, timeout };
5555
getProxySettings()
5656
.then(proxySettings => {
5757
const allOptions = Object.assign(options, proxySettings);

0 commit comments

Comments
 (0)