Resolving package.json
should rely on the vfile cwd, not process
#39
Labels
💪 phase/solved
Post is done
package.json
should rely on the vfile cwd, not process
#39
Initial checklist
Affected packages and versions
11.2.3
Link to runnable example
No response
Steps to reproduce
It is kind of annoying to reproduce, but this is what causes remarkjs/vscode-remark#65 builds to fail on Windows. When VSCode is opened in Windows, it doesn’t send the desired
cwd
to the language server process, meaningprocess.cwd()
doesn’t matchfile.cwd
. The language server makes surefile.cwd
is correct, and plugins are typically supposed to use that.Expected behavior
remark-github
usesfile.cwd
to lookuppackage.json
, so an implementation can set a customcwd
when runningt the unified pipeline.Actual behavior
remark-github
usesprocess.cwd()
, which is often the same asfile.cwd
but not always. This leads to unexpected behaviour.Runtime
Node v16
Package manager
npm 8
OS
Linux
Build and bundle tools
Other (please specify in steps to reproduce)
The text was updated successfully, but these errors were encountered: