@angular/build 19.1.0-next.2 → 19.1.0

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.
Files changed (58) hide show
  1. package/LICENSE +1 -1
  2. package/builders.json +5 -0
  3. package/index.d.ts +8 -0
  4. package/index.js +24 -0
  5. package/package.json +20 -16
  6. package/private/index.d.ts +8 -0
  7. package/private/index.js +24 -0
  8. package/src/builders/application/build-action.d.ts +1 -0
  9. package/src/builders/application/build-action.js +93 -11
  10. package/src/builders/application/execute-build.js +5 -2
  11. package/src/builders/application/index.d.ts +5 -12
  12. package/src/builders/application/index.js +35 -21
  13. package/src/builders/application/options.d.ts +6 -0
  14. package/src/builders/application/options.js +1 -0
  15. package/src/builders/application/results.d.ts +4 -1
  16. package/src/builders/application/setup-bundling.d.ts +2 -1
  17. package/src/builders/application/setup-bundling.js +2 -2
  18. package/src/builders/dev-server/index.d.ts +4 -2
  19. package/src/builders/dev-server/index.js +2 -1
  20. package/src/builders/dev-server/vite-server.d.ts +5 -1
  21. package/src/builders/dev-server/vite-server.js +101 -77
  22. package/src/builders/extract-i18n/index.d.ts +4 -2
  23. package/src/builders/extract-i18n/index.js +2 -1
  24. package/src/builders/ng-packagr/builder.d.ts +19 -0
  25. package/src/builders/ng-packagr/builder.js +103 -0
  26. package/src/builders/ng-packagr/index.d.ts +14 -0
  27. package/src/builders/ng-packagr/index.js +15 -0
  28. package/src/builders/ng-packagr/schema.d.ts +21 -0
  29. package/src/builders/ng-packagr/schema.js +4 -0
  30. package/src/builders/ng-packagr/schema.json +27 -0
  31. package/src/index.d.ts +2 -1
  32. package/src/index.js +3 -1
  33. package/src/private.d.ts +4 -7
  34. package/src/private.js +4 -1
  35. package/src/tools/babel/plugins/pure-toplevel-functions.js +14 -3
  36. package/src/tools/esbuild/angular/compiler-plugin.d.ts +2 -4
  37. package/src/tools/esbuild/angular/compiler-plugin.js +21 -10
  38. package/src/tools/esbuild/angular-localize-init-warning-plugin.d.ts +16 -0
  39. package/src/tools/esbuild/angular-localize-init-warning-plugin.js +49 -0
  40. package/src/tools/esbuild/application-code-bundle.d.ts +2 -1
  41. package/src/tools/esbuild/application-code-bundle.js +37 -26
  42. package/src/tools/esbuild/bundler-execution-result.d.ts +10 -3
  43. package/src/tools/esbuild/bundler-execution-result.js +13 -10
  44. package/src/tools/esbuild/compiler-plugin-options.js +0 -1
  45. package/src/tools/esbuild/javascript-transformer.js +8 -4
  46. package/src/tools/vite/middlewares/assets-middleware.d.ts +2 -2
  47. package/src/tools/vite/middlewares/assets-middleware.js +4 -4
  48. package/src/tools/vite/plugins/angular-memory-plugin.js +10 -5
  49. package/src/tools/vite/plugins/setup-middlewares-plugin.d.ts +2 -2
  50. package/src/tools/vite/utils.d.ts +5 -1
  51. package/src/tools/vite/utils.js +2 -1
  52. package/src/utils/bundle-calculator.d.ts +1 -0
  53. package/src/utils/bundle-calculator.js +5 -4
  54. package/src/utils/environment-options.js +1 -1
  55. package/src/utils/i18n-options.js +3 -3
  56. package/src/utils/normalize-cache.js +1 -1
  57. package/src/utils/server-rendering/fetch-patch.js +2 -2
  58. package/tsconfig-build.json +0 -6
@@ -39,7 +39,7 @@ function ensureString(value, name) {
39
39
  throw new Error(`Project field '${name}' is malformed. Expected a string.`);
40
40
  }
41
41
  }
42
- function ensureValidsubPath(value, name) {
42
+ function ensureValidSubPath(value, name) {
43
43
  ensureString(value, name);
44
44
  if (!/^[\w-]*$/.test(value)) {
45
45
  throw new Error(`Project field '${name}' is invalid. It can only contain letters, numbers, hyphens, and underscores.`);
@@ -78,7 +78,7 @@ function createI18nOptions(projectMetadata, inline, logger) {
78
78
  rawSourceLocaleBaseHref = metadata.sourceLocale.baseHref;
79
79
  }
80
80
  if (metadata.sourceLocale.subPath !== undefined) {
81
- ensureValidsubPath(metadata.sourceLocale.subPath, 'i18n.sourceLocale.subPath');
81
+ ensureValidSubPath(metadata.sourceLocale.subPath, 'i18n.sourceLocale.subPath');
82
82
  rawsubPath = metadata.sourceLocale.subPath;
83
83
  }
84
84
  if (rawsubPath !== undefined && rawSourceLocaleBaseHref !== undefined) {
@@ -111,7 +111,7 @@ function createI18nOptions(projectMetadata, inline, logger) {
111
111
  baseHref = options.baseHref;
112
112
  }
113
113
  if ('subPath' in options) {
114
- ensureString(options.subPath, `i18n.locales.${locale}.subPath`);
114
+ ensureValidSubPath(options.subPath, `i18n.locales.${locale}.subPath`);
115
115
  subPath = options.subPath;
116
116
  }
117
117
  if (subPath !== undefined && baseHref !== undefined) {
@@ -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.1.0-next.2';
13
+ const VERSION = '19.1.0';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -25,10 +25,10 @@ function patchFetchToLoadInMemoryAssets(baseURL) {
25
25
  url = input;
26
26
  }
27
27
  else if (typeof input === 'string') {
28
- url = new URL(input);
28
+ url = new URL(input, baseURL);
29
29
  }
30
30
  else if (typeof input === 'object' && 'url' in input) {
31
- url = new URL(input.url);
31
+ url = new URL(input.url, baseURL);
32
32
  }
33
33
  else {
34
34
  return originalFetch(input, init);
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "types": ["node"]
5
- }
6
- }