@angular/cli 19.2.0-next.2 → 19.2.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.
@@ -43,10 +43,10 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
43
43
  Object.defineProperty(exports, "__esModule", { value: true });
44
44
  exports.PackageManagerUtils = void 0;
45
45
  const core_1 = require("@angular-devkit/core");
46
- const child_process_1 = require("child_process");
47
- const fs_1 = require("fs");
48
- const os_1 = require("os");
49
- const path_1 = require("path");
46
+ const node_child_process_1 = require("node:child_process");
47
+ const node_fs_1 = require("node:fs");
48
+ const node_os_1 = require("node:os");
49
+ const node_path_1 = require("node:path");
50
50
  const workspace_schema_1 = require("../../lib/config/workspace-schema");
51
51
  const config_1 = require("./config");
52
52
  const memoize_1 = require("./memoize");
@@ -95,11 +95,11 @@ let PackageManagerUtils = (() => {
95
95
  }
96
96
  /** Install a single package temporary. */
97
97
  async installTemp(packageName, extraArgs) {
98
- const tempPath = await fs_1.promises.mkdtemp((0, path_1.join)((0, fs_1.realpathSync)((0, os_1.tmpdir)()), 'angular-cli-packages-'));
98
+ const tempPath = await node_fs_1.promises.mkdtemp((0, node_path_1.join)((0, node_fs_1.realpathSync)((0, node_os_1.tmpdir)()), 'angular-cli-packages-'));
99
99
  // clean up temp directory on process exit
100
100
  process.on('exit', () => {
101
101
  try {
102
- (0, fs_1.rmSync)(tempPath, { recursive: true, maxRetries: 3 });
102
+ (0, node_fs_1.rmSync)(tempPath, { recursive: true, maxRetries: 3 });
103
103
  }
104
104
  catch { }
105
105
  });
@@ -111,7 +111,7 @@ let PackageManagerUtils = (() => {
111
111
  // npm WARN .ng-temp-packages-84Qi7y No license field.
112
112
  // While we can use `npm init -y` we will end up needing to update the 'package.json' anyways
113
113
  // because of missing fields.
114
- await fs_1.promises.writeFile((0, path_1.join)(tempPath, 'package.json'), JSON.stringify({
114
+ await node_fs_1.promises.writeFile((0, node_path_1.join)(tempPath, 'package.json'), JSON.stringify({
115
115
  name: 'temp-cli-install',
116
116
  description: 'temp-cli-install',
117
117
  repository: 'temp-cli-install',
@@ -119,7 +119,7 @@ let PackageManagerUtils = (() => {
119
119
  }));
120
120
  // setup prefix/global modules path
121
121
  const packageManagerArgs = this.getArguments();
122
- const tempNodeModules = (0, path_1.join)(tempPath, 'node_modules');
122
+ const tempNodeModules = (0, node_path_1.join)(tempPath, 'node_modules');
123
123
  // Yarn will not append 'node_modules' to the path
124
124
  const prefixPath = this.name === workspace_schema_1.PackageManager.Yarn ? tempNodeModules : tempPath;
125
125
  const installArgs = [
@@ -171,7 +171,7 @@ let PackageManagerUtils = (() => {
171
171
  const { cwd = process.cwd(), silent = false } = options;
172
172
  return new Promise((resolve) => {
173
173
  const bufferedOutput = [];
174
- const childProcess = (0, child_process_1.spawn)(this.name, args, {
174
+ const childProcess = (0, node_child_process_1.spawn)(this.name, args, {
175
175
  // Always pipe stderr to allow for failures to be reported
176
176
  stdio: silent ? ['ignore', 'ignore', 'pipe'] : 'pipe',
177
177
  shell: true,
@@ -191,7 +191,7 @@ let PackageManagerUtils = (() => {
191
191
  }
192
192
  getVersion(name) {
193
193
  try {
194
- return (0, child_process_1.execSync)(`${name} --version`, {
194
+ return (0, node_child_process_1.execSync)(`${name} --version`, {
195
195
  encoding: 'utf8',
196
196
  stdio: ['ignore', 'pipe', 'ignore'],
197
197
  env: {
@@ -276,7 +276,7 @@ let PackageManagerUtils = (() => {
276
276
  lockfileName = 'package-lock.json';
277
277
  break;
278
278
  }
279
- return (0, fs_1.existsSync)((0, path_1.join)(this.context.root, lockfileName));
279
+ return (0, node_fs_1.existsSync)((0, node_path_1.join)(this.context.root, lockfileName));
280
280
  }
281
281
  getConfiguredPackageManager() {
282
282
  const getPackageManager = (source) => {
@@ -44,10 +44,10 @@ exports.fetchPackageMetadata = fetchPackageMetadata;
44
44
  exports.fetchPackageManifest = fetchPackageManifest;
45
45
  exports.getNpmPackageJson = getNpmPackageJson;
46
46
  const lockfile = __importStar(require("@yarnpkg/lockfile"));
47
- const fs_1 = require("fs");
48
47
  const ini = __importStar(require("ini"));
49
- const os_1 = require("os");
50
- const path = __importStar(require("path"));
48
+ const node_fs_1 = require("node:fs");
49
+ const node_os_1 = require("node:os");
50
+ const path = __importStar(require("node:path"));
51
51
  let npmrc;
52
52
  const npmPackageJsonCache = new Map();
53
53
  function ensureNpmrc(logger, usingYarn, verbose) {
@@ -80,7 +80,7 @@ function readOptions(logger, yarn = false, showPotentials = false) {
80
80
  }
81
81
  const defaultConfigLocations = [
82
82
  (!yarn && process.env.NPM_CONFIG_GLOBALCONFIG) || path.join(globalPrefix, 'etc', baseFilename),
83
- (!yarn && process.env.NPM_CONFIG_USERCONFIG) || path.join((0, os_1.homedir)(), dotFilename),
83
+ (!yarn && process.env.NPM_CONFIG_USERCONFIG) || path.join((0, node_os_1.homedir)(), dotFilename),
84
84
  ];
85
85
  const projectConfigLocations = [path.join(cwd, dotFilename)];
86
86
  if (yarn) {
@@ -94,11 +94,11 @@ function readOptions(logger, yarn = false, showPotentials = false) {
94
94
  }
95
95
  let rcOptions = {};
96
96
  for (const location of [...defaultConfigLocations, ...projectConfigLocations]) {
97
- if ((0, fs_1.existsSync)(location)) {
97
+ if ((0, node_fs_1.existsSync)(location)) {
98
98
  if (showPotentials) {
99
99
  logger.info(`Trying '${location}'...found.`);
100
100
  }
101
- const data = (0, fs_1.readFileSync)(location, 'utf8');
101
+ const data = (0, node_fs_1.readFileSync)(location, 'utf8');
102
102
  // Normalize RC options that are needed by 'npm-registry-fetch'.
103
103
  // See: https://github.com/npm/npm-registry-fetch/blob/ebddbe78a5f67118c1f7af2e02c8a22bcaf9e850/index.js#L99-L126
104
104
  const rcConfig = yarn ? lockfile.parse(data) : ini.parse(data);
@@ -177,7 +177,7 @@ function normalizeOptions(rawOptions, location = process.cwd(), existingNormaliz
177
177
  if (typeof substitutedValue === 'string') {
178
178
  const cafile = path.resolve(path.dirname(location), substitutedValue);
179
179
  try {
180
- options['ca'] = (0, fs_1.readFileSync)(cafile, 'utf8').replace(/\r?\n/g, '\n');
180
+ options['ca'] = (0, node_fs_1.readFileSync)(cafile, 'utf8').replace(/\r?\n/g, '\n');
181
181
  }
182
182
  catch { }
183
183
  }
@@ -43,8 +43,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.readPackageJson = readPackageJson;
44
44
  exports.findPackageJson = findPackageJson;
45
45
  exports.getProjectDependencies = getProjectDependencies;
46
- const fs = __importStar(require("fs"));
47
- const path_1 = require("path");
46
+ const fs = __importStar(require("node:fs"));
47
+ const node_path_1 = require("node:path");
48
48
  const resolve = __importStar(require("resolve"));
49
49
  function getAllDependencies(pkg) {
50
50
  return new Set([
@@ -73,7 +73,7 @@ function findPackageJson(workspaceDir, packageName) {
73
73
  }
74
74
  }
75
75
  async function getProjectDependencies(dir) {
76
- const pkg = await readPackageJson((0, path_1.join)(dir, 'package.json'));
76
+ const pkg = await readPackageJson((0, node_path_1.join)(dir, 'package.json'));
77
77
  if (!pkg) {
78
78
  throw new Error('Could not find package.json');
79
79
  }
@@ -86,7 +86,7 @@ async function getProjectDependencies(dir) {
86
86
  results.set(name, {
87
87
  name,
88
88
  version,
89
- path: (0, path_1.dirname)(packageJsonPath),
89
+ path: (0, node_path_1.dirname)(packageJsonPath),
90
90
  package: await readPackageJson(packageJsonPath),
91
91
  });
92
92
  }
@@ -42,9 +42,9 @@ var __importStar = (this && this.__importStar) || (function () {
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.findWorkspaceFile = findWorkspaceFile;
44
44
  const core_1 = require("@angular-devkit/core");
45
- const fs = __importStar(require("fs"));
46
- const os = __importStar(require("os"));
47
- const path = __importStar(require("path"));
45
+ const fs = __importStar(require("node:fs"));
46
+ const os = __importStar(require("node:os"));
47
+ const path = __importStar(require("node:path"));
48
48
  const find_up_1 = require("./find-up");
49
49
  function findWorkspaceFile(currentDirectory = process.cwd()) {
50
50
  const possibleConfigFiles = ['angular.json', '.angular.json'];
@@ -22,4 +22,4 @@ class Version {
22
22
  this.patch = patch;
23
23
  }
24
24
  }
25
- exports.VERSION = new Version('19.2.0-next.2');
25
+ exports.VERSION = new Version('19.2.0');