"fix" importmeta.resolve type conflict

This commit is contained in:
jhmaster2000
2023-09-29 16:55:06 -03:00
parent 776af14918
commit 238ebd5fb9
2 changed files with 3 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ export default function polyfillImportMeta(metaIn: ImportMeta) {
dir: path.dirname(metapath),
file: path.basename(metapath),
require: require2,
// @ts-expect-error conflict with @types/node
async resolve(id: string, parent?: string) {
return this.resolveSync(id, parent);
},

View File

@@ -32,8 +32,8 @@ import openEditor from 'open-editor';
export const main = path.resolve(process.cwd(), process.argv[1] ?? 'repl') satisfies typeof Bun.main;
//? These are automatically updated on build by tools/updateversions.ts, do not edit manually.
export const version = '0.7.4' satisfies typeof Bun.version;
export const revision = '56816a3ec845a4b9fc40ade34dbe5c0033433d51' satisfies typeof Bun.revision;
export const version = '1.0.4' satisfies typeof Bun.version;
export const revision = '776af14918d9a895facd1ad60e83ee837bb7193a' satisfies typeof Bun.revision;
export const gc = (globalThis.gc ? (() => (globalThis.gc!(), process.memoryUsage().heapUsed)) : (() => {
const err = new Error('[bun-polyfills] Garbage collection polyfills are only available when Node.js is ran with the --expose-gc flag.');