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

Latests version of packages contain development files #65

Closed
MatthiasKunnen opened this issue Mar 23, 2021 · 2 comments
Closed

Latests version of packages contain development files #65

MatthiasKunnen opened this issue Mar 23, 2021 · 2 comments

Comments

@MatthiasKunnen
Copy link

The packages contain among other things; .eslintcache, tsconfig.tsbuildinfo, tsconfig.json, and spec files. These files increase package size and might contain personal information.

Examples:

  • @nodelib/fs.scandir@2.1.4
  • @nodelib/fs.stat@2.0.4
  • @nodelib/fs.walk@1.2.6

Instead of using blacklisting with .npmignore I recommend whitelisting with the files property in package.json. That way you can't accidentally publish files.

@iComputer7
Copy link

iComputer7 commented May 3, 2021

I noticed this as well. There are also test files included in the modules that are causing my Typescript builds to fail.

Versions:

  • @nodelib/fs.walk@1.2.6
  • @nodelib/fs.scandir@2.1.4
  • Nodejs version v14.15.4
  • NPM version 6.14.10

I don't have any testing libraries installed as dependencies.
Removing the src directory and extraneous tsconfig files for each module seems to solve most of my issues.

If these packages are only dependencies for packages that you've installed, you can just add this line to your tsconfig.json:

"exclude": ["node_modules/@nodelib/**/*"]

@mrmlnc
Copy link
Contributor

mrmlnc commented Jun 4, 2021

Fixed with the following versions:

  • @nodelib/fs.macchiato@1.0.4
  • @nodelib/fs.scandir@2.1.5
  • @nodelib/fs.stat@2.0.5
  • @nodelib/fs.walk@1.2.7

@mrmlnc mrmlnc closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants