Replies: 14 comments 2 replies
-
I guess I am OK with it but then let's make it a non-executable file. The reason for that is because some toolings (like renovateapp) run pnpm with |
Beta Was this translation helpful? Give feedback.
-
You mean like If so, I would prefer hjson to support comments. YAML is an option too I guess.
I don't understand. This is to get around renovate not running pnpmfile? |
Beta Was this translation helpful? Give feedback.
-
Not just renovate. @etamponi also wanted to avoid an uncontrolled executable to be run by pnpm. That's why he implemented I think YAML would be good because that's the format we mostly use. And I think it would be enough just to specify the overrides like this: react-native@0.52.0:
metro: npm:metro-pnpm@0.24.7-vjpr.1
# 'metro-resolver': '~/dev-live/metro/.dev/metro-resolver-0.28.0.tgz'
uuid: * # Libraries/Blob/Blob.js
react-native-scripts:
expo: * You can override optional dependencies but I don't think anyone would like to add new optional dependencies. Why would that be needed? Possible name: |
Beta Was this translation helpful? Give feedback.
-
I prefer having json option. Its easier to reuse if you want to add it to pnpmfile.js at some point, say if you want to publish as a package. Otherwise you need to pull in yaml parser lib. |
Beta Was this translation helpful? Give feedback.
-
BTW: The version should be a semver version range: And we need to support project root. E.g. |
Beta Was this translation helpful? Give feedback.
-
This name doesn't fit because you can override root dependencies. Yarn uses a We should call it Also, I want to be able to use packages in the config, so I think having a js option would be good, or some kind of mechanism to declaratively specify packages to be used. |
Beta Was this translation helpful? Give feedback.
-
Yarn supports Selective dependency resolutions which allow:
Do we need to handle this? |
Beta Was this translation helpful? Give feedback.
-
I like the idea of a {
"name": "foo",
"version": "0.1.0",
"pnpm": {
"resolutions": {}
}
} It's a shame there's no way for pnpm to support Yarn resolutions. 😢 |
Beta Was this translation helpful? Give feedback.
-
Just want to add an issue with .js pnpmfile. When using Docker, if you want to cache the node_modules layer which is a common practice, you copy |
Beta Was this translation helpful? Give feedback.
-
-1 for static files. Like for every tool, there is a set of files, which are needed to be commited or added to Dockerfile etc. But from my perspective,
Common, if you forgot to commit something, you get probably something wrong in production. Just don't do that :D |
Beta Was this translation helpful? Give feedback.
-
Do we still want this or is it enough to support Yarn's resolutions field? Related issue: #1221 |
Beta Was this translation helpful? Give feedback.
-
I will probably work on this soon. I plan to use Yarn's packageExtensions format. |
Beta Was this translation helpful? Give feedback.
-
We will probably use a shared compatibility database with Yarn. The question is how to ship this compatibility database. Yarn bundles it with the CLI. Shipping it with the CLI probably means better dev experience, as Yarn fixes issues out-of-the-box. But it also means that new fixes are shipped rarely. I'd suggest us to use a different approach and ask our users to download the packageExtensions json file and commit it to their repository. This way users can get fixes fast but it will also mean that sometimes new users will get a bad impression about pnpm not working. Another solution could be to load the compatibility json before running installation. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of a separate file for the db outside of the cli.
I’d also like to have a pnpmfile hook where I can return the declarative
json.
If there are bugs in the DB it would provide an opportunity to
ignore/override them while still pulling down latest updates.
There should probably be a way to check for updates to the db on every
install (or once every 5 mins). Checking into source control is best
though…you wouldn’t want something changing without your knowledge between
installs - but I guess the lock file helps with that.
A cli command to show active overrides would be useful too - show which
rules have been applied. This could be cached in the lock file maybe.
…On Wed 23. Jun 2021 at 01:57, Zoltan Kochan ***@***.***> wrote:
We will probably use a shared compatibility database with Yarn. The
question is how to ship this compatibility database.
Yarn bundles it with the CLI. Shipping it with the CLI probably means
better dev experience, as Yarn fixes issues out-of-the-box. But it also
means that new fixes are shipped rarely.
I'd suggest us to use a different approach and ask our users to download
the packageExtensions json file and commit it to their repository. This way
users can get fixes fast but it will also mean that sometimes new users
will get a bad impression about pnpm not working.
Another solution could be to load the compatibility json before running
installation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3172 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACEWRLIMYM3LHCF36URVSLTUEPPTANCNFSM47BQUBLQ>
.
|
Beta Was this translation helpful? Give feedback.
-
Opinions wanted.
When supporting CRNA, I created a package called
pnpmfile-file-read-package
which supports a declarative format for thereadPackage
hook.I think the most common case for
readPackage
can be done with a simple json object.I was wondering if it would be a good idea to support this format in a
readPackageJson
hook.Why
Otherwise, you have to rely on creating a
project/pnpmfile
directory withpackage.json
and usingrecursive install
which is a bit cumbersome. Or you have to copy in some code to parse the json format.Supporting packages would just be a simple matter of copying a json file for each package that needs patching. Or you could distribute a
pnpmfile-preset-crna.json
for CRNA. Keeps things simple. Although the package approach allows for easier updates.Format
Here is a format I use:
Example
Questions
Should we use:
or
Beta Was this translation helpful? Give feedback.
All reactions