Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions packages/web-scripts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ program
esm,
types,
cjs,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handlePromiseResult(buildTask(t));
Expand All @@ -79,7 +79,7 @@ program
const t: TestTaskDesc = {
name: 'test',
config,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

const result = testTask(t);
Expand All @@ -103,7 +103,7 @@ program
config,
stylecheck,
typecheck,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handlePromiseResult(lintTask(t));
Expand All @@ -125,7 +125,7 @@ program
name: 'format',
config,
path,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handleSpawnResult(formatTask(t));
Expand Down Expand Up @@ -156,7 +156,7 @@ program
jestConfig,
eslintConfig,
prettierConfig,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handlePromiseResult(precommitTask(t));
Expand Down Expand Up @@ -194,7 +194,7 @@ program
const t: AuditTaskDesc = {
name: 'audit',
threshold,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handlePromiseResult(auditTask(t));
Expand All @@ -215,7 +215,7 @@ program
const t: CommitTaskDesc = {
name: 'commit',
path,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

try {
Expand All @@ -240,7 +240,7 @@ program
const t: CommitMsgTaskDesc = {
name: 'commitmsg',
config,
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handleSpawnResult(commitMsgTask(t));
Expand All @@ -254,7 +254,7 @@ program
const cmd = getCommand(args);
const t: ReleaseTaskDesc = {
name: 'release',
restOptions: parseRestOptions(cmd),
restOptions: cmd.args,
};

handleSpawnResult(releaseTask(t));
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions packages/web-scripts/src/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('integration tests', () => {
);
}, SETUP_REPO_TIMEOUT);

// eslint-disable-next-line jest/expect-expect
test(
'Full integration test',
async () => await testScripts(),
Expand All @@ -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']),
Expand Down