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

Upgrade globby to latest version #84

Closed
altro3 opened this issue May 24, 2021 · 3 comments · Fixed by #77
Closed

Upgrade globby to latest version #84

altro3 opened this issue May 24, 2021 · 3 comments · Fixed by #77

Comments

@altro3
Copy link

altro3 commented May 24, 2021

Now I have warnings in console log:

warning cpy > globby > fast-glob > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning cpy > globby > fast-glob > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

These warnings already fixed in all libraries. All what you need - upgarde globby to version 11.0.3

@sindresorhus
Copy link
Owner

Pull request welcome, but it will require some changes for Windows.

@flvyu
Copy link

flvyu commented Jun 8, 2021

I had a PR up for this, but closed it since there was a duplicate one. What kind of changes do you think are needed? I can try and help.

@TheWyo
Copy link

TheWyo commented Jun 14, 2021

I did some digging into this to see what's up on Windows, here's what I found:

cpy could be updated to do .replace(/\\/g, '/') on windows, but micromatch recommends against this (and it doesn't seem like a great solution, there's bound to be cases where blindly applying that to users' patterns would be wrong). So instead seems like the only option might be to have cpy have the same "only use forward slashes" requirement as globby.

If that approach is taken, all that's needed to get the 2 affected tests passing again is to do two things:

  1. Run .replace(/\\/g, '/') on t.context.tmp (replacement here should be safer as we're actually expecting to receive a path here, not potentially a pattern that could have escapes), and use that in place of the current direct usages of t.context.tmp.
  2. To avoid node's path lib inserting backslashes, swap path.join calls to path.posix.join.

These might be things worth considering applying to all the tests for consistency rather than making an exception of those 2.

Happy to make a PR if people are happy with this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants