tink: State of the Unwinder [2018/11/12]

tink

(Kat Marchán) #1

It works, damnit. It works!

It Bloody Works™

No, seriously, I think the biggest news I have today is that as of tink@0.14.0, the following workflow works for me out of the box:

$ tink add <dep>
$ tink sh
> require(<dep>)
> ^C
$ tink rm <dep>
$ tink add which
$ npx which which
./node_modules/.bin/which

That means the primary workflows are all working! That includes linking bin packages and getting them working, having tink add and tink rm, and finally, lazily loading already-declared dependencies on demand. What this means is that if you pull down from a coworker’s work, and you just tink sh, you’ll automatically fetch any missing deps.

Note that tink doesn’t automatically add dependencies you haven’t declared. There might be an interactive interface with it so it does this when you do --interactive, but that’s really not a priority right now, and I really want this to be safe for everyone involved.

pkgmap -> pkglock refactor

As discussed last week, I was working on getting rid of .package-map.json as the primary conduit for finding dependencies. Instead, we just use package-lock.json now, and pretend all of node_modules is potentially a virtual directory. The caveat is that if a file already exists in the real node_modules, we prioritize that file instead – that means per-file overrides are as easy as just writing them to the filesystem!!

Implemented more subcommands

Huge thanks to the community for jumping in on this, we now have 7 whole subcommands available in tink:

  • tink add
  • tink rm
  • tink prepare
  • tink shell
  • tink org - Contributed!
  • tink ping - Contributed!
  • tink deprecate - Contributed!

While some of those ancillary commands may seem lower priority to you, having them is incredibly important to have a rounded-out package manager. Once this is done, you wouldn’t need to run npm at all yourself!

Additionally, all the other subcommands requested in tink: Implement ancillary subcommands have been claimed and/or have open PRs that should be getting merged this week, as well as tink search, tink view, and tink check-license, so there’s plenty to be excited about. There was also an awesome contribution of wrap-up and unit tests for the fs overrides so we can have much more confidence in that code!

And seriously, once again, an ENORMOUS THANK YOU to all the members of the community who have jumped on board and officially become part of the future of package management :muscle:. This wouldn’t have been possible without your help!

Next Steps

There’s only one week until my team gets 2 extra folks starting, and next week is also a holiday week in the US, so we can expect things to slow down a bit after this one. In the meantime, I’m gonna be trying (with the rest of y’all!) to do what I can to wrap up any major bits so we can have some leftover momentum after all that fatty holiday food!

The main bits are:

  • Wrap up the rest of the current subcommand PRs.
  • Get going on webpack stuff again now that things are more established.
  • Do more work on fs.
  • Start writing tests for tink in earnest (I’ll need a lot of help here!)
  • Get npm check started (or finished?).

I’ll be putting up more #help-wanted posts for things that y’all can help with, and of course, small PRs for known stuff is always welcome, but do try and follow the claiming system for call-for-contribution posts so no one gets preempted!