Upgrade Ava to v4
This commit is contained in:
parent
9a40cc5274
commit
ce89f1b611
1153 changed files with 27264 additions and 95308 deletions
12
node_modules/yargs/lib/platform-shims/esm.mjs
generated
vendored
12
node_modules/yargs/lib/platform-shims/esm.mjs
generated
vendored
|
|
@ -3,7 +3,7 @@
|
|||
import { notStrictEqual, strictEqual } from 'assert'
|
||||
import cliui from 'cliui'
|
||||
import escalade from 'escalade/sync'
|
||||
import { format, inspect } from 'util'
|
||||
import { inspect } from 'util'
|
||||
import { readFileSync } from 'fs'
|
||||
import { fileURLToPath } from 'url';
|
||||
import Parser from 'yargs-parser'
|
||||
|
|
@ -15,8 +15,13 @@ import y18n from 'y18n'
|
|||
const REQUIRE_ERROR = 'require is not supported by ESM'
|
||||
const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM'
|
||||
|
||||
const mainFilename = fileURLToPath(import.meta.url).split('node_modules')[0]
|
||||
const __dirname = fileURLToPath(import.meta.url)
|
||||
let __dirname;
|
||||
try {
|
||||
__dirname = fileURLToPath(import.meta.url);
|
||||
} catch (e) {
|
||||
__dirname = process.cwd();
|
||||
}
|
||||
const mainFilename = __dirname.split('node_modules')[0]
|
||||
|
||||
export default {
|
||||
assert: {
|
||||
|
|
@ -45,6 +50,7 @@ export default {
|
|||
process: {
|
||||
argv: () => process.argv,
|
||||
cwd: process.cwd,
|
||||
emitWarning: (warning, type) => process.emitWarning(warning, type),
|
||||
execPath: () => process.execPath,
|
||||
exit: process.exit,
|
||||
nextTick: process.nextTick,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue