-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
More flexible workspace detection #121
Conversation
🦋 Changeset detectedLatest commit: 1a4cd5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for #-api canceled.
|
✅ Deploy Preview for dmno ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -0,0 +1,3 @@ | |||
projects: |
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.
not sure about this name...
- "packages" feels a bit too javascript-y
- "services" is our current nomenclature, although technically here we are saying where folders are that might be dmno services, they still need a
.dmno
folder to be considered a dmno service - "workspaces" (npm, bun) is just confusing
- "projects" (moonrepo) feels fairly reasonable in a polyglot world
We could replace the term "service" with "project" everywhere?
@@ -0,0 +1,3 @@ | |||
projects: |
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.
Note that our example repo now needs this file, since otherwise we keep scanning upwards and find the root pnpm-workspace.yaml
file. While I hadn't planned on that, it makes sense and is more explicit.
14e0ac6
to
52dd230
Compare
52dd230
to
617be9f
Compare
commit:
|
Previously we relied completely on (js) package managers to get the workspace package/project globs, for example
pnpm-workspace.yaml
(pnpm) or theworkspaces
key inpackage.json
files (npm, yarn, bun).This creates problems in a monorepo that is not only using one of these package manager or using it to manage the monorepo. For example, one can imagine a monorepo that has several child "monorepos" managed by pnpm within it, or a polyglot case where there is no central package manager handling everything.
Now instead we will walk up from the current directory to the git root (if applicable), and if we ever find a
.dmno/dmno-workspace.yaml
file, it will be considered the root and override everything else. Otherwise we'll rely on the js package managers, or fallback to the git root if nothing else is found.