@angular/build 20.2.0-next.1 → 20.2.0-next.3
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 +7 -7
- package/src/builders/application/chunk-optimizer.js +3 -3
- package/src/private.d.ts +1 -0
- package/src/private.js +3 -1
- package/src/tools/vite/middlewares/assets-middleware.js +3 -2
- package/src/tools/vite/plugins/ssr-transform-plugin.js +1 -0
- package/src/utils/normalize-cache.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/build",
|
|
3
|
-
"version": "20.2.0-next.
|
|
3
|
+
"version": "20.2.0-next.3",
|
|
4
4
|
"description": "Official build system for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"builders": "builders.json",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ampproject/remapping": "2.3.0",
|
|
26
|
-
"@angular-devkit/architect": "0.2002.0-next.
|
|
26
|
+
"@angular-devkit/architect": "0.2002.0-next.3",
|
|
27
27
|
"@babel/core": "7.28.0",
|
|
28
28
|
"@babel/helper-annotate-as-pure": "7.27.3",
|
|
29
29
|
"@babel/helper-split-export-declaration": "7.24.7",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"parse5-html-rewriting-stream": "8.0.0",
|
|
42
42
|
"picomatch": "4.0.3",
|
|
43
43
|
"piscina": "5.1.3",
|
|
44
|
-
"
|
|
45
|
-
"sass": "1.
|
|
44
|
+
"rolldown": "1.0.0-beta.31",
|
|
45
|
+
"sass": "1.90.0",
|
|
46
46
|
"semver": "7.7.2",
|
|
47
47
|
"source-map-support": "0.5.21",
|
|
48
48
|
"tinyglobby": "0.2.14",
|
|
49
|
-
"vite": "7.0
|
|
49
|
+
"vite": "7.1.0",
|
|
50
50
|
"watchpack": "2.4.4"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"lmdb": "3.4.
|
|
53
|
+
"lmdb": "3.4.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@angular/core": "^20.0.0 || ^20.2.0-next.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@angular/platform-browser": "^20.0.0 || ^20.2.0-next.0",
|
|
61
61
|
"@angular/platform-server": "^20.0.0 || ^20.2.0-next.0",
|
|
62
62
|
"@angular/service-worker": "^20.0.0 || ^20.2.0-next.0",
|
|
63
|
-
"@angular/ssr": "^20.2.0-next.
|
|
63
|
+
"@angular/ssr": "^20.2.0-next.3",
|
|
64
64
|
"karma": "^6.4.0",
|
|
65
65
|
"less": "^4.2.0",
|
|
66
66
|
"ng-packagr": "^20.0.0 || ^20.2.0-next.0",
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.optimizeChunks = optimizeChunks;
|
|
14
14
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
|
-
const
|
|
15
|
+
const rolldown_1 = require("rolldown");
|
|
16
16
|
const bundler_context_1 = require("../../tools/esbuild/bundler-context");
|
|
17
17
|
const utils_1 = require("../../tools/esbuild/utils");
|
|
18
18
|
const error_1 = require("../../utils/error");
|
|
@@ -54,7 +54,7 @@ async function optimizeChunks(original, sourcemap) {
|
|
|
54
54
|
let bundle;
|
|
55
55
|
let optimizedOutput;
|
|
56
56
|
try {
|
|
57
|
-
bundle = await (0,
|
|
57
|
+
bundle = await (0, rolldown_1.rolldown)({
|
|
58
58
|
input: mainFile,
|
|
59
59
|
plugins: [
|
|
60
60
|
{
|
|
@@ -81,7 +81,7 @@ async function optimizeChunks(original, sourcemap) {
|
|
|
81
81
|
],
|
|
82
82
|
});
|
|
83
83
|
const result = await bundle.generate({
|
|
84
|
-
|
|
84
|
+
minify: { mangle: false, compress: false, removeWhitespace: true },
|
|
85
85
|
sourcemap,
|
|
86
86
|
chunkFileNames: (chunkInfo) => `${chunkInfo.name.replace(/-[a-zA-Z0-9]{8}$/, '')}-[hash].js`,
|
|
87
87
|
});
|
package/src/private.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare function createCompilerPlugin(pluginOptions: CompilerPluginOption
|
|
|
34
34
|
}): import('esbuild').Plugin;
|
|
35
35
|
export type { AngularCompilation } from './tools/angular/compilation';
|
|
36
36
|
export { createAngularCompilation };
|
|
37
|
+
export { ComponentStylesheetBundler } from './tools/esbuild/angular/component-stylesheets';
|
|
37
38
|
export * from './utils/bundle-calculator';
|
|
38
39
|
export { checkPort } from './utils/check-port';
|
|
39
40
|
export { deleteOutputDir } from './utils/delete-output-dir';
|
package/src/private.js
CHANGED
|
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.loadPostcssConfiguration = exports.generateSearchDirectories = exports.findTailwindConfiguration = exports.getTestEntrypoints = exports.findTests = exports.assertCompatibleAngularVersion = exports.getSupportedBrowsers = exports.generateBuildStatsTable = exports.augmentAppWithServiceWorker = exports.purgeStaleBuildCache = exports.createTranslationLoader = exports.loadProxyConfiguration = exports.InlineCriticalCssProcessor = exports.IndexHtmlGenerator = exports.loadTranslations = exports.createI18nOptions = exports.deleteOutputDir = exports.checkPort = exports.createAngularCompilation = exports.JavaScriptTransformer = exports.createJitResourceTransformer = exports.SourceFileCache = exports.SassWorkerImplementation = exports.transformSupportedBrowsersToTargets = exports.emitFilesToDisk = exports.serveWithVite = exports.ResultKind = exports.buildApplicationInternal = void 0;
|
|
24
|
+
exports.loadPostcssConfiguration = exports.generateSearchDirectories = exports.findTailwindConfiguration = exports.getTestEntrypoints = exports.findTests = exports.assertCompatibleAngularVersion = exports.getSupportedBrowsers = exports.generateBuildStatsTable = exports.augmentAppWithServiceWorker = exports.purgeStaleBuildCache = exports.createTranslationLoader = exports.loadProxyConfiguration = exports.InlineCriticalCssProcessor = exports.IndexHtmlGenerator = exports.loadTranslations = exports.createI18nOptions = exports.deleteOutputDir = exports.checkPort = exports.ComponentStylesheetBundler = exports.createAngularCompilation = exports.JavaScriptTransformer = exports.createJitResourceTransformer = exports.SourceFileCache = exports.SassWorkerImplementation = exports.transformSupportedBrowsersToTargets = exports.emitFilesToDisk = exports.serveWithVite = exports.ResultKind = exports.buildApplicationInternal = void 0;
|
|
25
25
|
exports.createCompilerPlugin = createCompilerPlugin;
|
|
26
26
|
/**
|
|
27
27
|
* @fileoverview
|
|
@@ -59,6 +59,8 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
59
59
|
? new compilation_1.NoopCompilation()
|
|
60
60
|
: () => (0, compilation_1.createAngularCompilation)(!!pluginOptions.jit, !!pluginOptions.browserOnlyBuild), new component_stylesheets_1.ComponentStylesheetBundler(styleOptions, styleOptions.inlineStyleLanguage, pluginOptions.incremental));
|
|
61
61
|
}
|
|
62
|
+
var component_stylesheets_2 = require("./tools/esbuild/angular/component-stylesheets");
|
|
63
|
+
Object.defineProperty(exports, "ComponentStylesheetBundler", { enumerable: true, get: function () { return component_stylesheets_2.ComponentStylesheetBundler; } });
|
|
62
64
|
// Utilities
|
|
63
65
|
__exportStar(require("./utils/bundle-calculator"), exports);
|
|
64
66
|
var check_port_1 = require("./utils/check-port");
|
|
@@ -13,6 +13,7 @@ const node_crypto_1 = require("node:crypto");
|
|
|
13
13
|
const node_fs_1 = require("node:fs");
|
|
14
14
|
const node_path_1 = require("node:path");
|
|
15
15
|
const utils_1 = require("../utils");
|
|
16
|
+
const CSS_PREPROCESSOR_REGEXP = /\.(?:s[ac]ss|less|css)$/;
|
|
16
17
|
const JS_TS_REGEXP = /\.[cm]?[tj]sx?$/;
|
|
17
18
|
function createAngularAssetsMiddleware(server, assets, outputFiles, componentStyles, encapsulateStyle) {
|
|
18
19
|
return function angularAssetsMiddleware(req, res, next) {
|
|
@@ -27,8 +28,8 @@ function createAngularAssetsMiddleware(server, assets, outputFiles, componentSty
|
|
|
27
28
|
// Rewrite all build assets to a vite raw fs URL
|
|
28
29
|
const asset = assets.get(pathname);
|
|
29
30
|
if (asset) {
|
|
30
|
-
// This is a workaround to serve JS and TS files without Vite transformations.
|
|
31
|
-
if (JS_TS_REGEXP.test(extension)) {
|
|
31
|
+
// This is a workaround to serve CSS, JS and TS files without Vite transformations.
|
|
32
|
+
if (JS_TS_REGEXP.test(extension) || CSS_PREPROCESSOR_REGEXP.test(extension)) {
|
|
32
33
|
const contents = (0, node_fs_1.readFileSync)(asset.source);
|
|
33
34
|
const etag = `W/${(0, node_crypto_1.createHash)('sha256').update(contents).digest('hex')}`;
|
|
34
35
|
if (checkAndHandleEtag(req, res, etag)) {
|
|
@@ -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 = '20.2.0-next.
|
|
13
|
+
const VERSION = '20.2.0-next.3';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|