From 4452642656a8d02346afc8a94eb12557c740b0f5 Mon Sep 17 00:00:00 2001 From: Satvik Mishra Date: Sat, 10 Oct 2026 21:34:36 +0530 Subject: [PATCH 1/2] docs: fix broken cross-page anchor links --- examples/tutorials/npm_lifecycle_scripts.md | 4 +-- runtime/fundamentals/modules.md | 4 +-- runtime/fundamentals/node.md | 6 ++--- runtime/fundamentals/typescript.md | 22 ++++++++-------- runtime/migrate/migrate_from_npm.md | 4 +-- runtime/migrate/migrate_from_yarn.md | 4 +-- runtime/packages/index.md | 4 +-- runtime/packages/peer_dependencies.md | 11 ++++---- runtime/reference/cli/add.md | 6 ++--- runtime/reference/cli/install.md | 4 +-- runtime/reference/cli/unstable_flags.md | 4 +-- runtime/reference/env_variables.md | 4 +-- runtime/reference/ts_config_migration.md | 28 ++++++++++----------- 13 files changed, 53 insertions(+), 52 deletions(-) diff --git a/examples/tutorials/npm_lifecycle_scripts.md b/examples/tutorials/npm_lifecycle_scripts.md index 89d1e23ec..e732c4a55 100644 --- a/examples/tutorials/npm_lifecycle_scripts.md +++ b/examples/tutorials/npm_lifecycle_scripts.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-11 +last_modified: 2026-10-10 title: "Run npm lifecycle scripts" description: "Allow npm postinstall and other lifecycle scripts in Deno with deno approve-scripts, and persist approvals with the allowScripts field in deno.json." url: /examples/npm_lifecycle_scripts_tutorial/ @@ -76,5 +76,5 @@ security policy is consistent across all packages. For more detail, see the [`deno approve-scripts` reference](/runtime/reference/cli/approve_scripts/) and the -[native Node.js addons section](/runtime/reference/cli/install/#native-nodejs-addons) +[native Node.js addons section](/runtime/reference/cli/install/#native-node.js-addons) of the `deno install` docs. diff --git a/runtime/fundamentals/modules.md b/runtime/fundamentals/modules.md index abfd349d5..bdc1dae61 100644 --- a/runtime/fundamentals/modules.md +++ b/runtime/fundamentals/modules.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-30 +last_modified: 2026-10-10 title: "Modules" description: "Learn how Deno's ECMAScript module system works: importing local and third-party modules, import attributes, import maps, and supported import types such as Wasm and data URLs." oldUrl: @@ -326,7 +326,7 @@ party modules. There, you'll find plenty of well documented ES modules for your projects, including the [Deno Standard Library](/runtime/reference/std/). You can -[read more about Deno's support for npm packages here](/runtime/fundamentals/node/#using-npm-modules). +[read more about Deno's support for npm packages here](/runtime/fundamentals/node/#using-npm-packages). ## Managing third party modules and libraries diff --git a/runtime/fundamentals/node.md b/runtime/fundamentals/node.md index bd42b340d..f6add53dc 100644 --- a/runtime/fundamentals/node.md +++ b/runtime/fundamentals/node.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-07-30 +last_modified: 2026-10-10 title: "Node and npm Compatibility" description: "Guide to using Node.js modules and npm packages in Deno. Learn about compatibility features, importing npm packages, and differences between Node.js and Deno environments." oldUrl: @@ -820,8 +820,8 @@ resolution, you can: tooling for packages to support both ESM and CJS, since default exports require different syntaxes. See also [microsoft/TypeScript#54593](https://github.com/microsoft/TypeScript/issues/54593)) -2. Use a [CDN](/runtime/fundamentals/modules/#url_imports), that rebuilds the - packages for Deno support, instead of an `npm:` identifier. +2. Use a [CDN](/runtime/packages/#https-imports), that rebuilds the packages for + Deno support, instead of an `npm:` identifier. 3. Ignore the type errors you get in your code base with `// @ts-expect-error` or `// @ts-ignore`. diff --git a/runtime/fundamentals/typescript.md b/runtime/fundamentals/typescript.md index c88d9ebf2..76799b508 100644 --- a/runtime/fundamentals/typescript.md +++ b/runtime/fundamentals/typescript.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-18 +last_modified: 2026-10-10 title: "TypeScript support" description: "TypeScript is a first-class language in Deno. Run .ts files directly with no build step, type-check with deno check, reuse your tsconfig.json, and skip the toolchain you needed under Node.js." oldUrl: @@ -65,14 +65,14 @@ running Node or a bundler), reach for a separate tool: If you write TypeScript for Node.js today, most of your toolchain has a built-in replacement: -| In your Node.js project | In Deno | -| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `tsx`, `ts-node`, or `node` with type stripping | `deno run main.ts` | -| `tsc --noEmit` | `deno check` | -| `tsconfig.json` | Optional. Auto-detected if present; Deno-first projects use `compilerOptions` in `deno.json` | -| `typescript` as a devDependency | Nothing to install; the checker ships inside the `deno` binary | -| `@types/node` | Built in and [version-overridable](/runtime/fundamentals/node/#including-node-types); `node:` imports are typed | -| ESLint + Prettier with TypeScript plugins | [`deno lint`](/runtime/reference/cli/lint/) and [`deno fmt`](/runtime/reference/cli/fmt/) handle `.ts` natively | +| In your Node.js project | In Deno | +| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `tsx`, `ts-node`, or `node` with type stripping | `deno run main.ts` | +| `tsc --noEmit` | `deno check` | +| `tsconfig.json` | Optional. Auto-detected if present; Deno-first projects use `compilerOptions` in `deno.json` | +| `typescript` as a devDependency | Nothing to install; the checker ships inside the `deno` binary | +| `@types/node` | Built in and [version-overridable](/runtime/fundamentals/node/#get-node-and-npm-type-definitions); `node:` imports are typed | +| ESLint + Prettier with TypeScript plugins | [`deno lint`](/runtime/reference/cli/lint/) and [`deno fmt`](/runtime/reference/cli/fmt/) handle `.ts` natively | Three differences trip up Node.js developers most often: @@ -95,7 +95,7 @@ Node 24. Deno runs all of them with no flag. Options like `target`, `module`, `outDir`, `esModuleInterop`, and `sourceMap` shape emitted JavaScript, which Deno keeps in its internal cache rather than writing to disk. Deno warns about these ignored options, and the -[migration table](/runtime/reference/ts_config_migration/#migrating-compileroptions-from-nodejs) +[migration table](/runtime/reference/ts_config_migration/#migrating-compileroptions-from-node.js) in the configuration reference says what to do with each one. For most, the answer is "delete it". @@ -410,7 +410,7 @@ This adds browser globals like `document` while keeping the `Deno` namespace available through `deno.ns`. Use `lib: ["deno.worker"]` (or a `/// ` directive) for code that runs in a `new Worker`. The -[lib property reference](/runtime/reference/ts_config_migration/#using-the-lib-property) +[lib property reference](/runtime/reference/ts_config_migration/#using-the-%22lib%22-property) describes the available libraries, conflicts to expect, and worker-specific setup. diff --git a/runtime/migrate/migrate_from_npm.md b/runtime/migrate/migrate_from_npm.md index 93cbcc344..fc9d7b02a 100644 --- a/runtime/migrate/migrate_from_npm.md +++ b/runtime/migrate/migrate_from_npm.md @@ -1,7 +1,7 @@ --- title: "Migrate from npm" description: "How to move an npm project to Deno: install dependencies from your existing package.json, keep your pinned versions, map npm CLI commands to Deno, run workspaces unchanged, and handle lifecycle scripts." -last_modified: 2026-06-25 +last_modified: 2026-10-10 oldUrl: - /runtime/migrate/switch_package_manager/ --- @@ -100,7 +100,7 @@ that field directly. A monorepo like this runs as-is: ``` Members reference each other through the -[`workspace:` protocol](/runtime/fundamentals/workspaces/#using-workspace-protocol-in-package-json) +[`workspace:` protocol](/runtime/fundamentals/workspaces/#using-workspace-protocol-in-package.json) in their `package.json` dependencies, exactly as they do under npm. There is nothing to convert. See [Workspaces](/runtime/fundamentals/workspaces/) for how resolution works. diff --git a/runtime/migrate/migrate_from_yarn.md b/runtime/migrate/migrate_from_yarn.md index f9658b9ae..ddf98ce1d 100644 --- a/runtime/migrate/migrate_from_yarn.md +++ b/runtime/migrate/migrate_from_yarn.md @@ -1,7 +1,7 @@ --- title: "Migrate from Yarn" description: "How to move a Yarn project to Deno: install dependencies from your existing package.json, keep your pinned versions, map Yarn CLI commands to Deno, run workspaces unchanged, and what to do about Plug'n'Play." -last_modified: 2026-06-25 +last_modified: 2026-10-10 --- Yarn is a package manager, not a runtime, so most of what you are "migrating" is @@ -94,7 +94,7 @@ that field directly. A monorepo like this runs as-is: ``` Members reference each other through the -[`workspace:` protocol](/runtime/fundamentals/workspaces/#using-workspace-protocol-in-package-json) +[`workspace:` protocol](/runtime/fundamentals/workspaces/#using-workspace-protocol-in-package.json) in their `package.json` dependencies, exactly as they do under Yarn. There is nothing to convert. See [Workspaces](/runtime/fundamentals/workspaces/) for how resolution works. diff --git a/runtime/packages/index.md b/runtime/packages/index.md index 65aaed027..2d1f7583a 100644 --- a/runtime/packages/index.md +++ b/runtime/packages/index.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-25 +last_modified: 2026-10-10 title: "Dependency management" description: "Use Deno as your package manager for npm and JSR: install, add, update, audit, and inspect dependencies, manage lockfiles and lifecycle scripts, and override packages." oldUrl: @@ -383,7 +383,7 @@ When using a `package.json` file, dev dependencies can be added to the separate If you work primarily in `package.json`, set `"preferPackageJson": true` in `deno.json` so that `deno add`, `deno install`, and `deno remove` write there by default instead of `deno.json`, without passing `--package-json` each time. See -[preferPackageJson](/runtime/reference/deno_json/#prefer-package-json-for-dependencies). +[preferPackageJson](/runtime/reference/deno_json/#prefer-package.json-for-dependencies). ### JSR packages in package.json diff --git a/runtime/packages/peer_dependencies.md b/runtime/packages/peer_dependencies.md index c8cf83c9a..1faee25b3 100644 --- a/runtime/packages/peer_dependencies.md +++ b/runtime/packages/peer_dependencies.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-15 +last_modified: 2026-10-10 title: "Peer dependencies" description: "Peer dependencies are an npm and package.json feature. deno.json has no peerDependencies field or equivalent. How Deno resolves peer dependencies when you consume npm packages, the node_modules layout caveat, optional peers, and fixing unmet-peer errors." --- @@ -64,7 +64,8 @@ in `dependencies`, exactly as you would in Node. ## node_modules layout and peer dependencies How peer dependencies resolve depends on the -[node_modules layout](/runtime/fundamentals/node/#node_modules) Deno uses. +[node_modules layout](/runtime/fundamentals/node/#control-node_modules) Deno +uses. In the default **isolated** layout, each package only sees the dependencies it declares, so a peer dependency must be provided by your project (as shown above) @@ -117,7 +118,7 @@ deno install If the package instead expects to find the peer dependency as a hoisted sibling in `node_modules`, see -[node_modules layout](/runtime/fundamentals/node/#node_modules) and switch to -the hoisted linker as shown above. For more on how Deno works with npm packages -and `node_modules`, see +[node_modules layout](/runtime/fundamentals/node/#control-node_modules) and +switch to the hoisted linker as shown above. For more on how Deno works with npm +packages and `node_modules`, see [Node compatibility](/runtime/fundamentals/node/#using-npm-packages). diff --git a/runtime/reference/cli/add.md b/runtime/reference/cli/add.md index e6b001307..bf20fa632 100644 --- a/runtime/reference/cli/add.md +++ b/runtime/reference/cli/add.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-25 +last_modified: 2026-10-10 title: "deno add" command: add openGraphLayout: "/open_graph/cli-commands.jsx" @@ -9,7 +9,7 @@ description: "Add and manage project dependencies with Deno" The `deno add` command adds dependencies to your project's configuration file. It is an alias for -[`deno install [PACKAGES]`](/runtime/reference/cli/install/#deno-install-packages). +[`deno install [PACKAGES]`](/runtime/reference/cli/install/#deno-install-%5Bpackages%5D). For more on how Deno handles dependencies, see [Modules and dependencies](/runtime/fundamentals/modules/). @@ -61,5 +61,5 @@ form (`npm:@jsr/...`). The same flag works on [`deno uninstall`](/runtime/reference/cli/uninstall/). To make this the default without passing the flag each time, set -[`"preferPackageJson": true`](/runtime/reference/deno_json/#prefer-package-json-for-dependencies) +[`"preferPackageJson": true`](/runtime/reference/deno_json/#prefer-package.json-for-dependencies) in `deno.json`. diff --git a/runtime/reference/cli/install.md b/runtime/reference/cli/install.md index 44ca37ec0..b71a2e27d 100644 --- a/runtime/reference/cli/install.md +++ b/runtime/reference/cli/install.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-07-02 +last_modified: 2026-10-10 title: "deno install" oldUrl: - /runtime/manual/tools/script_installer/ @@ -96,7 +96,7 @@ form (`npm:@jsr/...`). The same flag works on `deno add`, `deno remove`, and `deno uninstall`. To make this behavior the default without passing the flag every time, set -[`"preferPackageJson": true`](/runtime/reference/deno_json/#prefer-package-json-for-dependencies) +[`"preferPackageJson": true`](/runtime/reference/deno_json/#prefer-package.json-for-dependencies) in `deno.json`. ### deno install --entrypoint [FILES] diff --git a/runtime/reference/cli/unstable_flags.md b/runtime/reference/cli/unstable_flags.md index 98f6e2184..1b221d201 100644 --- a/runtime/reference/cli/unstable_flags.md +++ b/runtime/reference/cli/unstable_flags.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-07-02 +last_modified: 2026-10-10 title: "Unstable feature flags" oldUrl: - /runtime/tools/unstable_flags/ @@ -294,5 +294,5 @@ deno check --unstable-tsgo main.ts It can also be enabled with the `DENO_UNSTABLE_TSGO=1` environment variable or `"unstable": ["tsgo"]` in `deno.json`. This is a preview feature and is not yet feature-complete. See -[TypeScript](/runtime/fundamentals/typescript/#faster-type-checking-with-the-native-compiler-tsgo) +[TypeScript](/runtime/fundamentals/typescript/#faster-type-checking-with-the-native-compiler-(tsgo)) for details. diff --git a/runtime/reference/env_variables.md b/runtime/reference/env_variables.md index b398614b6..9dad39dc6 100644 --- a/runtime/reference/env_variables.md +++ b/runtime/reference/env_variables.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-07-02 +last_modified: 2026-10-10 title: "Environment variables" description: "A guide to working with environment variables in Deno. Learn about Deno.env API, .env file support, CLI configuration, and special environment variables that control Deno's behavior." oldUrl: @@ -145,7 +145,7 @@ The Deno runtime has these special environment variables. | DENO_REPL_HISTORY | Set REPL history file path History file is disabled when the value is empty
(defaults to `$DENO_DIR/deno_history.txt`) | | DENO_NO_PACKAGE_JSON | Disables auto-resolution of `package.json` | | DENO_CONDITIONS | Comma-separated list of custom conditions to use when resolving npm package exports (equivalent to the `--conditions` flag) | -| DENO_UNSTABLE_TSGO | Set to `1` to type-check with TypeScript's native (Go) compiler. Equivalent to the `--unstable-tsgo` flag. See [TypeScript](/runtime/fundamentals/typescript/#faster-type-checking-with-the-native-compiler-tsgo). | +| DENO_UNSTABLE_TSGO | Set to `1` to type-check with TypeScript's native (Go) compiler. Equivalent to the `--unstable-tsgo` flag. See [TypeScript](/runtime/fundamentals/typescript/#faster-type-checking-with-the-native-compiler-(tsgo)). | | DENO_NO_PROMPT | Set to disable permission prompts on access
(alternative to passing `--no-prompt` on invocation) | | DENO_NO_UPDATE_CHECK | Set to disable checking if a newer Deno version is available | | DENO_V8_FLAGS | Set V8 command line options | diff --git a/runtime/reference/ts_config_migration.md b/runtime/reference/ts_config_migration.md index 38773ce24..f618e7016 100644 --- a/runtime/reference/ts_config_migration.md +++ b/runtime/reference/ts_config_migration.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-25 +last_modified: 2026-10-10 title: "Configuring TypeScript" description: "A guide to TypeScript configuration in Deno. Learn about compiler options, type checking JavaScript, JSDoc support, type declarations, and configuring TypeScript for cross-platform compatibility." oldUrl: @@ -87,19 +87,19 @@ most of those options have no effect and can be deleted. Deno warns about ignored options when they appear in a `tsconfig.json`; moving your remaining options into `deno.json`'s `compilerOptions` suppresses the warning. -| Option in your `tsconfig.json` | In Deno | -| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `target`, `outDir`, `outFile`, `rootDir` | Delete. Deno never emits: code runs directly on the latest V8, and `deno check` type-checks without producing output. | -| `declaration`, `declarationMap`, `emitDeclarationOnly` | Delete. No emit. Use [`deno doc`](/runtime/reference/cli/doc/) for API documentation. | -| `sourceMap`, `inlineSourceMap`, `inlineSources` | Delete. Stack traces map to your TypeScript sources automatically. | -| `esModuleInterop`, `allowSyntheticDefaultImports` | Delete. Deno is ESM-native and handles CommonJS interop in the runtime. | -| `importHelpers`, `noEmitHelpers`, `downlevelIteration` | Delete. No downleveling happens, so no helpers are emitted. | -| `resolveJsonModule` | Delete. Import JSON with an attribute instead: `import data from "./data.json" with { type: "json" }`. | -| `skipLibCheck` | Delete. Deno does not type-check dependencies by default (`deno check --all` opts in). | -| `module`, `moduleResolution` | Usually delete. Deno defaults to `nodenext`; the supported values are listed in the table below. | -| `lib`, `types` | Usually delete. Deno's defaults cover its runtime; keep `lib` only for cross-runtime code (see ["lib" property](#using-the-lib-property)). | -| `strict`, `noImplicit*`, `noUnused*`, other check flags | Keep the ones you want, in `deno.json`'s `compilerOptions`. Note Deno's defaults are already strict (table below). | -| `paths`, `baseUrl` | Keep if needed for type-time path mapping, or replace with [import maps](/runtime/fundamentals/modules/), which also work at runtime. | +| Option in your `tsconfig.json` | In Deno | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `target`, `outDir`, `outFile`, `rootDir` | Delete. Deno never emits: code runs directly on the latest V8, and `deno check` type-checks without producing output. | +| `declaration`, `declarationMap`, `emitDeclarationOnly` | Delete. No emit. Use [`deno doc`](/runtime/reference/cli/doc/) for API documentation. | +| `sourceMap`, `inlineSourceMap`, `inlineSources` | Delete. Stack traces map to your TypeScript sources automatically. | +| `esModuleInterop`, `allowSyntheticDefaultImports` | Delete. Deno is ESM-native and handles CommonJS interop in the runtime. | +| `importHelpers`, `noEmitHelpers`, `downlevelIteration` | Delete. No downleveling happens, so no helpers are emitted. | +| `resolveJsonModule` | Delete. Import JSON with an attribute instead: `import data from "./data.json" with { type: "json" }`. | +| `skipLibCheck` | Delete. Deno does not type-check dependencies by default (`deno check --all` opts in). | +| `module`, `moduleResolution` | Usually delete. Deno defaults to `nodenext`; the supported values are listed in the table below. | +| `lib`, `types` | Usually delete. Deno's defaults cover its runtime; keep `lib` only for cross-runtime code (see ["lib" property](#using-the-%22lib%22-property)). | +| `strict`, `noImplicit*`, `noUnused*`, other check flags | Keep the ones you want, in `deno.json`'s `compilerOptions`. Note Deno's defaults are already strict (table below). | +| `paths`, `baseUrl` | Keep if needed for type-time path mapping, or replace with [import maps](/runtime/fundamentals/modules/), which also work at runtime. | ## TS Compiler Options From d4849c0c756aaf4ae4d83f42147ce13312f4533a Mon Sep 17 00:00:00 2001 From: Satvik Mishra Date: Mon, 12 Oct 2026 21:56:49 +0530 Subject: [PATCH 2/2] docs: fix Deno.permissions method links on security page --- runtime/fundamentals/security.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/runtime/fundamentals/security.md b/runtime/fundamentals/security.md index 048e6acc6..9c02b64d2 100644 --- a/runtime/fundamentals/security.md +++ b/runtime/fundamentals/security.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-06-17 +last_modified: 2026-10-12 title: "Security and permissions" description: "A guide to Deno's security model: secure-by-default execution, the permission sandbox, evaluating and executing untrusted code, and the permission broker. See the Permissions reference for the flags." --- @@ -151,10 +151,11 @@ code you are running. A program can inspect and tighten its own permissions through the [`Deno.permissions`](/api/deno/#permissions) API. -[`Deno.permissions.query`](/api/deno/#query-permissions) reports whether a -permission is granted, -[`Deno.permissions.request`](/api/deno/#request-permissions) prompts for one on -demand, and [`Deno.permissions.revoke`](/api/deno/#revoke-permissions) +[`Deno.permissions.query`](/api/deno/~/Deno.Permissions.prototype.query) reports +whether a permission is granted, +[`Deno.permissions.request`](/api/deno/~/Deno.Permissions.prototype.request) +prompts for one on demand, and +[`Deno.permissions.revoke`](/api/deno/~/Deno.Permissions.prototype.revoke) downgrades a granted permission back to the prompt state: ```ts