fix(core): generate npm preset correctly (#18164)

This commit is contained in:
Jack Hsu 2023-07-18 14:27:14 -04:00 committed by GitHub
parent 21bf6cd0a2
commit 36cd6b0485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -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');

View File

@ -412,7 +412,6 @@ async function determineNoneOptions(
} else {
preset = Preset.NPM;
}
preset = workspaceType === 'standalone' ? Preset.TsStandalone : Preset.TS;
}
if (parsedArgs.js !== undefined) {