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
3 changes: 3 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#! /usr/bin/env node
import { hideBin } from 'yargs/helpers';
import { cli } from './lib/cli.js';
// FIXME: this is a hot fix for github action running in node 18 instead of node 20
// eslint-disable-next-line import/no-unassigned-import
import './lib/polyfills.js';

// bootstrap Yargs, parse arguments and execute command
await cli(hideBin(process.argv)).argv;
Expand Down
9 changes: 9 additions & 0 deletions packages/cli/src/lib/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if (!Array.prototype.toSorted) {

Check failure on line 1 in packages/cli/src/lib/polyfills.ts

View workflow job for this annotation

GitHub Actions / Code PushUp

<✓> Code coverage | Branch coverage

1st branch is not taken in any test case.
// eslint-disable-next-line functional/immutable-data
Array.prototype.toSorted = function <T>(
this: T[],
compareFn?: (a: T, b: T) => number,
): T[] {
return [...this].sort(compareFn);
};
}

Check warning on line 9 in packages/cli/src/lib/polyfills.ts

View workflow job for this annotation

GitHub Actions / Code PushUp

<✓> Code coverage | Line coverage

Lines 1-9 are not covered in any test case.
Loading