Code Monkey home page Code Monkey logo

Comments (8)

mgara avatar mgara commented on June 12, 2024 1

I added the required changes to my PR : #197

from fastify-autoroutes.

mgara avatar mgara commented on June 12, 2024

Ok I added a new one .. it worked .. it looks like it doesn't like the "status.ts" as a route

from fastify-autoroutes.

GiovanniCardamone avatar GiovanniCardamone commented on June 12, 2024

That's very strange, I need to investigate, thank you for the report

from fastify-autoroutes.

GiovanniCardamone avatar GiovanniCardamone commented on June 12, 2024

i can confirm there is a problem with route /status I think is something related to glob, because is not extracted from files

from fastify-autoroutes.

mgara avatar mgara commented on June 12, 2024

I think you might as well put it as a "known bug" and close this one ? it's up to you ...

from fastify-autoroutes.

GiovanniCardamone avatar GiovanniCardamone commented on June 12, 2024

I think is better if I can solve this. Also I want to investigate if there are more names who fall in the same scenario.

from fastify-autoroutes.

mgara avatar mgara commented on June 12, 2024

@GiovanniCardamone I'm running into glob issues again, now I'm not sure if your expression is wrong or right as this is the first time for me I deep dive into it.
When I remove the [!.test] In your glob expression... everything works perfectly except it adds the .test files .. :/ else I'm getting an empty array of routes:
the [!.test] doesn't match anything that starts with a t or an e or an s
this is a single-character matching...
According to glob documentation :

[...] Matches a range of characters, similar to a RegExp range. If the first character of the range is ! or ^ then it matches any character not in the range.

We should be using !(.test) but I can't make it to work :/

FYI : https://www.digitalocean.com/community/tools/glob?comments=false&glob=.%2F%2A%2A%2F%5B%21._%5D%2A%21%28.test%29.%7Bts%2Cjs%7D&matches=false&tests=.%2Fapp%2Ftags.ts&tests=.%2Fapp%2Ftag.ts&tests=.%2Fapp%2Fstatus.ts&tests=.%2Fapp%2Fbar%2F%7Bfoo%7D%2Fbaz.ts&tests=.%2Fapp%2F.hidden.ts&tests=.%2Fapp%2F_hidden.ts&tests=.%2Fapp%2Ffoo_dir%2F.hidden.ts&tests=.%2Fapp%2Fsome%2Ftesting_should_be_hidden.test.ts

this is my best bet so far :

./**/[!._]!(*.test).{ts,js}

from fastify-autoroutes.

GiovanniCardamone avatar GiovanniCardamone commented on June 12, 2024

sorry for the delayed response, i also have a lot of work and almost no time for personal project! :(
I hope I can have more free time soon so I can contribute with the open source!

Thank you a lot for the report and the PR. I have merged and released v3.0.2 with your fix

from fastify-autoroutes.

Related Issues (12)

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.