-
Notifications
You must be signed in to change notification settings - Fork 22
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
Modernize Build... #134
Modernize Build... #134
Conversation
I just wanted an esm dist to make it debuggable...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
Sooo... I was stuck in a car for a 7 hours today (post-holiday traffic jams b/c snow) and was sorta bored... EDIT: Interactive rebasing to make the commits easier to review. |
Vitest's inference isn't as good, unfortunately.
Tests now fail if they don't explicitly test anything.
`fakes.ts` no longer exists and `types.ts` is fully tested (somehow).
Drop `filterMap` in favor of the `flatMap` method. Prefer the `includes` method. Replace sole source of mutability with a ternary.
We only write nice, pure functions that don't use classy state. If we let ts know, it'll stop complaining sometimes. We've already done it elsewhere, this just makes it consistent.
Glob provides a root option, which we should use instead of `join`. Why? `join` will normalize it to a Windows path. node-glob only takes POSIX paths, so we can't use `join`. Fixes jeffijoe#131.
This is explicitly warned against in the Node documentation, to the point that Deno doesn't even support doing this (easily). This is also a potential bug Windows bug as well. And best part of all: the new code is shorter!
And squeeze out some optimizations in globbing. We can glob for all of the patterns at once, and also ignore the ignored workspaces to reduce i/o.
Here ya go. Hopefully the rebase didn't break anything. Cool, just need to fix that coverage real quick! |
Sorry for making you have to review this... |
Yeah, but I don't have the typesync installed on my windows VM, just sheriff for the repro. |
Ok, glad I tested. Something broke (yes, it's that slow) |
🤦♂️ |
Tinyglobby's defaults are based on fast-glob.
Ok, this PR is good, but I found another bug, I'll probably push the fix if I find the issue. |
It doesn't seem to be installed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the bug, CI's green.
I was thinking about this and realized I'd thought of another bug in paths, which fixing should give a nice perf boost, so I'm going to do it. |
Otherwise, `readFileContents` doesn't work as expected.
Can bump with Node 18.
Lmk when you're done and I'll merge 👍 |
I'm done. |
Released as 0.14, thanks @lishaduck ! |
I just wanted an esm dist to make it debuggable...
Summary:
Might break node 16?(Yeah, rolldown doesn't support 16)Summary part 2:
Summary pt. 3