diff --git a/packages/angular/build/src/builders/dev-server/tests/options/proxy-config_spec.ts b/packages/angular/build/src/builders/dev-server/tests/options/proxy-config_spec.ts index 31ea54fc4004..092bb50dcbae 100644 --- a/packages/angular/build/src/builders/dev-server/tests/options/proxy-config_spec.ts +++ b/packages/angular/build/src/builders/dev-server/tests/options/proxy-config_spec.ts @@ -402,7 +402,7 @@ async function createProxyServer(body = 'TEST_API_RETURN') { await new Promise((resolve) => proxyServer.listen(0, '127.0.0.1', resolve)); return { - address: proxyServer.address() as import('net').AddressInfo, + address: proxyServer.address() as import('node:net').AddressInfo, close: () => new Promise((resolve) => proxyServer.close(() => resolve())), }; } diff --git a/packages/angular/cli/bin/ng.js b/packages/angular/cli/bin/ng.js index d503fb895f5f..b1725997ec54 100755 --- a/packages/angular/cli/bin/ng.js +++ b/packages/angular/cli/bin/ng.js @@ -11,7 +11,7 @@ /* eslint-disable import/no-unassigned-import */ 'use strict'; -const path = require('path'); +const path = require('node:path'); const nodeUtils = require('./version'); // Error if the external CLI appears to be used inside a google3 context. diff --git a/packages/angular/cli/src/commands/mcp/devserver.ts b/packages/angular/cli/src/commands/mcp/devserver.ts index 1a667afed6c9..6cf310bc6945 100644 --- a/packages/angular/cli/src/commands/mcp/devserver.ts +++ b/packages/angular/cli/src/commands/mcp/devserver.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import type { ChildProcess } from 'child_process'; +import type { ChildProcess } from 'node:child_process'; import { type Host, processStreamLines } from './host'; // Log messages that we want to catch to identify the build status. diff --git a/packages/angular/cli/src/commands/mcp/host.ts b/packages/angular/cli/src/commands/mcp/host.ts index 0ec914727e41..6f3313640510 100644 --- a/packages/angular/cli/src/commands/mcp/host.ts +++ b/packages/angular/cli/src/commands/mcp/host.ts @@ -13,9 +13,8 @@ * test-specific implementations. */ -import { existsSync as nodeExistsSync } from 'fs'; import { ChildProcess, spawn } from 'node:child_process'; -import { Stats, realpathSync } from 'node:fs'; +import { Stats, existsSync as nodeExistsSync, realpathSync } from 'node:fs'; import { glob as nodeGlob, readFile as nodeReadFile, stat } from 'node:fs/promises'; import { createRequire } from 'node:module'; import { createServer } from 'node:net'; diff --git a/packages/angular/cli/src/commands/mcp/host_spec.ts b/packages/angular/cli/src/commands/mcp/host_spec.ts index 2b2d3d9ea60a..f04f712ed0fa 100644 --- a/packages/angular/cli/src/commands/mcp/host_spec.ts +++ b/packages/angular/cli/src/commands/mcp/host_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ +import assert from 'node:assert'; import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { LocalWorkspaceHost, createRootRestrictedHost } from './host'; @@ -17,9 +17,11 @@ describe('createRootRestrictedHost', () => { let outsideDir: string; beforeEach(() => { - root1 = mkdtempSync(join(tmpdir(), 'angular-cli-mcp-root1-')); - root2 = mkdtempSync(join(tmpdir(), 'angular-cli-mcp-root2-')); - outsideDir = mkdtempSync(join(tmpdir(), 'angular-cli-mcp-outside-')); + const baseTmpDir = process.env['TEST_TMPDIR']; + assert(baseTmpDir, 'TEST_TMPDIR is not set'); + root1 = mkdtempSync(join(baseTmpDir, 'angular-cli-mcp-root1-')); + root2 = mkdtempSync(join(baseTmpDir, 'angular-cli-mcp-root2-')); + outsideDir = mkdtempSync(join(baseTmpDir, 'angular-cli-mcp-outside-')); writeFileSync(join(root1, 'file1.txt'), 'root 1 content'); writeFileSync(join(root2, 'file2.txt'), 'root 2 content'); diff --git a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver_spec.ts b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver_spec.ts index 735e82302a94..ddefccd54633 100644 --- a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver_spec.ts +++ b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import { EventEmitter } from 'events'; import type { ChildProcess } from 'node:child_process'; +import { EventEmitter } from 'node:events'; import type { MockHost } from '../../testing/mock-host'; import { MockMcpToolContext, diff --git a/packages/angular/cli/src/commands/mcp/tools/projects_spec.ts b/packages/angular/cli/src/commands/mcp/tools/projects_spec.ts index 9c5e2d7d08f8..8ed77e673466 100644 --- a/packages/angular/cli/src/commands/mcp/tools/projects_spec.ts +++ b/packages/angular/cli/src/commands/mcp/tools/projects_spec.ts @@ -7,8 +7,8 @@ */ import { workspaces } from '@angular-devkit/core'; +import assert from 'node:assert'; import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { pathToFileURL } from 'node:url'; import { AngularWorkspace } from '../../../utilities/config'; @@ -23,7 +23,9 @@ describe('List Projects Tool', () => { let workspaceDir: string; beforeEach(() => { - tempDir = mkdtempSync(join(tmpdir(), 'mcp-projects-tool-')); + const baseTmpDir = process.env['TEST_TMPDIR']; + assert(baseTmpDir, 'TEST_TMPDIR is not set'); + tempDir = mkdtempSync(join(baseTmpDir, 'mcp-projects-tool-')); allowedRoot = join(tempDir, 'allowed-root'); workspaceDir = join(allowedRoot, 'workspace'); mkdirSync(workspaceDir, { recursive: true }); diff --git a/packages/angular/cli/src/commands/mcp/workspace-utils_spec.ts b/packages/angular/cli/src/commands/mcp/workspace-utils_spec.ts index a000dd01da34..4de7d0748353 100644 --- a/packages/angular/cli/src/commands/mcp/workspace-utils_spec.ts +++ b/packages/angular/cli/src/commands/mcp/workspace-utils_spec.ts @@ -7,8 +7,8 @@ */ import { workspaces } from '@angular-devkit/core'; +import assert from 'node:assert'; import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { pathToFileURL } from 'node:url'; import { AngularWorkspace } from '../../utilities/config'; @@ -114,7 +114,9 @@ describe('MCP Workspace Utils', () => { beforeEach(() => { mockHost = createMockHost(); spyOn(process, 'cwd').and.returnValue(cwd); - tempDir = mkdtempSync(join(tmpdir(), 'mcp-workspace-utils-')); + const baseTmpDir = process.env['TEST_TMPDIR']; + assert(baseTmpDir, 'TEST_TMPDIR is not set'); + tempDir = mkdtempSync(join(baseTmpDir, 'mcp-workspace-utils-')); allowedRoot = join(tempDir, 'allowed-root'); allowedWorkspace = join(allowedRoot, 'workspace'); outsideWorkspace = join(tempDir, 'outside-workspace'); diff --git a/packages/angular/cli/src/commands/update/cli_spec.ts b/packages/angular/cli/src/commands/update/cli_spec.ts index bae00d3dba24..f693c4005815 100644 --- a/packages/angular/cli/src/commands/update/cli_spec.ts +++ b/packages/angular/cli/src/commands/update/cli_spec.ts @@ -8,7 +8,7 @@ import assert from 'node:assert'; import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'; -import path from 'path'; +import path from 'node:path'; import { resolveFallbackMigrations } from './cli'; import type { PackageVersionInfo, UpdatePlan } from './update-resolver'; diff --git a/packages/angular/cli/src/commands/update/update-resolver_spec.ts b/packages/angular/cli/src/commands/update/update-resolver_spec.ts index 9ced5829587e..a5074ea1bfec 100644 --- a/packages/angular/cli/src/commands/update/update-resolver_spec.ts +++ b/packages/angular/cli/src/commands/update/update-resolver_spec.ts @@ -7,8 +7,8 @@ */ import { logging } from '@angular-devkit/core'; +import assert from 'node:assert'; import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; import * as path from 'node:path'; import * as semver from 'semver'; import type { PackageManager, PackageManifest, PackageMetadata } from '../../package-managers'; @@ -43,7 +43,9 @@ describe('UpdateResolver', () => { const logger = new logging.NullLogger(); beforeEach(() => { - tempRoot = mkdtempSync(path.join(tmpdir(), 'angular-cli-update-resolver-test-')); + const baseTmpDir = process.env['TEST_TMPDIR']; + assert(baseTmpDir, 'TEST_TMPDIR is not set'); + tempRoot = mkdtempSync(path.join(baseTmpDir, 'angular-cli-update-resolver-test-')); }); afterEach(() => { diff --git a/packages/angular/ssr/package.json b/packages/angular/ssr/package.json index 2acc5f8babbd..01bc125458df 100644 --- a/packages/angular/ssr/package.json +++ b/packages/angular/ssr/package.json @@ -38,12 +38,6 @@ }, "devDependencies": { "@angular-devkit/schematics": "workspace:*", - "@angular/common": "22.3.0-next.3", - "@angular/compiler": "22.3.0-next.3", - "@angular/core": "22.3.0-next.3", - "@angular/platform-browser": "22.3.0-next.3", - "@angular/platform-server": "22.3.0-next.3", - "@angular/router": "22.3.0-next.3", "@schematics/angular": "workspace:*" }, "sideEffects": false, diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index cac45bc3309f..1454863ca837 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -66,8 +66,7 @@ "@angular/ssr": "workspace:*", "browser-sync": "3.0.4", "ng-packagr": "22.3.0-next.2", - "sass": "1.106.1", - "undici": "8.12.3" + "sass": "1.106.1" }, "peerDependencies": { "@angular/compiler-cli": "0.0.0-ANGULAR-FW-PEER-DEP", diff --git a/packages/angular_devkit/build_angular/src/builders/dev-server/tests/options/proxy-config_spec.ts b/packages/angular_devkit/build_angular/src/builders/dev-server/tests/options/proxy-config_spec.ts index 644edbea2d8a..968c1542e523 100644 --- a/packages/angular_devkit/build_angular/src/builders/dev-server/tests/options/proxy-config_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/dev-server/tests/options/proxy-config_spec.ts @@ -267,7 +267,7 @@ async function createProxyServer() { await new Promise((resolve) => proxyServer.listen(0, '127.0.0.1', resolve)); return { - address: proxyServer.address() as import('net').AddressInfo, + address: proxyServer.address() as import('node:net').AddressInfo, close: () => new Promise((resolve) => proxyServer.close(() => resolve())), }; } diff --git a/packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/proxy_spec.ts b/packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/proxy_spec.ts index 5539501222a6..339e8004f969 100644 --- a/packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/proxy_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/ssr-dev-server/specs/proxy_spec.ts @@ -91,7 +91,7 @@ describe('Serve SSR Builder - Proxy', () => { try { await new Promise((resolve) => proxyServer.listen(0, '127.0.0.1', resolve)); - const proxyAddress = proxyServer.address() as import('net').AddressInfo; + const proxyAddress = proxyServer.address() as import('node:net').AddressInfo; host.writeMultipleFiles({ 'proxy.config.json': `{ "/api/*": { "logLevel": "debug","target": "http://127.0.0.1:${proxyAddress.port}" } }`, diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 8c17f0eafe68..2c4444be2267 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -17,9 +17,6 @@ }, "devDependencies": { "@angular-devkit/core": "workspace:0.0.0-PLACEHOLDER", - "@angular/compiler": "22.3.0-next.3", - "@angular/compiler-cli": "22.3.0-next.3", - "typescript": "6.0.3", "webpack": "5.112.2" } } diff --git a/packages/schematics/angular/migrations/migrate-karma-to-vitest/migration.ts b/packages/schematics/angular/migrations/migrate-karma-to-vitest/migration.ts index fc5b11fb5eb0..022eff5069d4 100644 --- a/packages/schematics/angular/migrations/migrate-karma-to-vitest/migration.ts +++ b/packages/schematics/angular/migrations/migrate-karma-to-vitest/migration.ts @@ -9,7 +9,7 @@ import type { json } from '@angular-devkit/core'; import { Rule, SchematicContext, Tree, chain } from '@angular-devkit/schematics'; import { join } from 'node:path/posix'; -import { isDeepStrictEqual } from 'util'; +import { isDeepStrictEqual } from 'node:util'; import { DependencyType, ExistingBehavior, addDependency } from '../../utility/dependency'; import { JSONFile } from '../../utility/json-file'; import { latestVersions } from '../../utility/latest-versions'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ba2911c3048..72c4787c7668 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -672,24 +672,6 @@ importers: '@angular-devkit/schematics': specifier: workspace:* version: link:../../angular_devkit/schematics - '@angular/common': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2) - '@angular/compiler': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3 - '@angular/core': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3) - '@angular/platform-browser': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/animations@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)))(@angular/common@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2))(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)) - '@angular/platform-server': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/common@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2))(@angular/compiler@22.3.0-next.3)(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(@angular/platform-browser@22.3.0-next.3(@angular/animations@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)))(@angular/common@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2))(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)))(rxjs@7.8.2) - '@angular/router': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/common@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2))(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(@angular/platform-browser@22.3.0-next.3(@angular/animations@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)))(@angular/common@22.3.0-next.3(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3))(rxjs@7.8.2))(@angular/core@22.3.0-next.3(@angular/compiler@22.3.0-next.3)(rxjs@7.8.2)(zone.js@0.16.3)))(rxjs@7.8.2) '@schematics/angular': specifier: workspace:* version: link:../../schematics/angular @@ -874,9 +856,6 @@ importers: sass: specifier: 1.106.1 version: 1.106.1 - undici: - specifier: 8.12.3 - version: 8.12.3 optionalDependencies: esbuild: specifier: 0.28.2 @@ -964,15 +943,6 @@ importers: '@angular-devkit/core': specifier: workspace:0.0.0-PLACEHOLDER version: link:../../angular_devkit/core - '@angular/compiler': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3 - '@angular/compiler-cli': - specifier: 22.3.0-next.3 - version: 22.3.0-next.3(@angular/compiler@22.3.0-next.3)(typescript@6.0.3) - typescript: - specifier: 6.0.3 - version: 6.0.3 webpack: specifier: 5.112.2 version: 5.112.2(esbuild@0.28.2)(lightningcss@1.33.0)(postcss@8.5.32)(uglify-js@3.19.3)