Breaking change of 2.0.1 - if files not found it gives an error.
See original GitHub issueEnvironments:
- Prettier Version: 2.0.1
- Running Prettier via: CLI
- Runtime: Node.js
- Operating System: Linux
Steps to reproduce: With 1.19.1 run
"npx prettier app/**/*.js test/dummy/spec/javascripts/**/*_spec.js vendor/assets/javascripts/gcc/externs/*.externs.js --write -c --config prettier_conf.json"
it runs
With 2.0.1 run
"npx prettier app/**/*.js test/dummy/spec/javascripts/**/*_spec.js vendor/assets/javascripts/gcc/externs/*.externs.js --write -c --config prettier_conf.json"
[error] No files matching the pattern were found: "test/dummy/spec/javascripts/**/*_spec.js".
[error] No files matching the pattern were found: "vendor/assets/javascripts/gcc/externs/*.externs.js".
Expected behavior: I would expect that something that has worked with 1.19.1 would continue working with 2.0.1. Yes, there are no such files in the specific folder. But we were depending on this. It was a common procedure for us. We have hundreds of places and projects that got broken today.
Thank you for the terrific job with Prettier, but I would expect that things continue working on an upgrade. Should it give an error? I don’t know. But were were depending on it not given an error. It’s not a bug, it is a feature on which we’ve based our building infrastructure.
And yes, we could fix it. But that is not the point.
Actual behavior:
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Breaking change in 2.1.0 · Issue #286 · pallets/markupsafe
After installing a tiers tool, this error occured: File ... Breaking change in markupsafe makes flask crash on service startup ...
Read more >How to Polyfill node core modules in webpack 5
BREAKING CHANGE : webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify...
Read more >Changes — Flask Documentation (2.2.x)
Flask in debug mode will now complain with an assertion error if a view was attached after the first request was handled. This...
Read more >Changelog - devtools
This file has a new name, CRAN-SUBMISSION (instead of CRAN-RELEASE) and now ... If the email is not changed, the code now stops...
Read more >Breaking changes in .NET Core 3.0 - Microsoft Learn
In this article. ASP.NET Core; Core .NET libraries; Cryptography; Entity Framework Core; Globalization; MSBuild; Networking. If you're ...
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
The new behavior matches the behavior of the ESLint CLI. ESLint has
--no-error-on-unmatched-pattern
though. We might want to add it too.1.19.1 printed an error if it couldn’t match any file at all—for all the patterns together, not for an individual pattern. 2.0.1 now also prints errors for individual patterns.