Bug Fix: plugin will always crash since ini_one_bg.wasm is not found
Fix issue: https://github.com/foxundermoon/vs-shell-format/issues/396
I used your plugin and recommended it to others, but after the latest update, it's completely unusable. Others have the same issue, so I hope this can be fixed soon. I reviewed the recent changes and found that reverting the editorconfig version solves the problem. The fix is simple: just change the editorconfig dependency to the previous version, 7.2.5.
Confirmed, reverting the editorconfig package upgrade "fixes" the issue.
will always crash since ini_one_bg.wasm is not found
The root cause is that editorconfig v1+^1 began using the @one-ini/wasm^2 package. The Webpack build does not include the required one_ini_bg.wasm file, which causes the issue.
- Related issue: https://github.com/editorconfig/editorconfig-core-js/issues/128
If editorconfig is used in the code, the .wasm file dependency must also be included.
https://github.com/foxundermoon/vs-shell-format/blob/1b9985d64567da54c531fc470862d3116db5013d/src/shFormat.ts#L20
Alternative fix: include the wasm file in the bundle.
--- a/package.json
+++ b/package.json
@@ -195,4 +195,5 @@
"@types/mocha": "10.0.1",
"@types/node": "18.16.19",
+ "copy-webpack-plugin": "13.0.0",
"husky": "8.0.3",
"lint-staged": "13.3.0",
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -8,4 +8,5 @@
'use strict';
+const CopyPlugin = require('copy-webpack-plugin')
const path = require('path');
@@ -43,4 +44,9 @@ const config = {
],
},
+ plugins: [
+ new CopyPlugin({
+ patterns: [{ from: 'node_modules/@one-ini/wasm/one_ini_bg.wasm', to: 'one_ini_bg.wasm' }]
+ })
+ ],
};
PS: Potential issue with this approach: https://github.com/microsoft/vscode-cpptools/pull/12579
Can the owners please take a look after 2 weeks? All of us do a lot of works for free in the opensource world, but a little effort is required to make opensource work for everyone. Thanks.
Seems like @foxundermoon has abandoned this... time to fork?
@foxundermoon can you please take a quick look at this PR and merge it?
I am unable to use this extension in Cursor because I can't downgrade to v7.2.5 - Cursor Open IDX doesn't provide historical versions.