1127 Commits

Author SHA1 Message Date
Alan Agius
93e253bc93 refactor: rename tsconfig.json to tsconfig.base.json 2020-05-20 12:12:33 -07:00
Alan Agius
a78d1c3ed1 fix(@angular-devkit/build-angular): dedupe duplicate modules
Webpack relies on package managers to do module hoisting and doesn't have any deduping logic since version 4.

However relaying on package manager has a number of short comings, such as when having the same library with the same version laid out in different parts of the node_modules tree.

Example:
```
/node_modules/tslib@2.0.0
/node_modules/library-1/node_modules/tslib@1.0.0
/node_modules/library-2/node_modules/tslib@1.0.0
```

In the above case, in the final bundle we'll end up with 3 versions of tslib instead of 2, even though 2 of the modules are identical.

Webpack has an open issue for this https://github.com/webpack/webpack/issues/5593 (Duplicate modules - NOT solvable by `npm dedupe`)

With this change we add a custom resolve plugin that dedupes modules with the same name and versions that are laid out in different parts of the node_modules tree.
2020-05-20 11:25:31 +01:00
Renovate Bot
547205ca6a build: update rollup to version 2.10.5 2020-05-20 10:02:02 +01:00
Charles Lyding
1149b1aa97 revert: fix(@angular-devkit/build-angular): switch to license-checker-webpack-plugin
Partial revert of bd582591dc49569269c63910351fdb4026058842 (squashed commit)
2020-05-20 10:00:01 +01:00
Charles Lyding
515de49961 revert: "revert: "fix(@angular-devkit/build-angular): suppress duplicate 3rdpartylicenses.txt warning""
This reverts commit 863067cbd8d14ce9fddbd29e4a625f0d62a664fd.
2020-05-20 10:00:01 +01:00
Renovate Bot
25d5d75ca5 build: update rollup to version 2.10.4 2020-05-19 11:05:42 +01:00
Renovate Bot
82e8b27f2a build: update terser to version 4.7.0 2020-05-19 10:54:43 +01:00
Alan Agius
ad471a9cd3 build: update to TypeScript 3.9 2020-05-18 11:35:00 -07:00
Charles Lyding
2ae0300ad5 refactor(@angular-devkit/build-angular): optimize parallel worker shutdown
Stopping the workers can be a potentially lengthy process with a multi-stage approach based on the state of the worker.  This can cause lengthy blocking of the build.  This change allows the shutdown to happen in parallel to the remainder of the build.
2020-05-18 19:30:03 +01:00
Charles Lyding
4048e3c26f test(@angular-devkit/build-angular): improve performance of autoprefixer tests
These tests check the output of the global stylesheet and require a browserslist to target IE but this also triggers differential loading which is unneeded for the test.
2020-05-18 19:30:03 +01:00
Alan Agius
4e4e0e42ec style: fix typo in allowedCommonJsDependencies description 2020-05-18 19:25:41 +01:00
Renovate Bot
cb66703cbe build: update autoprefixer to version 9.8.0 2020-05-18 19:21:32 +01:00
Renovate Bot
24353739b6 build: update open to version 7.0.4 2020-05-18 19:21:23 +01:00
Alan Agius
27ca66ceea fix(@angular-devkit/build-angular): add link when displaying commonJS usage warnings
Add a link to https://web.dev/commonjs-larger-bundles when a commonJS module is used in browsers builds
2020-05-18 19:20:25 +01:00
Renovate Bot
a64e9e4bef build: update rollup to version 2.10.2 2020-05-15 14:45:26 +01:00
Alan Agius
5395cecf59 refactor: remove deprecate protractor elementExplorer
Protractor `elementExplorer` debugger and element explorer cannot be used for Node.js 8+ since it relied on `_debugger` module.

In protractor version 5, this resulted in the below error:
```
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
: Compiled successfully.
[10:25:35] I/direct - Using ChromeDriver directly...
[10:25:37] I/protractor -
[10:25:37] I/protractor - ------- Element Explorer -------
[10:25:37] I/protractor - Starting WebDriver debugger in a child process. Element Explorer is still beta, please report issues at github.com/angular/protractor
[10:25:37] I/protractor -
[10:25:37] I/protractor - Type <tab> to see a list of locator strategies.
[10:25:37] I/protractor - Use the `list` helper function to find elements by strategy:
[10:25:37] I/protractor -   e.g., list(by.binding('')) gets all bindings.
[10:25:37] I/protractor -
***********************************************************
* WARNING: _debugger module not available on Node.js 8    *
* and higher.                                             *
*                                                         *
* Use 'debugger' keyword instead:                       *
* https://goo.gl/MvWqFh                                   *
***********************************************************
/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:14
  throw e;
  ^

Error: Cannot find module '_debugger'
Require stack:
- /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js
- /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js',
    '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js'
  ]
}
```

but in protractor version 7, this logic was removed.

BREAKING CHANGE:
Protractor builder elementExplorer option has been removed. This was not compatable with the Node.Js versions that the Angular CLI supports. See: https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow for an alternative debugging methods.
2020-05-15 14:44:45 +01:00
Renovate Bot
e5aa176136 build: update rollup to version 2.10.0 2020-05-13 10:12:17 -04:00
Renovate Bot
5e30d20bf2 build: update postcss to version 7.0.30 2020-05-12 07:09:42 -04:00
Renovate Bot
86f97bc53a build: update webpack-dev-server to version 3.11.0 2020-05-11 07:47:26 -04:00
Renovate Bot
71fd298ac7 build: update rollup to version 2.9.1 2020-05-11 07:46:53 -04:00
Renovate Bot
a1cbc12eba build: update rollup to version 2.8.2 2020-05-08 13:06:23 -07:00
Renovate Bot
6efa948d7c build: update less-loader to version 6.1.0 2020-05-08 13:06:15 -07:00
Renovate Bot
b90c04db16 build: update terser-webpack-plugin to version 3.0.1 2020-05-07 10:39:04 -07:00
Alan Agius
4d4fc099ff build: udate angular packages to version 10 2020-05-07 10:38:22 -07:00
Renovate Bot
017e93276d build: update rollup to version 2.8.0 2020-05-06 11:43:30 -07:00
Charles Lyding
b1af6e8342 fix(@angular-devkit/build-angular): downlevel and optimize locale data
Locale data is now transformed to be compatible with the ECMAScript level of the application bundles.  The locale data is also optimized to remove comments and unnecessary whitespace.

Fixes: #17497
2020-05-06 11:43:04 -07:00
Alan Agius
0fd3c550b5 feat(@schematics/angular): update compiler options target and module settings
With this change we update the target and module settings of various compilation units.

- We replace ES5 target in protractor. Protractor runs on Node.Js which support ES2018
- For applications we now use `ES2020` instead of `ESNext` as a module to avoid unexpected changes in behaviour

This changes also adds a migration to update existing projects and also removes `module` from the Universal tsconfig as per #17352 to enable lazy loading on the server.
2020-05-06 11:42:35 -07:00
Charles Lyding
a0312c6c09 refactor(@angular-devkit/build-angular): support ES5 target with ES2015 APF 2020-05-06 11:41:38 -07:00
Renovate Bot
2d48ab3e4e build: update postcss to version 7.0.29 2020-05-05 10:53:04 -07:00
Renovate Bot
b3b70121e8 build: update jest-worker to version 26.0.0 2020-05-05 10:52:53 -07:00
Alan Agius
08062e9a11 refactor(@angular-devkit/build-angular): remove unused server builder options
BREAKING CHANGE: options `commonChunk` and `vendorChunk` have been removed from the server builder.

Note: this change only effects direct @angular-devkit/build-angular users and not the application developers as users will be migrated automatically off these options.
2020-05-05 10:50:15 -07:00
Renovate Bot
3eb61058ab build: update worker-plugin to version 4.0.3 2020-05-04 10:56:38 -07:00
Charles Lyding
6089835fb6 refactor(@angular-devkit/build-angular): remove unused rxjs path mapping
This path mapping was used during the transition to rxjs 5 via the use of rxjs-compat package during the Angular 5.x timeframe.  Now that the minimum version is 6.x and this transition is complete, these mappings are no longer necessary.
2020-05-04 10:54:05 -07:00
Alan Agius
a723af4271 feat(@schematics/angular): evergreen new applications
By default, we now generate new applications which support only evergreen browsers, as a result differential loading is now opt-in.

A new flag `--legacy-browsers`, was added to generate applications which support non evergreen browsers such as Internet Explorer 11.

**Note**: After an application is generated opting in and out of differential loading is still possible through the supported browsers configuration in the browserslist configuration file  defaulted to `.browserslistrc`.
2020-05-04 10:53:48 -07:00
Alan Agius
e2eed2c8f8 build: update several packages 2020-05-04 10:51:49 -07:00
Renovate Bot
944595ee66 build: update cacache to version 15.0.3 2020-05-01 16:26:22 -07:00
Renovate Bot
d4e6d5bd59 build: update rollup to version 2.7.6 2020-05-01 16:26:08 -07:00
Renovate Bot
7a54f609af build: update terser to version 4.6.13 2020-05-01 16:25:19 -07:00
Renovate Bot
273eeb7fa0 build: update webpack-subresource-integrity to version 1.4.1 2020-05-01 16:24:56 -07:00
Filipe Silva
b51cf8d1e6 build: use ts_library macro with common defaults 2020-04-30 15:12:46 -07:00
Greg Magolan
8ef940b205 build: use no-remote-exec tag so test still runs in sandbox
Turns out there is a linker bug with no sandbox.
2020-04-30 15:12:46 -07:00
Greg Magolan
52d7b012d3 build: run tests depending on webdriver-manager locally 2020-04-30 15:12:46 -07:00
Filipe Silva
9a28114f6b test: remove non-bazel test setup 2020-04-30 15:12:46 -07:00
Filipe Silva
ef7a07050a test(@angular-devkit/build-angular): build and test with Bazel 2020-04-30 15:12:46 -07:00
Alan Agius
a93f4f0a9f fix(@angular-devkit/build-angular): disable inline svg optimizations
SVGO can cause optimizations which are not compatible in all browsers.

FIxes: #17564
2020-04-29 10:16:16 -07:00
Pete Bacon Darwin
b3792deaae fix(@angular-devkit/build-angular): the path to source_file_utils changed in v10.0.0 2020-04-29 10:15:59 -07:00
Renovate Bot
ad860f30de build: update style-loader to version 1.2.1 2020-04-29 10:15:29 -07:00
Renovate Bot
e36dc1d957 build: update jest-worker to version 25.5.0 2020-04-29 10:15:00 -07:00
Renovate Bot
799bb10b61 build: update rollup to version 2.7.3 2020-04-28 09:01:12 -07:00
Renovate Bot
c8915f4205 build: update terser-webpack-plugin to version 2.3.6 2020-04-27 15:08:32 -07:00