Skip to content
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

Merged
merged 38 commits into from
Dec 2, 2024
Merged

Modernize Build... #134

merged 38 commits into from
Dec 2, 2024

Conversation

lishaduck
Copy link
Contributor

@lishaduck lishaduck commented Nov 30, 2024

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

  • ESM-only bumps
  • Fix bug cwd bug
  • More cleanup

I just wanted an esm dist to make it debuggable...
@coveralls
Copy link
Collaborator

coveralls commented Nov 30, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling d526f9d on lishaduck:modernize
into e7fdd3e on jeffijoe:master.

Copy link
Owner

@jeffijoe jeffijoe left a comment

Choose a reason for hiding this comment

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

This is awesome!

@lishaduck
Copy link
Contributor Author

lishaduck commented Nov 30, 2024

Sooo... I was stuck in a car for a 7 hours today (post-holiday traffic jams b/c snow) and was sorta bored...
Time for a push! I kinda fixed #131 and refactored the rest of everything in the process.

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.
@lishaduck
Copy link
Contributor Author

lishaduck commented Nov 30, 2024

Here ya go. Hopefully the rebase didn't break anything.

Cool, just need to fix that coverage real quick!

@lishaduck lishaduck marked this pull request as ready for review November 30, 2024 22:11
@lishaduck
Copy link
Contributor Author

Sorry for making you have to review this...

@lishaduck
Copy link
Contributor Author

Yeah, but I don't have the typesync installed on my windows VM, just sheriff for the repro.

@jeffijoe
Copy link
Owner

jeffijoe commented Dec 1, 2024

[email protected]

@lishaduck
Copy link
Contributor Author

lishaduck commented Dec 1, 2024

Ok, glad I tested. Something broke (yes, it's that slow)

@lishaduck
Copy link
Contributor Author

🤦‍♂️ onlyfiles is true by default.

Tinyglobby's defaults are based on fast-glob.
@lishaduck
Copy link
Contributor Author

Ok, this PR is good, but I found another bug, I'll probably push the fix if I find the issue.

Copy link
Contributor Author

@lishaduck lishaduck left a 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.

@lishaduck
Copy link
Contributor Author

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.

@jeffijoe
Copy link
Owner

jeffijoe commented Dec 2, 2024

Lmk when you're done and I'll merge 👍

@lishaduck
Copy link
Contributor Author

I'm done.

@jeffijoe jeffijoe merged commit ff6be67 into jeffijoe:master Dec 2, 2024
5 checks passed
@lishaduck lishaduck deleted the modernize branch December 2, 2024 13:40
@jeffijoe
Copy link
Owner

jeffijoe commented Dec 2, 2024

Released as 0.14, thanks @lishaduck !

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.

Monorepo support (allegedly) broken on Windows
3 participants