diff --git a/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts b/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts index f54ece8d56281..2a11dc1031cbb 100644 --- a/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts +++ b/e2e/workspace-create-npm/src/create-nx-workspace-npm.test.ts @@ -37,6 +37,17 @@ describe('create-nx-workspace --preset=npm', () => { cleanupProject({ skipReset: true }); }); + it('should setup package-based workspace', () => { + const packageJson = readJson('package.json'); + expect(packageJson.dependencies).toEqual({}); + + if (getSelectedPackageManager() === 'pnpm') { + checkFilesExist('pnpm-workspace.yaml'); + } else { + expect(packageJson.workspaces).toEqual(['packages/*']); + } + }); + it('should add angular application', () => { packageInstall('@nx/angular', wsName); const appName = uniq('my-app'); diff --git a/packages/create-nx-workspace/bin/create-nx-workspace.ts b/packages/create-nx-workspace/bin/create-nx-workspace.ts index 36bce6debd497..5b3143c5093a0 100644 --- a/packages/create-nx-workspace/bin/create-nx-workspace.ts +++ b/packages/create-nx-workspace/bin/create-nx-workspace.ts @@ -412,7 +412,6 @@ async function determineNoneOptions( } else { preset = Preset.NPM; } - preset = workspaceType === 'standalone' ? Preset.TsStandalone : Preset.TS; } if (parsedArgs.js !== undefined) {