Skip to content

Commit

Permalink
fix(schematics): set versions consistent with cli 6.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored and vsavkin committed Aug 4, 2018
1 parent 8334c20 commit b5550d3
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 111 deletions.
1 change: 0 additions & 1 deletion e2e/schematics/ng-add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ describe('Nrwl Convert to Nx Workspace', () => {
expect(
updatedPackageJson.devDependencies['@ngrx/store-devtools']
).toBeDefined();
expect(updatedPackageJson.dependencies['rxjs-compat']).toBeDefined();
expect(updatedPackageJson.devDependencies['@angular/cli']).toBeDefined();

const nxJson = readJson('nx.json');
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"checkformat": "prettier \"{packages,e2e}/**/*.ts\" --list-different"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.7.1",
"@angular-devkit/core": "^0.7.1",
"@angular-devkit/schematics": "^0.7.1",
"@angular/cli": "6.1.1",
"@angular-devkit/build-angular": "^0.7.2",
"@angular-devkit/core": "^0.7.2",
"@angular-devkit/schematics": "^0.7.2",
"@angular/cli": "6.1.2",
"@angular/common": "6.1.0",
"@angular/compiler": "6.1.0",
"@angular/compiler-cli": "6.1.0",
Expand All @@ -34,7 +34,7 @@
"@ngrx/schematics": "6.0.1",
"@ngrx/store": "6.0.1",
"@ngrx/store-devtools": "6.0.1",
"@schematics/angular": "^0.7.1",
"@schematics/angular": "^0.7.2",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
Expand Down Expand Up @@ -62,8 +62,7 @@
"precise-commits": "1.0.2",
"prettier": "1.10.2",
"release-it": "^7.4.0",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"rxjs": "^6.2.2",
"semver": "5.4.1",
"strip-json-comments": "2.0.1",
"tmp": "0.0.33",
Expand Down
33 changes: 15 additions & 18 deletions packages/schematics/migrations/update-6-2-0/update-6-2-0.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Tree, callRule } from '@angular-devkit/schematics';
import { Tree } from '@angular-devkit/schematics';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import { serializeJson } from '../../src/utils/fileutils';

import * as update from './update-6-2-0';
import * as path from 'path';

describe('Update 6.2.0', () => {
Expand All @@ -25,7 +24,6 @@ describe('Update 6.2.0', () => {
'@angular/router': '6.0.1',
'core-js': '^2.5.4',
rxjs: '6.0.0',
'rxjs-compat': '6.0.0',
'zone.js': '^0.8.26',
'@nrwl/nx': '6.1.0',
'@ngrx/effects': '5.2.0',
Expand Down Expand Up @@ -88,35 +86,34 @@ describe('Update 6.2.0', () => {
'affected:libs': './node_modules/.bin/nx affected:libs'
},
dependencies: {
'@angular/animations': '6.1.0',
'@angular/common': '6.1.0',
'@angular/compiler': '6.1.0',
'@angular/core': '6.1.0',
'@angular/forms': '6.1.0',
'@angular/platform-browser': '6.1.0',
'@angular/platform-browser-dynamic': '6.1.0',
'@angular/router': '6.1.0',
'@angular/animations': '^6.1.0',
'@angular/common': '^6.1.0',
'@angular/compiler': '^6.1.0',
'@angular/core': '^6.1.0',
'@angular/forms': '^6.1.0',
'@angular/platform-browser': '^6.1.0',
'@angular/platform-browser-dynamic': '^6.1.0',
'@angular/router': '^6.1.0',
'core-js': '^2.5.4',
rxjs: '6.2.2',
'rxjs-compat': '6.0.0',
'zone.js': '^0.8.26',
'@nrwl/nx': '6.1.0',
'@ngrx/effects': '6.0.1',
'@ngrx/store': '6.0.1',
'@ngrx/router-store': '6.0.1'
},
devDependencies: {
'@angular/cli': '6.1.1',
'@angular/compiler-cli': '6.1.0',
'@angular/language-service': '6.1.0',
'@angular-devkit/build-angular': '~0.7.1',
'@angular/cli': '6.1.2',
'@angular/compiler-cli': '^6.1.0',
'@angular/language-service': '^6.1.0',
'@angular-devkit/build-angular': '~0.7.0',
'@ngrx/store-devtools': '6.0.1',
'@nrwl/schematics': '6.1.0',
'jasmine-marbles': '0.3.1',
'@types/jasmine': '~2.8.6',
'@types/jasminewd2': '~2.0.3',
'@types/node': '~8.9.4',
codelyzer: '~4.4.2',
codelyzer: '~4.2.1',
'jasmine-core': '~2.99.1',
'jasmine-spec-reporter': '~4.2.1',
karma: '~2.0.0',
Expand All @@ -128,7 +125,7 @@ describe('Update 6.2.0', () => {
protractor: '~5.3.0',
'ts-node': '~5.0.1',
tslint: '~5.9.1',
typescript: '2.7.2',
typescript: '~2.7.2',
prettier: '1.10.2'
}
});
Expand Down
12 changes: 6 additions & 6 deletions packages/schematics/migrations/update-6-2-0/update-6-2-0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function updateDependencies() {
'@angular/platform-server',
'@angular/router'
],
'6.1.0',
'^6.1.0',
false
),
setDependencyVersionIfExisting(['rxjs'], '6.2.2', false),
Expand All @@ -81,20 +81,20 @@ function updateDependencies() {
'6.0.1',
false
),
setDependencyVersionIfExisting(['@angular/cli'], '6.1.1', true),
setDependencyVersionIfExisting(['codelyzer'], '~4.4.2', true),
setDependencyVersionIfExisting(['@angular/cli'], '6.1.2', true),
setDependencyVersionIfExisting(
['@angular/compiler-cli', '@angular/language-service'],
'6.1.0',
'^6.1.0',
true
),
setDependencyVersionIfExisting(
['@angular-devkit/build-angular'],
'~0.7.1',
'~0.7.0',
true
),
setDependencyVersionIfExisting(['ngrx-store-freeze'], '0.2.4', true),
setDependencyVersionIfExisting(['@ngrx/store-devtools'], '6.0.1', true)
setDependencyVersionIfExisting(['@ngrx/store-devtools'], '6.0.1', true),
setDependencyVersionIfExisting(['typescript'], '~2.7.2', true)
]);
}

Expand Down
9 changes: 2 additions & 7 deletions packages/schematics/src/collection/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ import {
ngrxVersion,
nxVersion,
prettierVersion,
routerStoreVersion,
schematicsVersion,
jasmineMarblesVersion,
rxjsVersion
jasmineMarblesVersion
} from '../../lib-versions';
import * as fs from 'fs';
import * as ts from 'typescript';
Expand Down Expand Up @@ -84,7 +82,7 @@ function updatePackageJson() {
packageJson.dependencies['@ngrx/store'] = ngrxVersion;
}
if (!packageJson.dependencies['@ngrx/router-store']) {
packageJson.dependencies['@ngrx/router-store'] = routerStoreVersion;
packageJson.dependencies['@ngrx/router-store'] = ngrxVersion;
}
if (!packageJson.dependencies['@ngrx/effects']) {
packageJson.dependencies['@ngrx/effects'] = ngrxVersion;
Expand All @@ -95,9 +93,6 @@ function updatePackageJson() {
if (!packageJson.devDependencies['ngrx-store-freeze']) {
packageJson.devDependencies['ngrx-store-freeze'] = ngrxStoreFreezeVersion;
}
if (!packageJson.dependencies['rxjs-compat']) {
packageJson.dependencies['rxjs-compat'] = rxjsVersion;
}
if (!packageJson.devDependencies['@nrwl/schematics']) {
packageJson.devDependencies['@nrwl/schematics'] = schematicsVersion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
"@angular/router": "<%= angularVersion %>",
"core-js": "^2.5.4",
"rxjs": "<%= rxjsVersion %>",
"rxjs-compat": "<%= rxjsVersion %>",
"zone.js": "^0.8.26",
"@nrwl/nx": "<%= nxVersion %>",
"@ngrx/effects": "<%= ngrxVersion %>",
"@ngrx/router-store": "<%= routerStoreVersion %>",
"@ngrx/router-store": "<%= ngrxVersion %>",
"@ngrx/store": "<%= ngrxVersion %>"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Rule } from '@angular-devkit/schematics';
import {
ngrxVersion,
routerStoreVersion,
ngrxStoreFreezeVersion
} from '../../../lib-versions';
import { ngrxVersion, ngrxStoreFreezeVersion } from '../../../lib-versions';
import { updateJsonInTree } from '@nrwl/schematics/src/utils/ast-utils';

export function addNgRxToPackageJson(): Rule {
Expand All @@ -28,7 +24,7 @@ export function addNgRxToPackageJson(): Rule {
packageJson['devDependencies']['@ngrx/store-devtools'] = ngrxVersion;
}
if (!packageJson['dependencies']['@ngrx/router-store']) {
packageJson['dependencies']['@ngrx/router-store'] = routerStoreVersion;
packageJson['dependencies']['@ngrx/router-store'] = ngrxVersion;
}
if (!packageJson['devDependencies']['ngrx-store-freeze']) {
packageJson['devDependencies'][
Expand Down
12 changes: 4 additions & 8 deletions packages/schematics/src/lib-versions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export const angularCliVersion = '6.1.1';
export const angularVersion = '6.1.0';
export const angularCliVersion = '~6.1.2';
export const angularVersion = '^6.1.0';
export const angularJsVersion = '1.6.6';
export const ngrxVersion = '6.0.1';
export const routerStoreVersion = '6.0.1';
export const ngrxStoreFreezeVersion = '0.2.4';
export const nxVersion = '*';
export const schematicsVersion = '*';
Expand All @@ -11,9 +10,8 @@ export const angularCliSchema =
export const latestMigration = '20180507-create-nx-json';
export const prettierVersion = '1.13.7';
export const typescriptVersion = '2.7.2';
export const rxjsVersion = '6.0.0';
export const rxjsVersion = '^6.0.0';
export const jasmineMarblesVersion = '0.3.1';
export const ngrxSchematicsVersion = '6.0.1';

export const libVersions = {
angularVersion,
Expand All @@ -28,7 +26,5 @@ export const libVersions = {
latestMigration,
typescriptVersion,
rxjsVersion,
jasmineMarblesVersion,
ngrxSchematicsVersion,
routerStoreVersion
jasmineMarblesVersion
};
Loading

0 comments on commit b5550d3

Please sign in to comment.