fix(core): fix dot notation parsing (#8763)

This commit is contained in:
Jason Jean 2022-01-28 18:36:20 -05:00 committed by GitHub
parent 3cdc681326
commit 490c66f245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -68,6 +68,26 @@ describe('parseRunOneOptions', () => {
});
});
it('should handle dot notation', () => {
expect(
parseRunOneOptions('root', workspaceJson, [
'run',
'myproj:build',
'--env.URL=https://localhost:9999',
])
).toEqual({
project: 'myproj',
target: 'build',
configuration: 'someDefaultConfig',
parsedArgs: {
_: [],
env: {
URL: 'https://localhost:9999',
},
},
});
});
it('should use defaultProjectName when no provided', () => {
expect(
parseRunOneOptions(

View File

@ -1,5 +1,4 @@
import yargsParser = require('yargs-parser');
import * as fs from 'fs';
import type {
WorkspaceJsonConfiguration,
NxJsonConfiguration,
@ -84,7 +83,6 @@ export function parseRunOneOptions(
},
configuration: {
'strip-dashed': true,
'dot-notation': false,
},
});