Skip to content

Commit

Permalink
fix: oxc package name
Browse files Browse the repository at this point in the history
closes #39
  • Loading branch information
sxzz committed Feb 1, 2024
1 parent 550c28e commit 170fb0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions composables/language/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const swc: Parser<typeof Swc, Swc.ParseOptions> = {

const oxc: Parser<typeof Oxc, Partial<Oxc.ParserOptions>> = {
id: 'oxc',
label: 'oxc',
label: 'Oxc',
icon: 'i-vscode-icons:file-type-js-official',
options: {
configurable: true,
Expand All @@ -126,14 +126,13 @@ const oxc: Parser<typeof Oxc, Partial<Oxc.ParserOptions>> = {
// @ts-expect-error
'https://cdn.jsdelivr.net/npm/@oxc-parser/wasm@latest/oxc_parser_wasm.js'
).then(async (mod: typeof Oxc) => {
// debugger
await mod.default()
return mod
}),
version: () =>
fetch('https://cdn.jsdelivr.net/npm/@oxc-parser/wasm@latest/package.json')
.then((r) => r.json())
.then((raw) => `@swc/wasm-web@${raw.version}`),
.then((raw) => `@oxc-parser/wasm@${raw.version}`),
parse(code, options) {
const { program, errors } = this.parseSync(code, { ...options })
return { program, errors }
Expand Down

0 comments on commit 170fb0b

Please sign in to comment.