14675 Commits

Author SHA1 Message Date
cexbrayat
bd26a18e7a fix(@angular-devkit/build-angular): typo in preloadInitial option description
The description had different types of quotes.
2023-12-27 12:56:01 -05:00
Alan Agius
116ee78613 refactor: remove unused code from CSS Lexer
This code is no longer used.
2023-12-27 15:05:51 +01:00
Alan Agius
a5f5561ba5 Revert "build: update dependency webpack-dev-middleware to v7"
This reverts commit 6741d2f8710416433a9276c9975f97c5ddb21cb9.
2023-12-27 09:01:22 -05:00
Paweł Fraś
9be1a82018 refactor(@schematics/angular): fix typo in "expression" variable name inside "addSymbolToNgModuleMetadata" function 2023-12-27 09:00:27 -05:00
Angular Robot
a175d1f9c0 build: lock file maintenance 2023-12-27 09:47:02 +01:00
Angular Robot
3e3cd82396 build: update dependency @types/ini to v4 2023-12-27 09:28:17 +01:00
Angular Robot
6741d2f871 build: update dependency webpack-dev-middleware to v7 2023-12-27 09:03:25 +01:00
Alan Agius
4469e481fc fix(@schematics/angular): do not trigger NPM install when using ---skip-install and --ssr
The `skipInstall` option was never passed to the ssr schematic, which caused NPM install to also be invoked when running `ng new --ssr`.
2023-12-26 18:28:45 +01:00
Doug Parker
220a7e82d9 docs: remove Universal from caretaking doc
Since Universal code has been integrated into the Angular CLI repo, there are no longer any unique caretaking responsibilities.
2023-12-26 10:23:29 -05:00
Alan Agius
49ed9a26cb fix(@angular-devkit/build-angular): emit error when using prerender and app-shell builders with application builder
The application builder has built-in prerendering and app-shell generation capabilities which makes using these builders redundant.
2023-12-26 10:19:00 -05:00
Angular Robot
140a5f5bb0 build: update angular 2023-12-26 10:16:19 -05:00
Angular Robot
db87e4f730 build: update all non-major dependencies 2023-12-26 10:16:04 -05:00
Angular Robot
acc82f7bf4 build: update github/codeql-action action to v3.22.12 2023-12-26 10:15:43 -05:00
Charles Lyding
874e576b52 fix(@angular-devkit/build-angular): filter explicit external dependencies for Vite prebundling
To ensure that Vite does not unintentionally attempt to prebundle a module that was explicitly
marked as external (typically via the `externalDependencies` build option), the full list of
externalized imports is now filtered by the dependencies specified within the external configuration.
Vite currently will include a module for prebundling if it is present in the include list even though
it may also be present in the exclude list.
2023-12-22 08:17:57 +01:00
Doug Parker
0d64ffcb62 release: cut the v17.1.0-next.3 release 17.1.0-next.3 2023-12-21 17:05:59 -08:00
Doug Parker
c319461c26 docs: changelog cherry pick for 17.0.8 release 2023-12-21 12:26:54 -08:00
Doug Parker
4a0f7843ae docs: release notes for the v16.2.11 release 2023-12-21 11:40:52 -08:00
Krzysztof Platis
aec581daf0 fix(@schematics/angular): add missing property "buildTarget" to interface "ServeBuilderOptions" 2023-12-21 10:28:29 -08:00
Alan Agius
fc7aa22462 refactor(@angular/cli): use process.versions.pnp to determine if PNP is used in warnOnMissingNodeModules
Instead of checking for existence of PNP config files we now use `process.versions.pnp`. See https://yarnpkg.com/advanced/pnpapi#processversionspnp
2023-12-21 16:37:55 +01:00
Alan Agius
a391b5f0c2 fix(@angular/cli): ng e2e and ng lint prompt requires to hit Enter twice to proceed on Windows
This fixes an issue where prompts in nested child processes on Windows require multiple keystrokes to proceed.

Closes #26724
2023-12-21 16:37:25 +01:00
Angular Robot
75b60468cd build: update angular 2023-12-21 16:36:30 +01:00
Angular Robot
1867a0a3cf build: update dependency mrmime to v2 2023-12-21 16:17:22 +01:00
Angular Robot
e25ad7a580 build: update angular 2023-12-20 14:40:19 -08:00
Angular Robot
f167e5445b build: update all non-major dependencies 2023-12-20 19:31:19 +01:00
Alan Agius
47a064b146 feat(@angular-devkit/build-angular): emit external sourcemaps for component styles
This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them.

Closes #24049 and closes #26676
2023-12-20 19:30:12 +01:00
Alan Agius
ceffafe1a3 fix(@angular-devkit/build-angular): provide better error messages for failed file reads
This commit adds a more actionable error message when `readFile` fails during index generation.
2023-12-20 15:58:13 +01:00
Angular Robot
6999c2e55e build: update angular 2023-12-19 10:37:30 -08:00
Alan Agius
ce9bf81598 refactor(@angular-devkit/build-angular): remove no longer needed realpathSync
This is no longer needed since the path provided is already passed through `realpathSync`. 9d7d136b32/packages/angular_devkit/build_angular/src/builders/application/options.ts (L104-L109)
2023-12-19 19:25:46 +01:00
Charles Lyding
efe3bda483 fix(@angular-devkit/build-angular): ensure external dependencies are used by Web Worker bundling
When processing a Web Worker reference in application code, the Web Worker entry point is bundled
in a separate action. The external dependencies configuration was previously not passed on to this
action which caused the Web Worker bundling to attempt to bundle any configured external dependencies.
This could lead to build errors if the dependency does not exist within the project.
2023-12-19 12:47:58 -05:00
Charles Lyding
9d7d136b32 refactor(@angular-devkit/build-angular): pass full extensions to application builder for dev server
Experimental programmatically added build extensions are now passed to the internal application builder
when used with the development server. Previously, the plugins were not passed in a manner that would
allow them to be used if the `application` builder was selected as the builder for dev server usage.
2023-12-19 10:50:07 -05:00
Charles Lyding
d263cb2783 refactor(@angular-devkit/build-angular): use direct explicit external configuration for metadata
The metadata used by the development server to determine the prebundling and externalization behavior
is now created using the external configurations of each bundling operation context directly instead
of the higher level `externalDependencies` build option. This better captures the explicitly defined
external values as each bundling operation configuration could contain additional values based on
the needs and/or customization of each. This will have no current noticeable behavior change as the
default behavior currently does not differ from the higher level option.
2023-12-19 10:50:07 -05:00
Alan Agius
a1f3ae5799 fix(@schematics/angular): do not generate standalone component when using ng generate module
Adjust the module schematic to always generate non standalone components.

Closes #26700
2023-12-19 16:48:12 +01:00
Alan Agius
b3c1991a2e fix(@angular-devkit/build-angular): add missing tailwind @screen directive in matcher
`@screen` is not documented in tailwind documentation as it is not a recommanded option, however it still works and they don't have plans to remove it.

https://github.com/tailwindlabs/tailwindcss/discussions/7516

Closes #26709
2023-12-19 16:47:59 +01:00
Charles Lyding
7f2d162c0c refactor(@angular-devkit/build-angular): reduce promise creation during estimated transfer size calculation
The promise creation overhead when calculating the estimated transfer size of the output files during an
optimized build has been reduced by directly using the `brotliCompress` Node.js function instead of using
a promisified variant. Node.js Only provides a callback-based async variant for brotli compression. This
change allows for a single promise to be used.
2023-12-19 10:45:21 -05:00
Alan Agius
a708dccff3 feat(@schematics/angular): update SSR and application builder migration schematics to work with new outputPath
In #26675 we introduced a long-form variant of `outputPath`, this commit updates the application builder migration and ssr schematics to handle this change.
2023-12-19 07:20:25 +01:00
Angular Robot
69d2dfdb50 build: lock file maintenance 2023-12-18 14:12:12 -08:00
Angular Robot
0457aa455a build: update all non-major dependencies 2023-12-18 14:10:56 -08:00
Angular Robot
187844ec64 build: update angular 2023-12-18 14:09:07 -08:00
Charles Lyding
72cf799388 refactor(@angular/pwa): use stream pipeline operator with HTML rewriter
The index HTML augmentation within the PWA schematic now uses the Node.js
promise-based pipeline helper to reduce the complexity of the code when
using the parse5 streaming rewriter. This removes a noticeable amount of
code as well as removing the need to manually wrap the result in a Promise.
2023-12-18 07:35:14 -05:00
Charles Lyding
10641beccb refactor(@angular-devkit/schematics-cli): remove usage of devkit core tags helper
This helper is only used in one location and can be replicated by adjusting the
whitespace of the string within the code. This reduces the number of value
imports from `@angular-devkit/core` to only one remaining.
2023-12-18 07:34:59 -05:00
Charles Lyding
15a669c1ef feat(@angular-devkit/build-angular): allowing control of index HTML initial preload generation
The long-form variant of the `index` option for the `application` builder now supports
an addition sub-option named `preloadInitial`. This new option is a boolean option that controls
the generation of initial preload related link elements in the generated index HTML file
for the application. Preload related link elements include `preload`, `modulepreload`,
and `preconnect` link rels for initial JavaScript and stylesheet application files.
2023-12-18 07:34:38 -05:00
Alan Agius
f7d538903a fix(@angular/cli): re-add -d alias for --dry-run
This got accidentally deleted during the transition to yargs.

Closes #26496
2023-12-15 16:34:08 +01:00
Alan Agius
30efb76c46 refactor(@angular/cli): remove no longer relevant regexps from ng version checks
Bazel and NgUniversal packages information is not needed in version 17.
2023-12-15 16:30:07 +01:00
Angular Robot
1b6e9c34f3 build: update all non-major dependencies 2023-12-15 11:17:52 +01:00
Angular Robot
d605fcecdf build: update actions/upload-artifact action to v4 2023-12-15 11:17:09 +01:00
Angular Robot
64ed9a64cb build: update actions/upload-artifact action to v4 2023-12-15 11:16:52 +01:00
Alan Agius
cc246d50ea feat(@angular-devkit/build-angular): allow customization of output locations
This update introduces the ability for users to define the locations for storing `media`, `browser`, and `server` files.

You can achieve this by utilizing the extended `outputPath` option.
```json
{
  "projects": {
    "my-app": {
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:application",
          "options": {
            "outputPath": {
              "base": "dist/my-app",
              "browser": "",
              "server": "node-server",
              "media": "resources"
            }
          }
        }
      }
    }
  }
}
```

While not recommended, choosing to set the `browser` option empty will result in files being output directly under the specified `base` path. It's important to note that this action will generate certain files like `stats.json` and `prerendered-routes.json` that aren't intended for deployment in this directory.

**Validation rules:**
- `browser` and `server` are relative to the configuration set in the `base` option.
- When SSR is enabled, `browser` cannot be set to an empty string, and cannot be the same as `server`.
- `media` is relative to the value specified in the `browser` option.
- `media` cannot be set to an empty string.
- `browser`, `media`, or `server` cannot contain slashes.

Closes: #26632 and closes: #26057
2023-12-14 23:50:17 +01:00
Charles Lyding
66edac4bbd refactor(@angular-devkit/build-angular): add index HTML transformer to application programmatic usage
Similar to the `dev-server` builder, the `application` builder's programmatic usage can now transform
the index HTML that is generated during a build. As is the case for the existing builder JavaScript
exports from the package, the new export (`buildApplication`) is also considered experimental and does
not provide the support nor semver guarantees that the builders have when used via `angular.json` configuration.

The third parameter of the `buildApplication` function can now be an extensions object with one of the fields
being `indexHtmlTransformer`. This newly introduced field allows adjusting the index HTML content.

Closes #26299
2023-12-14 12:01:46 +01:00
Angular Robot
68dfe3b38a build: update github/codeql-action action to v3 2023-12-14 09:02:45 +01:00
Angular Robot
fffb67e9e8 build: lock file maintenance 2023-12-14 09:02:32 +01:00