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 @@ -35,7 +35,7 @@
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine-html-reporter": "~1.5.0",
"protractor": "~7.0.0",<% } %>
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
Expand Down
18 changes: 9 additions & 9 deletions tests/legacy-cli/e2e/assets/webpack/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "test",
"license": "MIT",
"dependencies": {
"@angular/common": "9.0.0",
"@angular/compiler": "9.0.0",
"@angular/compiler-cli": "9.0.0",
"@angular/core": "9.0.0",
"@angular/platform-browser": "9.0.0",
"@angular/platform-browser-dynamic": "9.0.0",
"@angular/platform-server": "9.0.0",
"@angular/router": "9.0.0",
"@angular/common": "^10.0.0",
"@angular/compiler": "^10.0.0",
"@angular/compiler-cli": "^10.0.0",
"@angular/core": "^10.0.0",
"@angular/platform-browser": "^10.0.0",
"@angular/platform-browser-dynamic": "^10.0.0",
"@angular/platform-server": "^10.0.0",
"@angular/router": "^10.0.0",
"@ngtools/webpack": "0.0.0",
"core-js": "^3.0.0",
"rxjs": "^6.4.0",
Expand All @@ -20,7 +20,7 @@
"performance-now": "^0.2.0",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.0",
"typescript": "~3.6.4",
"typescript": "~4.0.2",
"webpack": "~4.0.1",
"webpack-cli": "~2.0.9"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/tests/build/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function () {

await silentNpm('install');
} else {
await silentNpm('install', '@angular/material-moment-adapter');
await silentNpm('install', '@angular/material-moment-adapter@10');
}

await silentNpm('install', 'moment');
Expand Down
35 changes: 19 additions & 16 deletions tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ import { expectFileToExist, readFile, rimraf } from '../../../utils/fs';
import { ng, npm } from '../../../utils/process';

export default async function () {
// forcibly remove in case another test doesn't clean itself up
await rimraf('node_modules/@angular/pwa');
// forcibly remove in case another test doesn't clean itself up
await rimraf('node_modules/@angular/pwa');

// set yarn as package manager
await ng('config', 'cli.packageManager', 'yarn');
await ng('add', '@angular/pwa');
await expectFileToExist(join(process.cwd(), 'src/manifest.webmanifest'));
// set yarn as package manager
await ng('config', 'cli.packageManager', 'yarn');
await ng('add', '@angular/pwa', '--registry=http://localhost:4873');
await expectFileToExist(join(process.cwd(), 'src/manifest.webmanifest'));

// Angular PWA doesn't install as a dependency
const { dependencies, devDependencies } = JSON.parse(await readFile(join(process.cwd(), 'package.json')));
const hasPWADep = Object.keys({ ...dependencies, ...devDependencies })
.some(d => d === '@angular/pwa');
if (hasPWADep) {
throw new Error(`Expected 'package.json' not to contain a dependency on '@angular/pwa'.`);
}
// Angular PWA doesn't install as a dependency
const { dependencies, devDependencies } = JSON.parse(
await readFile(join(process.cwd(), 'package.json')),
);
const hasPWADep = Object.keys({ ...dependencies, ...devDependencies }).some(
(d) => d === '@angular/pwa',
);
if (hasPWADep) {
throw new Error(`Expected 'package.json' not to contain a dependency on '@angular/pwa'.`);
}

// 'yarn' will nuke the entire node_modules when it is triggered during the above tests.
await rimraf('node_modules');
await npm('install');
// 'yarn' will nuke the entire node_modules when it is triggered during the above tests.
await rimraf('node_modules');
await npm('install');
}