kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
895 stars 237 forks source link

fs-routes: Lock glob version to 8.x.x for compatibility on Windows #862

Closed rokoucha closed 1 year ago

rokoucha commented 1 year ago

Since the combination of fs-routes and glob 9 or later stopped working on windows, I changed it to explicitly support up to glob 8.

https://github.com/isaacs/node-glob/blob/main/changelog.md#90

Last-Order commented 1 year ago

According to the docs, the backslash path delimiter is not supported by glob since 8.x. And we can confirm that 8.x is not working in projects using openapi-framework anymore so maybe we should lock the version to 7.x?

rokoucha commented 1 year ago

As far as I have tried, it works fine with glob 8.x.

Paths are returned in the canonical formatting for the platform in question. https://github.com/isaacs/node-glob/blob/main/changelog.md#90

I think this change may have destroyed it.

jsdevel commented 1 year ago

@rokoucha plz fix the build

rokoucha commented 1 year ago

@jsdevel I fixed it. It seems that it was originally unstable, not broken by my change.

meyerds commented 1 year ago

A better option to fix this issue might be to change file on this line to path.posix.normalize(file) which will avoid dependency on a specific glob version (though I haven't tested this fix on a Windows machine, someone will need to do that first)

jsdevel commented 1 year ago

@rokoucha i agree with @meyerds . locking down a dependency potentially opens up this project to dep lock in and security vulnerabilities in the long wrong. can you try fixing it with the latest glob?

rokoucha commented 1 year ago

OK, I will close this PR and try to fix it with a new PR. thanks for the comments!