-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why is popsicle in the devDependencies only? #13
Comments
No, not right. I don't have to specify it as a peer dependency for it to work. It's also not a dependency, it's used with |
In that case, why do you import the Request class from popsycle at L3 and create an instance of it at L27? return resolve(new Request(options))
Prepublish in your repo works fine with pnpm. I was talking about prepublish of rxjs |
Ok, so it does use it in the latest version (I thought it was only in type positions), but that shouldn't change anything. There's no need to rely on a flat structure or nested structure, this module works fine with all NPM versions. I think there's an issue in |
pnpm uses symlinks to link packages from the store to node_modules. Symlinks are resolved to realpath by Node. If you would at least add popsicle as a peer dependency, it would work with pnpm, because pnpm links peer deps to node_modules. IMHO, if you use a package, it should be specified in |
I don't see any reason it needs to be specified, it relies on extremely common and documented behaviour of node's module system. It's a peer dependency and NPM has trouble with pre-releases in peer dependencies positions so I typically avoid it. If you really wanted, you can set it in |
That change was reverted in Node v6.3. Don't get me wrong, I am investigating. If you think this is fine you might be right, I will open an issue on pnpm and discuss it there. |
Ah, that's unfortunate. I thought it was a worthwhile change. I'm happy to merge a PR to add it as a wildcard peer dependencies, I'm not sure if that'll mess with anything, but it's probably fine. I still believe, in the long run, figuring out how to workaround this might be worthwhile. I'm sure there's more modules than just mine that have relied on how NPM and node modules resolve (which happens to work for both flat and nested trees here, just not with symlinks). |
Thanks! I will try to find out whether this is a widely-used pattern and how to best solve it before creating a PR. Regarding Node, that is unfortunate, for sure, at least from pnpm's perspective :-) But I think I did manage to come up with a structure that solves most of the issues in pnpm 0.47. Also there is a discussion about trying to fix the symlinking issue in Node: nodejs/node-eps#46 |
Thanks for the link, it seems using symlinks would actually break |
reason to be specified: its production used dependency. It might be true that everything seems to working correctly at the time im typing this. But (a) its broken contract of shared dependency environment (everything you need is specified in pkg) (b) there is no guarantee it wouldnt be broken in the future |
and let say is it working with npm@2? |
If you looked at it, it works with NPM 2, 3, 4, whatever version you want - you can check CI. There is a guarantee it wouldn't be broken, because that's how the node module system works. I think you're misunderstanding something - this module can only ever be used with |
Also, I'm pretty confident you'll have issues with https://github.com/TypeStrong/ts-loader and https://github.com/TypeStrong/ts-node - those are off the top of my head because I work with them often. They also use |
thanks for explanation |
Hi, I am testing how pnpm works on some of the most popular Node packages. I was doing a pnpm install on the rxjs repo and I noticed that the prepublish script failed because popsicle-retry could not find popsicle.
I understand that this works with npm@3 and yarn, as they create a flat dependency tree, but is there a reason not to include popsicle as a dependency? You can at least include it as a peerDependency, I think.
It doesn't make sense to have it in devDependencies. You either need it in dependencies or in dev deps + peer deps, am I right?
The text was updated successfully, but these errors were encountered: