You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're doing some housekeeping that involves renaming some of our internal packages. Namely, vscode-ripgrep will be renamed to @vscode/ripgrep, which affects its location in VS Code's node_modules folder. It looks like this extension depends on vscode-ripgrep in a way that will break when this rename happens.
We suggest either:
Adding an extra check for the renamed binary path in your extension, or
Updating your extension to import vscode-ripgrep and retrieve the binary path from there. We will alias the require statement, so that the renamed package is always resolved correctly, and vscode-ripgrep exports the binary path. For example:
functiongetCoreNodeModule(moduleName){try{returnrequire(`${vscode.env.appRoot}/node_modules.asar/${moduleName}`);}catch(err){try{returnrequire(`${vscode.env.appRoot}/node_modules/${moduleName}`);}catch(err){returnundefined;}}}const{ rgPath }=getCoreNodeModule('vscode-ripgrep');// then child_process.spawn(rgPath, [...
Note that if you're building your extension with Webpack, you will want to use __non_webpack_require__ instead of require, otherwise webpack will try to (incorrectly) resolve the request by itself.
The text was updated successfully, but these errors were encountered:
Hello from the VS Code team 👋
We're doing some housekeeping that involves renaming some of our internal packages. Namely,
vscode-ripgrep
will be renamed to@vscode/ripgrep
, which affects its location in VS Code'snode_modules
folder. It looks like this extension depends onvscode-ripgrep
in a way that will break when this rename happens.We suggest either:
vscode-ripgrep
and retrieve the binary path from there. We will alias therequire
statement, so that the renamed package is always resolved correctly, andvscode-ripgrep
exports the binary path. For example:Note that if you're building your extension with Webpack, you will want to use
__non_webpack_require__
instead ofrequire
, otherwise webpack will try to (incorrectly) resolve the request by itself.The text was updated successfully, but these errors were encountered: