-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Tech debt
-
None
-
3
In our CI when building the vsix extension package we install dependencies with the `–omit=optional` flag. However this causes the `npm list` command that vsce runs to fail with invalid dependencies. I'm not sure on the exact cause of the failure, I think it's something to do with transitive optional peer dependencies being hoisted differently.
Currently we silence the errors with a node workaround:
https://github.com/mongodb-js/vscode/blob/main/scripts/no-npm-list-fail.js
To make `npm run package` work without our current `no-npm-list-fail` workaround we'll need to make the command run by the vscode package command (vsce) `npm list --production --parseable --depth=99999 --loglevel=error` work with optional dependencies omitted.
Install in ci: https://github.com/mongodb-js/vscode/blob/750c17a667f1a40828f0fef96218df90096f7b3e/.github/workflows/test-and-build.yaml#L57
Once this work is done we can remove the `no-npm-list-fail` node workaround:
https://github.com/mongodb-js/vscode/blob/main/scripts/no-npm-list-fail.js
- is related to
-
VSCODE-310 fix `npm run package` and `npm run local-install`
- Closed