-
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
Support PNPM Monorepos #119
Conversation
Note: I haven't added tests yet. I wanted to make sure this implementation was fine first. I'm not a big fan of adding code about a different file to a service about |
Forgot to remove a console.log. I'll get it :) |
Could you rebase this PR? I merged the other one! |
Yay! I found a bug in npm 🤣 |
Currently, it works... I was going to say... |
Ok, it works locally, but apparently Node 22.5 broke npm: npm/cli#7657 |
c14756e
to
da19f15
Compare
A bunch of stuff that was (and wasn't) needed for abstracting workspaces.
It's not yet the most efficient, but it passes the test suite!
Almost to a point I'm happy. I've got it reusing the package.json, now I just want to extract out fs to an interface so I can just mock the fs in tests instead of the cod, which should help readability (and code coverage). And then I'll need to clean up the history a bit more... |
This makes jump-to-definition much more useful.
I tried to enabled recommended-type-checked, but somehow ended up just making the arrays consistent.
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.
Looks good! Just gotta get CI to pass now.
Yup. I'll also need to get some tests (which I suppose is needed for CI). |
CI uses |
Ok, fair enough. See ya then! |
Added some tests, should be 100% coverage, but I don't have a good way of checking. |
npm run cover that should do it |
How is this line untested? typesync/src/workspace-resolver.ts Line 95 in c69636b
It's just a function declaration. And it's causing branch coverage problems? What? |
Ok, that was weird. I guess parameter defaults get considered as the declaration line, and branching %s factor in how high into the call stack it is??? |
Were you able to get the last branch covered? Also, looks like the bug has been fixed, we're just waiting for a release. |
Yup. 1860518
Yup. https://nodejs.org/en/blog/release/v22.5.1 Can I get a CI rerun? |
@jeffijoe, ping :) |
Thanks! I’ll release this tomorrow. :) nice work! |
Thanks to you! It was a pleasure to write, nicely architectured (I'll admit I'm not a big fan of dependency injection containers, but they do serve a purpose). It was lots of fun, entirely worthwhile, and feel free to ask me to fix monorepo support again if it breaks and you're not in mood to fix it yourself becuase I actually want to find an excuse to write some more code here 😉1 Footnotes
|
Closes: #118.
Depends on #117.Diff (GH doesn't like stacked PRs from forks): lishaduck/typesync@fix-monorepos...pnpm