From 52757187be8bffeeb9e1625442195f5416fd5aa0 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Thu, 21 Mar 2019 19:24:32 +0200 Subject: [PATCH 1/4] release: cut the 0.21.0 release --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9717065a..c52998fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ + +# [0.21.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.20.3...0.21.0) (2019-03-21) + + +### Bug Fixes + +* Emit inspector_modules.js as a separate entry point for iOS ([00ecaa0](https://github.com/NativeScript/nativescript-dev-webpack/commit/00ecaa0)) +* execute bundle-config-loader only for the entry point of the application ([#829](https://github.com/NativeScript/nativescript-dev-webpack/issues/829)) ([36824b1](https://github.com/NativeScript/nativescript-dev-webpack/commit/36824b1)) +* fix "Cannot read property 'kill' of undefined" error ([#822](https://github.com/NativeScript/nativescript-dev-webpack/issues/822)) ([8d18853](https://github.com/NativeScript/nativescript-dev-webpack/commit/8d18853)) +* stop deleting chunks with compilation errors in order to avoid outdated app state when deleting files or throwing errors ([#836](https://github.com/NativeScript/nativescript-dev-webpack/issues/836)) ([69cb061](https://github.com/NativeScript/nativescript-dev-webpack/commit/69cb061)) +* **HMR:** modulePath on Windows to apply changes in app styles at runtime ([#807](https://github.com/NativeScript/nativescript-dev-webpack/issues/807)) ([c4b4fee](https://github.com/NativeScript/nativescript-dev-webpack/commit/c4b4fee)) +* **inspector_modules:** Switch to `single` runtime chunk ([6e780af](https://github.com/NativeScript/nativescript-dev-webpack/commit/6e780af)) + + +### Features + +* Implement unit testing with bundle ([#835](https://github.com/NativeScript/nativescript-dev-webpack/issues/835)) ([7944611](https://github.com/NativeScript/nativescript-dev-webpack/commit/7944611)) +* Support Angular Ivy modules with AOT ([#828](https://github.com/NativeScript/nativescript-dev-webpack/issues/828)) ([f476c56](https://github.com/NativeScript/nativescript-dev-webpack/commit/f476c56)) + + + ## [0.20.3](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.20.2...0.20.3) (2019-03-14) From bd4fa9cd01c75c4eb464a5f4b2f301328181e95a Mon Sep 17 00:00:00 2001 From: Fatme Date: Thu, 4 Apr 2019 22:13:54 +0300 Subject: [PATCH 2/4] fix: add support for ts files on test command when `--bundle` is provided (#848) Rel to: https://github.com/NativeScript/nativescript-cli/issues/4477 https://github.com/NativeScript/nativescript-cli/issues/1798 --- unit-testing-config-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit-testing-config-loader.js b/unit-testing-config-loader.js index 3d257915..bf3db52d 100644 --- a/unit-testing-config-loader.js +++ b/unit-testing-config-loader.js @@ -2,7 +2,7 @@ const { join, relative } = require("path"); module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp }) { // TODO: Consider to use the files property from karma.conf.js - const testFilesRegExp = /tests\/.*\.js/; + const testFilesRegExp = /tests\/.*\.(ts|js)/; const runnerFullPath = join(projectRoot, "node_modules", "nativescript-unit-test-runner"); const runnerRelativePath = relative(appFullPath, runnerFullPath); let source = ` From 9020c47e2bc79112fb7295a8f1bb45d03131389d Mon Sep 17 00:00:00 2001 From: Fatme Date: Sat, 6 Apr 2019 02:47:21 +0300 Subject: [PATCH 3/4] fix: use correct slashes on windows (#851) --- unit-testing-config-loader.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unit-testing-config-loader.js b/unit-testing-config-loader.js index bf3db52d..31937c70 100644 --- a/unit-testing-config-loader.js +++ b/unit-testing-config-loader.js @@ -1,10 +1,11 @@ const { join, relative } = require("path"); +const { convertSlashesInPath } = require("./projectHelpers"); module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp }) { // TODO: Consider to use the files property from karma.conf.js const testFilesRegExp = /tests\/.*\.(ts|js)/; const runnerFullPath = join(projectRoot, "node_modules", "nativescript-unit-test-runner"); - const runnerRelativePath = relative(appFullPath, runnerFullPath); + const runnerRelativePath = convertSlashesInPath(relative(appFullPath, runnerFullPath)); let source = ` require("tns-core-modules/bundle-entry-points"); const runnerContext = require.context("${runnerRelativePath}", true, ${rootPagesRegExp}); @@ -24,7 +25,7 @@ module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp `; } - const runnerEntryPointPath = join(runnerRelativePath, "bundle-app.js"); + const runnerEntryPointPath = convertSlashesInPath(join(runnerRelativePath, "bundle-app.js")); source += ` require("${runnerEntryPointPath}"); `; From 196d977cfebaae4b96c234d13ac914c28aa8acac Mon Sep 17 00:00:00 2001 From: Fatme Date: Fri, 12 Apr 2019 04:12:48 +0300 Subject: [PATCH 4/4] fix: fix "ERROR in Must have a source file to refactor." error from ngCompilerPlugin on `test` command (#859) --- templates/webpack.angular.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index 2f196cb2..afff3af5 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -88,7 +88,7 @@ module.exports = env => { const ngCompilerPlugin = new AngularCompilerPlugin({ hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]), platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule))), - mainPath: resolve(appPath, entryModule), + mainPath: join(appFullPath, entryModule), tsConfigPath: join(__dirname, tsConfigName), skipCodeGeneration: !aot, sourceMap: !!sourceMap,