@angular-devkit/build-angular 20.1.0-next.2 → 20.1.0-rc.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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "20.1.0-next.2",
3
+ "version": "20.1.0-rc.0",
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.2001.0-next.2",
11
- "@angular-devkit/build-webpack": "0.2001.0-next.2",
12
- "@angular-devkit/core": "20.1.0-next.2",
13
- "@angular/build": "20.1.0-next.2",
14
- "@babel/core": "7.27.4",
10
+ "@angular-devkit/architect": "0.2001.0-rc.0",
11
+ "@angular-devkit/build-webpack": "0.2001.0-rc.0",
12
+ "@angular-devkit/core": "20.1.0-rc.0",
13
+ "@angular/build": "20.1.0-rc.0",
14
+ "@babel/core": "7.27.7",
15
15
  "@babel/generator": "7.27.5",
16
16
  "@babel/helper-annotate-as-pure": "7.27.3",
17
17
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -21,8 +21,7 @@
21
21
  "@babel/preset-env": "7.27.2",
22
22
  "@babel/runtime": "7.27.6",
23
23
  "@discoveryjs/json-ext": "0.6.3",
24
- "@ngtools/webpack": "20.1.0-next.2",
25
- "@vitejs/plugin-basic-ssl": "2.0.0",
24
+ "@ngtools/webpack": "20.1.0-rc.0",
26
25
  "ansi-colors": "4.1.3",
27
26
  "autoprefixer": "10.4.21",
28
27
  "babel-loader": "10.0.0",
@@ -43,8 +42,8 @@
43
42
  "open": "10.1.2",
44
43
  "ora": "8.2.0",
45
44
  "picomatch": "4.0.2",
46
- "piscina": "5.0.0",
47
- "postcss": "8.5.5",
45
+ "piscina": "5.1.2",
46
+ "postcss": "8.5.6",
48
47
  "postcss-loader": "8.1.1",
49
48
  "resolve-url-loader": "5.0.0",
50
49
  "rxjs": "7.8.2",
@@ -53,7 +52,7 @@
53
52
  "semver": "7.7.2",
54
53
  "source-map-loader": "5.0.0",
55
54
  "source-map-support": "0.5.21",
56
- "terser": "5.42.0",
55
+ "terser": "5.43.1",
57
56
  "tree-kill": "1.2.2",
58
57
  "tslib": "2.8.1",
59
58
  "webpack": "5.99.9",
@@ -72,7 +71,7 @@
72
71
  "@angular/platform-browser": "^20.0.0 || ^20.1.0-next.0",
73
72
  "@angular/platform-server": "^20.0.0 || ^20.1.0-next.0",
74
73
  "@angular/service-worker": "^20.0.0 || ^20.1.0-next.0",
75
- "@angular/ssr": "^20.1.0-next.2",
74
+ "@angular/ssr": "^20.1.0-rc.0",
76
75
  "@web/test-runner": "^0.20.0",
77
76
  "browser-sync": "^3.0.2",
78
77
  "jest": "^29.5.0",
@@ -48,7 +48,6 @@ const private_1 = require("@angular/build/private");
48
48
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
49
49
  const path = __importStar(require("node:path"));
50
50
  const node_url_1 = require("node:url");
51
- const tailwind_1 = require("../../../utils/tailwind");
52
51
  const plugins_1 = require("../plugins");
53
52
  const css_optimizer_plugin_1 = require("../plugins/css-optimizer-plugin");
54
53
  const styles_webpack_plugin_1 = require("../plugins/styles-webpack-plugin");
@@ -86,24 +85,38 @@ async function getStylesConfig(wco) {
86
85
  });
87
86
  const assetNameTemplate = (0, helpers_1.assetNameTemplateFactory)(hashFormat);
88
87
  const extraPostcssPlugins = [];
89
- // Attempt to setup Tailwind CSS
90
- // Only load Tailwind CSS plugin if configuration file was found.
91
- // This acts as a guard to ensure the project actually wants to use Tailwind CSS.
92
- // The package may be unknowningly present due to a third-party transitive package dependency.
93
- const tailwindConfigPath = await (0, tailwind_1.findTailwindConfigurationFile)(root, projectRoot);
94
- if (tailwindConfigPath) {
95
- let tailwindPackagePath;
96
- try {
97
- tailwindPackagePath = require.resolve('tailwindcss', { paths: [root] });
98
- }
99
- catch {
100
- const relativeTailwindConfigPath = path.relative(root, tailwindConfigPath);
101
- logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
102
- ` but the 'tailwindcss' package is not installed.` +
103
- ` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
88
+ const searchDirectories = await (0, private_1.generateSearchDirectories)([projectRoot, root]);
89
+ const postcssConfig = await (0, private_1.loadPostcssConfiguration)(searchDirectories);
90
+ if (postcssConfig) {
91
+ for (const [pluginName, pluginOptions] of postcssConfig.plugins) {
92
+ const resolvedPlugin = require.resolve(pluginName, { paths: [root] });
93
+ const { default: plugin } = await Promise.resolve(`${resolvedPlugin}`).then(s => __importStar(require(s)));
94
+ if (typeof plugin !== 'function' || plugin.postcss !== true) {
95
+ throw new Error(`Attempted to load invalid Postcss plugin: "${pluginName}"`);
96
+ }
97
+ extraPostcssPlugins.push(plugin(pluginOptions));
104
98
  }
105
- if (tailwindPackagePath) {
106
- extraPostcssPlugins.push(require(tailwindPackagePath)({ config: tailwindConfigPath }));
99
+ }
100
+ else {
101
+ // Attempt to setup Tailwind CSS
102
+ // Only load Tailwind CSS plugin if configuration file was found.
103
+ // This acts as a guard to ensure the project actually wants to use Tailwind CSS.
104
+ // The package may be unknowningly present due to a third-party transitive package dependency.
105
+ const tailwindConfigPath = (0, private_1.findTailwindConfiguration)(searchDirectories);
106
+ if (tailwindConfigPath) {
107
+ let tailwindPackagePath;
108
+ try {
109
+ tailwindPackagePath = require.resolve('tailwindcss', { paths: [root] });
110
+ }
111
+ catch {
112
+ const relativeTailwindConfigPath = path.relative(root, tailwindConfigPath);
113
+ logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
114
+ ` but the 'tailwindcss' package is not installed.` +
115
+ ` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
116
+ }
117
+ if (tailwindPackagePath) {
118
+ extraPostcssPlugins.push(require(tailwindPackagePath)({ config: tailwindConfigPath }));
119
+ }
107
120
  }
108
121
  }
109
122
  const autoprefixer = require('autoprefixer');
@@ -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.1.0-next.2';
13
+ const VERSION = '20.1.0-rc.0';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- export declare function findTailwindConfigurationFile(workspaceRoot: string, projectRoot: string): Promise<string | undefined>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.findTailwindConfigurationFile = findTailwindConfigurationFile;
11
- const promises_1 = require("node:fs/promises");
12
- const node_path_1 = require("node:path");
13
- const tailwindConfigFiles = [
14
- 'tailwind.config.js',
15
- 'tailwind.config.cjs',
16
- 'tailwind.config.mjs',
17
- 'tailwind.config.ts',
18
- ];
19
- async function findTailwindConfigurationFile(workspaceRoot, projectRoot) {
20
- const dirEntries = [projectRoot, workspaceRoot].map((root) => (0, promises_1.readdir)(root, { withFileTypes: false }).then((entries) => ({
21
- root,
22
- files: new Set(entries),
23
- })));
24
- // A configuration file can exist in the project or workspace root
25
- for (const { root, files } of await Promise.all(dirEntries)) {
26
- for (const potentialConfig of tailwindConfigFiles) {
27
- if (files.has(potentialConfig)) {
28
- return (0, node_path_1.join)(root, potentialConfig);
29
- }
30
- }
31
- }
32
- return undefined;
33
- }