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 {
20
20
} from '@angular-devkit/schematics' ;
21
21
import { NodeDependencyType , addPackageJsonDependency } from '../utility/dependencies' ;
22
22
import { JSONFile } from '../utility/json-file' ;
23
+ import { latestVersions } from '../utility/latest-versions' ;
23
24
import { relativePathToWorkspaceRoot } from '../utility/paths' ;
24
25
import { getWorkspace , updateWorkspace } from '../utility/workspace' ;
25
26
import { Builders } from '../utility/workspace-models' ;
@@ -93,6 +94,11 @@ export default function (options: E2eOptions): Rule {
93
94
name : 'ts-node' ,
94
95
version : '~9.1.1' ,
95
96
} ,
97
+ {
98
+ type : NodeDependencyType . Dev ,
99
+ name : '@types/node' ,
100
+ version : latestVersions [ '@types/node' ] ,
101
+ } ,
96
102
] . forEach ( ( dep ) => addPackageJsonDependency ( host , dep ) ) ,
97
103
addScriptsToPackageJson ( ) ,
98
104
] ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,12 @@ import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
23
23
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript' ;
24
24
import { findNode , getDecoratorMetadata } from '../utility/ast-utils' ;
25
25
import { 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' ;
27
32
import { findBootstrapModuleCall , findBootstrapModulePath } from '../utility/ng-ast-utils' ;
28
33
import { relativePathToWorkspaceRoot } from '../utility/paths' ;
29
34
import { targetBuildNotFoundError } from '../utility/project-targets' ;
@@ -226,7 +231,11 @@ function addDependencies(): Rule {
226
231
} ;
227
232
addPackageJsonDependency ( host , platformServerDep ) ;
228
233
229
- return host ;
234
+ addPackageJsonDependency ( host , {
235
+ type : NodeDependencyType . Dev ,
236
+ name : '@types/node' ,
237
+ version : latestVersions [ '@types/node' ] ,
238
+ } ) ;
230
239
} ;
231
240
}
232
241
Original file line number Diff line number Diff line change 25
25
"devDependencies": {
26
26
"@angular/cli": "<%= '~' + version %>",
27
27
"@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'] %>",
30
29
"jasmine-core": "<%= latestVersions['jasmine-core'] %>",
31
30
"karma": "<%= latestVersions['karma'] %>",
32
31
"karma-chrome-launcher": "<%= latestVersions['karma-chrome-launcher'] %>",
You can’t perform that action at this time.
0 commit comments