Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ async function createProxyServer(body = 'TEST_API_RETURN') {
await new Promise<void>((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<void>((resolve) => proxyServer.close(() => resolve())),
};
}
2 changes: 1 addition & 1 deletion packages/angular/cli/bin/ng.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/cli/src/commands/mcp/devserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions packages/angular/cli/src/commands/mcp/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
10 changes: 6 additions & 4 deletions packages/angular/cli/src/commands/mcp/host_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions packages/angular/cli/src/commands/mcp/tools/projects_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 });
Expand Down
6 changes: 4 additions & 2 deletions packages/angular/cli/src/commands/mcp/workspace-utils_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/cli/src/commands/update/cli_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(() => {
Expand Down
6 changes: 0 additions & 6 deletions packages/angular/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ async function createProxyServer() {
await new Promise<void>((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<void>((resolve) => proxyServer.close(() => resolve())),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('Serve SSR Builder - Proxy', () => {

try {
await new Promise<void>((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}" } }`,
Expand Down
3 changes: 0 additions & 3 deletions packages/ngtools/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
30 changes: 0 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading