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
Don't know if this helps at all, but Yarn v3 has a yarn patch command that allows users to apply patches to installed packages locally: https://yarnpkg.com/cli/patch
I'm not very familiar with this code base, but here's a potential idea:
When ts-patch install is run, detect if Yarn Berry is in use.
If it is in use, then utilize the same API calls that yarn patch uses to apply a patch to the typescript modules.
Once patch is applied, perform the equivalent of a yarn patch-commit to update the package.json to resolve typescript to the patched version of typescript.
The yarn patch and yarn patch-commit commands are performed by the plugin-patch plugin.
Activity
AlCalzone commentedon Aug 9, 2023
@samchon try the
pnpmornode-moduleslinker. This works for me with yarn v3.nonara commentedon Aug 11, 2023
Hi @samchon! Let me know if AlCalzone's solution works for you, please.
I still haven't worked much with yarn3. We have tests in place but not turned on yet. I know others have said it works with the node modules linker.
If so, we should enable those tests and possibly add something to the readme.
tsengia commentedon Sep 17, 2023
Don't know if this helps at all, but Yarn v3 has a
yarn patchcommand that allows users to apply patches to installed packages locally: https://yarnpkg.com/cli/patchThis Yarn
patchcommand utilizes the@yarnpkg/fsliblibrary to access files stored inside of the installed.zipfolders: https://yarnpkg.com/advanced/pnpapi#accessing-the-filesI'm not very familiar with this code base, but here's a potential idea:
ts-patch installis run, detect if Yarn Berry is in use.yarn patchuses to apply a patch to the typescript modules.yarn patch-committo update thepackage.jsonto resolve typescript to the patched version of typescript.The
yarn patchandyarn patch-commitcommands are performed by theplugin-patchplugin.