Skip to content

Commit

Permalink
fix(@schematics/angular): remove jasmine-spec-reporter and ts-node fr…
Browse files Browse the repository at this point in the history
…om default workspace

The dependencies are only needed for protractor tests, so they should only be added by the e2e schematics.

(cherry picked from commit 29cf812)
  • Loading branch information
cexbrayat authored and alan-agius4 committed Apr 22, 2021
1 parent 94957d1 commit 21b601b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 10 additions & 2 deletions packages/schematics/angular/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,19 @@ export default function (options: E2eOptions): Rule {
}),
move(root),
])),
host => addPackageJsonDependency(host, {
host => [{
type: NodeDependencyType.Dev,
name: 'protractor',
version: '~7.0.0',
}),
}, {
type: NodeDependencyType.Dev,
name: 'jasmine-spec-reporter',
version: '~7.0.0',
}, {
type: NodeDependencyType.Dev,
name: 'ts-node',
version: '~9.1.1',
}].forEach(dep => addPackageJsonDependency(host, dep)),
addScriptsToPackageJson(),
]);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@
"@types/jasmine": "~3.6.0",<% } %>
"@types/node": "^12.11.1",<% if (!minimal) { %>
"jasmine-core": "~3.7.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ts-node": "~9.1.1",<% } %>
"karma-jasmine-html-reporter": "^1.5.0",<% } %>
"typescript": "<%= latestVersions.TypeScript %>"
}
}

0 comments on commit 21b601b

Please sign in to comment.