@angular-devkit/build-angular 19.2.19 → 19.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "19.2.19",
3
+ "version": "19.2.21",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "builders": "builders.json",
8
8
  "dependencies": {
9
9
  "@ampproject/remapping": "2.3.0",
10
- "@angular-devkit/architect": "0.1902.19",
11
- "@angular-devkit/build-webpack": "0.1902.19",
12
- "@angular-devkit/core": "19.2.19",
13
- "@angular/build": "19.2.19",
10
+ "@angular-devkit/architect": "0.1902.21",
11
+ "@angular-devkit/build-webpack": "0.1902.21",
12
+ "@angular-devkit/core": "19.2.21",
13
+ "@angular/build": "19.2.21",
14
14
  "@babel/core": "7.26.10",
15
15
  "@babel/generator": "7.26.10",
16
16
  "@babel/helper-annotate-as-pure": "7.25.9",
@@ -21,7 +21,7 @@
21
21
  "@babel/preset-env": "7.26.9",
22
22
  "@babel/runtime": "7.26.10",
23
23
  "@discoveryjs/json-ext": "0.6.3",
24
- "@ngtools/webpack": "19.2.19",
24
+ "@ngtools/webpack": "19.2.21",
25
25
  "@vitejs/plugin-basic-ssl": "1.2.0",
26
26
  "ansi-colors": "4.1.3",
27
27
  "autoprefixer": "10.4.20",
@@ -56,7 +56,7 @@
56
56
  "terser": "5.39.0",
57
57
  "tree-kill": "1.2.2",
58
58
  "tslib": "2.8.1",
59
- "webpack": "5.98.0",
59
+ "webpack": "5.105.0",
60
60
  "webpack-dev-middleware": "7.4.2",
61
61
  "webpack-dev-server": "5.2.2",
62
62
  "webpack-merge": "6.0.1",
@@ -70,7 +70,7 @@
70
70
  "@angular/localize": "^19.0.0 || ^19.2.0-next.0",
71
71
  "@angular/platform-server": "^19.0.0 || ^19.2.0-next.0",
72
72
  "@angular/service-worker": "^19.0.0 || ^19.2.0-next.0",
73
- "@angular/ssr": "^19.2.19",
73
+ "@angular/ssr": "^19.2.21",
74
74
  "@web/test-runner": "^0.20.0",
75
75
  "browser-sync": "^3.0.2",
76
76
  "jest": "^29.5.0",
@@ -130,7 +130,7 @@
130
130
  "type": "git",
131
131
  "url": "https://github.com/angular/angular-cli.git"
132
132
  },
133
- "packageManager": "pnpm@9.15.6",
133
+ "packageManager": "pnpm@10.15.0",
134
134
  "engines": {
135
135
  "node": "^18.19.1 || ^20.11.1 || >=22.0.0",
136
136
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
@@ -99,7 +99,7 @@ function execute(options, context) {
99
99
  if (!s.success || !b.success) {
100
100
  return (0, rxjs_1.of)([b, s]);
101
101
  }
102
- return startNodeServer(s, nodeServerPort, context.logger, !!options.inspect).pipe((0, rxjs_1.map)(() => [b, s]), (0, rxjs_1.catchError)((err) => {
102
+ return startNodeServer(s, nodeServerPort, options.host, context.logger, !!options.inspect).pipe((0, rxjs_1.map)(() => [b, s]), (0, rxjs_1.catchError)((err) => {
103
103
  context.logger.error(`A server error has occurred.\n${mapErrorToMessage(err)}`);
104
104
  return rxjs_1.EMPTY;
105
105
  }));
@@ -164,10 +164,10 @@ function log({ stderr, stdout }, logger) {
164
164
  logger.info(stdout.replace(/\n?$/, ''));
165
165
  }
166
166
  }
167
- function startNodeServer(serverOutput, port, logger, inspectMode = false) {
167
+ function startNodeServer(serverOutput, port, host, logger, inspectMode = false) {
168
168
  const outputPath = serverOutput.outputPath;
169
169
  const path = (0, node_path_1.join)(outputPath, 'main.js');
170
- const env = { ...process.env, PORT: '' + port };
170
+ const env = { ...process.env, PORT: '' + port, NG_ALLOWED_HOSTS: host ?? 'localhost' };
171
171
  const args = ['--enable-source-maps', `"${path}"`];
172
172
  if (inspectMode) {
173
173
  args.unshift('--inspect-brk');
@@ -45,7 +45,7 @@ class IndexHtmlWebpackPlugin extends private_1.IndexHtmlGenerator {
45
45
  continue;
46
46
  }
47
47
  files.push({
48
- name: chunk.name,
48
+ name: chunk.name ?? undefined,
49
49
  file,
50
50
  extension: (0, node_path_1.extname)(file),
51
51
  });
@@ -44,6 +44,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  const path = __importStar(require("path"));
47
+ const node_assert_1 = __importDefault(require("node:assert"));
47
48
  const webpack_1 = __importDefault(require("webpack"));
48
49
  const webpack_dev_middleware_1 = __importDefault(require("webpack-dev-middleware"));
49
50
  const stats_1 = require("../../utils/stats");
@@ -145,6 +146,7 @@ const init = (config, emitter) => {
145
146
  isBlocked = true;
146
147
  callback?.();
147
148
  }
149
+ (0, node_assert_1.default)(compiler, 'Compiler cannot be undefined.');
148
150
  compiler.hooks.invalid.tap('karma', () => handler());
149
151
  compiler.hooks.watchRun.tapAsync('karma', (_, callback) => handler(callback));
150
152
  compiler.hooks.run.tapAsync('karma', (_, callback) => handler(callback));
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '19.2.19';
13
+ const VERSION = '19.2.21';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -205,7 +205,8 @@ async function inlineLocalesDirect(ast, options) {
205
205
  const { ConcatSource, OriginalSource, ReplaceSource, SourceMapSource } = webpackSources;
206
206
  for (const locale of i18n.inlineLocales) {
207
207
  const content = new ReplaceSource(inputMap
208
- ? new SourceMapSource(options.code, options.filename, inputMap)
208
+ ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
209
+ new SourceMapSource(options.code, options.filename, inputMap)
209
210
  : new OriginalSource(options.code, options.filename));
210
211
  const isSourceLocale = locale === i18n.sourceLocale;
211
212
  // eslint-disable-next-line @typescript-eslint/no-explicit-any