format command sorts "files" property and breaks packages
See original GitHub issueDescription
syncpack is reordering the contents of the “files” property which changes the contents of the tarball when using “npm publish” or “npm pack”.
example package.json:
{
files: [
"dist/",
"!*.test.*",
"!__mocks__"
]
}
command:
npx syncpack format
result:
{
files: [
"!*.test.*",
"!__mocks__",
"dist/"
]
}
expected result:
{
files: [
"dist/",
"!*.test.*",
"!__mocks__"
]
}
The only work-around is to use .npmignore and remove the files property, but this becomes unmanageable.
Suggested Solution
Do not sort the “files” property.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Dir Command (Examples, Options, Switches, & More) - Lifewire
The dir command is a Command Prompt command that's used to display a list of the files and subfolders contained in a folder....
Read more >dir | Microsoft Learn
Reference article for the dir command, which displays a list of a directory's files and subdirectories.
Read more >Properties File Format - Oracle Help Center
The properties files read by Nucleus must follow a format that is recognized by the class java.util.Properties . The rules for the format...
Read more >5. Control files and their fields — Debian Policy Manual v4.6.2.0
The package management system manipulates data represented in a common format, known as control data, stored in control files. Control files are used...
Read more >What is a flat file and how does it work? - TechTarget
Learn what a flat file is and how it works, types of flat files and their use ... types of databases are significantly...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Great, thanks a lot. I have the fix ready locally and will release soon.
Works perfectly. Thanks for the fast turn around!
-Luke
On Fri, Jun 19, 2020, 12:21 Jamie Mason notifications@github.com wrote: