684 Commits

Author SHA1 Message Date
Renovate Bot
734e396b14 build: update all non-major dependencies 2021-07-22 12:31:52 -04:00
Alan Agius
8bea912724 build: update angular dependencies to 12.2.0-next.3 2021-07-22 11:51:51 -04:00
Charles Lyding
1cb07caddc build: transition from ts-api-guardian to dev-infra api-golden utility
The dev-infra tooling now directly provides public API change testing capabilities that leverage the `api-extractor` utility. These new testing capabilities are shared with framework and components.
`ts-api-guardian` has been removed as a dependency as a result.
2021-07-21 14:55:18 -07:00
Charles Lyding
7bfe58e54b refactor(@ngtools/webpack): avoid exposing internal types in public API
The `AngularPluginSymbol` and `FileEmitterCollection` types are not intended to be exported for use within the public API of the package.
2021-07-19 07:06:11 +02:00
Renovate Bot
cb1db78f12 build: update all non-major dependencies 2021-07-19 07:05:44 +02:00
Renovate Bot
4b86f67128 build: update angular 2021-07-15 07:08:01 +02:00
Renovate Bot
2c9a6f0c55 build: update all non-major dependencies 2021-07-12 16:41:09 +01:00
Charles Lyding
720feee34f fix(@ngtools/webpack): avoid non-actionable template type-checker syntax diagnostics
The AOT compiler's internal template type-checking files are not intended to be directly analyzed for diagnostics by the emitting program and are instead analyzed during the template type-checking phase. Previously, only semantic diagnostics were ignored. Now both syntactic and semantic diagnostics are ignored. This change prevents non-actionable diagnostics from being shown during a build.

Addresses: https://github.com/angular/angular/issues/42667
2021-07-09 17:02:10 +01:00
Charles Lyding
7536338e0b fix(@ngtools/webpack): allow generated assets of Angular component resources
The asset caching for Angular component resources previously required that all assets had an originating file. However, some Webpack plugins may generate assets that do not originate from on-disk files and are instead synthetic. These type of assets are now supported by generating a cache key based on the output name of the asset. These assets will persist within the cache due to the lack of knowledge on the dependencies of these assets which results in the inability to invalidate the assets. Updated assets of the same output name will, however, replace older versions of the asset on rebuilds.

Fixes: #21290
2021-07-09 17:01:24 +01:00
Renovate Bot
7ee3a80eaf build: update all non-major dependencies 2021-07-07 11:17:09 -04:00
Charles Lyding
5256699a61 refactor(@ngtools/webpack): remove implicit dependency on raw-loader
When JIT mode and `directTemplateLoading` were enabled, the plugin would reference the `raw-loader` dependency. This dependency was not mentioned in the `package.json` and is also now deprecated.
An internal `direct-resource` loader is now used instead which removes the usage of the implicit dependency.
2021-07-07 09:24:36 -04:00
Charles Lyding
098ff0d939 refactor(@ngtools/webpack): move internal loaders into a subdirectory
The source file for the internal inline resource loader is moved into a `loaders` subdirectory for better code organization. The need to call `require.resolve` is also removed from the consumers of this loader.
2021-07-07 09:24:36 -04:00
Charles Lyding
492c879cd4 refactor(@ngtools/webpack): consolidate diagnostic helper functions
All the webpack related diagnostic helplers are now located in one file which simplifies maintenance and reduces the number of required imports.
2021-07-07 09:24:25 -04:00
Renovate Bot
2bd859e6d5 build: update all non-major dependencies 2021-07-06 10:21:28 -04:00
Alan Agius
dbbcf5c8c4 fix(@ngtools/webpack): only track file dependencies
`fileDependencies` can contain directories and not just files which can cause incorrect cache invalidation on rebuilds.

Example
```
'/Users/***/tailwindcss-angular12-replica/src/app/component19/component19.component.scss',
'/Users/***/tailwindcss-angular12-replica/tailwind.config.js',
'/var/folders/mp/zsgl3srd389_js72bk4_bkgh0000gn/T/tmp-19814-FDsnpPo5zlQK',
'/Users/***/tailwindcss-angular12-replica/package.json',
'/Users/***/tailwindcss-angular12-replica/src/app/component19',
'/Users/***/tailwindcss-angular12-replica/src/app',
'/Users/***/tailwindcss-angular12-replica/src',
'/Users/***/tailwindcss-angular12-replica',
'/Users/***',
'/Users/****',
'/Users',
'/'
```

Closes #21228
2021-07-02 12:55:17 -04:00
Renovate Bot
356f25a1dd build: update all non-major dependencies 2021-07-02 11:49:49 -04:00
Renovate Bot
b3cc790bf4 build: update angular 2021-07-01 13:12:51 +02:00
Renovate Bot
42d4775016 build: update dependency typescript to v4.3.5 2021-07-01 11:05:58 +02:00
Alan Agius
6a7bcf3300 fix(@ngtools/webpack): encode component style data
We now encode the data using `encodeURIComponent` which safely encodes `+` signs. Without this a portion of the buffer was lost and caused `Unrecognised input` errors.

Closes #21236
2021-06-30 14:04:21 +02:00
Renovate Bot
398f56d545 build: update all non-major dependencies 2021-06-30 11:45:41 +02:00
Renovate Bot
73a0a04c24 build: update all non-major dependencies 2021-06-29 08:46:19 +02:00
Renovate Bot
cad770568c build: update angular 2021-06-25 11:34:51 +02:00
Alan Agius
05a52c8c59 refactor: clean up remove unused code 2021-06-25 07:46:22 +02:00
Renovate Bot
50b18858fc build: update all non-major dependencies 2021-06-22 17:40:09 +01:00
Renovate Bot
81cd7d0d8d build: update dependency typescript to v4.3.4 2021-06-21 11:12:58 +01:00
Alan Agius
cef94e10b5 docs(@ngtools/webpack): update options in readme 2021-06-21 11:01:33 +01:00
Renovate Bot
e46a09b8e1 build: update angular 2021-06-18 11:19:05 +01:00
Charles Lyding
12c14b5653 fix(@ngtools/webpack): remove no longer needed component styles workaround
The underlying Angular compiler issue was corrected prior to the final release of 12.0.0 via a5fe8b9589
2021-06-18 11:17:47 +01:00
Renovate Bot
b2a4cb013e build: update dependency typescript to v4.3.3 2021-06-17 12:55:03 -04:00
Renovate Bot
8c4c464f5c build: update all non-major dependencies 2021-06-17 09:43:33 -04:00
Alan Agius
277b356e2f refactor(@ngtools/webpack): improve symbols description 2021-06-16 10:55:21 -04:00
Renovate Bot
ddd2c9f671 build: update all non-major dependencies 2021-06-15 07:30:11 -04:00
Alan Agius
0e5d894c1c build: add missing tslib dep in webpack_test 2021-06-14 08:03:27 -04:00
Charles Lyding
559a65c51e build: update Angular dependencies to 12.1 prerelease versions 2021-06-10 17:34:02 +02:00
Charles Lyding
76308fecaa feat(@ngtools/webpack): support using TypeScript 4.3
With the support of TypeScript 4.3 within the Angular framework, the CLI now supports using TypeScript 4.3 as well.  TypeScript 4.2 also continues to be supported for existing projects.
2021-06-10 17:34:02 +02:00
Renovate Bot
0f4a2d1840 build: update angular 2021-06-10 13:03:50 +02:00
Charles Lyding
ca6e9fec94 refactor(@ngtools/webpack): use Webpack loader context hook to access file emitters
The Angular Webpack loader will now access the Angular Webpack Plugin's file emitters via the loader context directly. This is instead of using the not fully public Webpack compilation property on the loader context. This change also removes the need to directly alter the Webpack compilation object which previously added an additional property.
2021-06-10 08:11:05 +02:00
Charles Lyding
f2f15c0893 fix(@ngtools/webpack): disable caching for ngcc synchronous Webpack resolver
The ngcc resolver must be synchronous to integrate with TypeScript which is only synchronous. If the Webpack resolver cache option is enabled when creating a resolver, the resolver will become asynchronous after a rebuild due to the internal implementation of the resolver caching. To prevent this change in behavior, caching is disabled for the ngcc resolver. The ngcc resolver is only used the first time each dependency is used by the application.
2021-06-10 07:59:57 +02:00
Charles Lyding
2e4ee282b3 refactor(@ngtools/webpack): support both sync and async resolvers with TypeScript paths plugin
Usage of async functions and promises were removed from the TypeScript paths resolver plugin to allow it to be used with both a synchronous and asychronous Webpack resolver.
2021-06-10 07:59:57 +02:00
Charles Lyding
0c2a862db0 fix(@ngtools/webpack): ensure plugin provided Webpack instance is used
Webpack 5 provides the Webpack instance as a property on the Webpack compiler which allows Webpack plugins to leverage the same Webpack instance that was used to initiate the build. The `AngularWebpackPlugin` now will only use the provided instance to ensure that differing Webpack instances and/or versions are not used.
2021-06-09 08:00:49 +02:00
Charles Lyding
bf11f2bc2b refactor(@ngtools/webpack): create ngcc resolver from Webpack Compiler
By using the Webpack compiler to request a resolver, configuration supplied options will automatically be used (such as symlinks) and also ensures that the same version of the resolver code will be used. Additionally, this removes one of the reasons to directly depend on the `enhanced-resolve` package.
2021-06-09 07:59:52 +02:00
Charles Lyding
2539023c30 refactor(@ngtools/webpack): remove unneeded transform operation types
The transform operation types are currently only used and returned by the import elider but are immediately mapped back to the underlying TypeScript node at import elider callsites.
This change also switches the import elider to return a Set to reduce the overhead of repeated array `includes` calls.
2021-06-04 08:37:57 +02:00
Renovate Bot
21baf6157b build: update angular 2021-06-03 18:58:21 +02:00
Alan Agius
3a287beab3 refactor: remove left over webpack version 4 code 2021-06-03 15:12:23 +02:00
Alan Agius
8a8384b70a build: update peerDependencies to support ^12.1.0-next 2021-06-03 13:44:07 +02:00
Renovate Bot
89a8faa152 build: update angular 2021-06-02 09:16:51 +02:00
Charles Lyding
f9657bc919 fix(@ngtools/webpack): remove redundant inline style cache
The size of the cache could grow quite large over long active development periods. Webpack 5 memory caching will also allow for caching of the data.
2021-05-31 12:53:08 +01:00
Alan Agius
3afa5567cb fix(@ngtools/webpack): normalize paths when adding file dependencies
This caused Webpack to mark all TypeScript files as removed after the first compilation on Windows because the file separators didn't match

Closes #20891
2021-05-31 12:50:22 +01:00
Alan Agius
494cca6426 build: update Webpack to version 5.38.1
With this change we update to `webpack` to `5.38.1`, this also updates `webpack-sources` to `2.3.0`, The latter is causing OOM errors on our CI, but it in real projects the memory usage only increased by a small fraction. Also, the OOM errors don't manifest themselves when the entire test suit is run locally.

Therefore with this change we also disable sourcemap genertation for most of the browser builds to speed up the tests and reduce memery usage.
2021-05-31 12:49:55 +01:00
Charles Lyding
7a6a4ecb59 refactor(@ngtools/webpack): use Webpack inline resource matching for inline resources
Webpack provides a method to construct a special request string that will remap a loader chain to appear to be from a specific resource path. This requires a custom loader, however, it allows rule matching to leverage the existing file extension based approach and allows providing a path to other loaders which simplifies relative request handling.
2021-05-26 10:51:33 -04:00