| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
🦋 Changeset detectedLatest commit: 0bbcc29 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 80.55556% with 7 lines in your changes missing coverage. Please review. @@ Coverage Diff @@
## next #1655 +/- ##
==========================================
- Coverage 82.52% 82.47% -0.05%
==========================================
Files 53 53
Lines 2357 2357
Branches 697 697
==========================================
- Hits 1945 1944 -1
- Misses 370 371 +1
Partials 42 42 ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
|
Hi @bluwy any update on merging this? |
Sorry, something went wrong.
|
I haven't finished the tasks I mentioned in my last comment, but I'm also unfortunately not interested in updating anymore given I had no reviews when it was ready. If anyone would like to help out, that'd be much appreciated. |
Sorry, something went wrong.
|
This is a prerequisite to this work: #1872 . I'll land this soon to unblock this work here, see the discussion that led to this PR here: #1795 (comment) |
Sorry, something went wrong.
|
@marcalexiei I know you were interested in this work. I just updated this PR after landing your work. There are known type errors here because the Changesets' Packages require a string literal for the tool (it assumes known tools) whereas the manypkg's Tool is now more generic and the tool type is typed as just a string. Treating it as string is probably more future-proof and flexible... but it's also kinda more annoying. So dunno, I invite you to take a look at the current state of this PR and participae in the discussion.
The new requirement is more strict but I think it's ultimately more correct. We might want to differentiate further in the future between npm-managed workspaces and root-only repositories without lockfiles.
This was largely addressed by #1872 , WDYT?
I thiiiink Rush might not support the root package in the same sense as other tools support it today. Its workspaces might be defined in its own config file or something. But honestly, I'd have to do a deeper research on this to answer this properly.
This was also addressed by #1872 |
Sorry, something went wrong.
How about using a 'npm' | 'pnpm' | ... | (string & {}) union for Changesets’ Packages?
Would you like me to open a PR on this branch using this approach? |
Sorry, something went wrong.
|
This was a simple fix - so I think it wasn't worth opening a different PR for this. I just pushed it out here. Do you think it's worth keeping up with manypkg's compatibility or at this point it's just making things more complicated than they should be? I'm torn on this - but also, manypkg is also controlled by us so we can refactor it however we want to suit our needs. So ultimately, it's kinda a choice of:
|
Sorry, something went wrong.
|
Changesets is the main consumer followed by backstage. Not sure we need to worry too much about anyone else $ npx github:Fuzzyma/e18e-tools @manypkg/get-packages -n 20 -U https://npm.devminer.xyz/registry -q -o md
|
Sorry, something went wrong.
Perfect, thank you!
Personally, I’d lean toward option 1 (landing this PR and settling on this approach). The main advantage is that moving to an object-based tool gives us forward compatibility. It creates space to evolve the API (e.g. adding new properties or methods) without forcing breaking changes later. I’m not sure yet what we might need for tools like Rush, but this keeps that door open. It also enables more tool-specific extensions in a type-safe way. For example: type Tool =
| { type: 'pnpm'; pnpmMethod: () => void }
| { type: 'yarn'; yarnMethod: () => void }
| { type: string | {} };
function isToolTypeKnown(x: Tool): x is Extract<Tool, { type: 'pnpm' | 'yarn' }> {
return x.type === 'pnpm';
}
const tool = {} as Tool;
if (isToolTypeKnown(tool)) {
if (tool.type === 'yarn') {
tool.yarnMethod();
} else {
tool.pnpmMethod();
}
}If this direction works well in practice, we could then revisit whether @changesets/get-packages should evolve accordingly. |
Sorry, something went wrong.
|
That sounds good to me. I'll wait a couple of days before landing this to give @bluwy the chance to comment too. |
Sorry, something went wrong.
|
We still need to remember to update the bot. If you'd be interested in helping with that, I'd really appreciate it. |
Sorry, something went wrong.
I can take a pass at this. I’ll open an issue in the bot repo with all the relevant references so we don’t lose track (I remember you already pointed out the parts that need updating). Sounds good? |
Sorry, something went wrong.
|
Sounds good! thanks 🙏 |
Sorry, something went wrong.
I'll leave it to y'all to handle this as I don't have much time to follow-up on this lately. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Some code added to handle the breaking change, mainly the Package now needs to specify dir and relativeDir. And the tool needs to be a tool from @manypkg/tools and not just a string.
There are a lot of line changes adding package-lock.json to the fixtures because that's the only way for it to detect as monorepo (npm). Previously a "workspaces" only field was sufficient. @Andarist I'm not sure this is the most ergonomic, shouldn't npm monorepos be detected as fallback without the need for package-lock.json to exist?
Unrelated but if I may give feedback on the new breaking APIs, I'm not a big fan of passing the tool object entirely from @manypkg/tools. It should've supported a simple string like before and a union of Tool object instead.
Also, I'm not entirely clear for Packages type, why the returned rootPackage could be undefined while rootDir is not? rootPackage shouldn't be possible to be undefined from what I can tell (at least for default tools).
Also, I'm not sure if it was necessarily to introduce both dir (absolute) and relativeDir (relative) in the object. Feels redundant.