Skip to content

Commit

Permalink
fix(angular): set the right defaultBase when migrating an angular cli…
Browse files Browse the repository at this point in the history
… workspace (#9050)
  • Loading branch information
leosvelperez committed Feb 21, 2022
1 parent 5c4b67c commit dfcc853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit dfcc853

Please sign in to comment.