Skip to content
This repository has been archived by the owner on May 14, 2018. It is now read-only.

feat: add a hook to modify dependency manifests #12

Merged
merged 1 commit into from
Sep 2, 2017
Merged

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Aug 31, 2017

@zkochan
Copy link
Member Author

zkochan commented Aug 31, 2017

Hey, @vjpr and @andreineculau.

This PR adds a hook to pnpm's installation engine for rewriting dependencies' manifests.

pnpm will probably require a pnpm.js file from the root of the package, if available, and hooks or other configs will be exported by that file. That will be another PR in the pnpm repo

@andreineculau
Copy link

this looks fantastic! need to try it out but a glimpse through the diff passed my mental compiler

@zkochan
Copy link
Member Author

zkochan commented Sep 1, 2017

I think this hook will be super powerfull with the alias feature added: pnpm/pnpm#837

I'm not sure though how to implement that. Maybe through another hook

@vjpr
Copy link
Contributor

vjpr commented Sep 2, 2017

Looks really cool!

pnpm will probably require a pnpm.js file

I vote for pnpm.config.js.

@zkochan
Copy link
Member Author

zkochan commented Sep 2, 2017

I called it pnpmfile.js. Here's the change: pnpm/pnpm@0330ff0

I published the change with pnpm version 1.12.0 and posted an article about it: Why package managers need hook systems

@andreineculau
Copy link

I would have also +1 ed the pnpm.config.js (or pnpmrc.js or pnpm.js or the dotted variants) but it's not the end of the world. It's just both not clear (what it does, how do you write it : pnpm-file like in the comment above or pnpmfile), and overly verbose (a file called *file*).

@zkochan
Copy link
Member Author

zkochan commented Sep 2, 2017

It can be changed. The reason I did not call it with the rc or config suffix is that we use npm's config system which uses .npmrc files.

The file suffix is used by gulpfile.js, Gruntfile.js, Dockerfile. So it seemed to me like a convention.

If any of you would really prefer a different name, please create an issue and we'll make a vote or something like that.

@zkochan zkochan deleted the feat/hooks branch September 17, 2017 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants