Skip to content

Update deps, swap tiny-glob for fast-glob #963

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

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Update deps, swap tiny-glob for fast-glob #963

merged 1 commit into from
Oct 30, 2022

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented Oct 30, 2022

Changes

Updates deps, swaps tiny-glob for fast-glob (former hasn’t been updated in quite some time).

⚠️ Note: main is failing CI; will fix in a following PR.

How to Review

See comments

Checklist

  • Unit tests updated
  • README updated
  • examples/ directory updated (if applicable)

@@ -114,11 +116,11 @@ async function generateSchema(pathToSpec) {

// output
if (output === OUTPUT_FILE) {
let outputFilePath = path.resolve(process.cwd(), flags.output); // note: may be directory
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overdue cleanup: URL() is a vastly-preferred way to work with the filesystem in Node, because it’s not only faster, but it also works in both Windows and *nix systems without any fuss. And no more awkward path.join() or conditional path.sep logic; simply use forward slashes and It Just Works™

path.resolve() is a bit of a convoluted mess under-the-hood. It’s great when it works, but it’s a headache when it doesn’t.

@@ -4,14 +4,15 @@
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2018"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another overdue cleanup: most modern versions of Node don’t need legacy codegen.

@drwpow drwpow merged commit 5a33a49 into main Oct 30, 2022
@drwpow drwpow deleted the deps branch October 30, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant