diff --git a/package.json b/package.json index ac59b6613..c18c4bd1a 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "@angular-devkit/build-angular", - "version": "21.0.0-next.2+sha-9749ec6", + "version": "20.3.4+sha-d8ca86b", "description": "Angular Webpack Build Facade", "main": "src/index.js", "typings": "src/index.d.ts", "builders": "builders.json", "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#9749ec6", - "@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#9749ec6", - "@angular-devkit/core": "github:angular/angular-devkit-core-builds#9749ec6", - "@angular/build": "github:angular/angular-build-builds#9749ec6", - "@babel/core": "7.28.4", + "@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#d8ca86b", + "@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#d8ca86b", + "@angular-devkit/core": "github:angular/angular-devkit-core-builds#d8ca86b", + "@angular/build": "github:angular/angular-build-builds#d8ca86b", + "@babel/core": "7.28.3", "@babel/generator": "7.28.3", "@babel/helper-annotate-as-pure": "7.27.3", "@babel/helper-split-export-declaration": "7.24.7", @@ -19,9 +19,9 @@ "@babel/plugin-transform-async-to-generator": "7.27.1", "@babel/plugin-transform-runtime": "7.28.3", "@babel/preset-env": "7.28.3", - "@babel/runtime": "7.28.4", + "@babel/runtime": "7.28.3", "@discoveryjs/json-ext": "0.6.3", - "@ngtools/webpack": "github:angular/ngtools-webpack-builds#9749ec6", + "@ngtools/webpack": "github:angular/ngtools-webpack-builds#d8ca86b", "ansi-colors": "4.1.3", "autoprefixer": "10.4.21", "babel-loader": "10.0.0", @@ -29,11 +29,12 @@ "copy-webpack-plugin": "13.0.1", "css-loader": "7.1.2", "esbuild-wasm": "0.25.9", + "fast-glob": "3.3.3", "http-proxy-middleware": "3.0.5", "istanbul-lib-instrument": "6.0.3", "jsonc-parser": "3.3.1", "karma-source-map-support": "1.4.0", - "less": "4.4.1", + "less": "4.4.0", "less-loader": "12.3.0", "license-webpack-plugin": "4.0.2", "loader-utils": "3.3.1", @@ -43,20 +44,19 @@ "picomatch": "4.0.3", "piscina": "5.1.3", "postcss": "8.5.6", - "postcss-loader": "8.2.0", + "postcss-loader": "8.1.1", "resolve-url-loader": "5.0.0", "rxjs": "7.8.2", - "sass": "1.92.1", + "sass": "1.90.0", "sass-loader": "16.0.5", "semver": "7.7.2", "source-map-loader": "5.0.0", "source-map-support": "0.5.21", - "terser": "5.44.0", - "tinyglobby": "0.2.15", + "terser": "5.43.1", "tree-kill": "1.2.2", "tslib": "2.8.1", - "webpack": "5.101.3", - "webpack-dev-middleware": "7.4.3", + "webpack": "5.101.2", + "webpack-dev-middleware": "7.4.2", "webpack-dev-server": "5.2.2", "webpack-merge": "6.0.1", "webpack-subresource-integrity": "5.1.0" @@ -65,22 +65,22 @@ "esbuild": "0.25.9" }, "peerDependencies": { - "@angular/core": "^21.0.0-next.0", - "@angular/compiler-cli": "^21.0.0-next.0", - "@angular/localize": "^21.0.0-next.0", - "@angular/platform-browser": "^21.0.0-next.0", - "@angular/platform-server": "^21.0.0-next.0", - "@angular/service-worker": "^21.0.0-next.0", - "@angular/ssr": "github:angular/angular-ssr-builds#9749ec6", + "@angular/core": "^20.0.0", + "@angular/compiler-cli": "^20.0.0", + "@angular/localize": "^20.0.0", + "@angular/platform-browser": "^20.0.0", + "@angular/platform-server": "^20.0.0", + "@angular/service-worker": "^20.0.0", + "@angular/ssr": "github:angular/angular-ssr-builds#d8ca86b", "@web/test-runner": "^0.20.0", "browser-sync": "^3.0.2", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", "karma": "^6.3.0", - "ng-packagr": "^21.0.0-next.0", + "ng-packagr": "^20.0.0", "protractor": "^7.0.0", "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0", - "typescript": ">=5.9 <6.0" + "typescript": ">=5.8 <6.0" }, "peerDependenciesMeta": { "@angular/core": { @@ -137,7 +137,7 @@ "type": "git", "url": "https://github.com/angular/angular-cli.git" }, - "packageManager": "pnpm@10.15.1", + "packageManager": "pnpm@10.18.0", "engines": { "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", diff --git a/src/tools/babel/presets/application.d.ts b/src/tools/babel/presets/application.d.ts index a0f2ceb88..d6ed49e5f 100644 --- a/src/tools/babel/presets/application.d.ts +++ b/src/tools/babel/presets/application.d.ts @@ -37,7 +37,7 @@ export interface ApplicationPresetOptions { inputSourceMap: unknown; }; optimize?: { - pureTopLevel: boolean; + topLevelSafeMode: boolean; wrapDecorators: boolean; }; supportedBrowsers?: string[]; diff --git a/src/tools/babel/presets/application.js b/src/tools/babel/presets/application.js index 7ccc967a9..60639226b 100644 --- a/src/tools/babel/presets/application.js +++ b/src/tools/babel/presets/application.js @@ -124,13 +124,7 @@ function default_1(api, options) { } if (options.optimize) { const { adjustStaticMembers, adjustTypeScriptEnums, elideAngularMetadata, markTopLevelPure, } = require('@angular/build/private'); - if (options.optimize.pureTopLevel) { - plugins.push(markTopLevelPure); - } - plugins.push(elideAngularMetadata, adjustTypeScriptEnums, [ - adjustStaticMembers, - { wrapDecorators: options.optimize.wrapDecorators }, - ]); + plugins.push([markTopLevelPure, { topLevelSafeMode: options.optimize.topLevelSafeMode }], elideAngularMetadata, adjustTypeScriptEnums, [adjustStaticMembers, { wrapDecorators: options.optimize.wrapDecorators }]); } if (options.instrumentCode) { plugins.push(require('../plugins/add-code-coverage').default); diff --git a/src/tools/babel/webpack-loader.js b/src/tools/babel/webpack-loader.js index 619bc7347..0dd256fbf 100644 --- a/src/tools/babel/webpack-loader.js +++ b/src/tools/babel/webpack-loader.js @@ -99,7 +99,7 @@ exports.default = (0, babel_loader_1.custom)(() => { customOptions.optimize = { // Angular packages provide additional tested side effects guarantees and can use // otherwise unsafe optimizations. (@angular/platform-server/init) however has side-effects. - pureTopLevel: AngularPackage && sideEffectFree, + topLevelSafeMode: !(AngularPackage && sideEffectFree), // JavaScript modules that are marked as side effect free are considered to have // no decorators that contain non-local effects. wrapDecorators: sideEffectFree, diff --git a/src/tools/webpack/configs/styles.js b/src/tools/webpack/configs/styles.js index 0dc63bcc7..5c8b31ea1 100644 --- a/src/tools/webpack/configs/styles.js +++ b/src/tools/webpack/configs/styles.js @@ -46,7 +46,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getStylesConfig = getStylesConfig; const private_1 = require("@angular/build/private"); const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin")); -const node_module_1 = require("node:module"); const path = __importStar(require("node:path")); const node_url_1 = require("node:url"); const plugins_1 = require("../plugins"); @@ -89,9 +88,9 @@ async function getStylesConfig(wco) { const searchDirectories = await (0, private_1.generateSearchDirectories)([projectRoot, root]); const postcssConfig = await (0, private_1.loadPostcssConfiguration)(searchDirectories); if (postcssConfig) { - const postCssPluginRequire = (0, node_module_1.createRequire)(path.dirname(postcssConfig.configPath) + '/'); - for (const [pluginName, pluginOptions] of postcssConfig.config.plugins) { - const plugin = postCssPluginRequire(pluginName); + for (const [pluginName, pluginOptions] of postcssConfig.plugins) { + const resolvedPlugin = require.resolve(pluginName, { paths: [root] }); + const { default: plugin } = await Promise.resolve(`${resolvedPlugin}`).then(s => __importStar(require(s))); if (typeof plugin !== 'function' || plugin.postcss !== true) { throw new Error(`Attempted to load invalid Postcss plugin: "${pluginName}"`); } diff --git a/src/tools/webpack/utils/helpers.js b/src/tools/webpack/utils/helpers.js index 64dd97f97..233948bd6 100644 --- a/src/tools/webpack/utils/helpers.js +++ b/src/tools/webpack/utils/helpers.js @@ -39,6 +39,9 @@ var __importStar = (this && this.__importStar) || (function () { return result; }; })(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOutputHashFormat = getOutputHashFormat; exports.normalizeExtraEntryPoints = normalizeExtraEntryPoints; @@ -50,9 +53,9 @@ exports.globalScriptsByBundleName = globalScriptsByBundleName; exports.assetPatterns = assetPatterns; exports.getStatsOptions = getStatsOptions; exports.isPackageInstalled = isPackageInstalled; +const fast_glob_1 = __importDefault(require("fast-glob")); const node_crypto_1 = require("node:crypto"); const path = __importStar(require("node:path")); -const tinyglobby_1 = require("tinyglobby"); const schema_1 = require("../../../builders/browser/schema"); const package_version_1 = require("../../../utils/package-version"); function getOutputHashFormat(outputHashing = schema_1.OutputHashing.None, length = 20) { @@ -136,7 +139,7 @@ function getInstrumentationExcludedPaths(root, excludedPaths) { const excluded = new Set(); for (const excludeGlob of excludedPaths) { const excludePath = excludeGlob[0] === '/' ? excludeGlob.slice(1) : excludeGlob; - (0, tinyglobby_1.globSync)(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p))); + fast_glob_1.default.sync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p))); } return excluded; } diff --git a/src/utils/copy-assets.js b/src/utils/copy-assets.js index b787eead5..68df420cc 100644 --- a/src/utils/copy-assets.js +++ b/src/utils/copy-assets.js @@ -11,15 +11,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.copyAssets = copyAssets; +const fast_glob_1 = __importDefault(require("fast-glob")); const node_fs_1 = __importDefault(require("node:fs")); const node_path_1 = __importDefault(require("node:path")); -const tinyglobby_1 = require("tinyglobby"); async function copyAssets(entries, basePaths, root, changed) { const defaultIgnore = ['.gitkeep', '**/.DS_Store', '**/Thumbs.db']; const outputFiles = []; for (const entry of entries) { const cwd = node_path_1.default.resolve(root, entry.input); - const files = await (0, tinyglobby_1.glob)(entry.glob, { + const files = await (0, fast_glob_1.default)(entry.glob, { cwd, dot: true, ignore: entry.ignore ? defaultIgnore.concat(entry.ignore) : defaultIgnore, diff --git a/src/utils/normalize-cache.js b/src/utils/normalize-cache.js index 9cde9fe59..e1f5e3a99 100644 --- a/src/utils/normalize-cache.js +++ b/src/utils/normalize-cache.js @@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeCacheOptions = normalizeCacheOptions; const node_path_1 = require("node:path"); /** Version placeholder is replaced during the build process with actual package version */ -const VERSION = '21.0.0-next.2+sha-9749ec6'; +const VERSION = '20.3.4+sha-d8ca86b'; function hasCacheMetadata(value) { return (!!value && typeof value === 'object' && diff --git a/src/utils/test-files.d.ts b/src/utils/test-files.d.ts index e6d7da17e..a0e29546b 100644 --- a/src/utils/test-files.d.ts +++ b/src/utils/test-files.d.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ -import { glob as globFn } from 'tinyglobby'; +import fastGlob from 'fast-glob'; /** * Finds all test files in the project. * @@ -15,4 +15,4 @@ import { glob as globFn } from 'tinyglobby'; * testing purposes. * @returns A set of all test files in the project. */ -export declare function findTestFiles(include: string[], exclude: string[], workspaceRoot: string, glob?: typeof globFn): Promise>; +export declare function findTestFiles(include: string[], exclude: string[], workspaceRoot: string, glob?: typeof fastGlob): Promise>; diff --git a/src/utils/test-files.js b/src/utils/test-files.js index 551550059..a1cd6b355 100644 --- a/src/utils/test-files.js +++ b/src/utils/test-files.js @@ -6,9 +6,12 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.findTestFiles = findTestFiles; -const tinyglobby_1 = require("tinyglobby"); +const fast_glob_1 = __importDefault(require("fast-glob")); /** * Finds all test files in the project. * @@ -18,7 +21,7 @@ const tinyglobby_1 = require("tinyglobby"); * testing purposes. * @returns A set of all test files in the project. */ -async function findTestFiles(include, exclude, workspaceRoot, glob = tinyglobby_1.glob) { +async function findTestFiles(include, exclude, workspaceRoot, glob = fast_glob_1.default) { const globOptions = { cwd: workspaceRoot, ignore: ['node_modules/**'].concat(exclude), diff --git a/uniqueId b/uniqueId index c6638e7b8..75639618c 100644 --- a/uniqueId +++ b/uniqueId @@ -1 +1 @@ -Tue Sep 09 2025 16:40:21 GMT+0000 (Coordinated Universal Time) \ No newline at end of file +Sat Oct 04 2025 13:27:19 GMT+0000 (Coordinated Universal Time) \ No newline at end of file