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

Cleanup: Use canceled instead of cancelled #29438

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions code/addons/test/src/node/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class StorybookReporter implements Reporter {
unhandledErrors[0]
);
} else {
const isCancelled = this.ctx.isCancelling;
const isCanceled = this.ctx.isCancelling;
ghengeveld marked this conversation as resolved.
Show resolved Hide resolved
const report = this.getProgressReport(Date.now());

const testSuiteFailures = report.details.testResults.filter(
Expand All @@ -209,10 +209,10 @@ export class StorybookReporter implements Reporter {
reducedTestSuiteFailures.add(t.message);
});

if (isCancelled) {
if (isCanceled) {
this.sendReport({
providerId: TEST_PROVIDER_ID,
status: 'cancelled',
status: 'canceled',
...report,
});
} else if (reducedTestSuiteFailures.size > 0) {
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/core-events/data/testing-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type TestingModuleRunAllRequestPayload = {
export type TestingModuleProgressReportPayload =
| {
providerId: TestProviderId;
status: 'success' | 'pending' | 'cancelled';
status: 'success' | 'pending' | 'canceled';
cancellable?: boolean;
progress?: TestingModuleProgressReportProgress;
details?: { [key: string]: any };
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/core-server/presets/common-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export const experimental_serverChannel = async (
TESTING_MODULE_PROGRESS_REPORT,
async (payload: TestingModuleProgressReportPayload) => {
if (
(payload.status === 'success' || payload.status === 'cancelled') &&
(payload.status === 'success' || payload.status === 'canceled') &&
payload.progress?.finishedAt
) {
await telemetry('testing-module-completed-report', {
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli-storybook/src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const sandbox = async ({
},
{
onCancel: () => {
logger.log('Command cancelled by the user. Exiting...');
logger.log('Command canceled by the user. Exiting...');
process.exit(1);
},
}
Expand Down Expand Up @@ -278,7 +278,7 @@ async function promptSelectedTemplate(choices: Choice[]): Promise<Choice | null>
},
{
onCancel: () => {
logger.log('Command cancelled by the user. Exiting...');
logger.log('Command canceled by the user. Exiting...');
process.exit(1);
},
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/cancel-preparation-runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export const run = async () => {
);

if (result.some((r) => r.status === 'rejected')) {
console.warn('⚠️ Some runs could not be cancelled:');
console.warn('⚠️ Some runs could not be canceled:');
result.forEach((r, index) => {
if (r.status === 'rejected') {
console.warn(`Run ID: ${runsToCancel[index].id} - Reason: ${r.reason}`);
}
});
} else {
console.log('✅ Successfully cancelled all preparation runs.');
console.log('✅ Successfully canceled all preparation runs.');
}
};

Expand Down
2 changes: 1 addition & 1 deletion scripts/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async function run() {
},
{
onCancel: () => {
logger.log('Command cancelled by the user. Exiting...');
logger.log('Command canceled by the user. Exiting...');
process.exit(1);
},
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export async function promptOptions<TOptions extends OptionSpecifier>(

const selection = await prompts(questions, {
onCancel: () => {
logger.log('Command cancelled by the user. Exiting...');
logger.log('Command canceled by the user. Exiting...');
process.exit(1);
},
});
Expand Down
Loading