File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
packages/schematics/angular Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020} from '@angular-devkit/schematics' ;
2121import { NodeDependencyType , addPackageJsonDependency } from '../utility/dependencies' ;
2222import { JSONFile } from '../utility/json-file' ;
23+ import { latestVersions } from '../utility/latest-versions' ;
2324import { relativePathToWorkspaceRoot } from '../utility/paths' ;
2425import { getWorkspace , updateWorkspace } from '../utility/workspace' ;
2526import { Builders } from '../utility/workspace-models' ;
@@ -93,6 +94,11 @@ export default function (options: E2eOptions): Rule {
9394 name : 'ts-node' ,
9495 version : '~9.1.1' ,
9596 } ,
97+ {
98+ type : NodeDependencyType . Dev ,
99+ name : '@types/node' ,
100+ version : latestVersions [ '@types/node' ] ,
101+ } ,
96102 ] . forEach ( ( dep ) => addPackageJsonDependency ( host , dep ) ) ,
97103 addScriptsToPackageJson ( ) ,
98104 ] ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,12 @@ import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
2323import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript' ;
2424import { findNode , getDecoratorMetadata } from '../utility/ast-utils' ;
2525import { InsertChange } from '../utility/change' ;
26- import { addPackageJsonDependency , getPackageJsonDependency } from '../utility/dependencies' ;
26+ import {
27+ NodeDependencyType ,
28+ addPackageJsonDependency ,
29+ getPackageJsonDependency ,
30+ } from '../utility/dependencies' ;
31+ import { latestVersions } from '../utility/latest-versions' ;
2732import { findBootstrapModuleCall , findBootstrapModulePath } from '../utility/ng-ast-utils' ;
2833import { relativePathToWorkspaceRoot } from '../utility/paths' ;
2934import { targetBuildNotFoundError } from '../utility/project-targets' ;
@@ -226,7 +231,11 @@ function addDependencies(): Rule {
226231 } ;
227232 addPackageJsonDependency ( host , platformServerDep ) ;
228233
229- return host ;
234+ addPackageJsonDependency ( host , {
235+ type : NodeDependencyType . Dev ,
236+ name : '@types/node' ,
237+ version : latestVersions [ '@types/node' ] ,
238+ } ) ;
230239 } ;
231240}
232241
Original file line number Diff line number Diff line change 2525 "devDependencies": {
2626 "@angular/cli": "<%= '~' + version %>",
2727 "@angular/compiler-cli": "<%= latestVersions.Angular %>",<% if (!minimal) { %>
28- "@types/jasmine": "<%= latestVersions['@types/jasmine'] %>",<% } %>
29- "@types/node": "<%= latestVersions['@types/node'] %>",<% if (!minimal) { %>
28+ "@types/jasmine": "<%= latestVersions['@types/jasmine'] %>",
3029 "jasmine-core": "<%= latestVersions['jasmine-core'] %>",
3130 "karma": "<%= latestVersions['karma'] %>",
3231 "karma-chrome-launcher": "<%= latestVersions['karma-chrome-launcher'] %>",
You can’t perform that action at this time.
0 commit comments