@angular-devkit/build-angular 17.0.0-rc.4 → 17.0.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,15 +1,15 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "17.0.0-rc.4",
3
+ "version": "17.0.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.2.1",
10
- "@angular-devkit/architect": "0.1700.0-rc.4",
11
- "@angular-devkit/build-webpack": "0.1700.0-rc.4",
12
- "@angular-devkit/core": "17.0.0-rc.4",
10
+ "@angular-devkit/architect": "0.1700.0",
11
+ "@angular-devkit/build-webpack": "0.1700.0",
12
+ "@angular-devkit/core": "17.0.0",
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.4",
23
+ "@ngtools/webpack": "17.0.0",
24
24
  "@vitejs/plugin-basic-ssl": "1.0.1",
25
25
  "ansi-colors": "4.1.3",
26
26
  "autoprefixer": "10.4.16",
@@ -76,14 +76,14 @@
76
76
  "esbuild": "0.19.5"
77
77
  },
78
78
  "peerDependencies": {
79
- "@angular/compiler-cli": "^17.0.0 || ^17.0.0-next.0",
80
- "@angular/localize": "^17.0.0 || ^17.0.0-next.0",
81
- "@angular/platform-server": "^17.0.0 || ^17.0.0-next.0",
82
- "@angular/service-worker": "^17.0.0 || ^17.0.0-next.0",
79
+ "@angular/compiler-cli": "^17.0.0",
80
+ "@angular/localize": "^17.0.0",
81
+ "@angular/platform-server": "^17.0.0",
82
+ "@angular/service-worker": "^17.0.0",
83
83
  "jest": "^29.5.0",
84
84
  "jest-environment-jsdom": "^29.5.0",
85
85
  "karma": "^6.3.0",
86
- "ng-packagr": "^17.0.0 || ^17.0.0-next.1",
86
+ "ng-packagr": "^17.0.0",
87
87
  "protractor": "^7.0.0",
88
88
  "tailwindcss": "^2.0.0 || ^3.0.0",
89
89
  "typescript": ">=5.2 <5.3"
@@ -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
- if (normalizedPattern.charAt(0) === '/') {
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
- if (normalizedPattern.startsWith(relativeProjectRoot)) {
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/**', ...ignore],
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();