Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): set the right defaultBase when migrating an angular cli workspace #9050

Merged
merged 1 commit into from Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/angular-core/src/ng-add.test.ts
Expand Up @@ -147,7 +147,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => {
const nxJson = readJson('nx.json');
expect(nxJson).toEqual({
npmScope: 'projscope',
affected: { defaultBase: 'undefined' },
affected: { defaultBase: 'main' },
implicitDependencies: {
'angular.json': '*',
'package.json': '*',
Expand Down
4 changes: 3 additions & 1 deletion packages/workspace/src/generators/init/init.ts
Expand Up @@ -424,7 +424,9 @@ async function createAdditionalFiles(host: Tree, options: Schema) {
const nxJson: NxJsonConfiguration = {
npmScope: options.npmScope,
affected: {
defaultBase: `${options.defaultBase}` || deduceDefaultBase(),
defaultBase: options.defaultBase
? `${options.defaultBase}`
: deduceDefaultBase(),
},
implicitDependencies: {
'angular.json': '*',
Expand Down