GithubHelp home page GithubHelp logo

Comments (9)

conartist6 avatar conartist6 commented on July 23, 2024

I think the thing to do is to parse the glob, then potentially warn and fall back. I'll work on a PR.

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

Hmm, it's more interesting than that I guess. Here's what watchman actually supports for globbing: https://github.com/facebook/watchman/blob/061e6abd75449256e00cd8880b94d030f3360ee4/tests/wildmatch_test.json

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

I opened a PR for option 2 since it's the simplest correct behavior.

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

Also it seems like wildglob supports [!...] and [^...] for negated character classes where ... is characters which should not be part of the class. It seems that micromatch only supports [^...].

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

Fortunately it should be possible to use the parser to translate from [!...] to [^...]

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

er, actually I guess the translation would be from [!...] to [\!...]

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

I'm also going to follow up with watchman and see if it would be possible for them to gain more support by using fnmatch

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

Oh, and it looks like sane can gain at least braces support for watchman using micromatch.braces(glob, { expand: true })

from sane.

conartist6 avatar conartist6 commented on July 23, 2024

Unfortunately I none of the glob parsers I've found (save glob-parse, which is hardly well supported) give me the flexibility to identify the source text of POSIX brackets glob segments, so for the moment I think it's OK to let that smaller issue persist.

from sane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.