3301 Commits

Author SHA1 Message Date
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
Charles Lyding
f33fb34ae1 build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-09-01 06:24:31 -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
Jason Bedard
1cc2d655e5 build: allow no-remote-exec targets to be cached on CI 2022-08-29 08:16:30 -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
Charles Lyding
398d66af4f refactor(@angular-devkit/schematics): reduce RxJS usage in callRule/callSource functions
The amount of additional RxJS operators and chaining has been reduced within the `callRule`
and `callSource` functions. This also reduces the complexity of the code and removes
several repetitive code segments.
2022-08-12 08:12:56 -04:00
Charles Lyding
ddf1257d14 refactor(@angular-devkit/core): remove deprecated rxjs empty function usage
The RxJS `empty` function is deprecated and will be removed in future versions.
The `EMPTY` constant is the recommended replacement.
2022-08-11 13:00:48 -04:00
AgentEnder
db17eac251 fix(@angular-devkit/core): update workspace extension warning to use correct phrasing 2022-08-11 11:56:12 -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
Charles Lyding
f474bf532f fix(@angular-devkit/build-angular): process stylesheet resources from url tokens with esbuild browser builder
Stylesheet url tokens (`url(....)`) will now be processed when using the esbuild-based experimental browser
application builder. The paths will be resolved via the bundler's resolution system and then loaded
via the bundler's `file` loader. The functionality is implemented using an esbuild plugin to allow for all
file types to be supported without the need to manually specify each current and future file extension within
the build configuration.
The `externalDependencies` option also applies to the referenced resources. This allows for resource paths
specified with the option to remain unprocessed within the application output. This is useful if the relative
path for the resource does not exist on disk but will be available when the application is deployed.
2022-08-09 09:42:58 -04:00
Angular Robot
2dbc55e665 build: update all non-major dependencies 2022-08-08 12:15:49 -04:00
Angular Robot
36b68a5195 build: update all non-major dependencies 2022-08-05 16:47:36 -07:00
Alan Agius
3fb569b5c8 feat(@angular-devkit/build-angular): switch to Sass modern API in esbuild builder
With this change we replace Sass legacy with the modern API in the experimental esbuilder. The goal is that in the next major version this change is propagated to the Webpack builder.

Based on the benchmarks that we did Sass modern API is faster compared to the legacy version.
2022-08-05 10:56:41 -07:00