Any plans for checking the files array or npmrc
I am regular user of pkg-ok and loves it 😄
I try to be explicit about the files I publish to the npm using the files array or the .npmrc file. I have been bitten quite a few times, where as per pkg-ok the paths are correct, however, I forgot to add them to the files array.
I am checking to see if you have any plans to check the published files and then validate paths. Not only it makes sure that the path exists, it also makes sure that paths are also published to npm.
I am happy to work on this feature (only if you want to add it).
Thanks
Thanks @thetutlage :) glad you like it.
Not sure to know how files field relate to .npmrc? Could you point me to some docs?
Also a basic package.json and .npmrc examples would be helpful.
Maybe the @thetutlage has meant the .npmignore rather than .npmrc, I'm not sure if latter can control what gets published to the registry.
Maybe there is an npm JS API or npm publish --dry-run could be used to get the list of files that will be published and match against that.
For reference - this is what got implemented in Preconstruct to validate this sort of a thing: https://github.com/preconstruct/preconstruct/blob/50744cf58f9473c16e765e92c441a118a5b5b985/packages/cli/src/validate-included-files.ts#L8
Nice. npm-packlist looks particularly useful.
npm pack --dry-run --json shows which files will be packaged: https://github.com/sindresorhus/np/pull/682
This could then be verified against the files list.