2552 Commits

Author SHA1 Message Date
Angular Robot
91133fc244 build: update all non-major dependencies 2022-09-16 15:54:32 -07:00
Alan Agius
2ba44a433c refactor(@angular-devkit/build-angular): remove support for Stylus
The usage of Stylus in the CLI is minimal and this package never reached version 1.

BREAKING CHANGE:

Deprecated support for Stylus has been removed. The Stylus package has never reached a stable version and its usage in the Angular CLI is minimal. It's recommended to migrate to another CSS preprocessor that the Angular CLI supports.
2022-09-16 11:39:19 -07:00
Alan Agius
12931ba8c3 refactor(@angular-devkit/build-angular): remove deprecated ES5 support
Remove deprecated support for ES5 output.

BREAKING CHANGE: Producing ES5 output is no longer possible. This was needed for Internet Explorer which is no longer supported. All browsers that Angular supports work with ES2015+
2022-09-16 11:39:02 -07:00
Cédric Exbrayat
1c21e470c7 feat(@schematics/angular): enable error on unknown properties and elements in tests
These new options have been introduced in Angular v14.
The commit enables the option in a new project, as we did when we introduced the `destroyAfterOption`,
with the same long term goal to have these options enabled by default.
2022-09-16 11:37:56 -07:00
Alan Agius
9798323d5e refactor(@angular-devkit/build-angular): simplify configuration of inlineStyleFileExtension
Remove redundant switch statement.
2022-09-16 11:36:33 -07:00
Charles Lyding
1c527a9da5 feat(@angular-devkit/build-angular): add esbuild-based builder initial support for fileReplacements
Support for the `fileReplacements` option from the Webpack-based builder has now been integrated into
the experimental esbuild-based browser application builder. The option will no longer be ignored during
builds. Only the officially supported form of the option (`replace`/`with` fields) is implemented.
2022-09-16 11:35:57 -07:00
Alan Agius
fdc315d335 test(@angular-devkit/build-angular): rewrite app-shell unit test into e2e
This particular unit tests was really an e2e test.
2022-09-15 08:26:11 -07:00
Alan Agius
9beb878e2e feat(@schematics/angular): remove Browserslist configuration files from projects
The Browserslist configuration file is redundant as we set the defaults directly in @angular-devkit/build-angular. 8da926966e/packages/angular_devkit/build_angular/src/utils/supported-browsers.ts (L12-L19)

With this commit, we remove the `.browserlistrc` configuration file from the schematics application template and through a migration in existing projects when the Browserslist query result matches the default.

Users needing a finer grain support should still create a `.browserlistrc` in the root directory of the project.
2022-09-14 10:43:41 -07:00
Jason Bedard
4de9045de8 test: unit test multiple node versions in separate jobs 2022-09-14 10:43:17 -07:00
Alan Agius
2021e66a12 fix(@angular-devkit/build-angular): watch symbolic links
This commit addresses an issue which caused symbolic links not to be watched properly.

Closes #15100
2022-09-14 10:42:56 -07:00
Angular Robot
acd2e92bc4 build: update all non-major dependencies 2022-09-13 15:34:27 -07:00
Charles Lyding
b2add316e7 build: remove unneeded BUILD file licenses rule comments 2022-09-13 10:33:49 -07:00
Alan Agius
74db9818db refactor: remove unused file 2022-09-09 17:51:30 +02:00
Alan Agius
7f1017e60f refactor(@angular-devkit/build-angular): remove old bundleDependencies enum logic
BREAKING CHANGE: server builder `bundleDependencies` option now only accept a boolean value.
2022-09-08 18:59:26 +02:00
Alan Agius
4f8a3d2582 fix(@angular-devkit/build-angular): correctly display error messages that contain "at" text.
Previously, the regexp was incorrectly matching messages which contained "at" as part of the text.

Closes #23865
2022-09-08 18:51:04 +02:00
Alan Agius
98bde526b4 refactor(@angular-devkit/build-angular): remove postcss-preset-env
This change removes the usage of `postcss-preset-env` as this is no longer needed since Angular no longer supports browsers that require polyfills for CSS stage 3 features https://preset-env.cssdb.org/features/#stage-3.

We replace this and use autoprefixer directly which is still needed.

```
npx autoprefixer --info
Browsers:
  Chrome: 105
  Edge: 105, 104
  Firefox: 104, 102, 91
  iOS Safari: 15.6, 15.5, 15.4, 15.2-15.3, 15.0-15.1, 14.5-14.8, 14.0-14.4
  Safari: 15.6, 15.5, 15.4, 15.2-15.3, 15.1, 15, 14.1, 14

These browsers account for 20.38% of all users globally

At-Rules:
  @resolution: webkit

Selectors:
  ::backdrop: webkit
  ::file-selector-button: webkit
  :autofill: webkit
  :fullscreen: webkit

Properties:
  appearance: webkit
  backdrop-filter: webkit
  backface-visibility: webkit
  background-clip: webkit
  box-decoration-break: webkit
  color-adjust: webkit, moz
  hyphens: webkit
  mask-border-outset: webkit
  mask-border-repeat: webkit
  mask-border-slice: webkit
  mask-border-source: webkit
  mask-border-width: webkit
  mask-border: webkit
  mask-clip: webkit
  mask-composite: webkit
  mask-image: webkit
  mask-origin: webkit
  mask-position: webkit
  mask-repeat: webkit
  mask-size: webkit
  mask: webkit
  print-color-adjust: webkit, moz
  text-decoration-color: webkit
  text-decoration-line: webkit
  text-decoration-skip-ink: webkit
  text-decoration-skip: webkit
  text-decoration-style: webkit
  text-decoration: webkit
  text-size-adjust: webkit
  user-select: webkit

Values:
  cross-fade: webkit
  element: moz
  fill-available: webkit
  fill: webkit
  fit-content: moz
  image-set: webkit
  isolate: webkit
  stretch: webkit, moz
```
2022-09-08 18:50:47 +02:00
Angular Robot
a1e2870337 build: update all non-major dependencies 2022-09-08 08:49:45 +02:00
Alan Agius
3b1f109a33 fix(@angular-devkit/build-angular): change service worker errors to compilation errors
Previously, when there was an error during a build that had service workers enabled, the dev-server crashed as the promise was rejected instead of emitting a compilation error.

With this change we update the logic so that any errors during the SW augmentation phase are changed to a compilation error and also update the logic so that when there are compilation errors we don't try to generate a SW.
2022-09-06 18:40:44 +02:00
Alan Agius
34479475ad refactor: remove Ivy checks
This checks are no longer needed as `enableIvy` option is now meaningless to the compiler
2022-09-06 17:36:00 +02:00
Alan Agius
f86b384df4 fix(@angular-devkit/build-angular): handle service-worker serving with localize in dev-server
Previously, we tried to read the files from the wrong location as during localize we alter the output directory to a different temporary location.

7e64b1537d/packages/angular_devkit/build_angular/src/utils/i18n-options.ts (L251-L252)

Closes #23844
2022-09-02 12:25:20 -04:00
Alan Agius
130975c200 fix(@angular-devkit/build-angular): watch index file when running build in watch mode
Since the index augmentation happens outside of Webpack previously the index html was not being watched during watch mode.

Closes #23851
2022-09-02 11:24:43 -04:00
Angular Robot
b9db5841f5 build: update dependency postcss-import to v15 2022-08-31 08:39:09 -04:00
Charles Lyding
feb06753d5 perf(@angular-devkit/build-angular): use esbuild-based builder to directly downlevel for await...of
esbuild 0.15.6 now supports transforming `for await..of` syntax and will now be used instead of babel
when the syntax is found within code that will be bundled. Zone.js requires that all async/await
related code be downleveled to properly hook promise callbacks. esbuild does not yet support
transforming async generators and so babel is still used when async generator syntax is detected
in an input file.
esbuild 0.15.6 also adjusted the `supported` option to imply that all dependent features of a
disabled feature are disabled as well. For the CLI, this allows only needing to specify that
`async-await` is disabled in the esbuild options.
2022-08-31 08:38:33 -04:00
Charles Lyding
e402c2358c build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-08-31 08:37:19 -04:00
Alan Agius
9aab9ad54d fix(@angular-devkit/build-angular): issue warning when using deprecated tilde imports
With this change we add a warning when using deprecated tilde/`~` imports.
2022-08-30 12:26:14 -04:00
Angular Robot
56b3299f12 build: update all non-major dependencies 2022-08-30 08:54:10 -04:00
Alan Agius
f155f59361 build: update ng-packagr to 15.0.0-next.0
This version supports Angular 15.
2022-08-30 08:53:41 -04:00
Alan Agius
2300be6a41 build: update dependencies to Angular 15.0.0-next 2022-08-30 08:53:41 -04:00
Charles Lyding
504e9678ed Revert "test: enable rbe on all unit tests"
This reverts commit 1193886df5e8110de20ba534e2b4572da72b5e4a.
2022-08-29 13:58:19 -04:00
Jason Bedard
1193886df5 test: enable rbe on all unit tests 2022-08-29 08:19:46 -04:00
Angular Robot
ea5edbebb5 build: update all non-major dependencies 2022-08-29 08:18:24 -04:00
Charles Lyding
d50d09f98d fix(@angular-devkit/build-angular): allow esbuild-based builder to use SVG Angular templates
The experimental esbuild-based browser application builder will now consider SVG files as
Angular component templates. Previously, only HTML files were considered templates and this
resulted in the esbuild-based builder to try to process the SVG file as a stylesheet.
2022-08-29 08:17:47 -04:00
Alan Agius
1c042f38a6 refactor(@angular-devkit/build-angular): remove deprecated usage of canParse
All parsers now implement `parser.analyze`.
2022-08-29 08:17:31 -04:00
Charles Lyding
2b34935727 refactor(@angular-devkit/build-angular): reorganize esbuild builder setup steps
This contains several minor adjustments to the setup steps for the experimental
esbuild-based browser application builder. It better groups the output directory
deletion and creation steps as well as moves entry point normalization into the
normalize options helper function. This should reduce the size of the main
execution function as well as aid in future profiling of the build phases.
2022-08-29 08:15:49 -04:00
Charles Lyding
b647d8069f fix(@angular-devkit/build-angular): correct esbuild builder global stylesheet sourcemap URL
The sourcemap URL in the output CSS files for global stylesheets is now correctly updated to
reflect the name of the global stylesheet output file and not the internal `stdin` virtual
file name.
2022-08-25 10:18:08 -07:00
Charles Lyding
87a61aac36 perf(@angular-devkit/build-angular): with esbuild builder only load Sass compiler when needed
Previously, the Sass compiler was imported on the start of every build regardless of its usage.
The Sass compiler will now only be loaded if a Sass stylesheet is requested.
2022-08-23 12:31:52 -07:00
Charles Lyding
a910ae992c perf(@angular-devkit/build-angular): avoid extra string creation with no sourcemaps for esbuild sass
When using the experimental esbuild-based browser application builder with Sass stylesheets, an
additional string creation for each output stylesheet will now be avoided when sourcemaps are disabled.
2022-08-23 12:31:52 -07:00
Charles Lyding
823852d8c2 refactor(@angular-devkit/build-angular): process esbuild builder global stylesheets and code at the same time
The global stylesheet processing using esbuild and the code bundling that also uses esbuild are now executed
asynchronously. Previously, the global stylesheet processing was required to wait until the code bundling was
complete before starting. Any warnings and/or errors for global stylesheets will also now be shown even if there
are errors during code bundling.
2022-08-23 12:31:14 -07:00
Charles Lyding
4f4f9c9063 refactor(@angular-devkit/build-angular): move esbuild builder global stylesheet bundling into separate function
The global stylesheet bundling and processing code has been moved out of the main builder execution function
and into a separate function. This shortens the length of the main execution function for the builder and also
allows for further refactoring to allow the code and global stylesheet bundling to be executed at the same time.
2022-08-23 12:31:14 -07:00
Alan Agius
147f8c3ebb fix(@angular-devkit/build-angular): correctly handle parenthesis in url
PR #23691 introduced a regression that caused paranthesis in url not to be handled correctly.

This change correct this behaviour and adds a test case to valid this.

Closes #23773
2022-08-22 16:01:14 -07:00
Kristiyan Kostadinov
48dec89e91 build: update to TypeScript 4.8 RC
Updates to the TypeScript 4.8 RC and adds some code to account for a breaking change where the decorators and modifiers of an AST node have been combined into a single array.
2022-08-22 15:28:47 -06:00
Angular Robot
3651209e95 build: update all non-major dependencies 2022-08-17 10:35:20 +02:00
Angular Robot
b5cb05fce7 build: update all non-major dependencies 2022-08-16 18:56:01 +02:00
Angular Robot
ba41c177d5 build: update all non-major dependencies 2022-08-15 14:30:00 +02:00
Alan Agius
4368c85983 refactor: remove unused local variables 2022-08-12 08:19:26 -04:00
Alan Agius
78cacc30e5 refactor(@angular-devkit/build-angular): remove workaround for handle options requests
The upstream fix https://github.com/webpack/webpack-dev-server/issues/4180 has been merged and released as part of `webpack-dev-server` version `4.10.0`
2022-08-11 09:40:42 -04:00
Angular Robot
45e67491f3 build: update all non-major dependencies 2022-08-11 07:18:55 -04:00
Charles Lyding
50c783307e fix(@angular-devkit/build-angular): use valid CSS comment for sourcemaps with Sass in esbuild builder
CSS does not support the single line JS comment (`//`) but rather only the multi-line comment (`/* */`).
When generating the sourcemap URL comment with the modern Sass API, the multi-line comment syntax will
now be used. This removes the esbuild warnings per Sass file that would have otherwise been generated
when stylesheet sourcemaps are enabled for the build.
2022-08-11 07:17:41 -04:00
Alan Agius
7de9b470cb fix(@angular-devkit/build-angular): avoid collect stats from chunks with no files
This commit updates to bundle stats logic to skip checking chunks with no files.

Closes #23717
2022-08-10 09:55:19 -04:00
Angular Robot
a5f3ab41e4 build: update all non-major dependencies 2022-08-10 07:20:52 -04:00