4634 Commits

Author SHA1 Message Date
Angular Robot
947948434f build: update all non-major dependencies 2024-12-19 10:30:49 -05:00
Charles Lyding
fe1ae69339 fix(@angular-devkit/architect): avoid Node.js resolution for relative builder schema
To avoid the need to perform Node.js resolution for the typical case of a relative
builder schema, a check is now performed to determine if a schema path within the
build manifest appears to be relative.
2024-12-17 16:28:37 -05:00
Paul Gschwendtner
f728f2f526 build: migrate angular-devkit/architect-cli to ts_project
This migrates more package code to `ts_project` of `rules_js`.
2024-12-17 11:47:09 -05:00
Paul Gschwendtner
7a0adb9ca3 build: migrate remaining angular-devkit/architect to ts_project
This completes `ts_library` to `ts_project` for the architect devkit
package.
2024-12-17 11:47:09 -05:00
Paul Gschwendtner
ad450e3e86 build: add missing path mapping for build-webpack import causing lint error
I suspect there were some versioning changes with the e.g. `hoist =
false` setting in npmrc; so eslint now starts failing about an import
from `webpack-server.ts` resulting in unnecessary type cast lint errors.

The existing mapping didn't work due to the underscore conversion, so
this makes sense, and fixing the path mappings works.
2024-12-16 12:17:17 -05:00
Paul Gschwendtner
417ef7a1fb refactor: remove unnecessary type conversion failing lint
I suspect there were some versioning changes with the e.g. `hoist =
false` setting in npmrc; so eslint now starts failing about this
unnessary type cast. Seems reasonable so this is committed without
deep investigation.
2024-12-16 12:17:17 -05:00
Paul Gschwendtner
410040289a build: rename //:node_modules to root modules
In our dev-infra sync we decided that we want to have less
ambiguous naming for node modules from the workspace root vs. node
modules that are local to the package.

Consider the confusion between: `//:node_modules` and `:node_modules`.
This commit fixes this by naming the workspace `node_modules` as
`:root_modules`. This does not have an effect on runtime of NodeJS
output because `rules_js` continues to lay out the root modules as
`/node_modules` folder; as it should.
2024-12-16 12:17:17 -05:00
Paul Gschwendtner
3af88fef8b test: update chunk file name to reflect new name
It seems that the chunk deterministic name has changed after
recent node module /lock file changes. It's unclear what specifically is
involved in Webpack's chunk name generation, but the output and all
other tests still look good; which makes this is a rather safe update to
the new chunk name. Consulting with CLI team members explained that this
can happen quite often.
2024-12-16 12:17:17 -05:00
Paul Gschwendtner
a19a72d8fc build: migrate angular-devkit/architect to ts_project
This commit updates the architect devkit package code to use
`ts_project`. We specificially don't migrate the jasmine node test yet
as we want to experiment further with the incremental migration.
2024-12-16 12:17:17 -05:00
Jan Krems
a9a3470147 fix(@angular-devkit/build-angular): jasmine.clock with app builder 2024-12-13 12:12:07 -08:00
Angular Robot
7069c3bac8 build: update dependency sass to v1.83.0 2024-12-13 11:22:39 -08:00
dai1ooleet0aesei
2b8a02bac0 feat(@angular-devkit/architect): require build schemas from modules 2024-12-12 08:18:56 -08:00
Angular Robot
12f2026581 build: update all non-major dependencies 2024-12-11 07:56:48 -08:00
Angular Robot
e126bf9018 build: update all non-major dependencies 2024-12-08 15:32:03 +01:00
Alan Agius
0a570c0c2e feat(@angular/build): add support for customizing URL segments with i18n
Previously, the `baseHref` option under each locale allowed for generating a unique base href for specific locales. However, users were still required to handle file organization manually, and `baseHref` appeared to be primarily designed for this purpose.

This commit introduces a new `subPath` option, which simplifies the i18n process, particularly in static site generation (SSG) and server-side rendering (SSR). When the `subPath` option is used, the `baseHref` is ignored. Instead, the `subPath` serves as both the base href and the name of the directory containing the localized version of the app.

Below is an example configuration showcasing the use of `subPath`:

```json
"i18n": {
  "sourceLocale": {
    "code": "en-US",
    "subPath": ""
  },
  "locales": {
    "fr-BE": {
      "subPath": "fr",
      "translation": "src/i18n/messages.fr-BE.xlf"
    },
    "de-BE": {
      "subPath": "de",
      "translation": "src/i18n/messages.de-BE.xlf"
    }
  }
}
```

The following tree structure demonstrates how the `subPath` organizes localized build output:
```
dist/
├── app/
│   └── browser/  # Default locale, accessible at `/`
│       ├── fr/  # Locale for `fr-BE`, accessible at `/fr`
│       └── de/  # Locale for `de-BE`, accessible at `/de`
```

DEPRECATED: The `baseHref` option under `i18n.locales` and `i18n.sourceLocale` in `angular.json` is deprecated in favor of `subPath`.

The `subPath` defines the URL segment for the locale, serving as both the HTML base HREF and the directory name for output. By default, if not specified, `subPath` will use the locale code.

Closes #16997 and closes #28967
2024-12-07 19:00:32 +01:00
Angular Robot
ffad81a4de build: update all non-major dependencies 2024-12-06 10:14:31 +01:00
Jan Krems
fb41d182ee fix(@angular-devkit/build-angular): fix webpack config transform for karma 2024-12-05 11:24:29 -08:00
Jan Martin
9e2d3fbd1f fix(@angular-devkit/build-angular): handle windows spec collisions 2024-12-05 16:31:09 +01:00
Alan Agius
f2571b3251 build: update all non-major dependencies 2024-12-04 15:37:27 +01:00
Angular Robot
d96b096704 build: update all non-major dependencies 2024-12-03 08:35:22 +01:00
Angular Robot
d095498622 build: update schematics dependencies to ~5.5.0 2024-12-03 08:34:23 +01:00
Kristiyan Kostadinov
4d466bfa6a build: update to TypeScript 5.7
Updates the repo to use TypeScript 5.7.
2024-12-02 14:15:18 +01:00
Alan Agius
4e5585a27f build: update Angular packages to version 19.1.x 2024-12-02 13:12:00 +01:00
Angular Robot
3829b862d8 build: update dependency undici to v7 2024-12-02 09:03:42 +01:00
Angular Robot
3a22d4435b build: update all non-major dependencies 2024-11-27 08:39:52 -05:00
Angular Robot
399bbb7b77 build: update all non-major dependencies 2024-11-25 13:02:44 -05:00
Angular Robot
fe1af9fc97 build: update all non-major dependencies 2024-11-21 11:39:43 -08:00
cexbrayat
a9a871c414 fix(@angular-devkit/build-angular): use stylePreprocessorOptions
The `stylePreprocessorOptions` were ignored, meaning that `silenceDeprecations`, for example,
was not used when building tests.
2024-11-21 08:54:56 -08:00
Angular Robot
19b21d2084 build: update angular 2024-11-19 10:03:35 -08:00
Charles Lyding
23dac18def build: update Angular packages to v19 stable 2024-11-19 10:01:19 -05:00
Doug Parker
5d79ab7819 fix(@angular-devkit/build-angular): fix hanging terminal when browser-sync is not installed
Running the SSR dev server when `browser-sync` is not installed would print the error, but then build the browser and server targets, then hang and never return control to the user until they manually Ctrl+C. This change skips building at all if `browser-sync` is not installed, immediately returning control to the user.

This is a simple workaround, but there are two deeper bugs which would benefit from investigation:
1.  Figure out why NPM sometimes doesn't install `browser-sync`. It was happening inconsistently for me when running `ng add @angular/ssr`.
2.  Figure out why Architect does not cancel/await targets still executing when a builder completes.
2024-11-18 08:59:44 -08:00
Jan Krems
d746de59f3 fix(@angular-devkit/build-angular): bring back style tags in browser builder 2024-11-18 08:48:37 -08:00
Doug Parker
4340f5f9ad refactor: add ngServerMode to Webpack SSR dev server
This was missed in the original addition of `ngServerMode` and incorrectly caused `withEventReplay` to run browser-specific code on the server and crash.
2024-11-15 17:21:21 -08:00
Angular Robot
bec92d9fc8 build: update all non-major dependencies 2024-11-13 07:26:35 -08:00
Angular Robot
14bc784f09 build: update all non-major dependencies 2024-11-12 13:13:19 -08:00
Angular Robot
47f70d6423 build: update all non-major dependencies 2024-11-11 11:26:14 -08:00
Alan Agius
b2e2be052f refactor(@angular/ssr): remove RenderMode.AppShell in favor of new configuration option
This commit removes the `RenderMode.AppShell` option. Instead, a new configuration parameter, `{ appShellRoute: 'shell' }`, is introduced to the `provideServerRoutesConfig` method.

```ts
provideServerRoutesConfig(serverRoutes, { appShellRoute: 'shell' })
```
2024-11-08 19:51:35 +01:00
Jan Krems
2c9904ec7a fix(@angular-devkit/build-angular): handle basename collisions 2024-11-06 07:19:43 -08:00
Jan Krems
127811203a fix(@angular-devkit/build-angular): serve assets 2024-11-05 15:59:06 -08:00
Jan Krems
faabbbf910 fix(@angular-devkit/build-angular): remove double-watch in karma
The Karma file watching was racing with the file writes done by the
application builder. Since we already tell Karma when to reun via
`.refeshFiles()`, disabling Karma's own file watcher should make
things more reliable.

This allows removing a weird special-case in the test case and
removes the noisy "File chaned" logs generated by Karma.

Fixes https://github.com/angular/angular-cli/issues/28755
2024-11-05 14:36:01 -08:00
Charles Lyding
9f5b5eb46e fix(@angular/build): correctly use dev-server hmr option to control stylesheet hot replacement
The development server's `hmr` option will now disable both global and component
stylesheet hot replacement if explicitly disabled. These features are enabled by
default for all projects.
2024-11-05 10:59:24 +01:00
Angular Robot
316df8fbba build: update all non-major dependencies 2024-11-04 16:44:14 +01:00
Angular Robot
6a3e1f5e5d build: update dependency tslib to v2.8.1 2024-11-01 09:35:14 -04:00
Angular Robot
69768bdaa4 build: update all non-major dependencies 2024-11-01 08:25:17 -04:00
Angular Robot
170bb19074 build: update all non-major dependencies 2024-10-30 12:27:43 -04:00
Doug Parker
ed8f96a492 refactor(@angular-devkit/build-angular): adds protractor builder which throws with a clear error message
This should help users who upgrade more easily discover that the builder has been removed and find the resources needed to migrate any existing tests.
2024-10-30 11:08:19 -04:00
Jan Krems
864675188e fix(@angular-devkit/build-angular): fix --watch regression in karma
Outside of single-run mode, the karma test provider was expected to
watch for changes. In the application builder branch, we only handled
the case of an explicit `--watch` though. This meant that the karma
runner was kept running but didn't see any file changes.

Fixes https://github.com/angular/angular-cli/issues/28730
2024-10-29 10:19:41 -07:00
Alan Agius
8e2829c851 refactor(@angular/build): add handling for ngServerMode
Configure esbuild to add `ngServerMode` as define.
2024-10-29 07:44:55 +01:00
Angular Robot
afec9297dc build: update all non-major dependencies 2024-10-28 14:36:59 -04:00
Alan Agius
15677d0cb7 refactor: replace critters with beasties
The Critters project has been transferred to the Nuxt team, who will now manage its development and has been renamed to Beasties.

See: https://github.com/danielroe/beasties
2024-10-28 18:57:05 +01:00