zuke.tools.deno

← Python API reference

@zuke/deno 1.5.0: @zuke/deno — typed DenoTasks wrappers for the deno CLI, for use in Zuke build targets.

Symbols

#

DenoAddSettings

class
class DenoAddSettings(DenoLockSettings)

Settings for deno add.

  • packages(*specs: str) -> Self

    The packages to add, e.g. jsr:@std/assert or npm:express (required).

  • dev() -> Self

    Add as a dev dependency (--dev). Deno only distinguishes the two in a package.json; against a deno.json the flag has nothing to record.

  • jsr() -> Self

    Read unprefixed package names as JSR packages (--jsr).

  • npm() -> Self

    Read unprefixed package names as npm packages (--npm), deno's default.

  • save_exact() -> Self

    Record the exact version, without a caret range (--save-exact).

  • lockfile_only() -> Self

    Update the lockfile without installing (--lockfile-only).

  • package_json() -> Self

    Record the dependency in package.json rather than deno.json (--package-json).

#

DenoApproveScriptsSettings

class
class DenoApproveScriptsSettings(DenoSettings)

Settings for deno approve-scripts.

  • packages(*specs: str) -> Self

    The npm specifiers whose lifecycle scripts to approve (required).

  • lockfile_only() -> Self

    Record the approval in the lockfile without installing (--lockfile-only).

#

DenoBenchSettings

class
class DenoBenchSettings(DenoPermissionSettings)

Settings for deno bench.

  • paths(*paths: str) -> Self

    Restrict the run to specific benchmark files or directories.

  • filter(pattern: str) -> Self

    Only run benchmarks whose name matches (--filter).

  • json() -> Self

    Report results as JSON (--json) rather than the table. Deno marks the flag unstable, so treat the shape as subject to change between releases.

  • no_run() -> Self

    Cache the benchmark modules without running them (--no-run) — a cheap way to prove the benchmarks still compile without paying to run them.

  • permit_no_files() -> Self

    Succeed when no benchmark files matched (--permit-no-files) instead of failing the target.

  • ignore(*patterns: str) -> Self

    Skip files matching these patterns (--ignore).

  • config(path: str) -> Self

    Use an explicit config file (--config).

#

DenoBumpVersionSettings

class
class DenoBumpVersionSettings(DenoSettings)

Settings for deno bump-version.

The subcommand is experimental — deno itself prints a notice saying so on every run — so treat its output as subject to change between releases.

  • increment(kind: Literal['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']) -> Self

    The increment to apply. Omit it to derive the increment from the conventional commits since start.

  • dry_run() -> Self

    Print the planned changes without writing any files (--dry-run).

  • workspace() -> Self

    Bump every package in the workspace (--workspace).

  • no_workspace() -> Self

    Bump only the manifest in the current directory (--no-workspace).

  • config(path: str) -> Self

    The manifest to bump (--config).

  • import_map(path: str) -> Self

    The import map whose jsr: constraints to rewrite (--import-map).

  • base(ref: str) -> Self

    Git ref to compare against in conventional-commits mode (--base).

  • start(ref: str) -> Self

    Git ref to start from in conventional-commits mode (--start).

  • release_notes(path: str) -> Self

    Release notes file to prepend to in conventional-commits mode (--release-notes).

#

DenoCacheSettings

class
class DenoCacheSettings(DenoSettings)

Settings for deno cache.

  • reload() -> Self

    Reload remote modules instead of using the cache (--reload).

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag rather than PnpmSettings.frozenLockfile()'s naming.

  • paths(*paths: str) -> Self

    The entry points to cache (at least one is required).

#

DenoCheckSettings

class
class DenoCheckSettings(DenoSettings)

Settings for deno check.

  • paths(*paths: str) -> Self

    The files to type-check (at least one is required).

  • all() -> Self

    Type-check remote modules and npm packages too (--all), not just the local code. Slower, and the only way to catch a dependency whose published types do not actually compile.

  • doc() -> Self

    Type-check the code blocks in JSDoc and Markdown as well (--doc).

  • doc_only() -> Self

    Type-check *only* the code blocks in JSDoc and Markdown (--doc-only).

  • check_js() -> Self

    Type-check JavaScript files too (--check-js).

  • config(path: str) -> Self

    Type-check against a specific configuration file (--config) instead of the one Deno would discover by walking up from the checked files. The discovered config decides how bare specifiers resolve, so pointing at another one type-checks the same sources against a different dependency set — for example checking a workspace member against the *published* version of a sibling it declares, rather than the local member that workspace resolution would substitute.

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock), neither reading nor writing it. Use it for a check whose resolutions are deliberately not the project's: writing them into the committed lock would corrupt it, and reading it would pin the very versions the check is trying to vary.

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag rather than PnpmSettings.frozenLockfile()'s naming.

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock) instead of the discovered deno.lock.

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

  • reload(*specifiers: str) -> Self

    Reload the module cache (--reload), optionally only these specifiers.

  • node_modules_dir(mode: Literal['auto', 'manual', 'none']) -> Self

    Set the node-modules management mode (--node-modules-dir).

  • node_modules_linker(mode: Literal['isolated', 'hoisted']) -> Self

    Set the npm linker mode (--node-modules-linker).

  • vendor(enabled: bool | None=None) -> Self

    Toggle the local vendor folder (--vendor).

  • watch() -> Self

    Re-check when a watched file changes (--watch).

  • watch_exclude(*paths: str) -> Self

    Exclude paths from the watcher (--watch-exclude).

  • no_clear_screen() -> Self

    Keep previous output when re-running under --watch (--no-clear-screen).

#

DenoCiSettings

class
class DenoCiSettings(DenoSettings)

Settings for deno ci.

  • prod() -> Self

    Install production dependencies only, excluding dev ones (--prod).

  • skip_types() -> Self

    Exclude @types/* packages (--skip-types). Deno selects them by name, so a package that ships runtime code under a @types/ name is skipped too.

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

#

DenoCleanSettings

class
class DenoCleanSettings(DenoSettings)

Settings for deno clean.

  • dry_run() -> Self

    Report what would be removed without removing it (--dry-run).

  • except_(*paths: str) -> Self

    Keep the cache entries these files need (--except), clearing everything else. Use it to drop stale dependencies without forcing the next build to re-download the ones it still uses.

#

DenoCompileSettings

class
class DenoCompileSettings(DenoPermissionSettings)

Settings for deno compile.

  • script(path: str) -> Self

    The entrypoint to compile (required).

  • script_args(*args: str | float) -> Self

    Arguments baked into the executable, passed after the entrypoint.

  • output(path: str) -> Self

    Output file (--output); defaults to a name inferred from the entrypoint.

  • target(triple: Literal['x86_64-unknown-linux-gnu', 'aarch64-unknown-linux-gnu', 'x86_64-pc-windows-msvc', 'x86_64-apple-darwin', 'aarch64-apple-darwin']) -> Self

    Cross-compile for another platform (--target).

  • include(*paths: str) -> Self

    Embed an extra module, file or directory (--include, repeatable). Needed for anything the module graph cannot see statically — a dynamically imported module, a worker entrypoint, or a data file the program reads at runtime.

  • exclude(*paths: str) -> Self

    Exclude a file or directory from what include embedded (--exclude).

  • exclude_unused_npm() -> Self

    Embed only the npm packages the module graph actually reaches (--exclude-unused-npm), instead of the whole lockfile snapshot. Packages reached only through a dynamic import are not statically traceable, so pass those to include explicitly.

  • icon(path: str) -> Self

    Set the executable's Windows icon from a .ico file (--icon).

  • no_terminal() -> Self

    Hide the console window on Windows (--no-terminal).

  • self_extracting() -> Self

    Produce a self-extracting binary (--self-extracting) that unpacks its embedded file system to disk on first run and executes from there.

  • bundle() -> Self

    Bundle the entrypoint before embedding it (--bundle), rather than shipping the whole node_modules tree. Experimental: it produces a smaller, faster-starting binary but drops dynamic require/import patterns that cannot be traced statically.

  • minify() -> Self

    Minify the bundled output (--minify). Requires bundle — the CLI rejects --minify on its own, and so does this wrapper, so the mistake surfaces while the argv is being built rather than after the compile starts.

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_check() -> Self

    Skip type-checking before compiling (--no-check).

#

DenoCoverageSettings

class
class DenoCoverageSettings(DenoSettings)

Settings for deno coverage.

  • dir(path: str) -> Self

    The coverage profile directory to report on.

  • lcov() -> Self

    Emit lcov instead of the table report (--lcov).

  • output(path: str) -> Self

    Write the report to a file (--output=).

  • exclude(pattern: str) -> Self

    Exclude files matching the pattern (--exclude=).

  • include(pattern: str) -> Self

    Report only on files matching the pattern (--include=).

  • ignore(*patterns: str) -> Self

    Skip files matching these patterns (--ignore=).

  • html() -> Self

    Write an HTML report into the profile directory (--html). Mutually exclusive with lcov and with any threshold: given both, deno emits the lcov and silently produces no HTML, so asking for both is refused rather than quietly honoured in half.

  • detailed() -> Self

    Report per-line detail alongside the summary table (--detailed).

  • lines_threshold(percent: float) -> Self

    Fail the gate if line coverage is below percent. deno coverage has no fail-under flag, so DenoTasks.coverage enforces this after parsing the lcov report (and forces --lcov so a report exists to parse).

  • branches_threshold(percent: float) -> Self

    Fail the gate if branch coverage is below percent (see linesThreshold).

  • threshold(percent: float) -> Self

    Fail the gate if either line or branch coverage is below percent.

  • per_file_threshold(percent: float) -> Self

    Fail the gate if any single instrumented file's line coverage is below percent — a per-file floor, so an under-tested file can't hide inside a healthy aggregate (see CoverageThresholds.perFile, which notes the deno coverage limit for files no test loads).

#

DenoDeployAppSettings

class
class DenoDeployAppSettings(DenoDeployOrgSettings)

Base for the deno deploy commands scoped to an application.

  • app(name: str) -> Self

    The application (--app).

#

DenoDeployAppsGetSettings

class
class DenoDeployAppsGetSettings(DenoDeployAppSettings)

Settings for deno deploy apps get: an application, with its URLs.

#

DenoDeployAppsListSettings

class
class DenoDeployAppsListSettings(DenoDeployOrgSettings)

Settings for deno deploy apps list.

  • limit(count: float) -> Self

    At most this many applications (--limit).

#

DenoDeployCommandSettings

class
class DenoDeployCommandSettings(DenoSettings)

Base for all deno deploy settings. Each subcommand names its command path and its own arguments; the shared flags go between them.

  • token(value: str) -> Self

    The Deno Deploy access token. It is passed in the DENO_DEPLOY_TOKEN environment variable rather than on the command line, so it never shows in a process listing or an error's command line, and it is registered with the run's redactor. Without it, the CLI reads DENO_DEPLOY_TOKEN from the build's own environment.

  • config(path: str) -> Self

    The config file to read and write the org and app from (--config).

  • json() -> Self

    Print one JSON object on stdout instead of human-readable output (--json).

  • non_interactive() -> Self

    Fail instead of prompting, taking every value from flags or the environment (--non-interactive). Use it in CI, where nothing can answer a prompt.

  • quiet_output() -> Self

    Suppress non-essential output (--quiet).

#

DenoDeployCreateSettings

class
class DenoDeployCreateSettings(DenoDeployUploadSettings)

Settings for deno deploy create: create an application.

  • dry_run() -> Self

    Validate the flags without creating the application (--dry-run).

  • source(source: Literal['local', 'github']) -> Self

    Where the source comes from (--source).

  • repository(owner: str, repo: str) -> Self

    A GitHub source repository: --owner and --repo.

  • app_directory(path: str) -> Self

    The application's directory inside the source (--app-directory).

  • do_not_use_detected_build_config() -> Self

    Ignore the detected build configuration (--do-not-use-detected-build-config).

  • framework_preset(preset: str) -> Self

    The framework preset, e.g. fresh or astro (--framework-preset).

  • install_command(command: str) -> Self

    The install command (--install-command).

  • build_command(command: str) -> Self

    The build command (--build-command).

  • pre_deploy_command(command: str) -> Self

    The command run before each deployment (--pre-deploy-command).

  • runtime_mode(mode: Literal['dynamic', 'static']) -> Self

    Whether the application is a server or static files (--runtime-mode).

  • entrypoint(path: str) -> Self

    A dynamic application's entrypoint (--entrypoint).

  • argument(value: str) -> Self

    An argument for a dynamic application's entrypoint (--arguments); repeatable.

  • working_directory(path: str) -> Self

    A dynamic application's working directory (--working-directory).

  • static_dir(path: str) -> Self

    The directory a static application is served from (--static-dir).

  • single_page_app() -> Self

    Serve index.html for every path without a file (--single-page-app).

  • build_timeout(duration: str | float) -> Self

    The build timeout, e.g. 10m or 600s (--build-timeout).

  • build_memory_limit(megabytes: float) -> Self

    The build memory limit in megabytes (--build-memory-limit).

  • region(region: Literal['us', 'eu', 'global']) -> Self

    The region to deploy to (--region).

#

DenoDeployDeploymentsListSettings

class
class DenoDeployDeploymentsListSettings(DenoDeployAppSettings)

Settings for deno deploy deployments list.

  • limit(count: float) -> Self

    At most this many deployments (--limit).

  • cursor(cursor: str) -> Self

    Continue from a previous --json page's cursor (--cursor).

  • status(status: Literal['skipped', 'queued', 'building', 'succeeded', 'failed']) -> Self

    Only deployments with this status (--status).

#

DenoDeployEnvDeleteSettings

class
class DenoDeployEnvDeleteSettings(DenoDeployAppSettings)

Settings for deno deploy env delete.

  • variable(name: str) -> Self

    The variable to delete; required.

#

DenoDeployEnvListSettings

class
class DenoDeployEnvListSettings(DenoDeployAppSettings)

Settings for deno deploy env list.

#

DenoDeployEnvLoadSettings

class
class DenoDeployEnvLoadSettings(DenoDeployAppSettings)

Settings for deno deploy env load: load variables from a .env file.

  • file(path: str) -> Self

    The .env file to load; required.

  • non_secret(key: str) -> Self

    A key in the file to store as a plain value, not a secret (--non-secrets); repeatable.

  • replace() -> Self

    Replace variables that already exist (--replace).

  • skip_existing() -> Self

    Keep variables that already exist (--skip-existing).

#

DenoDeployEnvUpdateContextsSettings

class
class DenoDeployEnvUpdateContextsSettings(DenoDeployAppSettings)

Settings for deno deploy env update-contexts.

  • variable(name: str) -> Self

    The variable to update; required.

  • context(name: str) -> Self

    A context the variable applies in, e.g. production; repeatable.

#

DenoDeployEnvValueSettings

class
class DenoDeployEnvValueSettings(DenoDeployAppSettings)

Settings for deno deploy env add and deno deploy env update-value.

The value is a positional argument, so one that starts with - would be read as a flag and is refused; load such a value from a file with DenoDeployTasks.envLoad instead.

  • variable(name: str) -> Self

    The variable to set; required.

  • value(value: str) -> Self

    The variable's value; required, unless set by secretValue.

  • secret_value(value: str) -> Self

    A secret value: masked in the build's logs and errors, and for add stored as a secret (--secret).

#

DenoDeployLogsSettings

class
class DenoDeployLogsSettings(DenoDeployAppSettings)

Settings for deno deploy logs.

  • start(timestamp: str) -> Self

    Logs from this timestamp on, e.g. 2026-01-01T00:00:00Z (--start).

  • end(timestamp: str) -> Self

    Logs up to this timestamp; needs start (--end).

  • once() -> Self

    Print the logs available now and exit, instead of following them (--once). Without it the command streams until stopped, so a build almost always wants this.

#

DenoDeployOrgSettings

class
class DenoDeployOrgSettings(DenoDeployCommandSettings)

Base for the deno deploy commands scoped to an organization.

  • org(name: str) -> Self

    The organization (--org).

#

DenoDeployQuerySettings

class
class DenoDeployQuerySettings(DenoDeployCommandSettings)

Settings for deno deploy orgs list and deno deploy whoami, which take neither an organization nor an application.

#

DenoDeploySettings

class
class DenoDeploySettings(DenoDeployUploadSettings)

Settings for deno deploy: upload a directory to an application.

  • prod() -> Self

    Deploy straight to production rather than as a preview (--prod).

#

DenoDeployTasks

class
class DenoDeployTasks

Typed task functions for deno deploy.

  • static async deploy(ctx: ServiceContext, configure: Callable[[DenoDeploySettings], DenoDeploySettings] | None=None) -> ExecResult

    Deploy a directory to an application: deno deploy.

  • static async create(ctx: ServiceContext, configure: Callable[[DenoDeployCreateSettings], DenoDeployCreateSettings] | None=None) -> ExecResult

    Create an application: deno deploy create.

  • static async env_list(ctx: ServiceContext, configure: Callable[[DenoDeployEnvListSettings], DenoDeployEnvListSettings] | None=None) -> ExecResult

    List an application's variables: deno deploy env list.

  • static async env_add(ctx: ServiceContext, configure: Callable[[DenoDeployEnvValueSettings], DenoDeployEnvValueSettings]) -> ExecResult

    Add a variable: deno deploy env add.

  • static async env_update_value(ctx: ServiceContext, configure: Callable[[DenoDeployEnvValueSettings], DenoDeployEnvValueSettings]) -> ExecResult

    Change a variable's value: deno deploy env update-value.

  • static async env_update_contexts(ctx: ServiceContext, configure: Callable[[DenoDeployEnvUpdateContextsSettings], DenoDeployEnvUpdateContextsSettings]) -> ExecResult

    Change the contexts a variable applies in: deno deploy env update-contexts.

  • static async env_delete(ctx: ServiceContext, configure: Callable[[DenoDeployEnvDeleteSettings], DenoDeployEnvDeleteSettings]) -> ExecResult

    Delete a variable: deno deploy env delete.

  • static async env_load(ctx: ServiceContext, configure: Callable[[DenoDeployEnvLoadSettings], DenoDeployEnvLoadSettings]) -> ExecResult

    Load variables from a .env file: deno deploy env load.

  • static async logs(ctx: ServiceContext, configure: Callable[[DenoDeployLogsSettings], DenoDeployLogsSettings] | None=None) -> ExecResult

    Print an application's logs: deno deploy logs.

  • static async deployments_list(ctx: ServiceContext, configure: Callable[[DenoDeployDeploymentsListSettings], DenoDeployDeploymentsListSettings] | None=None) -> ExecResult

    List an application's deployments: deno deploy deployments list.

  • static async apps_list(ctx: ServiceContext, configure: Callable[[DenoDeployAppsListSettings], DenoDeployAppsListSettings] | None=None) -> ExecResult

    List an organization's applications: deno deploy apps list.

  • static async apps_get(ctx: ServiceContext, configure: Callable[[DenoDeployAppsGetSettings], DenoDeployAppsGetSettings] | None=None) -> ExecResult

    Show an application, with its production URL: deno deploy apps get.

  • static async orgs_list(ctx: ServiceContext, configure: Callable[[DenoDeployQuerySettings], DenoDeployQuerySettings] | None=None) -> ExecResult

    List the organizations the token reaches: deno deploy orgs list.

  • static async whoami(ctx: ServiceContext, configure: Callable[[DenoDeployQuerySettings], DenoDeployQuerySettings] | None=None) -> ExecResult

    Check the token: deno deploy whoami.

#

DenoDeployUploadSettings

class
class DenoDeployUploadSettings(DenoDeployAppSettings)

The flags shared by the commands that upload source from a local directory: deno deploy and deno deploy create.

  • root(path: str) -> Self

    The directory to upload (defaults to the working directory).

  • ignore(path: str) -> Self

    Leave a path out of the upload (--ignore); repeatable.

  • allow_node_modules() -> Self

    Include the node_modules directory in the upload (--allow-node-modules).

  • no_wait() -> Self

    Return once uploaded, without waiting for the build (--no-wait).

#

DenoDocSettings

class
class DenoDocSettings(DenoSettings)

Settings for deno doc.

  • paths(*paths: str) -> Self

    The source files (entry points) to document.

  • json() -> Self

    Output the documentation as JSON (--json).

  • html() -> Self

    Generate static HTML documentation (--html).

  • lint() -> Self

    Report documentation diagnostics rather than rendering docs (--lint).

  • private() -> Self

    Include private and internal symbols (--private).

  • strip_trailing_html() -> Self

    Drop the trailing .html from generated links (--strip-trailing-html).

  • name(title: str) -> Self

    Title for the generated HTML documentation (--name).

  • output(dir: str) -> Self

    Output directory for HTML documentation (--output).

  • filter(symbol: str) -> Self

    Document only the symbol at this dot-separated path (--filter).

  • category_docs(path: str) -> Self

    JSON file of per-category Markdown docs (--category-docs).

  • symbol_redirect_map(path: str) -> Self

    JSON file redirecting symbols to external links (--symbol-redirect-map).

  • default_symbol_map(path: str) -> Self

    Mapping of default export names to the names usage blocks show (--default-symbol-map).

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag rather than PnpmSettings.frozenLockfile()'s naming.

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock).

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

  • reload(*specifiers: str) -> Self

    Reload the module cache (--reload), optionally only these specifiers.

#

DenoEvalSettings

class
class DenoEvalSettings(DenoPermissionSettings)

Settings for deno eval.

The code is passed as a single argv entry by the shell layer, never interpolated into a command string, so a value built from build parameters cannot break out of it.

  • code(source: str) -> Self

    The source to evaluate (required).

  • print() -> Self

    Print the expression's result to stdout (--print).

  • ext(value: Literal['ts', 'tsx', 'js', 'jsx', 'mts', 'mjs', 'cts', 'cjs']) -> Self

    Treat the source as this content type (--ext), rather than TypeScript.

  • config(path: str) -> Self

    Use an explicit config file (--config).

#

DenoFmtSettings

class
class DenoFmtSettings(DenoSettings)

Settings for deno fmt.

  • check() -> Self

    Verify formatting without writing changes (--check).

  • fail_fast() -> Self

    Stop at the first badly formatted file (--fail-fast).

  • line_width(columns: float) -> Self

    Maximum line width (--line-width), 80 by default.

  • indent_width(columns: float) -> Self

    Indentation width (--indent-width), 2 by default.

  • use_tabs(enabled: bool | None=None) -> Self

    Indent with tabs rather than spaces (--use-tabs).

  • single_quote(enabled: bool | None=None) -> Self

    Quote strings with single quotes (--single-quote).

  • no_semicolons(enabled: bool | None=None) -> Self

    Omit semicolons except where they are required (--no-semicolons).

  • prose_wrap(mode: Literal['always', 'never', 'preserve']) -> Self

    How to wrap prose in Markdown (--prose-wrap).

  • unstable_component() -> Self

    Format Svelte, Vue, Astro and Angular files (--unstable-component).

  • unstable_sql() -> Self

    Format SQL files (--unstable-sql).

  • ext(value: str) -> Self

    Treat the inputs as this content type (--ext). deno fmt accepts far more than the script extensions — Markdown, JSON, CSS, HTML, YAML and the component formats among them — so this takes a string rather than the narrower script-only union the runtime subcommands use.

  • ignore(*patterns: str) -> Self

    Skip files matching these patterns (--ignore).

  • permit_no_files() -> Self

    Succeed when no files matched (--permit-no-files).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • watch() -> Self

    Re-format when a watched file changes (--watch).

  • watch_exclude(*paths: str) -> Self

    Exclude paths from the watcher (--watch-exclude).

  • no_clear_screen() -> Self

    Keep previous output when re-running under --watch (--no-clear-screen).

  • paths(*paths: str) -> Self

    Restrict formatting to specific files or directories.

#

DenoInfoSettings

class
class DenoInfoSettings(DenoSettings)

Settings for deno info.

  • path(file: str) -> Self

    The module to report on — a path, or any specifier deno info accepts, including a file:// URL. Prefer the URL form when the specifier is built rather than typed: it is the same string on every OS, where a constructed path is not. Omit it to report on the caches themselves — deno info with no module prints the cache directories rather than a module graph, which is why DenoTasks.cacheInfo and DenoTasks.moduleGraph are separate readers.

  • json() -> Self

    Emit the report as JSON (--json).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • reload() -> Self

    Reload the module cache before reporting (--reload).

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag.

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

#

DenoInitSettings

class
class DenoInitSettings(DenoSettings)

Settings for deno init.

  • directory(name: str) -> Self

    The directory to create, or the package to scaffold from.

  • lib() -> Self

    Scaffold an example library project (--lib).

  • serve() -> Self

    Scaffold an example deno serve project (--serve).

  • empty() -> Self

    Scaffold a minimal project — just main.ts and deno.json (--empty).

  • jsr() -> Self

    Scaffold from a JSR package (--jsr).

  • npm() -> Self

    Scaffold from an npm create-* package (--npm).

  • yes() -> Self

    Answer the scaffolding prompts affirmatively and grant full permissions (--yes). Required for an unattended run: without it deno init can stop on a prompt no build target is there to answer.

#

DenoInstallSettings

class
class DenoInstallSettings(DenoPermissionSettings)

Settings for deno install.

  • global_() -> Self

    Install a global executable (--global/-g) instead of project deps.

  • force() -> Self

    Overwrite an existing installation (--force/-f).

  • root(path: str) -> Self

    Install root; the binary lands in <root>/bin (--root).

  • name(value: str) -> Self

    Name the installed executable (--name/-n).

  • module(spec: str) -> Self

    The module to install, e.g. npm:cspell@9 (required for a global install).

  • module_args(*args: str | float) -> Self

    Arguments baked into the generated launcher, emitted after the -- separator deno requires for them.

  • dev() -> Self

    Install dev dependencies only alongside the rest (--dev).

  • prod() -> Self

    Install production dependencies only (--prod).

  • save_exact() -> Self

    Record exact versions, without a caret range (--save-exact).

  • lockfile_only() -> Self

    Update the lockfile without installing (--lockfile-only).

  • skip_types() -> Self

    Exclude @types/* packages (--skip-types).

  • jsr() -> Self

    Read unprefixed package names as JSR packages (--jsr).

  • npm() -> Self

    Read unprefixed package names as npm packages (--npm).

  • package_json() -> Self

    Install into package.json rather than deno.json (--package-json).

  • entrypoint(path: str) -> Self

    Name the entrypoint the launcher runs (--entrypoint).

  • compile() -> Self

    Build a compiled launcher (--compile) rather than a script shim, and cross-compile it with os and arch.

  • os(value: str) -> Self

    Target operating system for a compiled launcher (--os).

  • arch(value: str) -> Self

    Target architecture for a compiled launcher (--arch).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock).

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • cached_only() -> Self

    Resolve only from the cache (--cached-only).

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

  • reload(*specifiers: str) -> Self

    Reload the module cache (--reload), optionally only these specifiers.

  • node_modules_dir(mode: Literal['auto', 'manual', 'none']) -> Self

    Set the node-modules management mode (--node-modules-dir).

  • node_modules_linker(mode: Literal['isolated', 'hoisted']) -> Self

    Set the npm linker mode (--node-modules-linker).

  • vendor(enabled: bool | None=None) -> Self

    Toggle the local vendor folder (--vendor).

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

  • allow_scripts(*packages: str) -> Self

    Permit npm lifecycle scripts, optionally only for these packages (--allow-scripts).

  • conditions(*values: str) -> Self

    Resolve npm package exports with these conditions (--conditions).

  • preload(*paths: str) -> Self

    Execute these modules before the main one (--preload).

  • require(*paths: str) -> Self

    Execute these CommonJS modules before the main one (--require).

  • type_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Type-check before installing (--check).

  • no_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Skip type-checking (--no-check).

  • inspect(host_port: str | None=None) -> Self

    Activate the inspector (--inspect).

  • inspect_brk(host_port: str | None=None) -> Self

    Activate the inspector and break at the start (--inspect-brk).

  • inspect_wait(host_port: str | None=None) -> Self

    Activate the inspector and wait for a debugger (--inspect-wait).

#

DenoLintSettings

class
class DenoLintSettings(DenoSettings)

Settings for deno lint.

  • fix() -> Self

    Apply automatic fixes (--fix).

  • list_rules() -> Self

    List the available rules and exit (--rules) rather than linting. Pair it with json to get the catalogue in machine-readable form.

  • json() -> Self

    Report diagnostics as JSON (--json).

  • compact() -> Self

    Report diagnostics one per line (--compact).

  • rules_tags(*tags: str) -> Self

    Enable the rule sets carrying these tags (--rules-tags).

  • rules_include(*rules: str) -> Self

    Enable these rules on top of the configured set (--rules-include).

  • rules_exclude(*rules: str) -> Self

    Disable these rules (--rules-exclude).

  • ext(value: str) -> Self

    Treat the inputs as this content type (--ext).

  • ignore(*patterns: str) -> Self

    Skip files matching these patterns (--ignore).

  • permit_no_files() -> Self

    Succeed when no files matched (--permit-no-files).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • watch() -> Self

    Re-lint when a watched file changes (--watch).

  • watch_exclude(*paths: str) -> Self

    Exclude paths from the watcher (--watch-exclude).

  • no_clear_screen() -> Self

    Keep previous output when re-running under --watch (--no-clear-screen).

  • paths(*paths: str) -> Self

    Restrict linting to specific files or directories.

#

DenoLockSettings

class
class DenoLockSettings(DenoSettings)

Base for the deno subcommands that read and write the lockfile.

The lockfile flags are a section the CLI repeats across every one of them, so they live here once rather than being restated per subcommand.

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag.

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock), neither reading nor writing it.

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock) instead of the discovered deno.lock.

#

DenoOutdatedSettings

class
class DenoOutdatedSettings(DenoLockSettings)

Settings for deno outdated.

  • filters(*patterns: str) -> Self

    Restrict the report to dependencies matching these filters, which may include * wildcards. Filters match the alias a dependency is declared under, not the package it resolves to.

  • compatible() -> Self

    Only consider versions satisfying the declared semver range (--compatible).

  • latest() -> Self

    Consider the latest version regardless of the declared range (--latest).

  • recursive() -> Self

    Include every workspace member (--recursive).

  • update() -> Self

    Write the newer versions back into the manifest (--update) instead of only reporting them. Without it deno outdated reports and changes nothing, which is what a freshness gate wants.

  • lockfile_only() -> Self

    Update the lockfile without installing (--lockfile-only).

#

DenoPackSettings

class
class DenoPackSettings(DenoSettings)

Settings for deno pack.

  • files(*patterns: str) -> Self

    File patterns to include in the tarball; defaults to the package's own.

  • allow_dirty() -> Self

    Pack even with an uncommitted working tree (--allow-dirty).

  • allow_slow_types() -> Self

    Skip fast-check type extraction (--allow-slow-types). The tarball then ships without .d.ts files, so consumers get no types from it.

  • dry_run() -> Self

    Report what would be packed without writing the tarball (--dry-run).

  • no_source_maps() -> Self

    Omit source maps from the tarball (--no-source-maps).

  • ignore(*patterns: str) -> Self

    Exclude files matching these patterns (--ignore).

  • output(path: str) -> Self

    Write the tarball here (--output) instead of <name>-<version>.tgz.

  • set_version(version: str) -> Self

    Override the version recorded in the tarball (--set-version).

  • config(path: str) -> Self

    Use an explicit config file (--config).

#

DenoPermissionSettings

class
class DenoPermissionSettings(DenoSettings)

Base for subcommands that accept --allow-* permission flags.

  • allow_all() -> Self

    Grant all permissions (--allow-all).

  • allow(permission: Literal['read', 'write', 'net', 'env', 'run', 'sys', 'ffi', 'import'], *values: str) -> Self

    Grant one permission, optionally scoped to values (--allow-read=a,b).

  • frozen() -> Self

    Error out if the lockfile is out of date instead of silently updating it (--frozen). Use it whenever the module graph must match the committed deno.lock exactly — running an npm: tool in CI, say, so its transitive tree stays pinned to the audited integrity hashes rather than being resolved afresh. Named frozen — not frozenLockfile — to mirror the real Deno CLI flag exactly. This is a deliberate divergence from PnpmSettings.frozenLockfile() in @zuke/pnpm, which follows pnpm's own flag name instead: guideline 7 (mirror the real CLI) takes priority over cross-package naming symmetry.

#

DenoPublishSettings

class
class DenoPublishSettings(DenoSettings)

Settings for deno publish.

  • allow_dirty() -> Self

    Publish even with an uncommitted working tree (--allow-dirty).

  • allow_slow_types() -> Self

    Permit slow types in the published package (--allow-slow-types).

  • no_check() -> Self

    Skip type-checking before publishing (--no-check).

  • dry_run() -> Self

    Validate without publishing (--dry-run).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • token(value: str) -> Self

    Authenticate with a token instead of interactive/OIDC auth (--token). Registered with the run's redactor, so every *rendering* of the command masks it — a dry-run echo, a failure message. That is as far as it goes: deno publish accepts the token only as a flag, so the value still reaches the child's argv, where ps and /proc/<pid>/cmdline expose it to every other user on the host and to every process the build starts. There is no environment variable to move it to. DENO_AUTH_TOKENS is not one — it authenticates *module fetches*, not publishing. Prefer passing no token at all. On GitHub Actions deno publish uses OIDC, so the publish is authenticated by the workflow's identity and there is no credential to expose; this repository's own publish does exactly that.

  • set_version(version: str) -> Self

    Publish under an overridden version (--set-version) instead of the one in the manifest — how a release job publishes a version it computed without first committing it. deno accepts it only when publishing a single package: it is rejected in a workspace, where the versions have to come from each member's own manifest. Whether the working directory is a workspace is not visible while the argv is being built, so this is a note rather than a refusal.

  • no_provenance() -> Self

    Disable provenance attestation (--no-provenance). Provenance is what lets a consumer verify the published artifact came from this repository's CI, so turning it off is a deliberate weakening rather than a default worth reaching for. It stays on unless this is called. deno produces it by default only on GitHub Actions, so elsewhere there is nothing to disable. The case it exists for is the trade it makes: the attestation publicly links the package to the repository, workflow and commit it was built from, which a package published from a private repository may not want disclosed. Weigh that against consumers losing the ability to verify the artifact's origin, and prefer keeping it.

  • type_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Type-check before publishing (--check), optionally including remote code.

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

#

DenoRemoveSettings

class
class DenoRemoveSettings(DenoLockSettings)

Settings for deno remove.

  • packages(*names: str) -> Self

    The packages to remove, by the name they are recorded under (required).

  • lockfile_only() -> Self

    Update the lockfile without touching node_modules (--lockfile-only).

  • package_json() -> Self

    Remove from package.json rather than deno.json (--package-json).

#

DenoRunSettings

class
class DenoRunSettings(DenoPermissionSettings)

Settings for deno run.

  • script(path: str) -> Self

    The script to run (required).

  • script_args(*args: str | float) -> Self

    Arguments passed to the script (after the script path).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • reload(*specifiers: str) -> Self

    Reload the module cache (--reload), optionally only these specifiers.

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock).

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • cached_only() -> Self

    Resolve only from the cache (--cached-only), fetching nothing.

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

  • node_modules_dir(mode: Literal['auto', 'manual', 'none']) -> Self

    Set the node-modules management mode (--node-modules-dir).

  • node_modules_linker(mode: Literal['isolated', 'hoisted']) -> Self

    Set the npm linker mode (--node-modules-linker).

  • vendor(enabled: bool | None=None) -> Self

    Toggle the local vendor folder (--vendor).

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

  • cert(path: str) -> Self

    Load a certificate authority from a PEM file (--cert).

  • location(href: str) -> Self

    Set globalThis.location (--location).

  • seed(value: float) -> Self

    Seed the random number generator (--seed).

  • v8_flags(*flags: str) -> Self

    Pass flags through to V8 (--v8-flags).

  • conditions(*values: str) -> Self

    Resolve npm package exports with these conditions (--conditions).

  • preload(*paths: str) -> Self

    Execute these modules before the main one (--preload).

  • require(*paths: str) -> Self

    Execute these CommonJS modules before the main one (--require).

  • no_code_cache() -> Self

    Disable the V8 code cache (--no-code-cache).

  • allow_scripts(*packages: str) -> Self

    Permit npm lifecycle scripts, optionally only for these packages (--allow-scripts).

  • type_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Type-check before running (--check), optionally including remote code.

  • no_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Skip type-checking (--no-check), optionally only for remote code.

  • inspect(host_port: str | None=None) -> Self

    Activate the inspector (--inspect).

  • inspect_brk(host_port: str | None=None) -> Self

    Activate the inspector and break at the start (--inspect-brk).

  • inspect_wait(host_port: str | None=None) -> Self

    Activate the inspector and wait for a debugger (--inspect-wait).

  • watch() -> Self

    Restart when a watched file changes (--watch).

  • watch_hmr() -> Self

    Watch with hot-module replacement (--watch-hmr), which only deno run offers. It implies watching, so it replaces --watch rather than joining it.

  • watch_exclude(*paths: str) -> Self

    Exclude paths from the watcher (--watch-exclude).

  • no_clear_screen() -> Self

    Keep previous output when re-running under --watch (--no-clear-screen).

#

DenoServeSettings

class
class DenoServeSettings(DenoPermissionSettings)

Settings for deno serve.

A server runs until it is stopped, so a build target that awaits this task blocks forever. Give it a bound with .killAfter(ms) — for a smoke test that the server starts — or run it from a target the build is not waiting on.

  • script(path: str) -> Self

    The module exporting the server's default handler (required).

  • script_args(*args: str | float) -> Self

    Arguments passed to the server module (after the module path).

  • port(value: float) -> Self

    The TCP port to serve on (--port); 0 picks a free one.

  • host(value: str) -> Self

    The TCP address to serve on (--host), defaulting to all interfaces.

  • parallel() -> Self

    Run one server worker per available CPU (--parallel), or as many as DENO_JOBS allows.

  • open() -> Self

    Open a browser on the served address (--open).

  • watch() -> Self

    Restart the server when a watched file changes (--watch).

  • config(path: str) -> Self

    Use an explicit config file (--config).

#

DenoSettings

class
class DenoSettings(ToolSettings)

Base for all deno subcommand settings: binary is the deno running here.

#

DenoTasks

class
class DenoTasks

Typed task functions for the deno CLI.

  • static async run(ctx: ServiceContext, configure: Callable[[DenoRunSettings], DenoRunSettings] | None=None) -> ExecResult

    Run a script: deno run.

  • static async test(ctx: ServiceContext, configure: Callable[[DenoTestSettings], DenoTestSettings] | None=None) -> ExecResult

    Run tests: deno test. Reports the run's counts into the running target's row of the build summary (// Tests: 837 · Passed: 837 · Failed: 0), read from deno's own result line — see DenoTestSettings.

  • static async check(ctx: ServiceContext, configure: Callable[[DenoCheckSettings], DenoCheckSettings] | None=None) -> ExecResult

    Type-check files: deno check.

  • static async fmt(ctx: ServiceContext, configure: Callable[[DenoFmtSettings], DenoFmtSettings] | None=None) -> ExecResult

    Format files: deno fmt.

  • static async lint(ctx: ServiceContext, configure: Callable[[DenoLintSettings], DenoLintSettings] | None=None) -> ExecResult

    Lint files: deno lint.

  • static async doc(ctx: ServiceContext, configure: Callable[[DenoDocSettings], DenoDocSettings] | None=None) -> ExecResult

    Generate documentation: deno doc.

  • static async cache(ctx: ServiceContext, configure: Callable[[DenoCacheSettings], DenoCacheSettings] | None=None) -> ExecResult

    Warm the module cache: deno cache.

  • static async coverage(ctx: ServiceContext, configure: Callable[[DenoCoverageSettings], DenoCoverageSettings] | None=None) -> ExecResult

    Report coverage: deno coverage.

  • static async install(ctx: ServiceContext, configure: Callable[[DenoInstallSettings], DenoInstallSettings] | None=None) -> ExecResult

    Install a script or executable: deno install.

  • static async publish(ctx: ServiceContext, configure: Callable[[DenoPublishSettings], DenoPublishSettings] | None=None) -> ExecResult

    Publish a package to JSR: deno publish.

  • static async task(ctx: ServiceContext, configure: Callable[[DenoTaskSettings], DenoTaskSettings] | None=None) -> ExecResult

    Run a deno.json task: deno task.

  • static async serve(ctx: ServiceContext, configure: Callable[[DenoServeSettings], DenoServeSettings] | None=None) -> ExecResult

    Run a server: deno serve.

  • static async eval(ctx: ServiceContext, configure: Callable[[DenoEvalSettings], DenoEvalSettings] | None=None) -> ExecResult

    Evaluate a snippet: deno eval.

  • static async bench(ctx: ServiceContext, configure: Callable[[DenoBenchSettings], DenoBenchSettings] | None=None) -> ExecResult

    Run benchmarks: deno bench.

  • static async compile(ctx: ServiceContext, configure: Callable[[DenoCompileSettings], DenoCompileSettings] | None=None) -> ExecResult

    Build a self-contained executable: deno compile.

  • static async clean(ctx: ServiceContext, configure: Callable[[DenoCleanSettings], DenoCleanSettings] | None=None) -> ExecResult

    Remove the cache directory: deno clean.

  • static async info(ctx: ServiceContext, configure: Callable[[DenoInfoSettings], DenoInfoSettings] | None=None) -> ExecResult

    Report on a module or the caches: deno info.

  • static async init(ctx: ServiceContext, configure: Callable[[DenoInitSettings], DenoInitSettings] | None=None) -> ExecResult

    Scaffold a new project: deno init.

  • static async upgrade(ctx: ServiceContext, configure: Callable[[DenoUpgradeSettings], DenoUpgradeSettings] | None=None) -> ExecResult

    Upgrade the deno executable: deno upgrade.

  • static async add(ctx: ServiceContext, configure: Callable[[DenoAddSettings], DenoAddSettings] | None=None) -> ExecResult

    Add dependencies: deno add.

  • static async remove(ctx: ServiceContext, configure: Callable[[DenoRemoveSettings], DenoRemoveSettings] | None=None) -> ExecResult

    Remove dependencies: deno remove.

  • static async uninstall(ctx: ServiceContext, configure: Callable[[DenoUninstallSettings], DenoUninstallSettings] | None=None) -> ExecResult

    Uninstall a dependency or global executable: deno uninstall.

  • static async outdated(ctx: ServiceContext, configure: Callable[[DenoOutdatedSettings], DenoOutdatedSettings] | None=None) -> ExecResult

    Report outdated dependencies: deno outdated.

  • static async why(ctx: ServiceContext, configure: Callable[[DenoWhySettings], DenoWhySettings] | None=None) -> ExecResult

    Explain why a package is installed: deno why.

  • static async ci(ctx: ServiceContext, configure: Callable[[DenoCiSettings], DenoCiSettings] | None=None) -> ExecResult

    Install strictly from the lockfile: deno ci.

  • static async approve_scripts(ctx: ServiceContext, configure: Callable[[DenoApproveScriptsSettings], DenoApproveScriptsSettings] | None=None) -> ExecResult

    Approve npm lifecycle scripts: deno approve-scripts.

  • static async bump_version(ctx: ServiceContext, configure: Callable[[DenoBumpVersionSettings], DenoBumpVersionSettings] | None=None) -> ExecResult

    Bump the version in the manifest: deno bump-version.

  • static async pack(ctx: ServiceContext, configure: Callable[[DenoPackSettings], DenoPackSettings] | None=None) -> ExecResult

    Build an npm-compatible tarball: deno pack.

  • static async module_graph(ctx: ServiceContext, configure: Callable[[DenoInfoSettings], DenoInfoSettings] | None=None) -> object

    The module graph rooted at a file, parsed from deno info --json. A reader, not a gate: it returns the graph rather than printing it, so a build can assert on what its entry point actually pulls in.

  • static async cache_info(ctx: ServiceContext, configure: Callable[[DenoInfoSettings], DenoInfoSettings] | None=None) -> object

    The toolchain's cache locations, parsed from deno info --json.

#

DenoTaskSettings

class
class DenoTaskSettings(DenoSettings)

Settings for deno task.

  • name(value: str) -> Self

    The task name from deno.json (required).

  • task_args(*args: str | float) -> Self

    Arguments forwarded to the task.

  • recursive() -> Self

    Run the task in every workspace member (--recursive).

  • filter(pattern: str) -> Self

    Select the workspace members to run the task in (--filter). It selects on its own — recursive is not a prerequisite.

  • no_prefix() -> Self

    Drop the per-member name prefix from output (--no-prefix), which a recursive run adds. Useful when the output is being parsed rather than read.

  • eval_shell() -> Self

    Treat the task name as a shell command to evaluate (--eval) instead of a task defined in the configuration file.

  • task_cwd(path: str) -> Self

    Run the task from this directory (--cwd). Distinct from the inherited cwd, which sets the directory the deno process itself is spawned in: this one moves only the task, leaving configuration discovery anchored where deno started.

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • frozen() -> Self

    Error out if the lockfile is out of date (--frozen). See DenoPermissionSettings.frozen for why the name mirrors the real Deno flag rather than PnpmSettings.frozenLockfile()'s naming.

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock).

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • node_modules_dir(mode: Literal['auto', 'manual', 'none']) -> Self

    Set the node-modules management mode (--node-modules-dir).

  • node_modules_linker(mode: Literal['isolated', 'hoisted']) -> Self

    Set the npm linker mode (--node-modules-linker).

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

#

DenoTestSettings

class
class DenoTestSettings(DenoPermissionSettings)

Settings for deno test.

A run reports its counts into the running target's row of the build summary — // Tests: 837 · Passed: 837 · Failed: 0 — read from the result line the pretty and dot reporters print (ignored tests count as Skipped); a failed run reports too, so a red row says how many failed. The JUnit and TAP reporters print no such line, so a run under .reporter("junit")/.reporter("tap") reports nothing.

  • paths(*paths: str) -> Self

    Restrict the run to specific test files or directories.

  • coverage(dir: str) -> Self

    Collect coverage into the given profile directory (--coverage=).

  • coverage_raw_data_only() -> Self

    Collect raw coverage data without generating a report (--coverage-raw-data-only).

  • clean() -> Self

    Empty the coverage profile directory before running (--clean), so a run reports on its own tests rather than on whatever a previous run left. The directory need not come from coverage: DENO_COVERAGE_DIR sets it too, which is why this is not tied to that setter.

  • filter(pattern: str) -> Self

    Only run tests whose name matches (--filter).

  • parallel() -> Self

    Run test files in parallel (--parallel).

  • fail_fast(count: float | None=None) -> Self

    Stop after count failures (--fail-fast), or after the first.

  • doc() -> Self

    Evaluate the code blocks in JSDoc and Markdown as tests (--doc).

  • no_run() -> Self

    Cache the test modules without running them (--no-run).

  • shuffle(seed: float | None=None) -> Self

    Randomise test order (--shuffle), optionally with a fixed seed so a failing order can be replayed.

  • trace_leaks() -> Self

    Trace the ops a test leaks (--trace-leaks). It costs run time and is the only practical way to find which test leaked a pending op — the flakiest class of failure a suite has.

  • sanitize_ops() -> Self

    Require every async op started in a test to finish in it (--sanitize-ops).

  • sanitize_resources() -> Self

    Require every resource opened in a test to be closed in it (--sanitize-resources).

  • hide_stacktraces() -> Self

    Omit stack traces from failure output (--hide-stacktraces).

  • reporter(kind: Literal['pretty', 'dot', 'junit', 'tap']) -> Self

    Select the console reporter (--reporter).

  • junit_path(path: str) -> Self

    Also write a JUnit XML report to path (--junit-path), whatever the console reporter is — this is the file a CI test-report UI ingests.

  • ext(value: str) -> Self

    Treat the inputs as this content type (--ext).

  • ignore(*patterns: str) -> Self

    Skip files matching these patterns (--ignore).

  • permit_no_files() -> Self

    Succeed when no test files matched (--permit-no-files).

  • config(path: str) -> Self

    Use an explicit config file (--config).

  • no_config() -> Self

    Discover no configuration file at all (--no-config).

  • type_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Type-check before running (--check), optionally including remote code.

  • no_check(scope: Literal['all', 'remote'] | None=None) -> Self

    Skip type-checking (--no-check), optionally only for remote code.

  • inspect(host_port: str | None=None) -> Self

    Activate the inspector (--inspect).

  • inspect_brk(host_port: str | None=None) -> Self

    Activate the inspector and break at the start (--inspect-brk).

  • inspect_wait(host_port: str | None=None) -> Self

    Activate the inspector and wait for a debugger (--inspect-wait).

  • env_file(path: str) -> Self

    Load environment variables from a file (--env-file).

  • cert(path: str) -> Self

    Load a certificate authority from a PEM file (--cert).

  • location(href: str) -> Self

    Set globalThis.location (--location).

  • seed(value: float) -> Self

    Seed the random number generator (--seed), making a run reproducible.

  • v8_flags(*flags: str) -> Self

    Pass flags through to V8 (--v8-flags).

  • conditions(*values: str) -> Self

    Resolve npm package exports with these conditions (--conditions).

  • preload(*paths: str) -> Self

    Execute these modules before the main one (--preload).

  • require(*paths: str) -> Self

    Execute these CommonJS modules before the main one (--require).

  • allow_scripts(*packages: str) -> Self

    Permit npm lifecycle scripts, optionally only for these packages (--allow-scripts).

  • lock(path: str) -> Self

    Use an explicit lockfile (--lock).

  • no_lock() -> Self

    Ignore the lockfile entirely (--no-lock).

  • import_map(path: str) -> Self

    Load an import map from a file or URL (--import-map).

  • cached_only() -> Self

    Resolve only from the cache (--cached-only).

  • no_npm() -> Self

    Do not resolve npm modules (--no-npm).

  • no_remote() -> Self

    Do not resolve remote modules (--no-remote).

  • reload(*specifiers: str) -> Self

    Reload the module cache (--reload), optionally only these specifiers.

  • node_modules_dir(mode: Literal['auto', 'manual', 'none']) -> Self

    Set the node-modules management mode (--node-modules-dir).

  • node_modules_linker(mode: Literal['isolated', 'hoisted']) -> Self

    Set the npm linker mode (--node-modules-linker).

  • vendor(enabled: bool | None=None) -> Self

    Toggle the local vendor folder (--vendor).

  • watch() -> Self

    Re-run when a watched file changes (--watch).

  • watch_exclude(*paths: str) -> Self

    Exclude paths from the watcher (--watch-exclude).

  • no_clear_screen() -> Self

    Keep previous output when re-running under --watch (--no-clear-screen).

#

DenoUninstallSettings

class
class DenoUninstallSettings(DenoLockSettings)

Settings for deno uninstall.

  • packages(*names: str) -> Self

    The dependency names, or the global executable name, to remove (required).

  • global_() -> Self

    Remove a globally installed executable (--global) rather than a project dependency.

  • root(path: str) -> Self

    The installation root the executable lives under (--root).

  • lockfile_only() -> Self

    Update the lockfile without touching node_modules (--lockfile-only).

  • package_json() -> Self

    Remove from package.json rather than deno.json (--package-json).

#

DenoUpgradeSettings

class
class DenoUpgradeSettings(DenoSettings)

Settings for deno upgrade.

  • version(value: str) -> Self

    The version, channel (alpha, beta, rc, canary) or commit hash to install. Omit it to move to the latest stable release.

  • dry_run() -> Self

    Run every check without replacing the executable (--dry-run).

  • force() -> Self

    Replace the executable even when it is already up to date (--force).

  • no_delta() -> Self

    Download the full archive instead of a delta update (--no-delta).

  • output(path: str) -> Self

    Write the upgraded executable somewhere else (--output), leaving the running one in place. This is what makes upgrade usable from a build: a target can fetch a second Deno without replacing the one executing it.

  • checksum(sha256: str) -> Self

    Verify the downloaded archive against a SHA-256 checksum (--checksum).

#

DenoWhySettings

class
class DenoWhySettings(DenoLockSettings)

Settings for deno why.

  • package_name(value: str) -> Self

    The package to explain, optionally with a version (express@4.18.2) (required).