2437 Commits

Author SHA1 Message Date
Alan Agius
9030c9ee16 fix(@angular-devkit/build-angular): remove 0.0.0 version from supported Angular semver versions error message 2021-02-04 18:58:42 +01:00
Charles Lyding
c51126fc19 test(@angular-devkit/build-angular): add async downlevel source map unit test 2021-02-04 18:26:56 +01:00
Charles Lyding
a986d8ab63 test(@angular-devkit/build-angular): ensure jobs are complete before checking logs 2021-02-04 08:43:15 +01:00
Charles Lyding
5ba886cbb5 refactor(@angular-devkit/core): convert json schema registry to use async/await 2021-02-04 08:43:15 +01:00
Charles Lyding
93c858237f test(@angular-devkit/architect): allow asynchronous jobs to start execution before expect 2021-02-04 08:43:15 +01:00
Charles Lyding
5fc18efa6f test(@angular-devkit/core): allow asynchronous jobs to start execution before expect 2021-02-04 08:43:15 +01:00
Charles Lyding
3bb3c6cd51 fix(@angular-devkit/core): ensure job input values are processed in order
If schema validation happens to be asynchronous then the switchMap could cause loss of input values.
2021-02-04 08:43:15 +01:00
Alan Agius
6732294ff3 refactor(@angular-devkit/build-angular): remove file-loader dependency
`file-loader` resolves `import/require()` on a file into a url. This is non standard, undocumented, unsupported Webpack specific functionality. This was introduced in the Angular CLI  before `postcss-cli-resources` existed and was never removed.

Using `file-loader` and `postcss-cli-resources` are no longer needed with Webpack 5, because of the introduction of [Assets Modules](https://webpack.js.org/guides/asset-modules/).

BREAKING CHANGE:

The unsupported/undocumented, Webpack specific functionality to `import`/`require()` a non-module file has been removed.

Before
```js
import img from './images/asset.png';
```

After
```html
<img src="images/asset.png">
```
2021-02-04 08:42:57 +01:00
Charles Lyding
8300d53f79 fix(@angular-devkit/build-angular): update Angular peer dependencies to 11.2 prerelease 2021-02-03 20:44:47 +01:00
Alan Agius
d2ce3e7d62 fix(@ngtools/webpack): don't use skipTemplateCodegen to determine if compilation is JIT mode
With this change we add a new `jitMode` option to the ivy AngularWebpackPlugin.
`readConfiguration` from `@angular/compiler-cli` will use file configuration options over programmaticly supplied options. By using a separate option the options precedence issue can be avoided.

Closes #19949
2021-02-03 20:44:07 +01:00
Alan Agius
04ff164e08 test(@angular-devkit/build-angular): cleanup budgets E2E test 2021-02-03 18:14:26 +01:00
Alan Agius
238438e26f refactor(@angular-devkit/build-angular): remove BundleBudgetPlugin
Remove BundleBudgetPlugin, and instead use the `checkBudgets` method directly in the browser buillder.
2021-02-03 18:14:26 +01:00
Charles Lyding
73b409881f feat(@angular-devkit/build-angular): detect and use tailwindcss in projects
This feature adds detection of the `tailwindcss` package (https://tailwindcss.com) and provides a mechanism to automatically include support. To enable tailwindcss for a project, two actions must be taken:
1) Install `tailwindcss` into the Angular workspace (`npm install -D tailwindcss`/`yarn add -D tailwindcss`)
2) Create a tailwindcss configuration file (`tailwind.config.js`) in either the workspace root or the project root.  A configuration file in the project root takes precedence over one in the workspace root.

When both conditions are met, the Angular CLI will initialize and integrate tailwindcss into the stylesheet build pipeline.
2021-02-03 09:57:06 +01:00
Alan Agius
21a05d2ea0 fix(@angular-devkit/build-angular): error with status code when response code is not 200
During font inlining, a request can return a response status code other than 200. In which case, the contents of the page should not be inlined.
2021-02-02 16:54:53 +01:00
Alan Agius
e1efc35e41 fix(@ngtools/webpack): recover from component stylesheet errors
Webpack doesn't handle well expections and promise rejections. With this change we use the compilation errors.

Closes #19892
2021-02-02 16:54:34 +01:00
Alan Agius
2cf374a0fc refactor(@angular-devkit/build-angular): remove unused findUp method 2021-02-02 15:21:39 +01:00
Alan Agius
52d14d7261 refactor(@angular-devkit/build-angular): remove config barrel file export 2021-02-02 15:21:39 +01:00
Renovate Bot
6dfd7272ed build: update sass to version 1.32.6 2021-02-02 10:50:28 +01:00
Renovate Bot
2de17b5ce7 build: update rollup to version 2.38.4 2021-02-02 10:50:16 +01:00
Alan Agius
a5bf224527 refactor(@angular-devkit/build-angular): use ES6 imports instead of require
Main benefit is to use type definitions.
2021-02-02 07:46:32 +01:00
Alan Agius
7169c74422 ci: update to build_bazel_rules_nodejs version 3
More info: https://github.com/bazelbuild/rules_nodejs/wiki#migrating-to-30
2021-02-02 07:45:29 +01:00
Renovate Bot
7513170459 build: update open to version 7.4.0 2021-02-01 15:11:29 +01:00
Renovate Bot
e262c1bae6 build: update rollup to version 2.38.3 2021-02-01 10:31:03 +01:00
Charles Lyding
495459a8a3 fix(@angular-devkit/schematics): merge external schematics after execution
When an `externalSchematic` rule was used, the input tree was branched but never merged back into the input tree.  This resulted in a different tree instance being returned from the rule.  The `externalSchematic` rule now behaves like the `schematic` rule which merges the trees.
2021-02-01 10:30:15 +01:00
Charles Lyding
8688de462e fix(@angular-devkit/schematics): check merge ancestry of delegate & scoped trees
This change ensures correct merge behavior when a `HostTree` is wrapped in a `ScopedTree` or `DelegateTree`.  Previously the ancestry of the HostTree was not available to the merge.
2021-02-01 10:30:15 +01:00
Renovate Bot
aae0083b77 build: update less to version 4.1.1 2021-01-31 10:40:39 +01:00
Renovate Bot
8d5fcd42b4 build: update autoprefixer to version 10.2.4 2021-01-30 08:55:10 +01:00
Alan Agius
9d973d63f7 test(@angular-devkit/build-angular) use port 0 to fix flakey test 2021-01-29 23:47:17 +01:00
Renovate Bot
307362a8a7 build: update rollup to version 2.38.1 2021-01-29 12:34:12 +01:00
Renovate Bot
3159bbf27f build: update mini-css-extract-plugin to version 1.3.5 2021-01-29 12:34:00 +01:00
Alan Agius
e02d737cb8 fix(@angular-devkit/build-angular): handle promise rejection in IndexHtmlWebpackPlugin
Webpack doesn't handle promise rejections properly. With this change use use a try/catch block and add the error to the compilation.

Closes #19893
2021-01-28 20:32:39 +01:00
Alan Agius
60b2cb7f10 fix(@angular-devkit/build-angular): add fallback for non defined stats options
A fallback value for stats options when an option is not defined. It has precedence over local webpack defaults.
2021-01-28 20:32:17 +01:00
Charles Lyding
76915409df refactor(@angular-devkit/schematics): allow customization of node workflow engine host
This adds an option to the NodeWorkflow to allow a custom NodeModulesEngineHost to be used with the workflow.
2021-01-28 12:44:34 +01:00
Matt Lewis
42e439f6fd fix(@angular-devkit/build-angular): fix budgets for any script with differential loading enabled
Fixes #19849
2021-01-28 11:02:07 +01:00
Alan Agius
54f44bc49a test(@angular-devkit/build-angular): move output-hashing test to new test harness 2021-01-28 09:35:31 +01:00
Alan Agius
a86ea3f154 fix(@angular-devkit/build-angular): allow emitting multiple files with the same filename
Previously when hashing of media was disabled, if 2 files had the same name. Only one files used to be emitted. With this change we change the behaviour so that both files are emitted.

Closes #12186
2021-01-28 09:35:31 +01:00
Alan Agius
36a28e5226 fix(@angular-devkit/build-angular): styles that are not injected do count for initial bundle size
Closes #17672
2021-01-28 09:35:12 +01:00
Mike Brocchi
a179828be3 fix(@angular-devkit/schematics): Fix merge that causes an overwrite
This fixes #11337 to allow for merging of a tree with another when the the file already exists in the tree being merged into.
2021-01-28 09:34:43 +01:00
Charles Lyding
e2e8d57b38 feat(@angular-devkit/build-angular): support targeting ES2017 with Zone.js
This change causes native async functions to be downleveled when an application targets ES2017 within its TypeScript configuration.  Any source file that contains the async keyword will be processed including libraries.  Since Zone.js does not support native async, this processing allows Zone.js to function with an ES2017 target.
2021-01-26 09:26:23 -06:00
Renovate Bot
2f050fde34 build: update speed-measure-webpack-plugin to version 1.4.2 2021-01-26 09:20:17 -06:00
Alan Agius
4453bb1ab9 refactor(@angular-devkit/build-optimizer): replace deprecated TypeScript methods 2021-01-25 09:21:53 -06:00
Renovate Bot
bf0c5b9e96 build: update rollup to version 2.38.0 2021-01-25 09:19:23 -06:00
Alan Agius
f766fc1617 refactor(@angular-devkit/core): deprecate flatten schema method.
The flatten schema method has been deprecated without replacement.

Producing a flatten schema document does not in all cases produce a schema with identical behavior to the original.

See: https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.appendix.B.2
2021-01-25 09:17:45 -06:00
Alan Agius
9af0942e69 fix(@angular-devkit/build-angular): inlining fonts behind proxy
With this change users can now their proxy server via the `HTTPS_PROXY` environment variable. The specified proxy will be used when making requests to inline fonts.

Closes #19401
2021-01-25 09:17:03 -06:00
Alan Agius
d0cc0cbda3 fix(@angular-devkit/build-angular): correctly handle scripts when using subresource-integrity option
Fixes #19829
2021-01-25 09:16:32 -06:00
Alan Agius
3db8c6e464 test(@angular-devkit/build-angular): change sri tests to use new test harness 2021-01-25 09:16:32 -06:00
Alan Agius
cc51432661 fix(@angular-devkit/build-angular): resolve less from build-angular package 2021-01-22 10:36:20 -08:00
Alan Agius
5711e691b9 fix(@angular-devkit/build-angular): resolve postcss from build-angular package
`postcss-loader` version 4.2.0 added an `implementation` option. Using the using will ensure that the correct postcss version is used.

More info: deac9787ee

Fixes #19839
2021-01-22 10:36:20 -08:00
Alan Agius
64aa5703fa docs(@angular-devkit/build-angular): update vendorChunk and commonChunk descriptions 2021-01-20 10:30:28 -05:00
Charles Lyding
6b2a8e175e refactor(@angular-devkit/build-angular): remove virtualfs host usage from browser/dev-server
The virtualfs Host was only used for exist and directory checks during asset and file replacement option normalization within the browser and dev-server builders.
2021-01-20 10:27:43 -05:00