refactor(nx): extract workspace creation into @nrwl/workspace

This commit is contained in:
Victor Savkin 2019-04-20 11:35:59 -04:00
parent ca57cf29d8
commit b5f1966ca5
259 changed files with 1291 additions and 1712 deletions

View File

@ -3,7 +3,11 @@ tmp
/build /build
node_modules node_modules
/package.json /package.json
packages/schematics/src/collection/**/files/**/*.json packages/workspace/src/schematics/**/files/**/*.json
packages/web/src/schematics/**/files/**/*.json
packages/node/src/schematics/**/files/**/*.json
packages/express/src/schematics/**/files/**/*.json
packages/nest/src/schematics/**/files/**/*.json
packages/react/src/schematics/**/files/**/*.json packages/react/src/schematics/**/files/**/*.json
packages/jest/src/schematics/**/files/**/*.json packages/jest/src/schematics/**/files/**/*.json
/.vscode /.vscode

View File

@ -10,7 +10,7 @@ import {
} from '../utils'; } from '../utils';
describe('Affected', () => { describe('Affected', () => {
it('should print, build, and test affected apps', () => { fit('should print, build, and test affected apps', () => {
ensureProject(); ensureProject();
const myapp = uniq('myapp'); const myapp = uniq('myapp');
const myapp2 = uniq('myapp2'); const myapp2 = uniq('myapp2');

View File

@ -1,4 +1,10 @@
import { ensureProject, runCLI, uniq, updateFile } from '../utils'; import {
ensureProject,
patchKarmaToWorkOnWSL,
runCLI,
uniq,
updateFile
} from '../utils';
describe('DowngradeModule', () => { describe('DowngradeModule', () => {
it('should generate a downgradeModule setup', async () => { it('should generate a downgradeModule setup', async () => {
@ -6,6 +12,7 @@ describe('DowngradeModule', () => {
const myapp = uniq('myapp'); const myapp = uniq('myapp');
runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner=karma`); runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner=karma`);
patchKarmaToWorkOnWSL();
updateFile( updateFile(
`apps/${myapp}/src/legacy.js`, `apps/${myapp}/src/legacy.js`,

View File

@ -9,10 +9,10 @@ describe('Jest', () => {
runCLI(`generate @nrwl/angular:lib ${mylib} --unit-test-runner jest`); runCLI(`generate @nrwl/angular:lib ${mylib} --unit-test-runner jest`);
await Promise.all([ await Promise.all([
runCLIAsync(`generate service test --project ${myapp}`), runCLIAsync(`generate @nrwl/angular:service test --project ${myapp}`),
runCLIAsync(`generate component test --project ${myapp}`), runCLIAsync(`generate @nrwl/angular:component test --project ${myapp}`),
runCLIAsync(`generate service test --project ${mylib}`), runCLIAsync(`generate @nrwl/angular:service test --project ${mylib}`),
runCLIAsync(`generate component test --project ${mylib}`) runCLIAsync(`generate @nrwl/angular:component test --project ${mylib}`)
]); ]);
const appResult = await runCLIAsync(`test ${myapp}`); const appResult = await runCLIAsync(`test ${myapp}`);
expect(appResult.stderr).toContain('Test Suites: 3 passed, 3 total'); expect(appResult.stderr).toContain('Test Suites: 3 passed, 3 total');

View File

@ -1,14 +1,21 @@
import { runCLI, runCLIAsync, ensureProject, uniq } from '../utils'; import {
runCLI,
runCLIAsync,
ensureProject,
uniq,
patchKarmaToWorkOnWSL
} from '../utils';
describe('Karma', () => { describe('Karma', () => {
it('should be able to generate a testable library using karma', async done => { it('should be able to generate a testable library using karma', async done => {
ensureProject(); ensureProject();
const mylib = uniq('mylib'); const mylib = uniq('mylib');
runCLI(`generate @nrwl/angular:lib ${mylib} --unit-test-runner karma`); runCLI(`generate @nrwl/angular:lib ${mylib} --unit-test-runner karma`);
patchKarmaToWorkOnWSL();
await Promise.all([ await Promise.all([
runCLIAsync(`generate service test --project ${mylib}`), runCLIAsync(`generate @nrwl/angular:service test --project ${mylib}`),
runCLIAsync(`generate component test --project ${mylib}`) runCLIAsync(`generate @nrwl/angular:component test --project ${mylib}`)
]); ]);
const karmaResult = await runCLIAsync(`test ${mylib}`); const karmaResult = await runCLIAsync(`test ${mylib}`);
expect(karmaResult.stdout).toContain('3 SUCCESS'); expect(karmaResult.stdout).toContain('3 SUCCESS');
@ -19,10 +26,11 @@ describe('Karma', () => {
ensureProject(); ensureProject();
const myapp = uniq('myapp'); const myapp = uniq('myapp');
runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner karma`); runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner karma`);
patchKarmaToWorkOnWSL();
await Promise.all([ await Promise.all([
runCLIAsync(`generate service test --project ${myapp}`), runCLIAsync(`generate @nrwl/angular:service test --project ${myapp}`),
runCLIAsync(`generate component test --project ${myapp}`) runCLIAsync(`generate @nrwl/angular:component test --project ${myapp}`)
]); ]);
const karmaResult = await runCLIAsync(`test ${myapp}`); const karmaResult = await runCLIAsync(`test ${myapp}`);
expect(karmaResult.stdout).toContain('5 SUCCESS'); expect(karmaResult.stdout).toContain('5 SUCCESS');

View File

@ -13,7 +13,7 @@ import {
} from '../utils'; } from '../utils';
if (!runsInWSL()) { if (!runsInWSL()) {
describe('Nrwl Convert to Nx Workspace', () => { xdescribe('Nrwl Convert to Nx Workspace', () => {
beforeEach(cleanup); beforeEach(cleanup);
afterAll(cleanup); afterAll(cleanup);
@ -25,7 +25,7 @@ if (!runsInWSL()) {
packageJson.description = 'some description'; packageJson.description = 'some description';
updateFile('package.json', JSON.stringify(packageJson, null, 2)); updateFile('package.json', JSON.stringify(packageJson, null, 2));
// confirm that @nrwl and @ngrx dependencies do not exist yet // confirm that @nrwl and @ngrx dependencies do not exist yet
expect(packageJson.devDependencies['@nrwl/schematics']).not.toBeDefined(); expect(packageJson.devDependencies['@nrwl/workspace']).not.toBeDefined();
expect(packageJson.dependencies['@nrwl/nx']).not.toBeDefined(); expect(packageJson.dependencies['@nrwl/nx']).not.toBeDefined();
expect(packageJson.dependencies['@ngrx/store']).not.toBeDefined(); expect(packageJson.dependencies['@ngrx/store']).not.toBeDefined();
expect(packageJson.dependencies['@ngrx/effects']).not.toBeDefined(); expect(packageJson.dependencies['@ngrx/effects']).not.toBeDefined();
@ -52,7 +52,7 @@ if (!runsInWSL()) {
updateFile('angular.json', JSON.stringify(angularCLIJson, null, 2)); updateFile('angular.json', JSON.stringify(angularCLIJson, null, 2));
// run the command // run the command
runCLI('add @nrwl/schematics --npmScope projscope'); runCLI('add @nrwl/workspace --npmScope projscope');
// check that prettier config exits and that files have been moved! // check that prettier config exits and that files have been moved!
checkFilesExist( checkFilesExist(
@ -90,14 +90,14 @@ if (!runsInWSL()) {
format: './node_modules/.bin/nx format:write', format: './node_modules/.bin/nx format:write',
'format:write': './node_modules/.bin/nx format:write', 'format:write': './node_modules/.bin/nx format:write',
'format:check': './node_modules/.bin/nx format:check', 'format:check': './node_modules/.bin/nx format:check',
update: 'ng update @nrwl/schematics', update: 'ng update @nrwl/workspace',
'update:check': 'ng update', 'update:check': 'ng update',
'dep-graph': './node_modules/.bin/nx dep-graph', 'dep-graph': './node_modules/.bin/nx dep-graph',
'workspace-schematic': './node_modules/.bin/nx workspace-schematic', 'workspace-schematic': './node_modules/.bin/nx workspace-schematic',
help: './node_modules/.bin/nx help' help: './node_modules/.bin/nx help'
}); });
expect( expect(
updatedPackageJson.devDependencies['@nrwl/schematics'] updatedPackageJson.devDependencies['@nrwl/workspace']
).toBeDefined(); ).toBeDefined();
expect(updatedPackageJson.devDependencies['@angular/cli']).toBeDefined(); expect(updatedPackageJson.devDependencies['@angular/cli']).toBeDefined();
@ -258,7 +258,7 @@ if (!runsInWSL()) {
// update package.json // update package.json
const existingPackageJson = readJson('package.json'); const existingPackageJson = readJson('package.json');
existingPackageJson.devDependencies[ existingPackageJson.devDependencies[
'@nrwl/schematics' '@nrwl/workspace'
] = schematicsVersion; ] = schematicsVersion;
existingPackageJson.dependencies['@nrwl/nx'] = nxVersion; existingPackageJson.dependencies['@nrwl/nx'] = nxVersion;
existingPackageJson.dependencies['@ngrx/store'] = ngrxVersion; existingPackageJson.dependencies['@ngrx/store'] = ngrxVersion;
@ -274,10 +274,10 @@ if (!runsInWSL()) {
}) })
); );
// run the command // run the command
runCLI('add @nrwl/schematics --npmScope projscope --skip-install'); runCLI('add @nrwl/workspace --npmScope projscope --skip-install');
// check that dependencies and devDependencies remained the same // check that dependencies and devDependencies remained the same
const packageJson = readJson('package.json'); const packageJson = readJson('package.json');
expect(packageJson.devDependencies['@nrwl/schematics']).toEqual( expect(packageJson.devDependencies['@nrwl/workspace']).toEqual(
schematicsVersion schematicsVersion
); );
expect(packageJson.dependencies['@nrwl/nx']).toEqual(nxVersion); expect(packageJson.dependencies['@nrwl/nx']).toEqual(nxVersion);
@ -306,8 +306,8 @@ if (!runsInWSL()) {
// Add Universal // Add Universal
runCLI('generate universal --client-project proj'); runCLI('generate universal --client-project proj');
// Add @nrwl/schematics // Add @nrwl/workspace
runCLI('add @nrwl/schematics --npmScope projscope'); runCLI('add @nrwl/workspace --npmScope projscope');
checkFilesExist('apps/proj/tsconfig.server.json'); checkFilesExist('apps/proj/tsconfig.server.json');
@ -366,7 +366,7 @@ if (!runsInWSL()) {
runCLI('add @ngrx/effects'); runCLI('add @ngrx/effects');
// Add Nx // Add Nx
runCLI('add @nrwl/schematics'); runCLI('add @nrwl/workspace');
}); });
it('should handle workspaces with no e2e project', async () => { it('should handle workspaces with no e2e project', async () => {
@ -379,9 +379,9 @@ if (!runsInWSL()) {
delete existingAngularJson.projects['proj-e2e']; delete existingAngularJson.projects['proj-e2e'];
updateFile('angular.json', JSON.stringify(existingAngularJson, null, 2)); updateFile('angular.json', JSON.stringify(existingAngularJson, null, 2));
// Add @nrwl/schematics // Add @nrwl/workspace
const result = await runCLIAsync( const result = await runCLIAsync(
'add @nrwl/schematics --npmScope projscope --skip-install' 'add @nrwl/workspace --npmScope projscope --skip-install'
); );
checkFilesExist( checkFilesExist(
@ -406,8 +406,8 @@ if (!runsInWSL()) {
].architect.lint.options.tsConfig = ['e2e/tsconfig.e2e.json']; ].architect.lint.options.tsConfig = ['e2e/tsconfig.e2e.json'];
updateFile('angular.json', JSON.stringify(existingAngularJson, null, 2)); updateFile('angular.json', JSON.stringify(existingAngularJson, null, 2));
// Add @nrwl/schematics // Add @nrwl/workspace
runCLI('add @nrwl/schematics --npmScope projscope --skip-install'); runCLI('add @nrwl/workspace --npmScope projscope --skip-install');
const updatedAngularCLIJson = readJson('angular.json'); const updatedAngularCLIJson = readJson('angular.json');
@ -429,7 +429,7 @@ if (!runsInWSL()) {
// Only remove e2e directory // Only remove e2e directory
runCommand('mv e2e e2e-bak'); runCommand('mv e2e e2e-bak');
try { try {
runCLI('add @nrwl/schematics --npmScope projscope --skip-install'); runCLI('add @nrwl/workspace --npmScope projscope --skip-install');
fail('Did not handle not having a e2e directory'); fail('Did not handle not having a e2e directory');
} catch (e) { } catch (e) {
expect(e.stderr.toString()).toContain( expect(e.stderr.toString()).toContain(
@ -443,7 +443,7 @@ if (!runsInWSL()) {
// Remove package.json // Remove package.json
runCommand('mv package.json package.json.bak'); runCommand('mv package.json package.json.bak');
try { try {
runCLI('add @nrwl/schematics --npmScope projscope --skip-install'); runCLI('add @nrwl/workspace --npmScope projscope --skip-install');
fail('Did not handle not having a package.json'); fail('Did not handle not having a package.json');
} catch (e) { } catch (e) {
expect(e.stderr.toString()).toContain( expect(e.stderr.toString()).toContain(
@ -457,7 +457,7 @@ if (!runsInWSL()) {
// Remove src // Remove src
runCommand('mv src src-bak'); runCommand('mv src src-bak');
try { try {
runCLI('add @nrwl/schematics --npmScope projscope --skip-install'); runCLI('add @nrwl/workspace --npmScope projscope --skip-install');
fail('Did not handle not having a src directory'); fail('Did not handle not having a src directory');
} catch (e) { } catch (e) {
expect(e.stderr.toString()).toContain('Path: src does not exist'); expect(e.stderr.toString()).toContain('Path: src does not exist');

View File

@ -9,7 +9,7 @@ import {
uniq, uniq,
updateFile updateFile
} from '../utils'; } from '../utils';
import { toClassName } from '@nrwl/schematics/src/utils/name-utils'; import { toClassName } from '@nrwl/workspace';
describe('Nrwl Workspace', () => { describe('Nrwl Workspace', () => {
beforeEach(() => { beforeEach(() => {

View File

@ -1,5 +1,4 @@
import { import {
newApp,
runCLI, runCLI,
expectTestsPass, expectTestsPass,
runCLIAsync, runCLIAsync,

View File

@ -87,7 +87,7 @@ describe('Node Applications', () => {
const config = readJson('angular.json'); const config = readJson('angular.json');
config.projects[nodeapp].architect.waitAndPrint = { config.projects[nodeapp].architect.waitAndPrint = {
builder: '@nrwl/builders:run-commands', builder: '@nrwl/workspace:run-commands',
options: { options: {
commands: [ commands: [
{ {

View File

@ -9,7 +9,7 @@ import {
renameFile, renameFile,
readJson readJson
} from '../utils'; } from '../utils';
import { serializeJson } from '@nrwl/schematics/src/utils/fileutils'; import { serializeJson } from '@nrwl/workspace';
describe('React Applications', () => { describe('React Applications', () => {
it('should be able to generate a react app + lib', async () => { it('should be able to generate a react app + lib', async () => {

View File

@ -1,10 +1,7 @@
import { import {
ensureProject, ensureProject,
expectTestsPass, patchKarmaToWorkOnWSL,
newApp,
newProject,
runCLI, runCLI,
runCLIAsync,
uniq, uniq,
updateFile updateFile
} from '../utils'; } from '../utils';
@ -14,6 +11,7 @@ describe('Upgrade', () => {
ensureProject(); ensureProject();
const myapp = uniq('myapp'); const myapp = uniq('myapp');
runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner=karma`); runCLI(`generate @nrwl/angular:app ${myapp} --unit-test-runner=karma`);
patchKarmaToWorkOnWSL();
updateFile( updateFile(
`apps/${myapp}/src/legacy.js`, `apps/${myapp}/src/legacy.js`,

View File

@ -11,7 +11,6 @@ describe('Web Components Applications', () => {
ensureProject(); ensureProject();
const appName = uniq('app'); const appName = uniq('app');
runCLI(`add @nrwl/web`);
runCLI(`generate @nrwl/web:app ${appName} --no-interactive`); runCLI(`generate @nrwl/web:app ${appName} --no-interactive`);
const lintResults = runCLI(`lint ${appName}`); const lintResults = runCLI(`lint ${appName}`);

View File

@ -10,20 +10,39 @@ export function uniq(prefix: string) {
} }
export function runNgNew(command?: string, silent?: boolean): string { export function runNgNew(command?: string, silent?: boolean): string {
const buffer = execSync( const gen = execSync(
`../node_modules/.bin/ng new proj --no-interactive ${command}`, `../node_modules/.bin/ng new proj --no-interactive --skip-install ${command}`,
{ {
cwd: `./tmp`, cwd: `./tmp`,
...(silent ? { stdio: ['ignore', 'ignore', 'ignore'] } : {}) ...(silent ? { stdio: ['ignore', 'ignore', 'ignore'] } : {})
} }
); );
return buffer ? buffer.toString() : null;
const p = readFileSync('./tmp/proj/package.json').toString();
const workspacePath = path.join(getCwd(), 'build', 'packages', 'workspace');
const angularPath = path.join(getCwd(), 'build', 'packages', 'angular');
writeFileSync(
'./tmp/proj/package.json',
p
.replace(
'"@nrwl/workspace": "*"',
`"@nrwl/workspace": "file:${workspacePath}"`
)
.replace('"@nrwl/angular": "*"', `"@nrwl/angular": "file:${angularPath}"`)
);
const install = execSync('yarn install', {
cwd: './tmp/proj',
...(silent ? { stdio: ['ignore', 'ignore', 'ignore'] } : {})
});
return silent
? null
: `${gen ? gen.toString() : ''}${install ? install.toString() : ''}`;
} }
export function newProject(): void { export function newProject(): void {
cleanup(); cleanup();
if (!directoryExists('./tmp/proj_backup')) { if (!directoryExists('./tmp/proj_backup')) {
runNgNew('--collection=@nrwl/schematics --npmScope=proj', true); runNgNew('--collection=@nrwl/workspace --npmScope=proj', true);
copyMissingPackages(); copyMissingPackages();
runCLI('add @nrwl/jest'); runCLI('add @nrwl/jest');
runCLI('add @nrwl/cypress'); runCLI('add @nrwl/cypress');
@ -195,18 +214,6 @@ export function expectTestsPass(v: { stdout: string; stderr: string }) {
expect(v.stderr).not.toContain('fail'); expect(v.stderr).not.toContain('fail');
} }
export function newApp(name: string): string {
const r = runCLI(`generate app --no-interactive ${name}`);
patchKarmaToWorkOnWSL();
return r;
}
export function newLib(name: string): string {
const r = runCLI(`generate lib --no-interactive ${name}`);
patchKarmaToWorkOnWSL();
return r;
}
export function runCommand(command: string): string { export function runCommand(command: string): string {
try { try {
return execSync(command, { return execSync(command, {

View File

@ -82,7 +82,7 @@
"jest": "^24.1.0", "jest": "^24.1.0",
"jest-jasmine2": "^24.1.0", "jest-jasmine2": "^24.1.0",
"jest-preset-angular": "7.0.0", "jest-preset-angular": "7.0.0",
"karma": "~2.0.0", "karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.1", "karma-jasmine": "~1.1.1",

View File

@ -28,7 +28,7 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*" "@nrwl/workspace": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/core": "~7.3.1", "@angular-devkit/core": "~7.3.1",

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import * as stripJsonComments from 'strip-json-comments'; import * as stripJsonComments from 'strip-json-comments';
import { readJsonInTree, updateJsonInTree, NxJson } from '@nrwl/schematics'; import { readJsonInTree, updateJsonInTree, NxJson } from '@nrwl/workspace';
import { runSchematic, callRule } from '../../utils/testing'; import { runSchematic, callRule } from '../../utils/testing';
describe('app', () => { describe('app', () => {
@ -303,7 +303,7 @@ describe('app', () => {
const angularJson = readJsonInTree(result, 'angular.json'); const angularJson = readJsonInTree(result, 'angular.json');
expect(angularJson.projects['my-app'].schematics).toEqual({ expect(angularJson.projects['my-app'].schematics).toEqual({
'@nrwl/schematics:component': { '@nrwl/workspace:component': {
style: 'scss' style: 'scss'
} }
}); });

View File

@ -15,23 +15,23 @@ import {
import { Schema } from './schema'; import { Schema } from './schema';
import * as ts from 'typescript'; import * as ts from 'typescript';
import { insertImport } from '@schematics/angular/utility/ast-utils'; import { insertImport } from '@schematics/angular/utility/ast-utils';
import { updateJsonInTree, readJsonInTree } from '@nrwl/schematics'; import { updateJsonInTree, readJsonInTree } from '@nrwl/workspace';
import { import {
addImportToModule, addImportToModule,
addImportToTestBed, addImportToTestBed,
getDecoratorPropertyValueNode, getDecoratorPropertyValueNode,
insert, insert,
replaceNodeValue replaceNodeValue
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName } from '@nrwl/workspace';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
import { import {
getNpmScope, getNpmScope,
getWorkspacePath, getWorkspacePath,
replaceAppNameWithPath, replaceAppNameWithPath,
angularSchematicNames angularSchematicNames
} from '@nrwl/schematics/src/utils/cli-config-utils'; } from '@nrwl/workspace';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
import { join, normalize } from '@angular-devkit/core'; import { join, normalize } from '@angular-devkit/core';
import { addE2eTestRunner, addUnitTestRunner } from '../ng-add/ng-add'; import { addE2eTestRunner, addUnitTestRunner } from '../ng-add/ng-add';
@ -213,7 +213,7 @@ function updateProject(options: NormalizedSchema): Rule {
angularSchematicNames.forEach(type => { angularSchematicNames.forEach(type => {
const schematic = `@schematics/angular:${type}`; const schematic = `@schematics/angular:${type}`;
if (schematic in fixedProject.schematics) { if (schematic in fixedProject.schematics) {
fixedProject.schematics[`@nrwl/schematics:${type}`] = fixedProject.schematics[`@nrwl/workspace:${type}`] =
fixedProject.schematics[schematic]; fixedProject.schematics[schematic];
delete fixedProject.schematics[schematic]; delete fixedProject.schematics[schematic];
} }

View File

@ -1,10 +1,10 @@
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import * as path from 'path'; import * as path from 'path';
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createApp, createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createApp, createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('downgrade-module', () => { describe('downgrade-module', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -5,9 +5,9 @@ import {
insert, insert,
readBootstrapInfo, readBootstrapInfo,
removeFromNgModule removeFromNgModule
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { Schema } from './schema'; import { Schema } from './schema';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
import { addUpgradeToPackageJson } from '../../utils/upgrade'; import { addUpgradeToPackageJson } from '../../utils/upgrade';
function updateMain(angularJsImport: string, options: Schema): Rule { function updateMain(angularJsImport: string, options: Schema): Rule {

View File

@ -1,7 +1,7 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { readJsonInTree } from '@nrwl/schematics/src/utils/ast-utils'; import { readJsonInTree } from '@nrwl/workspace';
describe('karmaProject', () => { describe('karmaProject', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -14,9 +14,9 @@ import {
readJsonInTree, readJsonInTree,
updateJsonInTree, updateJsonInTree,
offsetFromRoot offsetFromRoot
} from '@nrwl/schematics'; } from '@nrwl/workspace';
import { join, normalize } from '@angular-devkit/core'; import { join, normalize } from '@angular-devkit/core';
import { getProjectConfig } from '@nrwl/schematics/src/utils/ast-utils'; import { getProjectConfig } from '@nrwl/workspace';
export interface KarmaProjectSchema { export interface KarmaProjectSchema {
project: string; project: string;

View File

@ -1,6 +1,6 @@
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
describe('karma', () => { describe('karma', () => {

View File

@ -1,5 +1,5 @@
import { Tree, noop, chain, mergeWith, url } from '@angular-devkit/schematics'; import { Tree, noop, chain, mergeWith, url } from '@angular-devkit/schematics';
import { readJsonInTree, addDepsToPackageJson } from '@nrwl/schematics'; import { readJsonInTree, addDepsToPackageJson } from '@nrwl/workspace';
import { jasmineMarblesVersion } from '../../utils/versions'; import { jasmineMarblesVersion } from '../../utils/versions';
export default function() { export default function() {
@ -13,15 +13,15 @@ export default function() {
addDepsToPackageJson( addDepsToPackageJson(
{}, {},
{ {
karma: '~3.0.0', karma: '~4.0.0',
'karma-chrome-launcher': '~2.2.0', 'karma-chrome-launcher': '~2.2.0',
'karma-coverage-istanbul-reporter': '~2.0.1', 'karma-coverage-istanbul-reporter': '~2.0.1',
'karma-jasmine': '~1.1.0', 'karma-jasmine': '~1.1.2',
'karma-jasmine-html-reporter': '^0.2.2', 'karma-jasmine-html-reporter': '^0.2.2',
'jasmine-core': '~2.99.1', 'jasmine-core': '~2.99.1',
'jasmine-spec-reporter': '~4.2.1', 'jasmine-spec-reporter': '~4.2.1',
'jasmine-marbles': jasmineMarblesVersion, 'jasmine-marbles': jasmineMarblesVersion,
'@types/jasmine': '~2.8.6' '@types/jasmine': '~2.8.8'
} }
) )
]); ]);

View File

@ -1,9 +1,9 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createApp, createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createApp, createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import * as stripJsonComments from 'strip-json-comments'; import * as stripJsonComments from 'strip-json-comments';
import { NxJson, readJsonInTree } from '@nrwl/schematics'; import { NxJson, readJsonInTree } from '@nrwl/workspace';
import { UnitTestTree } from '@angular-devkit/schematics/testing'; import { UnitTestTree } from '@angular-devkit/schematics/testing';
describe('lib', () => { describe('lib', () => {
@ -721,7 +721,7 @@ describe('lib', () => {
const angularJson = readJsonInTree(result, 'angular.json'); const angularJson = readJsonInTree(result, 'angular.json');
expect(angularJson.projects['my-lib'].schematics).toEqual({ expect(angularJson.projects['my-lib'].schematics).toEqual({
'@nrwl/schematics:component': { '@nrwl/workspace:component': {
styleext: 'scss' styleext: 'scss'
} }
}); });

View File

@ -24,25 +24,21 @@ import {
updateJsonInTree, updateJsonInTree,
readJsonInTree, readJsonInTree,
offsetFromRoot offsetFromRoot
} from '@nrwl/schematics'; } from '@nrwl/workspace';
import { import {
addGlobal, addGlobal,
addImportToModule, addImportToModule,
addIncludeToTsConfig, addIncludeToTsConfig,
addRoute, addRoute,
insert insert
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { import { toClassName, toFileName, toPropertyName } from '@nrwl/workspace';
toClassName,
toFileName,
toPropertyName
} from '@nrwl/schematics/src/utils/name-utils';
import { import {
getNpmScope, getNpmScope,
getWorkspacePath, getWorkspacePath,
replaceAppNameWithPath replaceAppNameWithPath
} from '@nrwl/schematics/src/utils/cli-config-utils'; } from '@nrwl/workspace';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
import { addUnitTestRunner } from '../ng-add/ng-add'; import { addUnitTestRunner } from '../ng-add/ng-add';
interface NormalizedSchema extends Schema { interface NormalizedSchema extends Schema {
@ -329,7 +325,7 @@ function updateProject(options: NormalizedSchema): Rule {
if (options.style !== 'css') { if (options.style !== 'css') {
fixedProject.schematics = { fixedProject.schematics = {
...fixedProject.schematics, ...fixedProject.schematics,
'@nrwl/schematics:component': { '@nrwl/workspace:component': {
styleext: options.style styleext: options.style
} }
}; };

View File

@ -1,7 +1,7 @@
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('ng-add', () => { describe('ng-add', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -10,7 +10,7 @@ import {
readJsonInTree, readJsonInTree,
addDepsToPackageJson, addDepsToPackageJson,
updateJsonInTree updateJsonInTree
} from '@nrwl/schematics'; } from '@nrwl/workspace';
import { import {
angularVersion, angularVersion,
angularDevkitVersion, angularDevkitVersion,

View File

@ -47,7 +47,7 @@
}, },
"skipInstall": { "skipInstall": {
"type": "boolean", "type": "boolean",
"description": "Skip installing after adding @nrwl/schematics", "description": "Skip installing after adding @nrwl/workspace",
"default": false "default": false
} }
} }

View File

@ -1,20 +1,16 @@
import { UnitTestTree } from '@angular-devkit/schematics/testing'; import { UnitTestTree } from '@angular-devkit/schematics/testing';
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import { readJsonInTree } from '@nrwl/schematics/src/utils/ast-utils'; import { readJsonInTree } from '@nrwl/workspace';
import { findModuleParent } from '@nrwl/schematics/src/utils/name-utils'; import { findModuleParent } from '@nrwl/workspace';
import { import { AppConfig, getLibConfig, getAppConfig } from '@nrwl/workspace/testing';
AppConfig,
getLibConfig,
getAppConfig
} from '@nrwl/schematics/src/utils/testing-utils';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { import {
createApp, createApp,
createLib, createLib,
createEmptyWorkspace createEmptyWorkspace
} from '@nrwl/schematics/testing'; } from '@nrwl/workspace/testing';
describe('ngrx', () => { describe('ngrx', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -15,7 +15,7 @@ import {
import { Schema } from './schema'; import { Schema } from './schema';
import * as path from 'path'; import * as path from 'path';
import { names, toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { names, toFileName } from '@nrwl/workspace';
import { import {
addImportsToModule, addImportsToModule,
@ -23,7 +23,7 @@ import {
addExportsToBarrel, addExportsToBarrel,
RequestContext RequestContext
} from './rules'; } from './rules';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
/** /**

View File

@ -2,8 +2,8 @@ import * as ts from 'typescript';
import * as path from 'path'; import * as path from 'path';
import { Rule, Tree } from '@angular-devkit/schematics'; import { Rule, Tree } from '@angular-devkit/schematics';
import { names } from '@nrwl/schematics/src/utils/name-utils'; import { names } from '@nrwl/workspace';
import { insert, addGlobal } from '@nrwl/schematics/src/utils/ast-utils'; import { insert, addGlobal } from '@nrwl/workspace';
import { Schema } from '../schema'; import { Schema } from '../schema';
/** /**

View File

@ -2,16 +2,12 @@ import { Rule, Tree } from '@angular-devkit/schematics';
import { Change } from '@schematics/angular/utility/change'; import { Change } from '@schematics/angular/utility/change';
import { insertImport } from '@schematics/angular/utility/ast-utils'; import { insertImport } from '@schematics/angular/utility/ast-utils';
import * as ts from 'typescript'; import * as ts from 'typescript';
import { import { toClassName, toFileName, toPropertyName } from '@nrwl/workspace';
toClassName,
toFileName,
toPropertyName
} from '@nrwl/schematics/src/utils/name-utils';
import { import {
insert, insert,
addImportToModule, addImportToModule,
addProviderToModule addProviderToModule
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { RequestContext } from './request-context'; import { RequestContext } from './request-context';
export function addImportsToModule(context: RequestContext): Rule { export function addImportsToModule(context: RequestContext): Rule {

View File

@ -1,5 +1,5 @@
import { Rule } from '@angular-devkit/schematics'; import { Rule } from '@angular-devkit/schematics';
import { addDepsToPackageJson } from '@nrwl/schematics'; import { addDepsToPackageJson } from '@nrwl/workspace';
import { import {
ngrxVersion, ngrxVersion,
ngrxStoreFreezeVersion, ngrxStoreFreezeVersion,

View File

@ -2,7 +2,7 @@ import * as path from 'path';
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { Schema } from '../schema'; import { Schema } from '../schema';
import * as stringUtils from '@nrwl/schematics/src/utils/strings'; import { stringUtils } from '@nrwl/workspace';
/** /**
* Schematic request context * Schematic request context

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createApp, createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createApp, createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('upgrade-module', () => { describe('upgrade-module', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -12,11 +12,7 @@ import {
url url
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { import { names, toClassName, toFileName } from '@nrwl/workspace';
names,
toClassName,
toFileName
} from '@nrwl/schematics/src/utils/name-utils';
import * as path from 'path'; import * as path from 'path';
import { import {
addDeclarationToModule, addDeclarationToModule,
@ -28,11 +24,11 @@ import {
insert, insert,
readBootstrapInfo, readBootstrapInfo,
removeFromNgModule removeFromNgModule
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { insertImport } from '@schematics/angular/utility/ast-utils'; import { insertImport } from '@schematics/angular/utility/ast-utils';
import { Schema } from './schema'; import { Schema } from './schema';
import { addUpgradeToPackageJson } from '../../utils/upgrade'; import { addUpgradeToPackageJson } from '../../utils/upgrade';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
function addImportsToModule(options: Schema): Rule { function addImportsToModule(options: Schema): Rule {
return (host: Tree) => { return (host: Tree) => {

View File

@ -1,6 +1,6 @@
import { Rule } from '@angular-devkit/schematics'; import { Rule } from '@angular-devkit/schematics';
import { angularJsVersion } from './versions'; import { angularJsVersion } from './versions';
import { updateJsonInTree } from '@nrwl/schematics'; import { updateJsonInTree } from '@nrwl/workspace';
export function addUpgradeToPackageJson(): Rule { export function addUpgradeToPackageJson(): Rule {
return updateJsonInTree('package.json', packageJson => { return updateJsonInTree('package.json', packageJson => {

View File

@ -1,7 +0,0 @@
export { BuildBuilderOptions, OptimizationOptions } from './src/utils/types';
export { readTsConfig } from './src/utils/typescript';
export {
getBaseWebpackPartial,
OUT_FILENAME
} from './src/utils/webpack/config';
export { normalizeBuildOptions } from './src/utils/normalize';

View File

@ -1,7 +1,7 @@
{ {
"name": "@nrwl/builders", "name": "@nrwl/builders",
"version": "0.0.1", "version": "0.0.1",
"description": "Angular CLI power-ups for modern Web development: Builders", "description": "Deprecated package. Use @nrwl/workspace, @nrwl/web, @nrwl/node, @nrwl/jest, @nrwl/cypress instead.",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/nrwl/nx.git" "url": "git+https://github.com/nrwl/nx.git"

View File

@ -29,7 +29,7 @@ if (parsedArgs.help) {
const nxTool = { const nxTool = {
name: 'Schematics', name: 'Schematics',
packageName: '@nrwl/schematics' packageName: '@nrwl/workspace'
}; };
let useYarn = true; let useYarn = true;

View File

@ -30,13 +30,9 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*" "@nrwl/workspace": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/architect": "~0.13.1", "tree-kill": "1.2.1"
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"tree-kill": "1.2.1",
"rxjs": "6.3.3"
} }
} }

View File

@ -49,7 +49,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: cypressBuilderOptions options: cypressBuilderOptions
}) })
.subscribe(() => { .subscribe(() => {
@ -78,7 +78,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: cypressBuilderOptions options: cypressBuilderOptions
}) })
.subscribe(() => { .subscribe(() => {
@ -107,7 +107,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: Object.assign(cypressBuilderOptions, { headless: false }) options: Object.assign(cypressBuilderOptions, { headless: false })
}) })
.subscribe(() => { .subscribe(() => {
@ -135,7 +135,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: Object.assign(cypressBuilderOptions, { options: Object.assign(cypressBuilderOptions, {
baseUrl: 'http://my-distant-host.com' baseUrl: 'http://my-distant-host.com'
}) })
@ -164,7 +164,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: Object.assign(cypressBuilderOptions, { options: Object.assign(cypressBuilderOptions, {
browser: 'chrome' browser: 'chrome'
}) })
@ -193,7 +193,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: { options: {
cypressConfig: 'apps/my-app-e2e/cypress.json', cypressConfig: 'apps/my-app-e2e/cypress.json',
tsConfig: 'apps/my-app-e2e/tsconfig.json', tsConfig: 'apps/my-app-e2e/tsconfig.json',
@ -236,7 +236,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: { options: {
cypressConfig: 'apps/my-app-e2e/cypress.json', cypressConfig: 'apps/my-app-e2e/cypress.json',
tsConfig: 'apps/my-app-e2e/tsconfig.e2e.json', tsConfig: 'apps/my-app-e2e/tsconfig.e2e.json',
@ -278,7 +278,7 @@ describe('Cypress builder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:cypress', builder: 'CYPRESSBUILDER',
options: { options: {
cypressConfig: 'apps/my-app-e2e/cypress.json', cypressConfig: 'apps/my-app-e2e/cypress.json',
tsConfig: 'apps/my-app-e2e/tsconfig.e2e.json', tsConfig: 'apps/my-app-e2e/tsconfig.e2e.json',

View File

@ -46,7 +46,7 @@ try {
"projectType": "application", "projectType": "application",
"architect": { "architect": {
"e2e": { "e2e": {
"builder": "@nrwl/builders:cypress", "builder": "@nrwl/cypress:cypress",
"options": { "options": {
"cypressConfig": "apps/my-app-e2e/cypress.json", "cypressConfig": "apps/my-app-e2e/cypress.json",
"tsConfig": "apps/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-app-e2e/tsconfig.json",

View File

@ -1,7 +1,7 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { readJsonInTree } from '@nrwl/schematics/src/utils/ast-utils'; import { readJsonInTree } from '@nrwl/workspace';
describe('schematic:cypress-project', () => { describe('schematic:cypress-project', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -9,9 +9,9 @@ import {
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { join, normalize } from '@angular-devkit/core'; import { join, normalize } from '@angular-devkit/core';
// app // app
import { updateJsonInTree, NxJson } from '@nrwl/schematics'; import { updateJsonInTree, NxJson } from '@nrwl/workspace';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
import { toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName } from '@nrwl/workspace';
import { Schema } from './schema'; import { Schema } from './schema';
export interface CypressProjectSchema extends Schema { export interface CypressProjectSchema extends Schema {

View File

@ -1,7 +1,7 @@
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';

View File

@ -2,11 +2,8 @@ import { Rule, Tree, noop, chain } from '@angular-devkit/schematics';
import { Schema } from './schema'; import { Schema } from './schema';
import { cypressVersion, nxVersion } from '../../utils/versions'; import { cypressVersion, nxVersion } from '../../utils/versions';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
import { import { addDepsToPackageJson, updateJsonInTree } from '@nrwl/workspace';
addDepsToPackageJson,
updateJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils';
function checkDependenciesInstalled(): Rule { function checkDependenciesInstalled(): Rule {
return (host: Tree): Rule => { return (host: Tree): Rule => {

View File

@ -30,12 +30,9 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*", "@nrwl/workspace": "*"
"@nrwl/builders": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@nrwl/node": "*", "@nrwl/node": "*",
"@nrwl/jest": "*" "@nrwl/jest": "*"
} }

View File

@ -1,7 +1,7 @@
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('app', () => { describe('app', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -12,8 +12,8 @@ import {
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { join, normalize, Path } from '@angular-devkit/core'; import { join, normalize, Path } from '@angular-devkit/core';
import { Schema } from './schema'; import { Schema } from './schema';
import { updateJsonInTree } from '@nrwl/schematics'; import { updateJsonInTree } from '@nrwl/workspace';
import { toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName } from '@nrwl/workspace';
interface NormalizedSchema extends Schema { interface NormalizedSchema extends Schema {
appProjectRoot: Path; appProjectRoot: Path;

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import { join } from 'path'; import { join } from 'path';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('ng-add', () => { describe('ng-add', () => {
let tree: Tree; let tree: Tree;

View File

@ -1,8 +1,5 @@
import { Rule, chain, externalSchematic } from '@angular-devkit/schematics'; import { Rule, chain, externalSchematic } from '@angular-devkit/schematics';
import { import { addDepsToPackageJson, updateJsonInTree } from '@nrwl/workspace';
addDepsToPackageJson,
updateJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils';
import { import {
expressTypingsVersion, expressTypingsVersion,
expressVersion, expressVersion,

View File

@ -30,12 +30,6 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*" "@nrwl/workspace": "*"
},
"dependencies": {
"@angular-devkit/architect": "~0.13.1",
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"rxjs": "6.3.3"
} }
} }

View File

@ -170,7 +170,7 @@ describe('Jest Builder', () => {
builder builder
.run({ .run({
root, root,
builder: '@nrwl/builders:jest', builder: 'JEST_BUILDER',
projectType: 'application', projectType: 'application',
options: { options: {
jestConfig: './jest.config.js', jestConfig: './jest.config.js',

View File

@ -1,6 +1,6 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { readJsonInTree, updateJsonInTree } from '@nrwl/schematics'; import { readJsonInTree, updateJsonInTree } from '@nrwl/workspace';
import { runSchematic, callRule } from '../../utils/testing'; import { runSchematic, callRule } from '../../utils/testing';
describe('jestProject', () => { describe('jestProject', () => {

View File

@ -11,12 +11,9 @@ import {
noop, noop,
filter filter
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { readJsonInTree, updateJsonInTree } from '@nrwl/schematics'; import { readJsonInTree, updateJsonInTree } from '@nrwl/workspace';
import { import { getProjectConfig, addDepsToPackageJson } from '@nrwl/workspace';
getProjectConfig, import { offsetFromRoot } from '@nrwl/workspace';
addDepsToPackageJson
} from '@nrwl/schematics/src/utils/ast-utils';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common';
import { join, normalize } from '@angular-devkit/core'; import { join, normalize } from '@angular-devkit/core';
export interface JestProjectSchema { export interface JestProjectSchema {

View File

@ -1,6 +1,6 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { readJsonInTree } from '@nrwl/schematics/src/utils/ast-utils'; import { readJsonInTree } from '@nrwl/workspace';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
describe('jest', () => { describe('jest', () => {

View File

@ -1,8 +1,5 @@
import { mergeWith, chain, url } from '@angular-devkit/schematics'; import { mergeWith, chain, url } from '@angular-devkit/schematics';
import { import { addDepsToPackageJson, updateJsonInTree } from '@nrwl/workspace';
addDepsToPackageJson,
updateJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils';
import { import {
jestVersion, jestVersion,
jestTypesVersion, jestTypesVersion,

View File

@ -29,12 +29,9 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*", "@nrwl/workspace": "*"
"@nrwl/builders": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@nrwl/node": "*", "@nrwl/node": "*",
"@nrwl/jest": "*" "@nrwl/jest": "*"
} }

View File

@ -1,5 +1,5 @@
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
describe('app', () => { describe('app', () => {

View File

@ -12,7 +12,7 @@ import {
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { join, normalize, Path } from '@angular-devkit/core'; import { join, normalize, Path } from '@angular-devkit/core';
import { Schema } from './schema'; import { Schema } from './schema';
import { toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName } from '@nrwl/workspace';
interface NormalizedSchema extends Schema { interface NormalizedSchema extends Schema {
appProjectRoot: Path; appProjectRoot: Path;

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import { join } from 'path'; import { join } from 'path';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('ng-add', () => { describe('ng-add', () => {
let tree: Tree; let tree: Tree;

View File

@ -1,8 +1,5 @@
import { Rule, chain, externalSchematic } from '@angular-devkit/schematics'; import { Rule, chain, externalSchematic } from '@angular-devkit/schematics';
import { import { addDepsToPackageJson, updateJsonInTree } from '@nrwl/workspace';
addDepsToPackageJson,
updateJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils';
import { import {
nestJsSchematicsVersion, nestJsSchematicsVersion,
nestJsVersion, nestJsVersion,

View File

@ -29,12 +29,9 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*", "@nrwl/workspace": "*"
"@nrwl/builders": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@nrwl/jest": "*" "@nrwl/jest": "*"
} }
} }

View File

@ -58,7 +58,7 @@ describe('NodeBuildBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-build', builder: '@nrwl/node:build',
options: testOptions options: testOptions
}); });
@ -79,7 +79,7 @@ describe('NodeBuildBuilder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-build', builder: '@nrwl/node:build',
options: testOptions options: testOptions
}) })
.toPromise(); .toPromise();
@ -110,7 +110,7 @@ describe('NodeBuildBuilder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-build', builder: '@nrwl/node:build',
options: { options: {
...testOptions, ...testOptions,
statsJson: true statsJson: true
@ -156,7 +156,7 @@ describe('NodeBuildBuilder', () => {
root: normalize('/root'), root: normalize('/root'),
sourceRoot: join(normalize('/root'), 'apps/nodeapp'), sourceRoot: join(normalize('/root'), 'apps/nodeapp'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-build', builder: '@nrwl/node:build',
options: { options: {
...testOptions, ...testOptions,
webpackConfig: 'apps/nodeapp/webpack.config.js' webpackConfig: 'apps/nodeapp/webpack.config.js'

View File

@ -11,12 +11,12 @@ import { Observable } from 'rxjs';
import { writeFileSync } from 'fs'; import { writeFileSync } from 'fs';
import { resolve } from 'path'; import { resolve } from 'path';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { getNodeWebpackConfig } from '../../../../node/src/utils/node.config'; import { getNodeWebpackConfig } from '../../utils/node.config';
import { import {
BuildBuilderOptions, BuildBuilderOptions,
normalizeBuildOptions, normalizeBuildOptions,
OUT_FILENAME OUT_FILENAME
} from '@nrwl/builders'; } from '@nrwl/workspace';
try { try {
require('dotenv').config(); require('dotenv').config();

View File

@ -88,7 +88,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: testOptions options: testOptions
}) })
).toBeObservable( ).toBeObservable(
@ -124,7 +124,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
inspect: InspectType.Inspect inspect: InspectType.Inspect
@ -154,7 +154,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
inspect: InspectType.InspectBrk inspect: InspectType.InspectBrk
@ -186,7 +186,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
host: '0.0.0.0' host: '0.0.0.0'
@ -218,7 +218,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
port: 1234 port: 1234
@ -252,7 +252,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: testOptions options: testOptions
}) })
).toBeObservable( ).toBeObservable(
@ -279,7 +279,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: testOptions options: testOptions
}) })
).toBeObservable( ).toBeObservable(
@ -302,7 +302,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
inspect: false, inspect: false,
@ -339,7 +339,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
inspect: false, inspect: false,
@ -392,7 +392,7 @@ describe('NodeExecuteBuilder', () => {
builder.run({ builder.run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
waitUntilTargets: ['project1:target1', 'project2:target2'] waitUntilTargets: ['project1:target1', 'project2:target2']
@ -426,7 +426,7 @@ describe('NodeExecuteBuilder', () => {
.run({ .run({
root: normalize('/root'), root: normalize('/root'),
projectType: 'application', projectType: 'application',
builder: '@nrwl/builders:node-execute', builder: '@nrwl/node:execute',
options: { options: {
...testOptions, ...testOptions,
waitUntilTargets: ['project1:target1', 'project2:target2'] waitUntilTargets: ['project1:target1', 'project2:target2']

View File

@ -1,9 +1,9 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { getFileContent } from '@schematics/angular/utility/test'; import { getFileContent } from '@schematics/angular/utility/test';
import * as stripJsonComments from 'strip-json-comments'; import * as stripJsonComments from 'strip-json-comments';
import { createApp, createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createApp, createEmptyWorkspace } from '@nrwl/workspace/testing';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
import { NxJson, readJsonInTree } from '@nrwl/schematics'; import { NxJson, readJsonInTree } from '@nrwl/workspace';
describe('app', () => { describe('app', () => {
let appTree: Tree; let appTree: Tree;

View File

@ -13,10 +13,10 @@ import {
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { join, normalize, Path } from '@angular-devkit/core'; import { join, normalize, Path } from '@angular-devkit/core';
import { Schema } from './schema'; import { Schema } from './schema';
import { updateJsonInTree } from '@nrwl/schematics'; import { updateJsonInTree } from '@nrwl/workspace';
import { toFileName } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName } from '@nrwl/workspace';
import { getProjectConfig } from '@nrwl/schematics/src/utils/ast-utils'; import { getProjectConfig } from '@nrwl/workspace';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
interface NormalizedSchema extends Schema { interface NormalizedSchema extends Schema {
appProjectRoot: Path; appProjectRoot: Path;

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import { join } from 'path'; import { join } from 'path';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('ng-add', () => { describe('ng-add', () => {
let tree: Tree; let tree: Tree;

View File

@ -1,8 +1,5 @@
import { Rule, chain } from '@angular-devkit/schematics'; import { Rule, chain } from '@angular-devkit/schematics';
import { import { addDepsToPackageJson, updateJsonInTree } from '@nrwl/workspace';
addDepsToPackageJson,
updateJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils';
import { nxVersion } from '../../utils/versions'; import { nxVersion } from '../../utils/versions';
function addDependencies(): Rule { function addDependencies(): Rule {

View File

@ -2,7 +2,7 @@ import { Configuration, BannerPlugin } from 'webpack';
import * as mergeWebpack from 'webpack-merge'; import * as mergeWebpack from 'webpack-merge';
import * as nodeExternals from 'webpack-node-externals'; import * as nodeExternals from 'webpack-node-externals';
import { getBaseWebpackPartial } from '@nrwl/builders/src/utils/webpack/config'; import { getBaseWebpackPartial } from '@nrwl/workspace';
import { BuildNodeBuilderOptions } from '../builders/build/build.builder'; import { BuildNodeBuilderOptions } from '../builders/build/build.builder';
function getNodePartial(options: BuildNodeBuilderOptions) { function getNodePartial(options: BuildNodeBuilderOptions) {

View File

@ -7,7 +7,7 @@
"module": "esm5/nrwl-nx.js", "module": "esm5/nrwl-nx.js",
"es2015": "esm2015/nrwl-nx.js", "es2015": "esm2015/nrwl-nx.js",
"peerDependencies": { "peerDependencies": {
"jasmine-marbles": "0.4.0" "jasmine-marbles": "*"
}, },
"author": "Victor Savkin", "author": "Victor Savkin",
"license": "MIT" "license": "MIT"

View File

@ -28,11 +28,9 @@
"migrations": "./migrations.json" "migrations": "./migrations.json"
}, },
"peerDependencies": { "peerDependencies": {
"@nrwl/schematics": "*" "@nrwl/workspace": "*"
}, },
"dependencies": { "dependencies": {
"@angular-devkit/core": "~7.3.1",
"@angular-devkit/schematics": "~7.3.1",
"@nrwl/cypress": "*", "@nrwl/cypress": "*",
"@nrwl/jest": "*", "@nrwl/jest": "*",
"@nrwl/web": "*" "@nrwl/web": "*"

View File

@ -1,7 +1,7 @@
import { Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import * as stripJsonComments from 'strip-json-comments'; import * as stripJsonComments from 'strip-json-comments';
import { readJsonInTree, NxJson } from '@nrwl/schematics'; import { readJsonInTree, NxJson } from '@nrwl/workspace';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
describe('app', () => { describe('app', () => {

View File

@ -14,11 +14,11 @@ import {
filter filter
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { Schema } from './schema'; import { Schema } from './schema';
import { updateJsonInTree, NxJson } from '@nrwl/schematics'; import { updateJsonInTree, NxJson } from '@nrwl/workspace';
import { toFileName, names } from '@nrwl/schematics/src/utils/name-utils'; import { toFileName, names } from '@nrwl/workspace';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
import { getNpmScope } from '@nrwl/schematics/src/utils/cli-config-utils'; import { getNpmScope } from '@nrwl/workspace';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files'; import { formatFiles } from '@nrwl/workspace';
interface NormalizedSchema extends Schema { interface NormalizedSchema extends Schema {
projectName: string; projectName: string;

View File

@ -1,7 +1,7 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { readJsonInTree } from '@nrwl/schematics/src/utils/ast-utils'; import { readJsonInTree } from '@nrwl/workspace';
import { NxJson } from '@nrwl/schematics/src/command-line/shared'; import { NxJson } from '@nrwl/workspace';
import { runSchematic } from '../../utils/testing'; import { runSchematic } from '../../utils/testing';
describe('lib', () => { describe('lib', () => {

View File

@ -13,15 +13,12 @@ import {
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { Schema } from './schema'; import { Schema } from './schema';
import { NxJson } from '@nrwl/schematics'; import { NxJson } from '@nrwl/workspace';
import { import { updateJsonInTree, readJsonInTree } from '@nrwl/workspace';
updateJsonInTree, import { toFileName, names } from '@nrwl/workspace';
readJsonInTree import { formatFiles } from '@nrwl/workspace';
} from '@nrwl/schematics/src/utils/ast-utils';
import { toFileName, names } from '@nrwl/schematics/src/utils/name-utils';
import { formatFiles } from '@nrwl/schematics/src/utils/rules/format-files';
import { join, normalize } from 'path'; import { join, normalize } from 'path';
import { offsetFromRoot } from '@nrwl/schematics/src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
export interface NormalizedSchema extends Schema { export interface NormalizedSchema extends Schema {
name: string; name: string;

View File

@ -1,8 +1,8 @@
import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { Tree, VirtualTree } from '@angular-devkit/schematics';
import { createEmptyWorkspace } from '@nrwl/schematics/testing'; import { createEmptyWorkspace } from '@nrwl/workspace/testing';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import { join } from 'path'; import { join } from 'path';
import { readJsonInTree } from '@nrwl/schematics'; import { readJsonInTree } from '@nrwl/workspace';
describe('ng-add', () => { describe('ng-add', () => {
let tree: Tree; let tree: Tree;

View File

@ -9,7 +9,7 @@ import {
addDepsToPackageJson, addDepsToPackageJson,
updateJsonInTree, updateJsonInTree,
readJsonInTree readJsonInTree
} from '@nrwl/schematics/src/utils/ast-utils'; } from '@nrwl/workspace';
import { import {
frameworkVersion, frameworkVersion,
typesVersion, typesVersion,

View File

@ -1,7 +0,0 @@
export { NxJson } from './src/command-line/shared';
export {
readJsonInTree,
updateJsonInTree,
addDepsToPackageJson
} from './src/utils/ast-utils';
export { offsetFromRoot } from './src/utils/common';

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Update the schema file to point to the nrwl schema.', description: 'Update the schema file to point to the nrwl schema.',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: description:

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Remove npmScope from tslint.json', description: 'Remove npmScope from tslint.json',

View File

@ -1,6 +1,6 @@
import { readCliConfigFile, updateJsonFile } from '../../src/utils/fileutils'; import { readCliConfigFile, updateJsonFile } from '@nrwl/workspace';
import { writeFileSync, unlinkSync } from 'fs'; import { writeFileSync, unlinkSync } from 'fs';
import { offsetFromRoot } from '../../src/utils/common'; import { offsetFromRoot } from '@nrwl/workspace';
import * as path from 'path'; import * as path from 'path';
export default { export default {

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Update tsconfig.spec.json to exclude e2e specs', description: 'Update tsconfig.spec.json to exclude e2e specs',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: description:

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add format:write and format:check to npm scripts', description: 'Add format:write and format:check to npm scripts',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Update npm scripts to use the nx command', description: 'Update npm scripts to use the nx command',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Update the version of prettier', description: 'Update the version of prettier',

View File

@ -1,4 +1,4 @@
import { copyFile, updateJsonFile } from '../../src/utils/fileutils'; import { copyFile, updateJsonFile } from '@nrwl/workspace';
import * as path from 'path'; import * as path from 'path';
export default { export default {

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add @angular-devkit/core as a dev dependency', description: 'Add @angular-devkit/core as a dev dependency',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add nx-migrate:check and nx-migrate:skip to npm scripts', description: 'Add nx-migrate:check and nx-migrate:skip to npm scripts',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add postinstall script to run nx-migrate:check', description: 'Add postinstall script to run nx-migrate:check',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add @angular-devkit/schematics as a dev dependency', description: 'Add @angular-devkit/schematics as a dev dependency',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
import { unlinkSync } from 'fs'; import { unlinkSync } from 'fs';
export default { export default {

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add update, update:skip, update:check scripts', description: 'Add update, update:skip, update:check scripts',

View File

@ -1,11 +1,11 @@
import { writeFileSync, unlinkSync } from 'fs'; import { writeFileSync, unlinkSync } from 'fs';
import { join } from 'path'; import { join } from 'path';
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
import { import {
ExistingPrettierConfig, ExistingPrettierConfig,
resolveUserExistingPrettierConfig resolveUserExistingPrettierConfig
} from '../../src/utils/common'; } from '@nrwl/workspace';
export default { export default {
description: 'Create or update prettier configuration', description: 'Create or update prettier configuration',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Add tags to all app and libs', description: 'Add tags to all app and libs',

View File

@ -1,4 +1,4 @@
import { updateJsonFile } from '../../src/utils/fileutils'; import { updateJsonFile } from '@nrwl/workspace';
export default { export default {
description: 'Run lint checks ensuring the integrity of the workspace', description: 'Run lint checks ensuring the integrity of the workspace',

Some files were not shown because too many files have changed in this diff Show More