2339 Commits

Author SHA1 Message Date
Renovate Bot
a6bbd60d9f build: update all non-major dependencies 2022-02-01 17:02:50 -08:00
Alan Agius
378ec0bcf0 docs(@angular-devkit/build-angular): add missing period in include description 2022-02-01 17:01:11 -08:00
Alan Agius
1842bd5d53 fix(@angular-devkit/build-angular): add whatwg-url to downlevel exclusion list
Similar to https://github.com/angular/angular-cli/pull/21739, `whatwg-url` seems to suffer from the same issue as https://github.com/angular/angular-cli/issues/21735

```ts
const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);
```
2022-02-01 17:00:58 -08:00
Alan Agius
0a1cd584d8 refactor(@angular-devkit/build-angular): remove deprecated showCircularDependencies browser and server builder option
BREAKING CHANGE:

The deprecated `showCircularDependencies` browser and server builder option has been removed. The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tools.
2022-01-31 11:34:58 -08:00
Alan Agius
d23a168b8d feat(@angular-devkit/build-angular): validate file extensions for scripts and styles options
In some cases unexpected files may be provided which can cause to unsupported or broken behaviour.

One such use-case is users can provide TypeScript files as `scripts` input, this would not be processed by the TypeScript compiler, see: https://github.com/angular/angular-cli/issues/17125 and would cause the build to fail with a an unhelpful error message during optimization as the JS optimizers cannot parse TypeScript input.

BREAKING CHANGE:

`browser` and `karma` builders `script` and `styles` options input files extensions are now validated.

Valid extensions for `scripts` are:
- `.js`
- `.cjs`
- `.mjs`
- `.jsx`
- `.cjsx`
- `.mjsx`

Valid extensions for `styles` are:
- `.css`
- `.less`
- `.sass`
- `.scss`
- `.styl`
2022-01-31 11:30:10 -08:00
Alan Agius
7f67dbc1cf fix(@angular-devkit/build-angular): invalid browsers version ranges
This change addresses the `Invalid version: "15.2-15.3"` range error. We previously only handled version ranges for `ios_safari`. Now, we handle such versions for all browsers.

Closes #22606
2022-01-31 09:14:43 -08:00
Renovate Bot
7bcc18e753 build: update dependency @ampproject/remapping to v2 2022-01-28 11:02:57 -08:00
Alan Agius
69ecddaa7d feat(@schematics/angular): update new and existing projects compilation target to ES2020
With this change we update the TypeScript compilation target to `ES2020` for both new and existing projects. This is because all browsers that Angular supports (https://angular.io/guide/browser-support) support `ES2020` features without the need for polyfills.
2022-01-28 11:01:09 -08:00
Alan Agius
b3082355c0 build: update @angular/ packages to version 14 prerelease 2022-01-28 10:59:53 -08:00
Alan Agius
07e776ea37 fix(@angular-devkit/build-angular): fail build when importing CSS files as an ECMA modules
BREAKING CHANGE:

We now issue a build time error since importing a CSS file as an ECMA module is non standard Webpack specific feature, which is not supported by the Angular CLI.

This feature was never truly supported by the Angular CLI, but has as such for visibility.
2022-01-27 11:07:32 -08:00
Alan Agius
6df962c7a4 refactor: remove build-optimizer from repo
This package is deprecated and should not be used. It has always been experimental. All the relevant functionality has been moved into `@angular-devkit/build-angular`.
2022-01-27 11:06:00 -08:00
Alan Agius
7068de2809 refactor(@angular-devkit/build-angular): clean find tests logic
With this change we clean up and reduce the complexity of the `findTests` logic that handles the `include` option in the karma builder.
2022-01-27 11:05:36 -08:00
Renovate Bot
5c5230861c build: update all non-major dependencies 2022-01-26 10:44:30 +01:00
Renovate Bot
23dac94c78 build: update all non-major dependencies 2022-01-25 15:39:41 +01:00
Alan Agius
e9684b2fd2 build: update all non-major dependencies 2022-01-24 12:54:31 +01:00
Renovate Bot
f8eb40e58a build: update all non-major dependencies 2022-01-21 12:51:20 +01:00
Derek Cormier
4721b2796c build: correctly stamp experimental packages in bazel build 2022-01-21 12:50:53 +01:00
Renovate Bot
3478258486 build: update all non-major dependencies to v7.16.10 2022-01-20 09:59:34 +01:00
Bill Barry
acf7532bd7 fix(@angular-devkit/build-angular): load translations fresh start
Currently when making a change while serving a localized application, duplicate
translation warnings appear for every translation id. This fixes that by
replacing the whole translation object with a new one each time translations
are loaded.

fixes #22398
2022-01-19 17:45:34 +01:00
Renovate Bot
6801e3db14 build: update all non-major dependencies 2022-01-19 08:29:06 +01:00
Doug Parker
4de2eb54f8 build: bump Angular peer deps to 13.2.0-next
`next` releases are currently for 13.2.0, so this is necessary to avoid peer dep warnings.
2022-01-19 07:22:19 +01:00
Renovate Bot
52964b135c build: update dependency resolve-url-loader to v5 2022-01-19 07:21:31 +01:00
Alan Agius
b6886cea52 refactor(@angular-devkit/build-angular): refactor mini-css-extract-plugin import to ES6
`mini-css-extract-plugin` now ships its own types.
2022-01-19 07:21:10 +01:00
Renovate Bot
79a474de68 build: update all non-major dependencies 2022-01-19 07:21:10 +01:00
Alan Agius
a35262e6a5 refactor(@angular-devkit/build-angular): exit early when there are no component style budgets
With this change we exit the function early, when there are no budgets defined.
2022-01-16 19:41:13 +00:00
Alan Agius
b5c4a23446 fix(@angular-devkit/build-angular): support ESNext as target for JavaScript optimizations
Previously, when ESNext was used, we fallbacked to ES2020 which caused ESBuild to output broken code.

Closes #22486
2022-01-16 19:40:29 +00:00
Alan Agius
a0784bd8cb fix(@angular-devkit/build-angular): disable parsing new URL syntax
When web-workers are enabled we allowing parsing `new URL` syntax which has the side-effect that Webpack will treat all assets as asset modules (https://webpack.js.org/guides/asset-modules/#url-assets). With this change we remove this inconsistency by disabling the `url` parsing which doesn't effect `new Worker(new URL(...))`.
2022-01-16 19:39:00 +00:00
Renovate Bot
acad0abbb9 build: update dependency postcss-preset-env to v7 2022-01-12 10:08:19 -08:00
Renovate Bot
81b2bd6ea3 build: update all non-major dependencies 2022-01-12 10:07:17 -08:00
Alan Agius
426ddb68d9 fix(@angular-devkit/build-angular): ensure $localize calls are replaced in watch mode
When `translations` is undefined `$localize` calls are not replaced.

2c9a33dddb/packages/angular_devkit/build_angular/src/builders/dev-server/index.ts (L382)

Closes #22435
2022-01-12 10:06:49 -08:00
Alan Agius
0d68ed5473 fix(@angular-devkit/build-angular): localized bundle generation fails in watch mode
Previously, we used to delete the temporary emitted JS and map files. However this causes a problem in watch mode, as Webpack will not re-emit these deleted files during the next incremental re-build.

With this change we now delete the entire temporary directory when the process is being terminated instead of a file by file bases.

Closes #22395
2022-01-12 10:05:08 -08:00
Elio Goettelmann
50167a36b0 fix(@angular-devkit/build-angular): websocket client only injected if required
After the webpack-dev-server migration to v4, the websocket client was always injected, even if not required. This caused unnecessary 'ws' requests when live-reload and hmr were disabled.
2022-01-12 10:03:55 -08:00
Derek Cormier
c2737dd51a build: use placeholder version for stamping 2022-01-12 10:02:23 -08:00
Alan Agius
6d2087b8f8 fix(@angular-devkit/build-angular): automatically purge stale build cache entries
With every build-angular release, previously created cache entries get stale and are no longer used. This causes the cache to keep growing as older files are not purged.

With this change we automatically purge entries that have been created with older version of build-angular and can no longer be used with the current installed version.

Closes #22323
2022-01-12 09:46:03 -08:00
minijus
cbe028e37c feat(@angular-devkit/build-angular): expose i18nDuplicateTranslation option of browser and server builders
Closes #22201
2022-01-10 16:14:14 -08:00
Alan Agius
11f817adae fix(@angular-devkit/build-angular): use contenthash instead of chunkhash for chunks
See https://github.com/waysact/webpack-subresource-integrity/tree/main/webpack-subresource-integrity#caching and https://github.com/waysact/webpack-subresource-integrity/issues/162 for more information about this.

Closes #22439
2022-01-10 16:13:39 -08:00
Alan Agius
a5e375ca93 fix(@angular-devkit/build-angular): correctly resolve core-js/proposals/reflect-metadata
Closes #22443
2022-01-10 16:13:06 -08:00
Alan Agius
2b789b3ad0 refactor: remove @types/webpack-dev-server
This package is no longer needed since `webpack-dev-server` now has it's own typings.
2022-01-10 11:32:40 -08:00
Renovate Bot
f70f871db2 build: update all non-major dependencies 2022-01-10 11:32:40 -08:00
Derek Cormier
4b5c52b0d8 build: perform package.json substitutions in bazel build 2022-01-10 10:25:49 -08:00
Jordan Pittman
509322b621 fix(@angular-devkit/build-angular): Don't use TAILWIND_MODE=watch
This was only used as a workaround for older postcss-loder versions. It is no longer necessary. Additionaly it does not work with polling.
2022-01-10 10:23:38 -08:00
Lukas Spirig
9a9af20400 fix(@angular-devkit/build-angular): enable :where CSS pseudo-class
Currently when using the `:where` CSS pseudo-class in Angular CLI projects,
a warning will be emitted, as `:where` could not be interpreted. Updating
to the latest version of `critters` fixes this issue.
2022-01-10 10:22:29 -08:00
Alan Agius
2c9a33dddb refactor(@angular-devkit/build-angular): ability to perform DCE but retain symbol names
Previously, we enabled the `keepNames` esbuild when mangling was disabled, this caused dead code to be retained because of the transformations that esbuild did to the input.

Input
```js
class foo {}
```

Output
```js
var l = Object.defineProperty,
  a = (s, c) => l(s, "name", { value: c, configurable: !0 });
class foo {}
a(foo, "foo");
```

Previously we enabled the `keepNames` esbuild option when mangling was disabled, which is actually not needed to retain the name of symbols but is needed for SSR because Domino relies on the `name` property on functions and classes.

Closes #22354
2021-12-17 13:30:52 +01:00
Alan Agius
b0c8109a99 build: update all non-major dependencies 2021-12-17 12:50:59 +01:00
Alan Agius
471930007c fix(@angular-devkit/build-angular): display FS cache information when verbose option is used
With this change we enabling Webpack to display additional cache related logs when the `verbose` option is enabled. This is helpful to debug cache misses.
2021-12-15 11:35:25 -08:00
Alan Agius
f1d2873ca7 fix(@angular-devkit/build-angular): only extract CSS styles when are specified in styles option
This fixes an issue were in some cases when importing CSS in the compilation using import syntax caused CSS to be extracted which causes a runtime error.

In general this is not something that we fully support since this is a specific webpack features and importing CSS as if they were ES modules not supported by the browsers. However, certain widely using libraries such as Monaco editor depend on this specific Webpack feature.

Note: This non-standard unsupported behaviour will no longer be possible in the next major version.

Closes #22358
2021-12-15 11:34:40 -08:00
Renovate Bot
441c2ef768 build: update all non-major dependencies 2021-12-15 09:23:07 +01:00
Alan Agius
e15aee65b5 build: refactor code to use types from sass and copy-webpack-plugin instead of @types
These packages now ship their own type decleration files.
2021-12-14 20:20:59 +01:00
Renovate Bot
0db333f31b build: update all non-major dependencies 2021-12-14 20:20:59 +01:00
Alan Agius
0323a35b47 fix(@angular-devkit/build-angular): add tailwindcss support for version 3 2021-12-11 09:20:36 +01:00