From 42d66a85b00e81fecfb78c8247c83bb7ae9f0949 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 16 Apr 2026 12:05:20 +0900 Subject: [PATCH] docs: add minimumDependencyAge, allowScripts, and links to workspaces --- runtime/fundamentals/workspaces.md | 85 ++++++++++++++++-------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/runtime/fundamentals/workspaces.md b/runtime/fundamentals/workspaces.md index 4ffef1793..0dc763d4a 100644 --- a/runtime/fundamentals/workspaces.md +++ b/runtime/fundamentals/workspaces.md @@ -1,5 +1,5 @@ --- -last_modified: 2025-11-04 +last_modified: 2026-04-16 title: "Workspaces and monorepos" description: "A guide to managing workspaces and monorepos in Deno. Learn about workspace configuration, package management, dependency resolution, and how to structure multi-package projects effectively." oldUrl: /runtime/manual/basics/workspaces @@ -437,46 +437,49 @@ Deno will warn if an option needs to be applied at the workspace root. Here's a full matrix of various `deno.json` options available at the workspace root and its members: -| Option | Workspace | Package | Notes | -| ------------------ | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| compilerOptions | ✅ | ✅ | | -| importMap | ✅ | ❌ | Exclusive with imports and scopes per config file. Additionally, it is not supported to have importMap in the workspace config, and imports in the package config. | -| imports | ✅ | ✅ | Exclusive with importMap per config file. | -| scopes | ✅ | ❌ | Exclusive with importMap per config file. | -| exclude | ✅ | ✅ | | -| lint.include | ✅ | ✅ | | -| lint.exclude | ✅ | ✅ | | -| lint.files | ⚠️ | ❌ | Deprecated | -| lint.rules.tags | ✅ | ✅ | Tags are merged by appending package to workspace list. Duplicates are ignored. | -| lint.rules.include | | | | -| lint.rules.exclude | ✅ | ✅ | Rules are merged per package, with package taking priority over workspace (package include is stronger than workspace exclude). | -| lint.report | ✅ | ❌ | Only one reporter can be active at a time, so allowing different reporters per workspace would not work in the case where you lint files spanning multiple packages. | -| fmt.include | ✅ | ✅ | | -| fmt.exclude | ✅ | ✅ | | -| fmt.files | ⚠️ | ❌ | Deprecated | -| fmt.useTabs | ✅ | ✅ | Package takes priority over workspace. | -| fmt.indentWidth | ✅ | ✅ | Package takes priority over workspace. | -| fmt.singleQuote | ✅ | ✅ | Package takes priority over workspace. | -| fmt.proseWrap | ✅ | ✅ | Package takes priority over workspace. | -| fmt.semiColons | ✅ | ✅ | Package takes priority over workspace. | -| fmt.options.\* | ⚠️ | ❌ | Deprecated | -| nodeModulesDir | ✅ | ❌ | Resolution behaviour must be the same in the entire workspace. | -| vendor | ✅ | ❌ | Resolution behaviour must be the same in the entire workspace. | -| tasks | ✅ | ✅ | Package tasks take priority over workspace. cwd used is the cwd of the config file that the task was inside of. | -| test.include | ✅ | ✅ | | -| test.exclude | ✅ | ✅ | | -| test.files | ⚠️ | ❌ | Deprecated | -| publish.include | ✅ | ✅ | | -| publish.exclude | ✅ | ✅ | | -| bench.include | ✅ | ✅ | | -| bench.exclude | ✅ | ✅ | | -| bench.files | ⚠️ | ❌ | Deprecated | -| lock | ✅ | ❌ | Only a single lock file may exist per resolver, and only resolver may exist per workspace, so conditional enablement of the lockfile per package does not make sense. | -| unstable | ✅ | ❌ | For simplicities sake, we do not allow unstable flags, because a lot of the CLI assumes that unstable flags are immutable and global to the entire process. Also weird interaction with DENO_UNSTABLE_\* flags. | -| name | ❌ | ✅ | | -| version | ❌ | ✅ | | -| exports | ❌ | ✅ | | -| workspace | ✅ | ❌ | Nested workspaces are not supported. | +| Option | Workspace | Package | Notes | +| -------------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| compilerOptions | ✅ | ✅ | | +| importMap | ✅ | ❌ | Exclusive with imports and scopes per config file. Additionally, it is not supported to have importMap in the workspace config, and imports in the package config. | +| imports | ✅ | ✅ | Exclusive with importMap per config file. | +| scopes | ✅ | ❌ | Exclusive with importMap per config file. | +| exclude | ✅ | ✅ | | +| lint.include | ✅ | ✅ | | +| lint.exclude | ✅ | ✅ | | +| lint.files | ⚠️ | ❌ | Deprecated | +| lint.rules.tags | ✅ | ✅ | Tags are merged by appending package to workspace list. Duplicates are ignored. | +| lint.rules.include | ✅ | ✅ | Rules are merged per package, with package taking priority over workspace (package include is stronger than workspace exclude). | +| lint.rules.exclude | ✅ | ✅ | Rules are merged per package, with package taking priority over workspace (package include is stronger than workspace exclude). | +| lint.report | ✅ | ❌ | Only one reporter can be active at a time, so allowing different reporters per workspace would not work in the case where you lint files spanning multiple packages. | +| fmt.include | ✅ | ✅ | | +| fmt.exclude | ✅ | ✅ | | +| fmt.files | ⚠️ | ❌ | Deprecated | +| fmt.useTabs | ✅ | ✅ | Package takes priority over workspace. | +| fmt.indentWidth | ✅ | ✅ | Package takes priority over workspace. | +| fmt.singleQuote | ✅ | ✅ | Package takes priority over workspace. | +| fmt.proseWrap | ✅ | ✅ | Package takes priority over workspace. | +| fmt.semiColons | ✅ | ✅ | Package takes priority over workspace. | +| fmt.options.\* | ⚠️ | ❌ | Deprecated | +| minimumDependencyAge | ✅ | ❌ | Resolution behaviour must be the same in the entire workspace. | +| nodeModulesDir | ✅ | ❌ | Resolution behaviour must be the same in the entire workspace. | +| vendor | ✅ | ❌ | Resolution behaviour must be the same in the entire workspace. | +| allowScripts | ✅ | ❌ | Must be defined at the workspace root to ensure consistent security policy across all packages. | +| links | ✅ | ❌ | Only respected in the workspace root. | +| tasks | ✅ | ✅ | Package tasks take priority over workspace. cwd used is the cwd of the config file that the task was inside of. | +| test.include | ✅ | ✅ | | +| test.exclude | ✅ | ✅ | | +| test.files | ⚠️ | ❌ | Deprecated | +| publish.include | ✅ | ✅ | | +| publish.exclude | ✅ | ✅ | | +| bench.include | ✅ | ✅ | | +| bench.exclude | ✅ | ✅ | | +| bench.files | ⚠️ | ❌ | Deprecated | +| lock | ✅ | ❌ | Only a single lock file may exist per resolver, and only resolver may exist per workspace, so conditional enablement of the lockfile per package does not make sense. | +| unstable | ✅ | ❌ | For simplicities sake, we do not allow unstable flags, because a lot of the CLI assumes that unstable flags are immutable and global to the entire process. Also weird interaction with DENO_UNSTABLE_\* flags. | +| name | ❌ | ✅ | | +| version | ❌ | ✅ | | +| exports | ❌ | ✅ | | +| workspace | ✅ | ❌ | Nested workspaces are not supported. | ## Running commands across workspaces