@angular-devkit/build-angular 17.0.0-rc.4 → 17.0.0-rc.5
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,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "17.0.0-rc.
|
|
3
|
+
"version": "17.0.0-rc.5",
|
|
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.2.1",
|
|
10
|
-
"@angular-devkit/architect": "0.1700.0-rc.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1700.0-rc.
|
|
12
|
-
"@angular-devkit/core": "17.0.0-rc.
|
|
10
|
+
"@angular-devkit/architect": "0.1700.0-rc.5",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1700.0-rc.5",
|
|
12
|
+
"@angular-devkit/core": "17.0.0-rc.5",
|
|
13
13
|
"@babel/core": "7.23.2",
|
|
14
14
|
"@babel/generator": "7.23.0",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.22.5",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/preset-env": "7.23.2",
|
|
21
21
|
"@babel/runtime": "7.23.2",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.7",
|
|
23
|
-
"@ngtools/webpack": "17.0.0-rc.
|
|
23
|
+
"@ngtools/webpack": "17.0.0-rc.5",
|
|
24
24
|
"@vitejs/plugin-basic-ssl": "1.0.1",
|
|
25
25
|
"ansi-colors": "4.1.3",
|
|
26
26
|
"autoprefixer": "10.4.16",
|
|
@@ -89,18 +89,26 @@ async function findTests(include, exclude, workspaceRoot, projectSourceRoot) {
|
|
|
89
89
|
return [...new Set(files.flat())];
|
|
90
90
|
}
|
|
91
91
|
const normalizePath = (path) => path.replace(/\\/g, '/');
|
|
92
|
+
const removeLeadingSlash = (pattern) => {
|
|
93
|
+
if (pattern.charAt(0) === '/') {
|
|
94
|
+
return pattern.substring(1);
|
|
95
|
+
}
|
|
96
|
+
return pattern;
|
|
97
|
+
};
|
|
98
|
+
const removeRelativeRoot = (path, root) => {
|
|
99
|
+
if (path.startsWith(root)) {
|
|
100
|
+
return path.substring(root.length);
|
|
101
|
+
}
|
|
102
|
+
return path;
|
|
103
|
+
};
|
|
92
104
|
async function findMatchingTests(pattern, ignore, workspaceRoot, projectSourceRoot) {
|
|
93
105
|
// normalize pattern, glob lib only accepts forward slashes
|
|
94
106
|
let normalizedPattern = normalizePath(pattern);
|
|
95
|
-
|
|
96
|
-
normalizedPattern = normalizedPattern.substring(1);
|
|
97
|
-
}
|
|
107
|
+
normalizedPattern = removeLeadingSlash(normalizedPattern);
|
|
98
108
|
const relativeProjectRoot = normalizePath((0, path_1.relative)(workspaceRoot, projectSourceRoot) + '/');
|
|
99
109
|
// remove relativeProjectRoot to support relative paths from root
|
|
100
110
|
// such paths are easy to get when running scripts via IDEs
|
|
101
|
-
|
|
102
|
-
normalizedPattern = normalizedPattern.substring(relativeProjectRoot.length);
|
|
103
|
-
}
|
|
111
|
+
normalizedPattern = removeRelativeRoot(normalizedPattern, relativeProjectRoot);
|
|
104
112
|
// special logic when pattern does not look like a glob
|
|
105
113
|
if (!(0, fast_glob_1.isDynamicPattern)(normalizedPattern)) {
|
|
106
114
|
if (await isDirectory((0, path_1.join)(projectSourceRoot, normalizedPattern))) {
|
|
@@ -116,10 +124,12 @@ async function findMatchingTests(pattern, ignore, workspaceRoot, projectSourceRo
|
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
}
|
|
127
|
+
// normalize the patterns in the ignore list
|
|
128
|
+
const normalizedIgnorePatternList = ignore.map((pattern) => removeRelativeRoot(removeLeadingSlash(normalizePath(pattern)), relativeProjectRoot));
|
|
119
129
|
return (0, fast_glob_1.default)(normalizedPattern, {
|
|
120
130
|
cwd: projectSourceRoot,
|
|
121
131
|
absolute: true,
|
|
122
|
-
ignore: ['**/node_modules/**', ...
|
|
132
|
+
ignore: ['**/node_modules/**', ...normalizedIgnorePatternList],
|
|
123
133
|
});
|
|
124
134
|
}
|
|
125
135
|
async function isDirectory(path) {
|
|
@@ -203,6 +203,7 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
203
203
|
}
|
|
204
204
|
if (compilation instanceof compilation_1.NoopCompilation) {
|
|
205
205
|
await sharedTSCompilationState.waitUntilReady;
|
|
206
|
+
hasCompilationErrors = false;
|
|
206
207
|
return result;
|
|
207
208
|
}
|
|
208
209
|
const diagnostics = await compilation.diagnoseFiles();
|