We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5f226e commit 55704d1Copy full SHA for 55704d1
packages/cli/src/index.ts
@@ -1,6 +1,9 @@
1
#! /usr/bin/env node
2
import { hideBin } from 'yargs/helpers';
3
import { cli } from './lib/cli.js';
4
+// FIXME: this is a hot fix for github action running in node 18 instead of node 20
5
+// eslint-disable-next-line import/no-unassigned-import
6
+import './lib/polyfills.js';
7
8
// bootstrap Yargs, parse arguments and execute command
9
await cli(hideBin(process.argv)).argv;
packages/cli/src/lib/polyfills.ts
@@ -0,0 +1,9 @@
+if (!Array.prototype.toSorted) {
+ // 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);
+ };
+}
0 commit comments