question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking change of 2.0.1 - if files not found it gives an error.

See original GitHub issue

Environments:

  • 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:closed
  • Created 3 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
thorn0commented, Mar 22, 2020

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.

1reaction
thorn0commented, Mar 22, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found