Skip to content

Commit

Permalink
cleanup(core): export setDefaultCollection from @nrwl/workspace (#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinshoemaker authored May 9, 2020
1 parent 515cc37 commit 0a70e46
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/angular/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
addDepsToPackageJson,
formatFiles,
readJsonInTree,
setDefaultCollection,
updateJsonInTree,
updateWorkspace,
} from '@nrwl/workspace';
Expand All @@ -22,7 +23,6 @@ import {
import { Schema } from './schema';
import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
import { stripIndents } from '@angular-devkit/core/src/utils/literals';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

const updateDependencies = addDepsToPackageJson(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/express/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { chain, noop, Rule } from '@angular-devkit/schematics';
import {
addPackageWithInit,
formatFiles,
setDefaultCollection,
updateJsonInTree,
} from '@nrwl/workspace';
import {
Expand All @@ -10,7 +11,6 @@ import {
nxVersion,
} from '../../utils/versions';
import { Schema } from './schema';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

function updateDependencies(): Rule {
return updateJsonInTree('package.json', (json) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/nest/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
addDepsToPackageJson,
addPackageWithInit,
formatFiles,
setDefaultCollection,
updateJsonInTree,
} from '@nrwl/workspace';
import { Schema } from './schema';
Expand All @@ -12,7 +13,6 @@ import {
nxVersion,
reflectMetadataVersion,
} from '../../utils/versions';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

export const updateDependencies = addDepsToPackageJson(
{
Expand Down
7 changes: 5 additions & 2 deletions packages/next/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { chain, noop } from '@angular-devkit/schematics';
import { addDepsToPackageJson, addPackageWithInit } from '@nrwl/workspace';
import {
addDepsToPackageJson,
addPackageWithInit,
setDefaultCollection,
} from '@nrwl/workspace';
import { nextVersion } from '../../utils/versions';
import { Schema } from './schema';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';
import {
reactDomVersion,
reactVersion,
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { chain, noop, Rule } from '@angular-devkit/schematics';
import {
addPackageWithInit,
formatFiles,
setDefaultCollection,
updateJsonInTree,
} from '@nrwl/workspace';
import { nxVersion } from '../../utils/versions';
import { Schema } from './schema';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

function updateDependencies(): Rule {
return updateJsonInTree('package.json', (json) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { chain, noop, Rule } from '@angular-devkit/schematics';
import {
addPackageWithInit,
setDefaultCollection,
updateJsonInTree,
updateWorkspace,
} from '@nrwl/workspace';
Expand All @@ -14,7 +15,6 @@ import {
typesReactVersion,
} from '../../utils/versions';
import { JsonObject } from '@angular-devkit/core';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

export function updateDependencies(): Rule {
return updateJsonInTree('package.json', (json) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { chain, noop, Rule } from '@angular-devkit/schematics';
import {
addPackageWithInit,
formatFiles,
setDefaultCollection,
updateJsonInTree,
} from '@nrwl/workspace';
import { Schema } from './schema';
import {
documentRegisterElementVersion,
nxVersion,
} from '../../utils/versions';
import { setDefaultCollection } from '@nrwl/workspace/src/utils/rules/workspace';

function updateDependencies(): Rule {
return updateJsonInTree('package.json', (json) => {
Expand Down
1 change: 1 addition & 0 deletions packages/workspace/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export { formatFiles } from './src/utils/rules/format-files';
export { deleteFile } from './src/utils/rules/deleteFile';
export * from './src/utils/rules/ng-add';
export { updateKarmaConf } from './src/utils/rules/update-karma-conf';
export { setDefaultCollection } from './src/utils/rules/workspace';
import * as strings from './src/utils/strings';
export { checkAndCleanWithSemver } from './src/utils/version-utils';
export { updatePackagesInPackageJson } from './src/utils/update-packages-in-package-json';
Expand Down

0 comments on commit 0a70e46

Please sign in to comment.