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

chore: merge release in master #986

Merged
merged 29 commits into from
Jul 15, 2019
Merged

Conversation

rosen-vladimirov
Copy link
Contributor

Conflicts:
templates/webpack.vue.js

mudlabs and others added 28 commits May 24, 2019 08:11
Co-Authored-By: Kristian Dimitrov <[email protected]>
…gular app with uglify option

Currently there is a logic that gets all runtime files and entry point files from webpack compilation. These files are needed to CLI in order to decides if the application should be restarted or refreshed on device(when there is at least one file that is not hot update file, CLI restarts the application). However, this logic doesn't work for lazy loaded modules in angular application as they are reported neither entry point files nor runtime files. Lazy loaded modules are directly injected into webpack compilation using the hooks of ContextModuleFactory - https://github.com/angular/ngtools-webpack-builds/blob/39ccb0b487e92a7ac4330ff9db821337b7aa5c45/src/angular_compiler_plugin.js#L516.  This PR fixes the behavior with lazy loaded files as it gets all chunks produced from webpack compilation and omits hot-update.js files from them. Chunk files are all files except hot update files. Chunk files are: `runtime.js`, `tns_modules/inspector-modules.js`, `bundle.js`, `vendor.js` and all lazy loaded modules. When a files is changed in hmr mode, <hash>.hot-update.js file is included into chunk files. This way we don't need to separate the files to entry point, runtime, lazy loaded and others. We just need to omit <hash>.hot-update.js file from chunk files from webpack compilation.
… when modifying the NgModule - in some cases (e.g. when there is a decomposition in another NgModule property), the TypeScipt program is trying to read `node.name.kind` on each property causing an exception for Identifiers)
* fix(preuninstall): add preuninstall script to remove old hooks

During migration from one version to another or when the plugin is removed from application we need to remove its hooks. This is usually done in preuninstall script, however, it was missing until now. This causes several issues when the version is updated as old hooks remain, but they may not be valid anymore.

* fix(postinstall): remove old hooks

As in 1.0.0 and CLI 6.0 we've changed the way nativescript-dev-webpack interacts with CLI, we need to remove hooks from previous nativescript-dev-webpack versions and use new ones. Usually this should happen with preuninstall script of the old version that removes the hooks. However, our current live version does not have such logic, so implement this in the postinstall of the current version.
This way we try to ensure the current plugin will work correctly.

* feat(hooks): add before-checkForChanges hook

Add before-checkForChanges hook to prevent users from using the current version of the plugin with CLI 5.x.x or older. These two versions are incompatible, so add an error in case older CLI is used.
fix: don't restart application when lazy loaded code is changed in angular app with uglify option
fix: the Lazy transformer is not crashing the TypeScript program anymore
…nd the plugins

By default it will be undefined but the plugins and the app developers will be able to polyfill it. We had the same behavior with the Legacy Workflow.
fix: allow overriding the `global.process` object
build(package): Update webpack-bundle-analyzer
…s-snapshot

fix: avoid generating invalid JavaScript when merging IIFE files
* feat: support for file qualifiers

* refactor: convert bundle-config-loader to TS

* chore: vs code tasks

* chore: convert hmr folder to TS

* feat: universal hmr loader

* feat: no need of "page" suffix for HMR  to work

* chore: add tns-core-modules as dev dep

* fix: filter d.ts files

* refactor: don't include native app/activity in bundle

* refactor: review changes
fix: require automatically only files from app folder of unit-test-runner
… nativescript-dev-webpack@rc (#978)

With the latest rc of nativescript-dev-webpack it is not possible to run unit tests as the nativescript-dev-webpack searches for app folder inside runner root folder. As such folder doesn't exist in live version of nativescript-unit-test-runner, test command throws an error.
Conflicts:
	templates/webpack.vue.js
@rosen-vladimirov rosen-vladimirov requested a review from Fatme July 15, 2019 14:08
@rosen-vladimirov rosen-vladimirov self-assigned this Jul 15, 2019
@cla-bot cla-bot bot added the cla: yes label Jul 15, 2019
@rosen-vladimirov rosen-vladimirov merged commit 3b120da into master Jul 15, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/merge-rel-master branch July 15, 2019 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants