Skip to content

Commit

Permalink
fix(build): add missing webpack deps to node and web
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Apr 22, 2019
1 parent 1c07d05 commit e8ea4df
Show file tree
Hide file tree
Showing 11 changed files with 239 additions and 112 deletions.
21 changes: 19 additions & 2 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ export function newProject(): void {
if (!directoryExists('./tmp/proj_backup')) {
runNgNew('--collection=@nrwl/workspace --npmScope=proj', true);
copyMissingPackages();

writeFileSync(
'./tmp/proj/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tasks/node-package/executor.js',
`
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const rxjs_1 = require("rxjs");
function default_1(factoryOptions = {}) {
return (options) => {
return new rxjs_1.Observable(obs => {
obs.complete();
});
};
}
exports.default = default_1;`
);
runCLI('add @nrwl/jest');
runCLI('add @nrwl/cypress');
runCLI('add @nrwl/web');
Expand Down Expand Up @@ -87,14 +103,15 @@ export function copyMissingPackages(): void {
'@ngrx',
'@nrwl',
'angular',
'@angular/upgrade',
'@angular-devkit/build-ng-packagr',
'@angular',
'@angular-devkit',
'codelyzer',
'ngrx-store-freeze',
'npm-run-all',
'yargs',
'yargs-parser',

'ng-packagr',
'cypress',
'@types/jquery',
'jest',
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
"documentation": "./scripts/documentation/documentation.sh && yarn format && ./scripts/documentation/check-documentation.sh"
},
"devDependencies": {
"@angular-devkit/architect": "0.13.1",
"@angular-devkit/build-angular": "0.13.1",
"@angular-devkit/build-ng-packagr": "0.13.1",
"@angular-devkit/build-webpack": "0.13.1",
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@angular-devkit/architect": "0.13.8",
"@angular-devkit/build-angular": "0.13.8",
"@angular-devkit/build-ng-packagr": "0.13.8",
"@angular-devkit/build-webpack": "0.13.8",
"@angular-devkit/core": "7.3.8",
"@angular-devkit/schematics": "7.3.8",
"@angular/cli": "7.3.1",
"@angular/common": "^7.2.1",
"@angular/compiler": "^7.2.1",
"@angular/compiler-cli": "^7.2.1",
"@angular/core": "^7.2.1",
"@angular/platform-browser": "^7.2.1",
"@angular/platform-browser-dynamic": "^7.2.1",
"@angular/router": "^7.2.1",
"@angular/upgrade": "^7.2.1",
"@angular/common": "7.2.13",
"@angular/compiler": "7.2.13",
"@angular/compiler-cli": "7.2.13",
"@angular/core": "7.2.13",
"@angular/platform-browser": "7.2.13",
"@angular/platform-browser-dynamic": "7.2.13",
"@angular/router": "7.2.13",
"@angular/upgrade": "7.2.13",
"@nestjs/common": "5.5.0",
"@nestjs/core": "5.5.0",
"@nestjs/schematics": "5.11.2",
Expand Down Expand Up @@ -107,7 +107,7 @@
"tsickle": "^0.33.0",
"tslib": "^1.9.3",
"tslint": "5.11.0",
"typescript": "3.2.2",
"typescript": "3.2.4",
"viz.js": "^1.8.1",
"webpack": "4.29.0",
"webpack-dev-server": "3.1.14",
Expand Down
2 changes: 0 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"@nrwl/workspace": "*"
},
"dependencies": {
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@schematics/angular": "~7.3.1",
"@nrwl/cypress": "*",
"@nrwl/jest": "*"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import * as path from 'path';
import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createApp, createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing';
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const nxVersion = '*';
export const angularVersion = '^7.0.0';
export const angularDevkitVersion = '0.13.1';
export const angularDevkitVersion = '^0.13.8';
export const angularJsVersion = '1.6.6';
export const ngrxVersion = '7.2.0';
export const ngrxStoreFreezeVersion = '0.2.4';
Expand Down
12 changes: 11 additions & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
"@nrwl/workspace": "*"
},
"dependencies": {
"@nrwl/jest": "*"
"@nrwl/jest": "*",
"@angular-devkit/build-webpack": "~0.13.1",
"copy-webpack-plugin": "4.6.0",
"fork-ts-checker-webpack-plugin": "0.4.9",
"identity-obj-proxy": "3.0.0",
"license-webpack-plugin": "^1.4.0",
"source-map-support": "0.5.11",
"ts-loader": "5.3.1",
"webpack": "4.29.0",
"webpack-dev-server": "3.1.14",
"webpack-node-externals": "1.7.2"
}
}
12 changes: 11 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
},
"dependencies": {
"@nrwl/cypress": "*",
"@nrwl/jest": "*"
"@nrwl/jest": "*",
"@angular-devkit/build-webpack": "~0.13.1",
"copy-webpack-plugin": "4.6.0",
"fork-ts-checker-webpack-plugin": "0.4.9",
"identity-obj-proxy": "3.0.0",
"license-webpack-plugin": "^1.4.0",
"source-map-support": "0.5.11",
"ts-loader": "5.3.1",
"webpack": "4.29.0",
"webpack-dev-server": "3.1.14",
"webpack-node-externals": "1.7.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@
"dependencies": {},
"devDependencies": {
"@nrwl/workspace": "<%= nxVersion %>",
"@angular/cli": "<%= angularCliVersion %>",
"@types/node": "~8.9.4",
"dotenv": "6.2.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "<%= typescriptVersion %>",
"prettier": "<%= prettierVersion %>"
"prettier": "<%= prettierVersion %>" <% if(!nxCli) { %>
, "@angular/cli": "<%= angularCliVersion %>",
"@angular/core": "<%= angularVersion %>",
"@angular/compiler": "<%= angularVersion %>",
"@angular/compiler-cli": "<%= angularVersion %>"
<% } %>
}
}
8 changes: 6 additions & 2 deletions packages/workspace/src/schematics/workspace/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
angularCliVersion,
prettierVersion,
typescriptVersion,
nxVersion
nxVersion,
angularVersion
} from '../../utils/versions';

export const DEFAULT_NRWL_PRETTIER_CONFIG = {
Expand All @@ -34,11 +35,14 @@ export default function(options: Schema): Rule {
utils: strings,
dot: '.',
tmpl: '',
nxCli: false,
typescriptVersion,
prettierVersion,
// angular cli and angular version are used only when workspace schematics is added to angular cli
angularCliVersion,
nxVersion,
angularVersion,
...(options as object),
nxVersion,
npmScope,
defaultNrwlPrettierConfig: JSON.stringify(
DEFAULT_NRWL_PRETTIER_CONFIG,
Expand Down
3 changes: 2 additions & 1 deletion packages/workspace/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const nxVersion = '*';

export const angularCliVersion = '7.3.1';
export const typescriptVersion = '3.2.2';
export const typescriptVersion = '~3.2.2';
export const prettierVersion = '1.16.4';
export const jasmineMarblesVersion = '^0.4.0';
export const angularVersion = '^7.0.0';
Loading

0 comments on commit e8ea4df

Please sign in to comment.