node-glob: Document breaking changes for `glob@8`

It looks like glob@8 has been released, congratulations! We would love to upgrade, but before that, would it be possible to document the changes, particularly the breaking changes, for this release, in the change log? Thank you in advance.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 25 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Just to repeat what was already said above:

  • This is a change that occurred in a semver major. It should not have broken anyone unexpectedly, unless you are depending on * or >= or something foolish like that.
  • It is dropping support for a use case that has not been supported, explicitly in the readme, for 10 years.
  • It fixed the use of escape characters on Windows platforms (which was broken before).

A v8 minor will come with the ability to explicitly choose to use \ as a path separator and not an escape character in #468.

Since cwd and root are always paths, and not patterns, we can add /-coercion to those automatically.

You are 100% right, but why not mention it in the changelog?

I also had to change my patterns sent to glob when updating from v7.2 to v8.0, to not get empty array instead of correct list results.

On Windows, and mixing or joining path values with “child” glob patterns, it works quite fine directly with v7.2, while with v8.0 you are required to replace backslashes with forward-slashes (basic replace, or like using normalize-path or unixify packages).

  • does it come from the minimatch v3 to v5 update? (or v3.0 to v3.1 in unpublished 7.2.1 yet?) if so, it should be added to the changelog.md I think
  • even if the README mentions the “backslashes vs. forward-slashes” it in its Windows section, maybe it should be more explicit about how to manipulate path values and meet the expected glob pattern “format” and/or the “tools” to help do so. add a warning in the changelog telling it may have worked before but it is not the case anymore, requiring to review and possibly update your patterns.

Sorry for the ref, but fast-glob helped me understand with its

Use the normalize-path or the unixify package to convert Windows-style path to a Unix-style path.

@JustinBeckwith No worries! I definitely knew what you meant. More just trying to forestall the next dozen comments complaining about glob breaking their programs 😅

Just to repeat what was already said above:

  • This is a change that occurred in a semver major. It should not have broken anyone unexpectedly, unless you are depending on * or >= or something foolish like that.
  • It is dropping support for a use case that has not been supported, explicitly in the readme, for 10 years.
  • It fixed the use of escape characters on Windows platforms (which was broken before).

A v8 minor will come with the ability to explicitly choose to use \ as a path separator and not an escape character in #468.

Since cwd and root are always paths, and not patterns, we can add /-coercion to those automatically.

Same issue here. On Windows, version 8.x.x doesn’t find files in folder that works on 7.2.0

  • This is a change that occurred in a semver major. It should not have broken anyone unexpectedly, unless you are depending on * or >= or something foolish like that.
  • It is dropping support for a use case that has not been supported, explicitly in the readme, for 10 years.
  • It fixed the use of escape characters on Windows platforms (which was broken before).

Would it be possible to document these changes in the change log?

More just trying to forestall the next dozen comments complaining about glob breaking their programs

I’d just like to say that’s the most relatable comment I’ve ever seen on GitHub! 😅

Also - I appreciate the work you’ve done for the community, node and npm through the years. A major version breaking assumptions is not a huge issue.

Thank you! ♥️

This caveat has been in the readme for a a decade now (added in 386f7e8). But if someone has a repro case showing something that worked in v7 and doesn’t work in v8, I’d be happy to take a look.