fix(bun): import setTimeout/setInterval from "node:timers" for .unref() to correctly work
This commit is contained in:
parent
db656c2310
commit
543b7f6f77
4 changed files with 8 additions and 0 deletions
5
.changeset/late-suits-destroy.md
Normal file
5
.changeset/late-suits-destroy.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@emigrate/cli': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use setTimeout/setInterval from "node:timers" so that .unref() correctly works with Bun
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import { parseArgs } from 'node:util';
|
import { parseArgs } from 'node:util';
|
||||||
|
import { setTimeout } from 'node:timers';
|
||||||
import importFromEsm from 'import-from-esm';
|
import importFromEsm from 'import-from-esm';
|
||||||
import { CommandAbortError, ShowUsageError } from './errors.js';
|
import { CommandAbortError, ShowUsageError } from './errors.js';
|
||||||
import { getConfig } from './get-config.js';
|
import { getConfig } from './get-config.js';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { setTimeout } from 'node:timers';
|
||||||
import prettyMs from 'pretty-ms';
|
import prettyMs from 'pretty-ms';
|
||||||
import { ExecutionDesertedError, toError } from './errors.js';
|
import { ExecutionDesertedError, toError } from './errors.js';
|
||||||
import { DEFAULT_RESPITE_SECONDS } from './defaults.js';
|
import { DEFAULT_RESPITE_SECONDS } from './defaults.js';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { setInterval } from 'node:timers';
|
||||||
import { black, blueBright, bold, cyan, dim, faint, gray, green, red, redBright, yellow, yellowBright } from 'ansis';
|
import { black, blueBright, bold, cyan, dim, faint, gray, green, red, redBright, yellow, yellowBright } from 'ansis';
|
||||||
import logUpdate from 'log-update';
|
import logUpdate from 'log-update';
|
||||||
import elegantSpinner from 'elegant-spinner';
|
import elegantSpinner from 'elegant-spinner';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue