Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing ignored files prompt #577

Closed
adam-lynch opened this issue Nov 4, 2020 · 5 comments · Fixed by #583
Closed

Confusing ignored files prompt #577

adam-lynch opened this issue Nov 4, 2020 · 5 comments · Fixed by #583

Comments

@adam-lynch
Copy link

Description

I got the following prompt when running np today:

The following new files are not already part of your published package:
- .../config/dependenciesObjectContainsToDesktopCLI/index.js
- .../dependenciesObjectMissingToDesktopRuntime/index.js
Continue? y/N

These files will not be published. They're both inside test/fixtures and this is the files property in my package.json;

	"files": [
		"build",
		"docs",
		".env",
		"LICENSE",
		"README.md"
	]

Steps to reproduce

  1. Set up a project with a similar files property.
  2. Publish.
  3. Add some files inside an npm-ignored directory.
  4. Try to publish again.

I'm not 100% sure about this because I haven't seen this prompt before. Maybe something changed in np since the last time I published (I use npx)

Expected behavior

I shouldn't be seeing this prompt. Also, I found the message unclear. To me it's not clear this is related to ignored files, I discovered that by looking at the source.

Environment

np - 7.0.0 (I use npx)
Node.js - 10.18.0
npm - 6.13.4
Git - 2.24.3 (Apple Git-128)
OS - macOS Catalina 10.15.2

@sindresorhus
Copy link
Owner

// @bunysae

@jmshal
Copy link

jmshal commented Nov 4, 2020

I'm also experiencing this issue - on each of our Azure DevOps pipelines, as we target the latest version of np. So, I'm having to adjust each of our pipelines to target np@6 instead. This issue causes the build to hang indefinitely (see screenshot below).

Screen Shot 2020-11-05 at 10 26 28 AM

@mansona
Copy link

mansona commented Nov 11, 2020

I also noticed this issue for a file that was explicitly in the .npmignore file 🤔 it could be an odd one because it's prefixed with a /:

/.template-lintrc.js

Here is an example of it in place: https://github.com/ember-cli/ember-addon-output/blob/master/.npmignore#L17

@bunysae
Copy link
Contributor

bunysae commented Nov 12, 2020

@adam-lynch
Issue reproduced. The git command we used abbreviate long file paths. Will fix asap.

@bunysae
Copy link
Contributor

bunysae commented Nov 28, 2020

@mansona
This is the expected behavior. /.template-lintrc.js is not part of the package and we show this prompt to report files, which are accidentally ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants