@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.
- package/LICENSE +1 -1
- package/builders.json +5 -0
- package/index.d.ts +8 -0
- package/index.js +24 -0
- package/package.json +20 -16
- package/private/index.d.ts +8 -0
- package/private/index.js +24 -0
- package/src/builders/application/build-action.d.ts +1 -0
- package/src/builders/application/build-action.js +93 -11
- package/src/builders/application/execute-build.js +5 -2
- package/src/builders/application/index.d.ts +5 -12
- package/src/builders/application/index.js +35 -21
- package/src/builders/application/options.d.ts +6 -0
- package/src/builders/application/options.js +1 -0
- package/src/builders/application/results.d.ts +4 -1
- package/src/builders/application/setup-bundling.d.ts +2 -1
- package/src/builders/application/setup-bundling.js +2 -2
- package/src/builders/dev-server/index.d.ts +4 -2
- package/src/builders/dev-server/index.js +2 -1
- package/src/builders/dev-server/vite-server.d.ts +5 -1
- package/src/builders/dev-server/vite-server.js +101 -77
- package/src/builders/extract-i18n/index.d.ts +4 -2
- package/src/builders/extract-i18n/index.js +2 -1
- package/src/builders/ng-packagr/builder.d.ts +19 -0
- package/src/builders/ng-packagr/builder.js +103 -0
- package/src/builders/ng-packagr/index.d.ts +14 -0
- package/src/builders/ng-packagr/index.js +15 -0
- package/src/builders/ng-packagr/schema.d.ts +21 -0
- package/src/builders/ng-packagr/schema.js +4 -0
- package/src/builders/ng-packagr/schema.json +27 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +3 -1
- package/src/private.d.ts +4 -7
- package/src/private.js +4 -1
- package/src/tools/babel/plugins/pure-toplevel-functions.js +14 -3
- package/src/tools/esbuild/angular/compiler-plugin.d.ts +2 -4
- package/src/tools/esbuild/angular/compiler-plugin.js +21 -10
- package/src/tools/esbuild/angular-localize-init-warning-plugin.d.ts +16 -0
- package/src/tools/esbuild/angular-localize-init-warning-plugin.js +49 -0
- package/src/tools/esbuild/application-code-bundle.d.ts +2 -1
- package/src/tools/esbuild/application-code-bundle.js +37 -26
- package/src/tools/esbuild/bundler-execution-result.d.ts +10 -3
- package/src/tools/esbuild/bundler-execution-result.js +13 -10
- package/src/tools/esbuild/compiler-plugin-options.js +0 -1
- package/src/tools/esbuild/javascript-transformer.js +8 -4
- package/src/tools/vite/middlewares/assets-middleware.d.ts +2 -2
- package/src/tools/vite/middlewares/assets-middleware.js +4 -4
- package/src/tools/vite/plugins/angular-memory-plugin.js +10 -5
- package/src/tools/vite/plugins/setup-middlewares-plugin.d.ts +2 -2
- package/src/tools/vite/utils.d.ts +5 -1
- package/src/tools/vite/utils.js +2 -1
- package/src/utils/bundle-calculator.d.ts +1 -0
- package/src/utils/bundle-calculator.js +5 -4
- package/src/utils/environment-options.js +1 -1
- package/src/utils/i18n-options.js +3 -3
- package/src/utils/normalize-cache.js +1 -1
- package/src/utils/server-rendering/fetch-patch.js +2 -2
- 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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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);
|