Skip to content

fix(workspace): skip include-matched directories without a package.json - #1069

Closed
JiangYueYun wants to merge 1 commit into
rolldown:mainfrom
JiangYueYun:fix/workspace-manifestless-directories
Closed

JiangYueYun wants to merge 1 commit into
rolldown:mainfrom
JiangYueYun:fix/workspace-manifestless-directories

Conversation

@JiangYueYun

@JiangYueYun JiangYueYun commented Sep 11, 2026 •

Copy link
Copy Markdown

AI usage

  • No AI was used in this PR.
  • AI was used: DeepSeek Harness (deepseek-v4-pro)
    • I have carefully reviewed the AI-generated content myself.

Description

workspace.include is a list of glob patterns, expanded with onlyDirectories: true, so a directory
that is not a package — a directory left behind by a package rename, for example — becomes a
workspace entry. It has no config of its own, so it inherits the root config's entry and name,
and the build then fails with [root-name] Cannot find entry: [...]: the message names the root
package and carries no path.

This brings the include branch in line with auto, which discovers **/package.json and so never
matches a non-package: directories matched by the globs that own no package.json are skipped, and
reported instead of being passed over quietly.

WARN  workspace include matched 2 directories without a package.json; skipping: packages/a, packages/b

Source report

Reproduced from a real monorepo: deepseek-ai/deepseek-harness discussion #6089
(deepseek-ai/deepseek-harness#6089). pnpm run build:lib:host fails
with [@deepseek-ai/dsh-root] Cannot find entry: ["lib/types/{index,invariant,startup}.js"] on a tree
that holds a directory without a package.json under packages/*/*, while a clean checkout of the
same revision builds 249 packages without a root lib/types.

Linked Issues

Refs #1067. #1068 covers the other half — naming the offending directory in the error message; this
covers "a directory that is not a package must not join the workspace".

Tests

tests/e2e.test.ts gains a workspace whose include glob matches one real package and one directory
holding only .gitkeep: it fails on main (Build failed with 1 error) and passes with the change,
together with its snapshot. eslint --max-warnings 0 and tsc --noEmit are clean on the touched
files.

@netlify

netlify Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit fb432d4
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6aa389cf5f7a920008007b25
😎 Deploy Preview https://deploy-preview-1069--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown@1069 -D
npm i https://pkg.pr.new/rolldown/tsdown@1069 -D
yarn add https://pkg.pr.new/rolldown/tsdown@1069.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1069 -D
npm i https://pkg.pr.new/rolldown/tsdown/create-tsdown@1069 -D
yarn add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1069.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1069 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1069 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1069.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1069 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1069 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1069.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1069 -D
npm i https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1069 -D
yarn add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1069.tgz -D

commit: fb432d4

@JiangYueYun
JiangYueYun force-pushed the fix/workspace-manifestless-directories branch 2 times, most recently from 9cfcf2e to a302455 Compare September 11, 2026 04:55
@JiangYueYun
JiangYueYun force-pushed the fix/workspace-manifestless-directories branch from a302455 to fb432d4 Compare September 11, 2026 04:55
@JiangYueYun

Copy link
Copy Markdown
Author

Closing this: #1067 already carries the diagnosis, which I hit independently while building a monorepo, and #1068 covers the error-message side. The implementation here is yours to take, rewrite, or drop — I won't be iterating on the patch.

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.

1 participant