2667 Commits

Author SHA1 Message Date
Renovate Bot
d8554de60b build: update dependency core-js to v3.18.0 2021-09-20 10:28:10 +02:00
Renovate Bot
d1e28b4f1e build: update all non-major dependencies 2021-09-19 09:02:53 +02:00
Renovate Bot
ed376fe02e build: update all non-major dependencies 2021-09-17 19:57:23 +02:00
Renovate Bot
504f47fd74 build: update all non-major dependencies 2021-09-16 09:19:36 +02:00
Renovate Bot
3f31a6757f build: update all non-major dependencies 2021-09-14 09:05:32 +01:00
Charles Lyding
590c156642 fix(@angular-devkit/build-angular): add web-streams-polyfill to downlevel exclusion list
Polyfill related packages should not be downlevelled due to the nature of their code which may need to perform feature testing or leverage native capabilities to extract browser support information necessary to properly polyfill a given browser. In the case of `web-streams-polyfill`, it leverages the `%AsyncIteratorPrototype%`, when available, to fully polyfill its stream implementations.  To access `%AsyncIteratorPrototype%`, a native async generator is needed and therefore the code present in the package cannot have this case of a native async generator downlevelled. `core-js` is also excluded for similar (and additional reasons).
2021-09-14 09:03:28 +01:00
Alan Agius
df8f909d80 fix(@angular-devkit/build-angular): handle FORCE_COLOR when stdout is not instance of WriteStream
In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732
2021-09-14 09:00:24 +01:00
Renovate Bot
be81752905 build: update all non-major dependencies 2021-09-08 10:19:14 +02:00
Charles Lyding
decb1d14b0 fix(@angular-devkit/build-angular): improve Safari browserslist to esbuild target conversion
The browser targets provided by `browserslist` have several differences than what `esbuild` expects for the Safari browsers. The first is that the iOS Safari is named `ios_saf` within browserslist and `ios` by esbuild. The former is now converted to the later when generating the target list for esbuild.  The second difference is that `browserslist` supports a `TP` (Technology Preview) version for Safari but esbuild expects a numeric value for all versions. Since a TP version of Safari is assumed to be the latest unreleased version and as a result supports all currently known features, a high version number (999) is used as a replacement when generating the target list for esbuild.
2021-09-07 17:52:43 +02:00
Renovate Bot
b78400aa18 build: update dependency @babel/core to v7.15.5 2021-09-04 13:58:06 +02:00
Renovate Bot
40ebaa035e build: update all non-major dependencies 2021-09-04 10:27:31 +02:00
Renovate Bot
7ab1cf3b29 build: update all non-major dependencies 2021-09-03 10:34:02 +02:00
Renovate Bot
7550ecbaf6 build: update all non-major dependencies 2021-09-02 18:25:48 +02:00
Alan Agius
c13cc888d0 build: update ng-packagr to version 13.0.0-next.1 2021-09-02 17:54:09 +02:00
Renovate Bot
93957e5e59 build: update all non-major dependencies 2021-09-01 07:45:33 +02:00
Renovate Bot
588285c386 build: update all non-major dependencies 2021-08-31 08:33:31 +02:00
Renovate Bot
f082868239 build: update dependency esbuild to v0.12.24 2021-08-28 08:30:23 +02:00
Alan Agius
76d6d8826f fix(@angular-devkit/build-angular): set browserslist defaults
By default, browserslist defaults are too inclusive: 83764ea81f/index.js (L516-L522)

We change the default query to browsers that Angular support: https://angular.io/guide/browser-support
2021-08-27 15:57:57 +02:00
Alan Agius
32dbf659ac feat(@angular-devkit/build-angular): update webpack-dev-server to version 4
BREAKING CHANGE:

The dev-server now uses WebSockets to communicate changes to the browser during HMR and live-reloaded. If during your development you are using a proxy you will need to enable proxying of WebSockets.
2021-08-27 15:40:10 +02:00
Renovate Bot
4b323b139e build: update dependency cacache to v15.3.0 2021-08-27 07:15:52 +02:00
Renovate Bot
c0dfbfecdc build: update all non-major dependencies 2021-08-26 07:31:06 +02:00
Charles Lyding
a7de97e485 build: add Bazel ts_library rule package_name properties to all packages
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
2021-08-26 07:30:44 +02:00
Alan Agius
9a46ba562a build: update dependency webpack-subresource-integrity to v5 2021-08-26 07:30:34 +02:00
Renovate Bot
ab3db39472 build: update all non-major dependencies 2021-08-24 10:51:32 +01:00
Charles Lyding
51f89d633f test: enable no-useless-escape lint rule
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
2021-08-24 10:51:14 +01:00
Renovate Bot
9e71069610 build: update all non-major dependencies 2021-08-23 11:07:13 +01:00
Alan Agius
961218aae7 refactor(@angular-devkit/build-angular): remove differential loading stats generation
This is no longer needed size differential loading was removed.
2021-08-23 11:05:53 +01:00
Renovate Bot
a6f8d33637 build: update all non-major dependencies 2021-08-20 10:05:13 +01:00
Renovate Bot
6be902ac83 build: update dependency core-js to v3.16.2 2021-08-18 12:00:15 -04:00
Alan Agius
aba54ae783 fix(@angular-devkit/build-angular): provide supported browsers to esbuild
With this change we provide the list of supported browsers to Esbuild during CSS optimizations, so it can perform optimizations based on the browser support needed.

Closes #21594
2021-08-18 10:14:39 -04:00
Renovate Bot
5326b49488 build: update all non-major dependencies 2021-08-17 10:09:45 -04:00
Simon Primetzhofer
9eb599da2b fix(@angular-devkit/build-angular): handle undefined entrypoints when marking async chunks
When using custom builders, it is possible to remove entries from the webpack-configuration
manually. This may eventually lead to undefined entryPoints in async-chunks.ts and aborts
the compilation.
2021-08-13 16:15:12 -04:00
Renovate Bot
f4874d5545 build: update all non-major dependencies 2021-08-13 16:13:31 -04:00
Renovate Bot
dd4e774655 build: update dependency tslib to v2.3.1 2021-08-12 06:41:34 -04:00
Charles Lyding
d67e7ad2fc fix(@angular-devkit/build-angular): ensure native async is downlevelled in third-party libraries
Application code (TS files) will only contain native async if the TypeScript configuration target is ES2017+. However, third-party libraries can contain native async regardless of the target option. To address these third-party libraries, all non-application files need to be analyzed to determine if they must have native async downlevelled. The analysis is first resource path based and then a string match search for the async keyword. This approach has the potential for rare false positives (for example, the word async in a comment) but the outcome would only be a small amount of additional processing for that one file due to the no-op transformation. This is in contrast to a more exact method covering those rare false positives but that would require a more expensive analysis operation on every file and result in longer overall build times.
2021-08-11 16:41:54 +02:00
Renovate Bot
498d1409f2 build: update dependency @babel/runtime to v7.15.3 2021-08-11 11:31:25 +02:00
Renovate Bot
b0dfd90d2c build: update all non-major dependencies 2021-08-11 09:16:13 +02:00
Charles Lyding
8e82263c5e perf(@angular-devkit/build-angular): use esbuild/terser combination to optimize global scripts
`esbuild` and `terser` are now used to optimize global scripts in addition to the previous performance enhancement of optimizing application bundles. This change removes the need for the `terser-webpack-plugin` as a direct dependency and provides further production build time improvements for applications which use global scripts (`scripts` option in the `angular.json` file).
Since `esbuild` does not support optimizing a script with ES2015+ syntax when targetting ES5, the JavaScript optimizer will fallback to only using terser in the event that such a situation occurs. This will only happen if ES5 is the output target for an application and a global script contains ES2015+ syntax. In that case, the global script is technically already invalid for the target environment and may fail at runtime but this is and has been considered a configuration issue. Global scripts must be compatible with the target environment/browsers.
2021-08-11 09:15:49 +02:00
Charles Lyding
1341ad6406 refactor(@angular-devkit/build-angular): remove unused getEsVersionForFileName helper
The `getEsVersionForFileName` helper function was previously used for recently removed differential loading support but is now unused and can also be removed.
2021-08-10 21:40:57 +02:00
Charles Lyding
7b189789d8 refactor(@angular-devkit/build-angular): remove core path usage from normalizeExtraEntryPoints helper
The Node.js `path` builtin module is already imported and provides the necessary functionality to extract the base file name needed within this helper function. By using `path`, all imports from `@angular-devkit/core` can be eliminated from the file.
2021-08-10 21:40:57 +02:00
Charles Lyding
2a1f4ee0d8 refactor(@angular-devkit/build-angular): remove unneeded core JsonObject type usage
The architect runtime no longer requires builder options to include the JsonObject in its type definition when calling `createBuilder`. The remaining cases in this package have been removed.
2021-08-10 21:40:57 +02:00
Alan Agius
e95ecb8ab0 feat(@angular-devkit/build-angular): deprecate deployUrl
With this change we deprecate deployUrl which in many case causes unexpected and undesired behaviour. Such as #12322, #21432 and #6666. This is because one of the drawbacks of deploy Url is that this url needs to be injected all over the bundles.

This option was previously introduced to handle application that only assets are hosted on a CDN. This setup is now mostly considered as legacy as it is recommended that the entire application is hosted on a CDN. That said, this legacy behaviour can still be achieved by setting the `baseHref` to the CDN address, while setting the `APP_BASE_HREF` to the application address.

Closes #12322 and closes #6666
2021-08-10 19:17:19 +02:00
Alan Agius
cb7d156c23 perf(@angular-devkit/build-angular): use esbuild as a CSS optimizer for global styles
Esbuild now support CSS sourcemaps which now makes it possible to be used to optimize global CSS.

With this change we also reduce the amount of dependencies by removing `css-minimizer-webpack-plugin` which brings in a number of transitive depedencies which we no longer use.
2021-08-10 19:16:14 +02:00
Alan Agius
019614b9e8 Revert "fix(@angular-devkit/build-angular): ensure Sass worker implementation supports Node.js 12.14"
This reverts commit 4dc7cf952961183abcd201db6a5747a7b22e5953.
2021-08-09 22:10:50 +02:00
Charles Lyding
1e142cd29a refactor(@angular-devkit/build-angular): remove legacy ES5 build optimizer usage
The legacy standalone build optimizer was still used when targetting ES5 due to the new babel-based build optimizer only supporting the analysis of ES2015+ code. Mainly due to the presence of native classes, the new build optimizer is faster and significantly less complex. To fully remove the legacy build optimizer, ES5 downleveling of application code is now also performed by babel when the TypeScript configuration specifies an ES5 target. TypeScript will now internally emit ES2015 in this configuration and ES2015 code will be used as the input to the remainder of the build pipeline. This has been the behavior for third-party packages and now all code will be consistently downleveled to ES5 using the same tooling.
2021-08-09 16:50:49 +02:00
Alan Agius
a7b2e6f512 feat(@schematics/angular): update ngsw-config resources extensions
With this change we update service worker ngsw-config resources extensions.

- Remove `eot`. Old IE font format. Not supported by browsers which support service worker.
- Remove `ani`. Not supported by browsers.
- Add `jpeg` as common alias for `jpg`.
- Add `apng` as modern alternative to `gif`.
- Add `avif` a modern image format.

Closes #21526
2021-08-09 16:50:16 +02:00
Charles Lyding
c4baba4459 refactor(@angular-devkit/build-angular): reduce repeat TypeScript configuration loading
An application's TypeScript configuration was previously being loaded multiple times in several different aspects of the build setup process. These aspects need to access specific compiler options relevant to that particular area of the setup. However, loading the configuration can be expensive due to the process also calculating the root files for the TypeScript compilation which can result in a large amount of file access. To improve the setup performance, the number of times the TypeScript configuration will be loaded has now been reduced with further reductions possible with additional refactorings.
2021-08-09 14:15:13 +02:00
Charles Lyding
3bcb729a33 refactor(@angular-devkit/build-angular): remove unneeded ivy enabled checks
Applications can now only be built with Ivy. However, several checks were still present in the code to determine if Ivy was enabled. Since Ivy is always enabled these checks have since become unused code and can be removed.
2021-08-09 14:15:13 +02:00
Renovate Bot
7098d652f9 build: update all non-major dependencies 2021-08-09 11:29:36 +02:00
Charles Lyding
cdfaeee089 fix(@angular-devkit/build-angular): support both pure annotation forms for static properties
The static property optimization pass analyzes the initializers of static properties for possible side effects to determine if optimization is safe to perform. Previously the pure annotation of the form `@__PURE__` was not considered during the analysis. This has now been corrected and all of the following forms are supported: `@__PURE__`, `#__PURE__`, and `@pureOrBreakMyCode`.
2021-08-06 19:38:11 +02:00