Closed arcanis closed 3 weeks ago
What's blocking this from being merged?
What's blocking this from being merged?
https://github.com/yarnpkg/berry/issues/6219#issuecomment-2123394931
For those can't wait just resolve package @yarnpkg/sdks
to the branch of this pr: https://stackoverflow.com/questions/43411864/how-to-install-package-from-github-repo-in-yarn/67779901#67779901
yarn dlx -p '@yarnpkg/sdks@https://github.com/yarnpkg/berry#head=mael/eslint-flat-config-sdk&workspace=@yarnpkg/sdks' @yarnpkg/sdks vscode
wait for it to completely git clone
this LARGE repo.
not working, ignore
Or manually [`git clone --filter+git sparse-checkout`](https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/52269934#52269934) but also for [`/*`](https://stackoverflow.com/questions/75311408/how-to-prevent-git-clone-filter-blobnone-sparse-from-downloading-files-on-t) ```bash git clone https://github.com/yarnpkg/berry --branch mael/eslint-flat-config-sdk --depth 1 --filter=blob:none --sparse berry cd berry git sparse-checkout add packages/yarnpkg-{sdks,core} cd packages/yarnpkg-sdks touch yarn.lock yarn install ``` Or download online archive [`packages/yarnpkg-sdks`](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fyarnpkg%2Fberry%2Ftree%2Fmael%2Feslint-flat-config-sdk%2Fpackages%2Fyarnpkg-sdks) then resolve it with [`file:` protocol](https://stackoverflow.com/questions/40102686/how-to-install-package-with-local-path-by-yarn-it-couldnt-find-package) ```bash yarn dlx -p '@yarnpkg/sdks@./berry/packages/yarnpkg-sdks' @yarnpkg/sdks vscode ``` instead.
dbaeumer.vscode-eslint>=3.0.5
run with Node >v20.6.0, v18.19.0
by setting eslint.runtime
in settings.json
: https://stackoverflow.com/questions/69179099/enforcing-node-version-on-eslint-server
node --version
"eslint.runtime": "node",
What's the problem this PR addresses?
ESM loaders aren't supported by the sdks because we only
require().setup()
but we don'tregister()
the ESM loader hook.Fixes #6219
How did you fix it?
Add support for ESM loaders to the SDK.
Check whether the
findPnpApi
function could be found in themodule
builtin. If not, tries to setup the environment accordingly. This is because in the case of the SDK, the subprocesses have been created without the--require .pnp.loader.mjs
flag, so the PnP runtime won't be setup.Checklist