np
np copied to clipboard
"Show files added since..." feature should ignore the `.github` directory
I keep getting:
? The following new files are not already part of your published package:
- .github/workflows/main.yml
Continue? (y/N)
Which is not useful.
// @bunysae
It also showed a false-positive just now:
~/dev/oss/is-retry-allowed master
❯ np
? The following new files are not already part of your published package:
- index.test-d.ts
Continue? (y/N) y
iindex.test-d.ts is not in files in package.json.
Another bug, I got this when publishing p-timeout just now (this commit https://github.com/sindresorhus/p-timeout/commit/e26f08d43fe0a8f58c169b60feaac863041e4e3e):
~/dev/oss/p-timeout master
❯ np
? The following new files are not already part of your published package:
-
Continue? (y/N)
The last issue is caused by: https://github.com/sindresorhus/np/commit/3466903c8940d5bcbf12e17ac27e65f66e990d3b
There is maybe a misunderstanding. The prompt shows the files, which are added to the git repository, but which are NOT added to the npm package. I assume you thought the prompt shows the files which are added to the git repository and which will be published in the npm package.
The message is very misleading then.
The following new files are not already part of your published package:
This makes it sound like it's just a warning that a new file is added to the package, not that it's not going to be included in the package.
Shouldn't we do both? For a new file, indicate that it will be included in the package, and if it will not, indicate that too. That way there's no way you accidentally include a file you don't want, and also no way to forget to include a file. That was the original intent of the feature.
Can we close this it it is implemented? @sindresorhus @bunysae
I don't think all the issues mentioned here are resolved.
I'm also getting this for the .storybook directory, should it be ignored too?
Maybe there should be a setting to add an array of directories to ignore.
I don't think it's worth having a setting for this. We can hard-code a list of common things. You should only be prompted about this once anyway.
Just encountered this and I'm quite confused what it means and for me it's unclear what decision I'm actually making here.
➜ np prerelease --tag latest
? The following new files are not already part of your published package:
- src/core/collection.ts
Continue? (y/N)
In my case, src is never ever part of the published package, as I am transpiling the TypeScript code to JavaScript code for the published package. Why does the prompt actually recommend N as answer here? What does this mean? :D
@thasmo Can you try out https://github.com/sindresorhus/np/pull/595? It should be clearer there.