docs: correct deno compile sloppy imports and pnpm workspace exclusion claims - #3435
Open
davidpavlovschi wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two pages state behavior that the current Deno CLI contradicts. Both statements
are the only place in the repo that makes the claim, so this is a prose-only fix
to those two spots.
1.
deno compiledoes support sloppy importsruntime/reference/cli/unstable_flags.mdends the--unstable-sloppy-importssection with:
Support landed in denoland/deno#27944 (
feat(compile): support sloppy imports,merged 2025-02-03, shipped in Deno 2.2) and denoland/deno#34569 added further
test coverage in 2026. Verified against Deno 2.9.2 with the exact
foo.ts/bar.tssnippet already on that page:The same works through the config file (
{"unstable": ["sloppy-imports"]}), andwithout the flag the compile still fails, so the flag is doing the work. The
behavior predates the previous major release, so per AGENTS.md I did not add a
version marker.
2. pnpm workspace exclusions do have an equivalent
runtime/migrate/migrate_from_pnpm.mdtells readers that Deno'sworkspacefield has no
**glob and no exclusions:This contradicts the reference page in this same repo, which documents both
Recursive matching
and
Excluding members.
The reference page is the correct one. Verified on Deno 2.9.2 with a scratch
workspace containing
packages/a,packages/b,packages/excluded:"workspace": ["packages/*", "!packages/excluded"], importing@acme/aand@acme/bresolves and printsa b, while importing@acme/excludederrors withImport "@acme/excluded" not a dependency and not in import map.!line makes@acme/excludedresolve again, so the negation iswhat excludes it rather than an unrelated failure.
!pattern before the wildcard behaves identically, so the fixedprose does not claim an ordering requirement. (The reference section says "an
earlier pattern"; observed behavior on 2.9.2 is order-independent, so the
guide says "another pattern" — the looser reference wording may deserve its
own follow-up.)
"workspace": ["packages/**"]picks uppackages/foo/sub, confirming therecursive glob works too.
Both bullets sit in the same two-item list, so I corrected them together and
pointed each at the reference section that enumerates the detail, following the
"guides teach, reference enumerates" rule in AGENTS.md.
Note: open PR #3383 touches
migrate_from_pnpm.mdtoo, but only a link on line166 — no overlap with this hunk.
Checks
Per AGENTS.md, run against this branch on macOS with Deno 2.9.2:
deno fmt- clean (Checked 885 files,deno fmt --checkpasses)deno test -A frontmatter_test.ts sidebar_test.ts-ok | 8 passed (646 steps) | 0 faileddeno task check:freshness-Freshness check passed: all changed pages have a fresh 'last_modified'.deno task build:light-1109 files generated, no broken links or invalidMDX; confirmed the new
#excluding-memberslink resolves to a real anchor inthe built
workspacespagedeno lint- reports 172 pre-existing problems in TypeScript files; identicalcount on unmodified
main, and this PR touches only markdownlast_modifiedis bumped to 2026-08-01 on both pages.Disclosure
I prepared this change with an AI coding agent (Claude Code). The agent read the
two pages, ran every command quoted above against Deno 2.9.2 on my machine, and
wrote the prose. I have not independently audited the Deno source beyond the
linked upstream PRs and the CLI behavior reproduced above.