Skip to content

Commit

Permalink
chore: deno process tweak ups
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jan 7, 2025
1 parent fddd04a commit 55cfb16
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/deno.polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ if (globalThis.Deno) {
globalThis.__filename = __filename
globalThis.__dirname = __dirname
globalThis.module = new Proxy({}, { set() { return true } })
Object.assign(process, {
version: 'v18.0.0',
versions: { node: '18.0.0' },
env: globalThis.Deno.env.toObject(),
argv: [globalThis.Deno.execPath(), globalThis.Deno.mainModule.replace('file://', ''), ...globalThis.Deno.args]
})

const p = globalThis.process = globalThis.process || process
p.version || (p.version = 'v18.0.0')
p.version || (p.version = { node: '18.0.0' })
p.env || (p.env = globalThis.Deno.env.toObject())
p.argv || (p.argv = [globalThis.Deno.execPath(), globalThis.Deno.mainModule.replace('file://', ''), ...globalThis.Deno.args])
}

export { require, __dirname, __filename }

0 comments on commit 55cfb16

Please sign in to comment.