4 ms·
That’s an interesting approach to it (modifying how the package.json is processed). If anyone is wondering if their current package manager supports this, it d
by exogen 9y ago
That’s an interesting approach to it (modifying how the package.json is processed).
If anyone is wondering if their current package manager supports this, it does if you are using Yarn. Yarn has a `resolutions` field to override subdeps (either globally or in a targeted way): https://yarnpkg.com/lang/en/docs/selective-version-resolutions/ https://yarnpkg.com/lang/en/docs/selective-version-resolutio...
It’s not as low-level and flexible as pnpm’s approach, but is perfect for the use case described here.
- andreineculau 9y agoCorrect. The pnpm approach is more versatile. You can do anything to a dependency's package.json . I have recently used it to debug and then monkey patch "scripts" (property) invocations without even forking the dependency.