@schematics/angular 19.1.7 → 19.1.8

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/config/index.js CHANGED
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = default_1;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const utility_1 = require("@schematics/angular/utility");
13
- const path_1 = require("path");
13
+ const node_path_1 = require("node:path");
14
14
  const paths_1 = require("../utility/paths");
15
15
  const schema_1 = require("./schema");
16
16
  function default_1(options) {
@@ -52,7 +52,7 @@ function addKarmaConfig(options) {
52
52
  throw new schematics_1.SchematicsException(`Cannot add a karma configuration as builder for "test" target in project does not use "${utility_1.AngularBuilder.Karma}".`);
53
53
  }
54
54
  testTarget.options ??= {};
55
- testTarget.options.karmaConfig = path_1.posix.join(project.root, 'karma.conf.js');
55
+ testTarget.options.karmaConfig = node_path_1.posix.join(project.root, 'karma.conf.js');
56
56
  // If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
57
57
  let folderName = options.project.startsWith('@') ? options.project.slice(1) : options.project;
58
58
  if (/[A-Z]/.test(folderName)) {
package/e2e/index.js CHANGED
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = default_1;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const utility_1 = require("@schematics/angular/utility");
13
- const path_1 = require("path");
13
+ const node_path_1 = require("node:path");
14
14
  const json_file_1 = require("../utility/json-file");
15
15
  const latest_versions_1 = require("../utility/latest-versions");
16
16
  /**
@@ -40,13 +40,13 @@ function default_1(options) {
40
40
  if (!project) {
41
41
  throw new schematics_1.SchematicsException(`Project name "${relatedAppName}" doesn't not exist.`);
42
42
  }
43
- const e2eRootPath = path_1.posix.join(project.root, 'e2e');
43
+ const e2eRootPath = node_path_1.posix.join(project.root, 'e2e');
44
44
  project.targets.add({
45
45
  name: 'e2e',
46
46
  builder: utility_1.AngularBuilder.Protractor,
47
47
  defaultConfiguration: 'development',
48
48
  options: {
49
- protractorConfig: path_1.posix.join(e2eRootPath, 'protractor.conf.js'),
49
+ protractorConfig: node_path_1.posix.join(e2eRootPath, 'protractor.conf.js'),
50
50
  },
51
51
  configurations: {
52
52
  production: {
@@ -62,7 +62,7 @@ function default_1(options) {
62
62
  (0, schematics_1.applyTemplates)({
63
63
  utils: schematics_1.strings,
64
64
  ...options,
65
- relativePathToWorkspaceRoot: path_1.posix.relative(path_1.posix.join('/', e2eRootPath), '/'),
65
+ relativePathToWorkspaceRoot: node_path_1.posix.relative(node_path_1.posix.join('/', e2eRootPath), '/'),
66
66
  }),
67
67
  (0, schematics_1.move)(e2eRootPath),
68
68
  ])),
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = default_1;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const utility_1 = require("@schematics/angular/utility");
13
- const path_1 = require("path");
13
+ const node_path_1 = require("node:path");
14
14
  const ENVIRONMENTS_DIRECTORY = 'environments';
15
15
  const ENVIRONMENT_FILE_CONTENT = 'export const environment = {};\n';
16
16
  function default_1(options) {
@@ -31,7 +31,7 @@ function default_1(options) {
31
31
  ' A "build" target is required to generate environment files.');
32
32
  }
33
33
  const serverTarget = project.targets.get('server');
34
- const sourceRoot = project.sourceRoot ?? path_1.posix.join(project.root, 'src');
34
+ const sourceRoot = project.sourceRoot ?? node_path_1.posix.join(project.root, 'src');
35
35
  // The generator needs to be iterated prior to returning to ensure all workspace changes that occur
36
36
  // within the generator are present for `updateWorkspace` when it writes the workspace file.
37
37
  return (0, schematics_1.chain)([
@@ -64,7 +64,7 @@ function* generateConfigurationEnvironments(buildTarget, serverTarget, sourceRoo
64
64
  ' The generated project options may not be compatible with this builder.');
65
65
  }
66
66
  // Create default environment file
67
- const defaultFilePath = path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, 'environment.ts');
67
+ const defaultFilePath = node_path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, 'environment.ts');
68
68
  yield createIfMissing(defaultFilePath);
69
69
  const configurationEntries = [
70
70
  ...Object.entries(buildTarget.configurations ?? {}),
@@ -80,7 +80,7 @@ function* generateConfigurationEnvironments(buildTarget, serverTarget, sourceRoo
80
80
  if (name === buildTarget.defaultConfiguration) {
81
81
  continue;
82
82
  }
83
- const configurationFilePath = path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, `environment.${name}.ts`);
83
+ const configurationFilePath = node_path_1.posix.join(sourceRoot, ENVIRONMENTS_DIRECTORY, `environment.${name}.ts`);
84
84
  // Add file replacement option entry for the configuration environment file
85
85
  const replacements = (configurationOptions['fileReplacements'] ??= []);
86
86
  const existing = replacements.find((value) => value.replace === defaultFilePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "19.1.7",
3
+ "version": "19.1.8",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "schematics": "./collection.json",
24
24
  "dependencies": {
25
- "@angular-devkit/core": "19.1.7",
26
- "@angular-devkit/schematics": "19.1.7",
25
+ "@angular-devkit/core": "19.1.8",
26
+ "@angular-devkit/schematics": "19.1.8",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -43,7 +43,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.ExistingBehavior = exports.InstallBehavior = exports.DependencyType = void 0;
44
44
  exports.addDependency = addDependency;
45
45
  const tasks_1 = require("@angular-devkit/schematics/tasks");
46
- const path = __importStar(require("path"));
46
+ const path = __importStar(require("node:path"));
47
47
  const installTasks = new WeakMap();
48
48
  /**
49
49
  * An enum used to specify the type of a dependency found within a package manifest
@@ -15,7 +15,7 @@ exports.latestVersions = {
15
15
  ...dependencies,
16
16
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
17
17
  Angular: dependencies['@angular/core'],
18
- DevkitBuildAngular: '^19.1.7',
19
- AngularBuild: '^19.1.7',
20
- AngularSSR: '^19.1.7',
18
+ DevkitBuildAngular: '^19.1.8',
19
+ AngularBuild: '^19.1.8',
20
+ AngularSSR: '^19.1.8',
21
21
  };
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.findAppConfig = findAppConfig;
14
- const path_1 = require("path");
14
+ const node_path_1 = require("node:path");
15
15
  const typescript_1 = __importDefault(require("../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
16
16
  const util_1 = require("./util");
17
17
  /**
@@ -58,7 +58,7 @@ function resolveAppConfigFromIdentifier(identifier, tree, bootstapFilePath) {
58
58
  // Look for a variable with the imported name in the file. Note that ideally we would use
59
59
  // the type checker to resolve this, but we can't because these utilities are set up to
60
60
  // operate on individual files, not the entire program.
61
- const filePath = (0, path_1.join)((0, path_1.dirname)(bootstapFilePath), node.moduleSpecifier.text + '.ts');
61
+ const filePath = (0, node_path_1.join)((0, node_path_1.dirname)(bootstapFilePath), node.moduleSpecifier.text + '.ts');
62
62
  const importedSourceFile = (0, util_1.getSourceFile)(tree, filePath);
63
63
  const resolvedVariable = findAppConfigFromVariableName(importedSourceFile, (specifier.propertyName || specifier.name).text);
64
64
  if (resolvedVariable) {