diff --git a/packages/web-scripts/src/index.ts b/packages/web-scripts/src/index.ts index 14a8f538..8a92dac7 100644 --- a/packages/web-scripts/src/index.ts +++ b/packages/web-scripts/src/index.ts @@ -62,7 +62,7 @@ program esm, types, cjs, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handlePromiseResult(buildTask(t)); @@ -79,7 +79,7 @@ program const t: TestTaskDesc = { name: 'test', config, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; const result = testTask(t); @@ -103,7 +103,7 @@ program config, stylecheck, typecheck, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handlePromiseResult(lintTask(t)); @@ -125,7 +125,7 @@ program name: 'format', config, path, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handleSpawnResult(formatTask(t)); @@ -156,7 +156,7 @@ program jestConfig, eslintConfig, prettierConfig, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handlePromiseResult(precommitTask(t)); @@ -194,7 +194,7 @@ program const t: AuditTaskDesc = { name: 'audit', threshold, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handlePromiseResult(auditTask(t)); @@ -215,7 +215,7 @@ program const t: CommitTaskDesc = { name: 'commit', path, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; try { @@ -240,7 +240,7 @@ program const t: CommitMsgTaskDesc = { name: 'commitmsg', config, - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handleSpawnResult(commitMsgTask(t)); @@ -254,7 +254,7 @@ program const cmd = getCommand(args); const t: ReleaseTaskDesc = { name: 'release', - restOptions: parseRestOptions(cmd), + restOptions: cmd.args, }; handleSpawnResult(releaseTask(t)); @@ -292,10 +292,6 @@ function getOpts(cmd: Command): { [key: string]: any } { return cmd.opts(); } -function parseRestOptions(cmd: Command): string[] { - return cmd.parseOptions(process.argv).unknown; -} - program.parse(process.argv); if (!process.argv.slice(2).length) { diff --git a/packages/web-scripts/src/integration.test.ts b/packages/web-scripts/src/integration.test.ts index 6a88a0e9..72a7453b 100644 --- a/packages/web-scripts/src/integration.test.ts +++ b/packages/web-scripts/src/integration.test.ts @@ -92,6 +92,7 @@ describe('integration tests', () => { ); }, SETUP_REPO_TIMEOUT); + // eslint-disable-next-line jest/expect-expect test( 'Full integration test', async () => await testScripts(), @@ -109,6 +110,7 @@ describe('integration tests', () => { ); }, SETUP_REPO_TIMEOUT); + // eslint-disable-next-line jest/expect-expect test( 'Full integration test', async () => await testScripts(['--no-types'], ['--no-typecheck']),