684 Commits

Author SHA1 Message Date
Charles Lyding
9433bb6179 fix(@angular-devkit/build-angular): ensure latest inline stylesheet data is used during rebuilds
Fixes: #20904
2021-05-25 09:54:38 -04:00
Alan Agius
5855374eb5 fix(@ngtools/webpack): re-emit component stylesheet assets
With this change we re-emit assets referenced in component stylesheets which where uneffected by the change that re-triggered a re-compilation.

Since we cache the the result of processed component CSS, during a re-compilation `postcss-cli-resources` plugin will not run which causes assets to be to emit. With this change we now cache the asset and re-emit them on every change.

Closes #20882
2021-05-21 20:04:32 -04:00
Charles Lyding
4f2df00511 perf(@ngtools/webpack): reduce non-watch mode TypeScript diagnostic analysis overhead
When not in a watch mode, the analyis performed by TypeScript to improve incremental type checking can be avoided by creating an abstract builder program that only wraps the underlying TypeScript program.
Performance enhancements in the upcoming TypeScript 4.3 may remove the need for this.  However, TypeScript 4.3 is not yet released and is not yet supported. In addition, TypeScript 4.2 will continue to be supported throughout the v12 major even when TypeScript 4.3 is also supported.
2021-05-19 20:51:23 +02:00
Renovate Bot
458723cdbb build: update angular 2021-05-13 06:53:01 +02:00
Renovate Bot
17fa3c1c2e build: update all non-major dependencies 2021-05-13 06:52:37 +02:00
Renovate Bot
50f456ae5b build: update angular 2021-05-10 20:58:42 +01:00
Alan Agius
e992c9a70b build: update files to be fix eslint header/header failures 2021-05-04 09:59:40 -04:00
Charles Lyding
6fc84ff1b9 perf(@ngtools/webpack): reduce source file and Webpack module iteration
During a build, the number of iterations over both the TypeScript program's source files and Webpack's modules has been reduced. Both of these collections can contain a significant number of elements especially in larger applications.
2021-05-03 16:00:26 -04:00
Charles Lyding
f62b0423b3 perf(@ngtools/webpack): rebuild Angular required files asynchronously
This change adjusts the Angular required files rebuilding logic to not block on each individual file's Webpack module rebuild. Now all required Webpack modules are discovered then rebuilt asynchrounously and only blocked on the full list of rebuilds. The promise-based Webpack rebuild function is also now only created if a rebuild is required.
2021-05-03 16:00:26 -04:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Renovate Bot
88c017582e build: update all non-major dependencies 2021-04-30 17:06:09 -04:00
Renovate Bot
e104fbf009 build: update all non-major dependencies 2021-04-29 12:52:58 -04:00
Renovate Bot
964917ef3a build: update angular 2021-04-29 12:52:12 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Renovate Bot
6864168cdb build: update webpack to version 5.36.0 2021-04-27 13:52:48 +02:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Renovate Bot
222b2e72e0 build: update webpack to version 5.35.1 2021-04-24 14:25:31 +02:00
Renovate Bot
81678e83a7 build: update angular packages 2021-04-22 11:17:33 +02:00
Renovate Bot
f96914f0d3 build: update webpack to version 5.35.0 2021-04-21 12:44:50 -07:00
Charles Lyding
86754e4750 refactor(@ngtools/webpack): use Webpack 5 modified/removed file sets for changed list
Webpack 5 directly provides the set of modified and removed files. This feature allows for the removal of the file timestamp logic within the plugin that was previously used to generated the set of changed files on a rebuild.
2021-04-21 12:41:35 -07:00
Charles Lyding
e8f22ab36d refactor(@ngtools/webpack): remove Webpack 4 specific type casting
Webpack 5 contains improved types and exports that reduce the need to perform additional type casting throughout the Angular Webpack Plugin.
2021-04-21 12:40:19 -07:00
Charles Lyding
b8fc1dc915 fix(@ngtools/webpack): only track actual resource file dependencies
Webpack's `fileDependencies` Set could contain directories as well as files. The directories were previously stored and incorrectly used during cache invalidation which resulted in excessive cache validation.
This change attempts to skip directories by ignoring any `fileDependencies` entry that does not have a file extension.
2021-04-21 12:34:37 -07:00
Charles Lyding
8dfc8e73f3 perf(@ngtools/webpack): cache results of processed inline resources
When in watch mode, both the file and inline resources will now be cached between rebuilds. This removes the need to reprocess inline resources that have not changed even if the containing TypeScript file has changed.
2021-04-21 12:34:37 -07:00
Charles Lyding
d92805e361 refactor(@ngtools/webpack): reduce stored resource data between rebuilds
This change makes several changes to attempt to reduce retained memory within the resource loader. The first is the preemptive clearing of the resource loader's parent compilation after all modules are built. The second removes the cached sourcemaps for each resource which are not yet used by the system. And finally, the child compilations are no longer stored on the parent compilation and instead the dependencies, errors, and warnings are propagated to the parent compilation.
2021-04-21 12:34:37 -07:00
Renovate Bot
72b224a569 build: update enhanced-resolve to version 5.8.0 2021-04-20 09:32:29 -05:00
Charles Lyding
bc0f3293c0 refactor(@ngtools/webpack): remove unused transformation helper code
With the recent refactoring of the package's TypeScript transformers, several internal functions and types are no longer used or needed.
2021-04-20 09:27:41 -05:00
Charles Lyding
cb78ebca9e refactor(@ngtools/webpack): directly use TypeScript transformation helpers
This change replaces the remaining usage of `makeTransform` with the usage of TypeScript AST helpers directly instead. This allows for the reduction in the number of AST walks necessary to transform the application's files.
2021-04-20 09:27:41 -05:00
Charles Lyding
98f0ba2ea9 test(@ngtools/webpack): directly test elideImports function
The `elideImports` function's unit tests now directly test the function instead of relying on the `makeTransform` abstraction.
This change more closely reflects the current usage of `elideImports`.
2021-04-20 09:27:41 -05:00
Renovate Bot
072f3a7009 build: update webpack to version 5.34.0 2021-04-19 20:33:01 +02:00
Alan Agius
0396d0839e build: update angular packages
With this change we also remove the workaround to fix stale reuse program. Which was fixed in https://github.com/angular/angular/pull/41289
2021-04-19 20:27:28 +02:00
Alan Agius
43b7a38b47 docs(@ngtools/webpack): remove webpack 4 reference 2021-04-14 11:10:48 -04:00
Charles Lyding
dd0fd18a98 refactor(@ngtools/webpack): remove redundant webpack-sources dependency
The `webpack` package now exports the `Source` based classes directly.
2021-04-13 15:34:54 -04:00
Alan Agius
1f662ebad9 refactor(@ngtools/webpack): remove usage of deprecated webpack plugins
Remove usage of `SingleEntryPlugin` and `LibraryTemplatePlugin` which are both deprecated.
2021-04-13 10:49:17 -04:00
Alan Agius
1532e32cc2 refactor: clean up webpack 4 code 2021-04-13 10:49:17 -04:00
Renovate Bot
871f9eee77 build: update webpack to version 5.32.0 2021-04-13 10:43:33 -04:00
Charles Lyding
440f57943d build: update webpack to version 5.31.2 2021-04-12 14:08:43 -04:00
Charles Lyding
8c7d56e03a feat(@ngtools/webpack): support processing inline component styles in AOT
This change updates the Angular Webpack Plugin's resource loader to support processing styles that do not exist on disk when the `inlineStyleMimeType` option is used.
2021-04-12 14:08:43 -04:00
Charles Lyding
5e5b2d9b1a feat(@ngtools/webpack): support generating data URIs for inline component styles in JIT
This change adds the new `inlineStyleMimeType` option. When set to a valid MIME type, enables conversion of an Angular Component's inline styles into data URIs.  This allows a Webpack 5 configuration rule to use the `mimetype` condition to process the inline styles. A valid MIME type is a string starting with `text/` (Example for CSS: `text/css`).
2021-04-12 14:08:43 -04:00
Alan Agius
dee6b79489 refactor: remove @types/webpack 2021-04-12 10:02:07 -04:00
Renovate Bot
dc2f678416 build: update angular packages 2021-04-08 12:20:44 -04:00
Charles Lyding
46e9d0e8a6 feat(@ngtools/webpack): support multiple plugin instances per compilation
This change allows multiple instances of the `AngularWebpackPlugin` to be present in a Webpack configuration.
Each plugin instance should reference a different TypeScript configuration file (`tsconfig.json`) and the TypeScript configuration files should be setup to not include source files present in the other TypeScript configuration files. If files are included in more than one TypeScript configuration, the first plugin present in the Webpack configuration that can emit the file will be used.

Closes: #5072
2021-04-08 09:42:47 -04:00
Charles Lyding
43e22ae24a build: update webpack to version 5.30.0 2021-04-08 09:42:47 -04:00
Renovate Bot
a3ab2de647 build: update typescript to version 4.2.4 2021-04-08 08:35:25 -04:00
Charles Lyding
160102ae57 fix(@ngtools/webpack): remove Webpack plugin for deprecated ViewEngine compiler
BREAKING CHANGE: Removal of View Engine support from application builds
With the removal of the deprecated View Engine compiler in Angular version 12 for applications, the View Engine Webpack plugin has been removed.
The Ivy-based Webpack plugin is the default used within the Angular CLI.
If using a custom standalone Webpack configuration, the removed `AngularCompilerPlugin` should be replaced with the Ivy-based `AngularWebpackPlugin`.
2021-04-05 19:20:56 +02:00
Renovate Bot
f6759c0bbd build: update angular packages 2021-04-02 08:09:41 +02:00
Charles Lyding
430ee441bd fix(@ngtools/webpack): use correct Webpack asset stage in resource loader
The asset extraction within the Angular compiler plugin resource loader needs to occur at the end of the Webpack asset processing pipeline. This ensures that all analysis and preprocessing of the asset have been performed before the resource asset is extracted from the Webpack child compilation.
2021-03-31 10:06:28 -06:00
Charles Lyding
aeebd14f04 perf(@ngtools/webpack): only check affected files for Angular semantic diagnostics
This change improves the performance of incremental type checking of Angular templates by reducing the number of calls to retrieve the diagnostics.
Only the set of affected files will be queried on a rebuild. The affected set includes files TypeScript deems affected, files that
are required to be emitted by the Angular compiler, and the original file for any TTC shim file that TypeScript deems affected.
2021-03-29 08:16:36 -06:00
Renovate Bot
2e3bd24e6e build: update angular packages 2021-03-18 10:45:34 +01:00
Alan Agius
79856644b4 feat(@angular/cli): support TypeScript 4.2
BREAKING CHANGE

Drop support for TypeScript versions prior to 4.2.3
2021-03-17 19:32:01 +01:00
Charles Lyding
2327ddc2f9 fixup! fix(@ngtools/webpack): remove Webpack 5 deprecation warning in resource loader 2021-03-17 11:27:53 +01:00