Open ianzone opened 3 months ago
We don't maintain that plugin, I suggest filing an issue in their repository
it actually happened before https://github.com/biomejs/biome/issues/2744
Sorry for the inconvenience.
The JavaScript APIs aren't well maintained and they are in alpha for a reason. I suggest you to check how we consume the WASM target inside the website repository -> playground
For example, we changed things very recently and now must register a project before setting up the configuration.
It's possible that these changes aren't reflected in the JavaScript APIs, so a PR might be needed to fix your bug
I'm seeing this in my project as well
/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/wasm.js:83
return new WasmError(e);
^
WasmError
at WasmError.fromError (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/wasm.js:83:16)
at wrapError (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/wasm.js:92:22)
at Biome.tryCatchWrapper (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:63:40)
at Biome.withFile (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:67:21)
at Biome.formatContent (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:93:21)
at writeOutput (/home/runner/work/openapi-code-generator/openapi-code-generator/scripts/generate-ajv-validator.js:33:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
stackTrace: Error: Error: missing field `only`
at module.exports.__wbg_new_28c511d9baebfa89 (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/wasm-nodejs/biome_wasm.js:922:17)
at wasm://wasm/02c92192:wasm-function[10295]:0x8f26e6
at wasm://wasm/02c92192:wasm-function[6050]:0x81a082
at wasm://wasm/02c92192:wasm-function[6635]:0x836fb0
at Workspace.pullDiagnostics (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/wasm-nodejs/biome_wasm.js:549:18)
at /home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:95:52
at /home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:77:24
at Biome.tryCatchWrapper (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:60:20)
at Biome.withFile (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:67:21)
at Biome.formatContent (/home/runner/work/openapi-code-generator/openapi-code-generator/node_modules/@biomejs/js-api/dist/index.js:93:21)
}
Which has a pretty vanilla use of the bindings https://github.com/mnahkies/openapi-code-generator/blob/main/packages/openapi-code-generator/src/typescript/common/typescript-formatter.biome.ts#L6-L46
(as an aside, I've not had much success getting the web WASM distribution to work, but not sure if that's me or the package)
Suspect the @biomejs/js-api
needs updating
I'm not sure about the error in OP's post. But the error in https://github.com/biomejs/biome/issues/3126#issuecomment-2155907772 is probably due to the reason that we didn't publish a new @biome/js-api
package when the pull diagnostics API is changed (with the skip
and only
option)
Environment information
What happened?
Reproduce:
Output:
Expected result
no error thrown
Code of Conduct