14675 Commits

Author SHA1 Message Date
Kristiyan Kostadinov
f06f4422c6 build: update to TypeScript 5.4
Updates the repo to TypeScript 5.4.
2024-02-28 12:59:28 -05:00
Angular Robot
4628a04995 build: update angular 2024-02-27 15:33:07 -05:00
Angular Robot
30f182c7ad build: update all non-major dependencies 2024-02-26 14:29:44 -05:00
Charles Lyding
422a9eaa70 build: update webpack to v5.90.3 2024-02-26 13:18:37 -05:00
Angular Robot
4c97fc6816 build: update angular 2024-02-23 09:55:20 -08:00
Angular Robot
5e3ec44833 build: update github/codeql-action action to v3.24.5 2024-02-23 09:13:45 -05:00
Charles Lyding
ce2c3ef0e9 fix(@angular-devkit/build-angular): ensure all related stylesheets are rebuilt when an import changes
This fixes a logic error wherein some stylesheets could potentially not be
rebuilt if a shared import was edited and triggered an application rebuild.
2024-02-23 07:11:09 -05:00
Doug Parker
6987d729b9 docs: release notes for the v17.2.1 release 2024-02-22 13:41:20 -08:00
Angular Robot
c48cced437 build: lock file maintenance 2024-02-22 10:04:52 -08:00
Charles Lyding
34481d07f5 Revert "refactor(@schematics/angular): remove private /components API"
The removed APIs are needed to support `ng add @angular/material@16` with
Angular CLI v17. These APIs should be able to be safely removed with v18.

This reverts commit 6a4d733ddaf67c0b93f48ff39cd2a987dcd2b024.
2024-02-22 10:04:29 -08:00
Charles Lyding
e98dde62de fix(@angular-devkit/build-angular): provide Vite client code source map when loading
The sourcemap for the Vite client code was previously not being loaded along with the
actual code. This could lead to browser 404 console messages when debugging applications.
2024-02-22 10:03:42 -08:00
Angular Robot
48d468c368 build: update github/codeql-action action to v3.24.4 2024-02-22 12:43:48 -05:00
Charles Lyding
9a6a77e2f1 build: update dart-sass to v1.71.1 2024-02-22 08:29:08 -05:00
Charles "Demurgos" Samborski
fa146b8e86 fix(@angular-devkit/build-angular): allow mts and cts file replacement
Updates the `fileReplacement` pattern to allow `.mts` and `.cts` files.
This enables support for TypeScript files with explicit ESM support.

Closes #27124
2024-02-21 14:20:43 -08:00
Angular Robot
dd4f3bcd5d build: update angular 2024-02-21 13:48:42 -08:00
Charles Lyding
2609237610 test: avoid new Node.js properties in webpack direct E2E chunk size testing
Avoid using `fs.Dirent.path` in the `packages/webpack/test-app` E2E test
to ensure the test executes properly on Node.js v18.13. The property was
not added until v18.17.
2024-02-21 10:46:27 -08:00
Charles Lyding
5759cde13e test: generalize webpack direct E2E chunk size testing
Updates to `webpack` or any of the used Webpack plugins can cause output
chunk identifiers to change. The `packages/webpack/test-app` E2E test
previously hard coded these file name identifiers into the test which
can cause unexpected test failures when packages are updated. To remedy
this situation, the output file contents are now checked to discover any
files.
2024-02-21 09:52:14 +01:00
Angular Robot
fcfba7a191 build: update github/codeql-action action to v3.24.3 2024-02-15 15:43:43 +01:00
Angular Robot
749cc744da build: update all non-major dependencies 2024-02-15 15:43:35 +01:00
Angular Robot
3d7b5f78bd build: update angular 2024-02-15 11:02:32 +01:00
Charles Lyding
275b5e7480 refactor(@angular-devkit/schematics-cli): rename schematic template files with a template extension
Files that contain template instructions should include a `.template` extension to prevent them from
being treated as TypeScript/JSON/etc. files. Not doing so can result in parse errors or other failures
when the files are incorrectly processed by other tools.
2024-02-15 11:01:28 +01:00
Angular Robot
a5e8ac5821 build: update dorny/paths-filter action to v3.0.1 2024-02-15 11:00:57 +01:00
Angular Robot
a83fbf6dfb build: update all non-major dependencies 2024-02-15 08:46:22 +01:00
Doug Parker
69cd01f170 docs: release notes for the v17.2.0 release 2024-02-14 12:22:49 -08:00
Doug Parker
2f90b1d921 docs: release notes for the v17.1.4 release 2024-02-14 11:39:51 -08:00
Alan Agius
6e8d32638b fix(@angular-devkit/build-angular): support string as plugin option in custom postcss plugin config
In certain cases, the plugin option may be a string value, as shown in the example below:

```json
{
 "plugins": {
  "tailwindcss/nesting": "postcss-nesting"
  }
}
```

In certain cases, the plugin option may be a string value, as shown in the example below:

```json
{
 "plugins": {
  "tailwindcss/nesting": "postcss-nesting"
  }
}
```

See: https://tailwindcss.com/docs/using-with-preprocessors#nesting
2024-02-14 16:56:48 +01:00
Angular Robot
0f84ae9230 build: update github/codeql-action action to v3.24.1 2024-02-14 10:32:21 +01:00
Angular Robot
bc31814a21 build: update dependency husky to v9.0.11 2024-02-14 10:13:36 +01:00
Angular Robot
d43efe7bde build: update dependency @typescript-eslint/eslint-plugin to v7 2024-02-13 16:08:29 +01:00
Angular Robot
ae51ed674f build: update dependency @typescript-eslint/parser to v7 2024-02-13 13:16:21 +01:00
Angular Robot
9f088c5ae9 build: update all non-major dependencies 2024-02-13 13:16:02 +01:00
Charles Lyding
e75aa9b581 fix(@angular-devkit/build-angular): downgrade copy-webpack-plugin to workaround Node.js support issue
The `copy-webpack-plugin@12` package has a dependency on the `globby@14` package. The recently released
`globby@14.0.1` uses the `merge-streams@2.1.0` package which requires a minimum Node.js version higher
than the officially supported 18.13 for the Angular CLI. Due to both `globby` and `merge-streams` being
transitive dependencies in end-user projects, the Angular CLI cannot directly control the package versions.
However, `copy-webpack-plugin@11` uses `globby@13` which is not affected by the Node.js version problem.
To workaround the Node.js compatibility problem, `copy-webpack-plugin` has been downgraded to version 11.0.0
which is the latest version in the 11 major for the package. The `copy-webpack-plugin` is only used with the
Webpack-based builders when in watch mode. From a review of the commit history between 11.0.0 and 12.0.2 (latest
at the time of this commit), it appears the only notable changes are several performance improvements and the
major version update of `globby`.
2024-02-13 13:14:21 +01:00
Charles Lyding
d7dccbf6b4 refactor(@schematics/angular): correct several comment typos
There were several typos in the comments for the Angular schematics utilities.
2024-02-12 22:21:50 +01:00
Angular Robot
87a01f976d build: lock file maintenance 2024-02-12 15:57:33 +01:00
Charles Lyding
860b93a25b refactor(@angular-devkit/schematics): remove now unused internal UpdateBuffer class
The internal `UpdateBuffer` class is no longer used within the schematics package
and can be removed.
2024-02-12 13:28:07 +01:00
Charles Lyding
77f6a41a83 refactor(@angular-devkit/schematics): directly use magic-string in update recorder
The schematics `UpdateRecorder` now uses the `magic-string` library directly instead
of delegating to another class (`UpdateBuffer`) which now effectively only wraps the
`magic-string`. This also allows for improved BOM handling and repeat conversion
of strings to and from `Buffer` instances.
2024-02-12 13:28:07 +01:00
Charles Lyding
5a2a963043 fix(@angular-devkit/build-angular): bypass Vite prebundling for absolute URL imports
To avoid the Vite-based development server's prebundling system from attempting to
prebundle import statements containing absolute URLs, the set of external specifiers
will now be pre-filtered before being passed onto Vite. Currently, the check for
an absolute URL is any specifier starting with `http://`, `https://`, or '//'.
2024-02-12 08:39:20 +01:00
Angular Robot
3056ccd300 build: update angular 2024-02-09 10:54:53 -05:00
Angular Robot
848eff7b4c build: update dependency vite to v5.1.1 2024-02-09 10:54:41 -05:00
Alan Agius
c9bc5076c9 build: update to vite 5.1.0 2024-02-09 15:41:01 +01:00
Alan Agius
782c7185c5 fix(@angular/cli): prevent BOM errors in package.json during ng update
To prevent `JSON.parse` errors triggered by Byte Order Marks (BOMs) in package.json files, the `readJson` tree method is now utilized for more reliable BOM handling.

Closes #27052
2024-02-09 15:36:15 +01:00
Alan Agius
cc916c1997 fix(@angular-devkit/schematics): add bun to known package managers
Fixes an issue that causes `Unknown package manager "bun".` is thrown when running `NodePackageTask` executor
2024-02-09 14:07:38 +01:00
Charles Lyding
48038a548c docs: release notes for the v17.2.0-rc.0 release 2024-02-08 14:51:10 -05:00
Charles Lyding
e9cec41727 release: bump the next branch to v17.3.0-next.0 2024-02-08 14:51:10 -05:00
Charles Lyding
1b6b7942aa docs: release notes for the v17.1.3 release 2024-02-08 14:21:19 -05:00
Charles Lyding
1aeeb7da09 fix(@angular-devkit/build-angular): ensure WebWorker main entry is used in output code
Previously, the check for determining the correct main entry point for a bundled web worker
found in application code could incorrectly use a lazy chunk created from the worker bundling
under certain situations. The check has now been made more strict to mitigate these situations.
2024-02-08 12:30:36 -05:00
Angular Robot
a957ede9d8 build: update angular 2024-02-08 18:02:35 +01:00
Angular Robot
8d09b80be9 build: update dependency picomatch to v4 2024-02-08 11:31:38 +01:00
Charles Lyding
7f57123fd4 feat(@angular-devkit/build-angular): add define build option to application builder
The `application` builder now supports a new option named `define`. This option allows
global identifiers present in the code to be replaced with another value at build time.
This is similar to the behavior of Webpack's `DefinePlugin` which was previously used with
some custom Webpack configurations that used third-party builders. The option has similar
capabilities to the `esbuild` option of the same name. The documentation for that option
can be found here: https://esbuild.github.io/api/#define
The command line capabilities of the Angular CLI option are not yet implemented and will added
in a future change.

The option within the `angular.json` configuration file is of the form of an object. The keys
of the object represent the global identifier to replace and the values of the object represent
the corresponding replacement value for the identifier. An example is as follows:

```
"define": {
    "SOME_CONSTANT": "5",
    "ANOTHER": "'this is a string literal'"
}
```

All replacement values are defined as strings within the configuration file. If the replacement
is intended to be an actual string literal, it should be enclosed in single quote marks. This
allows the flexibility of using any valid JSON type as well as a different identifier as a replacement.

Additionally, TypeScript needs to be aware of the module type for the import to prevent type-checking
errors during the build. This can be accomplished with an additional type definition file within the
application source code (`src/types.d.ts`, for example) with the following or similar content:
```
declare const SOME_CONSTANT: number;
declare const ANOTHER: string;
```
The default project configuration is already setup to use any type definition files present in the
project source directories. If the TypeScript configuration for the project has been altered, the
tsconfig may need to be adjusted to reference this newly added type definition file.

An important caveat to the option is that it does not function when used with values
contained within Angular metadata such as a Component or Directive decorator. This
limitation was present with previous third-party builder usage as well.
2024-02-07 13:40:51 -05:00
Angular Robot
ad52f8ee86 build: update all non-major dependencies 2024-02-07 12:34:12 -05:00