@angular-devkit/build-angular 14.0.2 → 14.0.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "14.0.2",
3
+ "version": "14.0.3",
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.0",
10
- "@angular-devkit/architect": "0.1400.2",
11
- "@angular-devkit/build-webpack": "0.1400.2",
12
- "@angular-devkit/core": "14.0.2",
10
+ "@angular-devkit/architect": "0.1400.3",
11
+ "@angular-devkit/build-webpack": "0.1400.3",
12
+ "@angular-devkit/core": "14.0.3",
13
13
  "@babel/core": "7.17.10",
14
14
  "@babel/generator": "7.17.10",
15
15
  "@babel/helper-annotate-as-pure": "7.16.7",
@@ -20,7 +20,7 @@
20
20
  "@babel/runtime": "7.17.9",
21
21
  "@babel/template": "7.16.7",
22
22
  "@discoveryjs/json-ext": "0.5.7",
23
- "@ngtools/webpack": "14.0.2",
23
+ "@ngtools/webpack": "14.0.3",
24
24
  "ansi-colors": "4.1.1",
25
25
  "babel-loader": "8.2.5",
26
26
  "babel-plugin-istanbul": "6.1.1",
@@ -52,7 +52,7 @@ exports.default = (0, babel_loader_1.custom)(() => {
52
52
  });
53
53
  return {
54
54
  async customOptions(options, { source, map }) {
55
- var _a, _b;
55
+ var _a, _b, _c;
56
56
  const { i18n, scriptTarget, aot, optimize, instrumentCode, supportedBrowsers, ...rawOptions } = options;
57
57
  // Must process file if plugins are added
58
58
  let shouldProcess = Array.isArray(rawOptions.plugins) && rawOptions.plugins.length > 0;
@@ -89,7 +89,7 @@ exports.default = (0, babel_loader_1.custom)(() => {
89
89
  // Comparable behavior to tsconfig target of ES5
90
90
  customOptions.supportedBrowsers = ['IE 9'];
91
91
  }
92
- else if (isJsFile) {
92
+ else if (isJsFile && ((_a = customOptions.supportedBrowsers) === null || _a === void 0 ? void 0 : _a.length)) {
93
93
  // Applications code ES version can be controlled using TypeScript's `target` option.
94
94
  // However, this doesn't effect libraries and hence we use preset-env to downlevel ES fetaures
95
95
  // based on the supported browsers in browserlist.
@@ -142,7 +142,7 @@ exports.default = (0, babel_loader_1.custom)(() => {
142
142
  pureTopLevel: angularPackage,
143
143
  // JavaScript modules that are marked as side effect free are considered to have
144
144
  // no decorators that contain non-local effects.
145
- wrapDecorators: !!((_b = (_a = this._module) === null || _a === void 0 ? void 0 : _a.factoryMeta) === null || _b === void 0 ? void 0 : _b.sideEffectFree),
145
+ wrapDecorators: !!((_c = (_b = this._module) === null || _b === void 0 ? void 0 : _b.factoryMeta) === null || _c === void 0 ? void 0 : _c.sideEffectFree),
146
146
  };
147
147
  shouldProcess = true;
148
148
  }
@@ -209,7 +209,9 @@ async function execute(options, context, transforms) {
209
209
  },
210
210
  });
211
211
  return partials;
212
- });
212
+ },
213
+ // During extraction we don't need specific browser support.
214
+ { supportedBrowsers: undefined });
213
215
  // All the localize usages are setup to first try the ESM entry point then fallback to the deep imports.
214
216
  // This provides interim compatibility while the framework is transitioned to bundled ESM packages.
215
217
  const localizeToolsModule = await (0, load_esm_1.loadEsmModule)('@angular/localize/tools');
@@ -107,8 +107,8 @@ function execute(options, context, transforms = {}) {
107
107
  throw new Error('The builder requires a target.');
108
108
  }
109
109
  const projectMetadata = await context.getProjectMetadata(projectName);
110
- const projectRoot = path.join(context.workspaceRoot, (_c = projectMetadata.root) !== null && _c !== void 0 ? _c : '');
111
- const projectSourceRoot = path.join(projectRoot, (_d = projectMetadata.sourceRoot) !== null && _d !== void 0 ? _d : '');
110
+ const sourceRoot = ((_d = (_c = projectMetadata.sourceRoot) !== null && _c !== void 0 ? _c : projectMetadata.root) !== null && _d !== void 0 ? _d : '');
111
+ const projectSourceRoot = path.join(context.workspaceRoot, sourceRoot);
112
112
  const files = await (0, find_tests_1.findTests)(options.include, context.workspaceRoot, projectSourceRoot);
113
113
  // early exit, no reason to start karma
114
114
  if (!files.length) {
@@ -125,8 +125,8 @@ function getInstrumentationExcludedPaths(sourceRoot, excludedPaths) {
125
125
  const excluded = new Set();
126
126
  for (const excludeGlob of excludedPaths) {
127
127
  glob_1.default
128
- .sync(path.join(sourceRoot, excludeGlob), { nodir: true })
129
- .forEach((p) => excluded.add(path.normalize(p)));
128
+ .sync(excludeGlob, { nodir: true, cwd: sourceRoot })
129
+ .forEach((p) => excluded.add(path.join(sourceRoot, p)));
130
130
  }
131
131
  return excluded;
132
132
  }