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
14 changes: 2 additions & 12 deletions packages/schematics/angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,8 @@ ts_project(
":node_modules/@angular-devkit/core",
":node_modules/@angular-devkit/schematics",
":node_modules/jsonc-parser",
":node_modules/typescript",
"//:node_modules/@types/node",
"//packages/schematics/angular/third_party/typescript",
],
)

jasmine_test(
name = "no_typescript_runtime_dep_test",
data = [
"no_typescript_runtime_dep_spec.js",
":angular",
"//:node_modules/@types/jasmine",
],
)

Expand All @@ -139,10 +130,10 @@ ts_project(
":node_modules/@angular-devkit/core",
":node_modules/@angular-devkit/schematics",
":node_modules/jsonc-parser",
":node_modules/typescript",
"//:node_modules/@types/jasmine",
"//:node_modules/@types/node",
"//:node_modules/prettier",
"//packages/schematics/angular/third_party/typescript",
],
)

Expand Down Expand Up @@ -173,6 +164,5 @@ npm_package(
":README.md",
":angular",
":license",
"//packages/schematics/angular/third_party/typescript",
],
)
2 changes: 1 addition & 1 deletion packages/schematics/angular/app-shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
schematic,
} from '@angular-devkit/schematics';
import { dirname, join } from 'node:path/posix';
import ts from '../third_party/typescript';
import ts from 'typescript';
Comment thread
alan-agius4 marked this conversation as resolved.
import {
findNode,
findNodes,
Expand Down
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 ts from '../../third_party/typescript';
import ts from 'typescript';
Comment thread
alan-agius4 marked this conversation as resolved.

export interface RequireInfo {
module: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
url,
} from '@angular-devkit/schematics';
import { join } from 'node:path/posix';
import ts from 'typescript';
import { Schema as ComponentOptions } from '../component/schema';
import * as ts from '../third_party/typescript';
import { addImportToModule, addRouteDeclarationToModule } from '../utility/ast-utils';
import { InsertChange } from '../utility/change';
import {
Expand Down
38 changes: 0 additions & 38 deletions packages/schematics/angular/no_typescript_runtime_dep_spec.js

This file was deleted.

3 changes: 2 additions & 1 deletion packages/schematics/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dependencies": {
"@angular-devkit/core": "workspace:0.0.0-PLACEHOLDER",
"@angular-devkit/schematics": "workspace:0.0.0-PLACEHOLDER",
"jsonc-parser": "3.3.1"
"jsonc-parser": "3.3.1",
"typescript": "6.0.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* blank line preservation, and reporting of transformation details.
*/

import ts from '../../third_party/typescript';
import ts from 'typescript';
import {
transformDoneCallback,
transformFocusedAndSkippedTests,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* operations that use the `done` callback.
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';
import { createPropertyAccess } from '../utils/ast-helpers';
import { addTodoComment } from '../utils/comment-helpers';
import { RefactorContext } from '../utils/refactor-context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* `toHaveBeenCalledOnceWith` and `arrayWithExactContents`.
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';
import {
addVitestValueImport,
createExpectCallExpression,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* includes logic to identify and add TODO comments for unsupported Jasmine features.
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';
import { addVitestValueImport, createViCallExpression } from '../utils/ast-helpers';
import { getJasmineMethodName, isJasmineCallExpression } from '../utils/ast-validation';
import { addTodoComment } from '../utils/comment-helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* and the inspection of spy calls (`spy.calls.reset`, `spy.calls.mostRecent`).
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';
import {
addVitestValueImport,
createPropertyAccess,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* necessary `vitest` imports are added to the file.
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';
import { addVitestTypeImport } from '../utils/ast-helpers';
import { RefactorContext } from '../utils/refactor-context';

Expand Down
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 ts from '../../../third_party/typescript';
import ts from 'typescript';

export function addVitestValueImport(imports: Set<string>, importName: string): void {
imports.add(importName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* TypeScript AST nodes, particularly for identifying specific patterns in Jasmine tests.
*/

import ts from '../../../third_party/typescript';
import ts from 'typescript';

/**
* If a node is a `jasmine.method()` call, returns the method name.
Expand Down
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 ts from '../../../third_party/typescript';
import ts from 'typescript';
import { TODO_NOTES, TodoCategory, TodoContextMap } from './todo-notes';

// A helper type to find all `TodoCategory` keys that do not require a context.
Expand Down
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 ts from '../../../third_party/typescript';
import ts from 'typescript';
import { addTodoComment } from './comment-helpers';

describe('addTodoComment', () => {
Expand Down
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 ts from '../../../third_party/typescript';
import ts from 'typescript';
import { RefactorReporter } from './refactor-reporter';

/**
Expand Down
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 ts from '../../../third_party/typescript';
import ts from 'typescript';
import { TodoCategory } from './todo-notes';

export class RefactorReporter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { logging } from '@angular-devkit/core';
import ts from '../../../third_party/typescript';
import ts from 'typescript';
import { RefactorReporter } from './refactor-reporter';

describe('RefactorReporter', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/server/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
import { parse as parseJson } from 'jsonc-parser';
import { CompilerOptions } from 'typescript';
import { Schema as ApplicationOptions, Style } from '../application/schema';
import { CompilerOptions } from '../third_party/typescript';
import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies';
import { Builders } from '../utility/workspace-models';
import { Schema as WorkspaceOptions } from '../workspace/schema';
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/service-worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
url,
} from '@angular-devkit/schematics';
import { join } from 'node:path/posix';
import ts from '../third_party/typescript';
import ts from 'typescript';
Comment thread
alan-agius4 marked this conversation as resolved.
import { addDependency, addRootProvider, writeWorkspace } from '../utility';
import { addSymbolToNgModuleMetadata, insertImport } from '../utility/ast-utils';
import { applyToUpdateRecorder } from '../utility/change';
Expand Down
31 changes: 0 additions & 31 deletions packages/schematics/angular/third_party/typescript/BUILD.bazel

This file was deleted.

5 changes: 0 additions & 5 deletions packages/schematics/angular/third_party/typescript/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions packages/schematics/angular/third_party/typescript/index.d.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Rule, Tree, strings } from '@angular-devkit/schematics';
import * as ts from '../third_party/typescript';
import ts from 'typescript';
import { addDeclarationToModule, addSymbolToNgModuleMetadata } from './ast-utils';
import { InsertChange } from './change';
import { buildRelativePath } from './find-module';
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/ast-utils.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 * as ts from '../third_party/typescript';
import ts from 'typescript';
import { Change, InsertChange, NoopChange } from './change';
import { getEOL } from './eol';

Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/ast-utils_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { HostTree } from '@angular-devkit/schematics';
import * as ts from '../third_party/typescript';
import ts from 'typescript';
import { Change, InsertChange } from '../utility/change';
import {
addDeclarationToModule,
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/ng-ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { SchematicsException, Tree } from '@angular-devkit/schematics';
import { dirname, join } from 'node:path/posix';
import * as ts from '../third_party/typescript';
import ts from 'typescript';
import { findNode, getSourceNodes } from '../utility/ast-utils';
import { findBootstrapApplicationCall } from './standalone/util';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { SchematicsException, Tree } from '@angular-devkit/schematics';
import ts from '../../third_party/typescript';
import ts from 'typescript';
Comment thread
alan-agius4 marked this conversation as resolved.
import { getDecoratorMetadata, getMetadataField } from '../ast-utils';
import { findBootstrapModuleCall, getAppModulePath } from '../ng-ast-utils';
import { findBootstrapApplicationCall, getSourceFile } from './util';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { Tree } from '@angular-devkit/schematics';
import { dirname, join } from 'node:path';
import ts from '../../third_party/typescript';
import ts from 'typescript';
import { getSourceFile } from './util';

/** App config that was resolved to its source node. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Rule, Tree } from '@angular-devkit/schematics';
import ts from '../../third_party/typescript';
import ts from 'typescript';
import { hasTopLevelIdentifier, insertImport } from '../ast-utils';
import { applyToUpdateRecorder } from '../change';

Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/standalone/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Rule, SchematicsException, Tree, chain } from '@angular-devkit/schematics';
import ts from '../../third_party/typescript';
import ts from 'typescript';
import { addSymbolToNgModuleMetadata, insertAfterLastOccurrence } from '../ast-utils';
import { InsertChange } from '../change';
import { getAppModulePath, isStandaloneApp } from '../ng-ast-utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/standalone/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { SchematicsException, Tree } from '@angular-devkit/schematics';
import { join } from 'node:path/posix';
import ts from '../../third_party/typescript';
import ts from 'typescript';
import { Change, applyToUpdateRecorder } from '../change';
import { targetBuildNotFoundError } from '../project-targets';
import { getWorkspace } from '../workspace';
Expand Down
Loading
Loading