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

"files" field removed from package.json. Test files etc. included in published package #42

Closed
2 tasks done
RubenStoesser opened this issue Feb 17, 2023 · 4 comments
Closed
2 tasks done

Comments

@RubenStoesser
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the regression has not already been reported

Last working version

1.0.0

Stopped working in version

2.0.0

Node.js version

all

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

13.2.1

💥 Regression Report

In a PR released with 2.0.0 (#6) the files field in package.json was removed.

Due to this all files of the repo are now included in the published npm package (tests, benchmarks, examples etc.).

Steps to Reproduce

I only noticed this because in our CI environment Mend security scans started failing with this error message while resolving the dependency tree:

java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: node_modules/@fastify/send/test/fixtures/snow ???

This seems to be caused by the snowman emoji in this folder name:
https://github.com/fastify/send/tree/master/test/fixtures/snow%20%E2%98%83

The issue wasn't present before because the entire tests folder was excluded from the published npm package.

Expected Behavior

Usually only relevant production files need to be included in the published package. If the change was on purpose another quick-fix for this specific issue would be to remove the non-standard character from the "snow" folder name

@climba03003
Copy link
Member

If the change was on purpose another quick-fix for this specific issue would be to remove the non-standard character from the "snow" folder name

The changes is on purpose and those characters exists also on purpose for testing the characters handling.

@Fdawgs
Copy link
Member

Fdawgs commented Apr 13, 2023

See fastify/skeleton#42

@Fdawgs Fdawgs closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2023
@marccremer
Copy link

The issue fastify/skeleton#42 points out that we should NOT include test folders, or have I misunderstood something?

image

@Eomm
Copy link
Member

Eomm commented Aug 15, 2023

we should NOT include test folders, or have I misunderstood something?

You have misunderstood:

image

Anyway, that image shows this pinojs issue: pinojs/pino#1588
That org is not the fastify one, so org has its rules.

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

No branches or pull requests

5 participants