[FEATURE] Publish Manifest #60
Labels
feature
feature or request
idea
maybe bad, maybe good, but definitely a thing to think about
needs-discussion
is pending a discussion
From slack:
darcy
https://x.com/colinhacks/status/1798136783538176048
^ this is pretty interesting. It definitely frustrated me that npm didn't support more fields/usecases with publishConfig. pnpm seems to have broadened the scope (ref. https://pnpm.io/package_json#publishconfig) but still no engines. If engines was added then it would make dev* specific variants unnecessary (because you can define what the package publishes with vs. what the project is using). I recently suggested this in @ljharbs devEngines npm PR npm/cli#7253 (comment)
isaacs
Just googling and searching twitter, looking at colin's assumptions, and the discussion in there, it seems like there's a real user expectation that publishConfig ought to override the package.json fields at publish time, rather than config values at publish time. That's really interesting to me.
it highlights an interesting discrepancy between "package.json as dev config" vs "package.json as dependency package manifest"
when publishing (or installing the package as a dep), you want the "dependency package manifest" view, but when installing locally, you want the "dev config" view
it's obviously way too late to rearchitect the poor thing, but wow, how different history would've been if that'd been considered from the get-go. Like, no need for devDependencies, just put it in the "local dev config" part of the file, and put your dependencies in the "published manifest" part of the file, or something.
oic, yeah, people are assuming that because pnpm does that, lol
Maybe it'd be good for us to come up with some clean reliable vlt-specific way to say "yeah, I know what the package.json says, but at publish time, I want this or that to be merged into the manifest that goes in the tarball/registry"
publishManifest or something? then when we publish and create the tarball, we can throw out extraneous junk that only matters at dev time, and ship a terse flattened manifest? no devDeps, no prettier or eslint or tap fields, etc.
The text was updated successfully, but these errors were encountered: