feat: implement deno module (v0.1)#1
Merged
Merged
Conversation
This was referenced Jul 15, 2026
TomChv
force-pushed
the
feat/add-deno-module
branch
2 times, most recently
from
July 16, 2026 13:27
06850a2 to
a26c48d
Compare
shykes
reviewed
Jul 16, 2026
| let root = if (findUp) { | ||
| findProjectRoot(ws, path) | ||
| } else { | ||
| let p = path.trimPrefix("/").trimSuffix("/") |
There was a problem hiding this comment.
Why trim the prefix and suffix? Why not just leave the path as specified?
shykes
reviewed
Jul 16, 2026
| """ | ||
| pub projects(ws: Workspace!): [DenoProject!]! { | ||
| let src = ws.directory( | ||
| "/", |
There was a problem hiding this comment.
Suggested change
| "/", | |
| ".", |
Should search from current location in the workspace, instead of workspace root.
shykes
reviewed
Jul 16, 2026
| "/", | ||
| include: ["**/deno.json", "**/deno.jsonc"], | ||
| exclude: ["**/node_modules/**"], | ||
| ) |
There was a problem hiding this comment.
Suggested change
| ) | |
| ) | |
| // FIXME: findup a deno project from current location (`.`) and add it to the list. |
Member
Author
There was a problem hiding this comment.
Fixed and test, now if you have:
/deno.json
/sub/deno.json
And execute from sub, you'll obtain ., ../
TomChv
force-pushed
the
feat/add-deno-module
branch
from
July 16, 2026 14:03
a26c48d to
86d4927
Compare
A Dagger module for Deno projects, written in Dang. It models a Deno project as a typed object graph and maps Deno's toolchain onto Dagger's first-class verbs instead of wrapping the CLI. - Root `Deno`: pinned `version` (2.9.3) + overridable `base`, and `install(ctr)` to add the Deno CLI + DENO_DIR cache to any container. - `DenoProject`: `project(ws, path, findUp)` lookup + `projects(ws)` discovery; `config` / `source` / `container` introspection. - Checks (`@check`): lint / test / typeCheck / formatCheck, each with a workspace-wide `*All` counterpart on the root that `dagger check` runs. - `format` generator (`@generate`) returns a reviewable Changeset; `formatAll` covers the whole workspace. - `compile` returns a standalone binary (a plain File output, not a verb). - Permissions come from deno.json, not Dagger args: `test` runs `deno test -P` (reads `test.permissions`) and `compile` runs `deno compile -P` (bakes the top-level `permissions.default` set). `-P` needs Deno >= 2.5.0; below that, `test` falls back to `-A` and `compile` bakes no permissions (version-gated). - e2e module (`.dagger/modules/e2e`) drives the installed module against sample fixtures (clean, unformatted, jsr-dependency, config permissions, compiled binary, legacy version); plus design doc and README. Signed-off-by: Tom Chauveau <tom@dagger.io>
TomChv
force-pushed
the
feat/add-deno-module
branch
from
July 16, 2026 15:35
86d4927 to
a1270b3
Compare
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.
Implements the
dagger/denomodule in Dang, per the design indesigns/deno-module.md. It models a Deno project as a typed object graph andmaps Deno's toolchain onto Dagger's first-class verbs rather than wrapping the
CLI.
API (v0.1)
Deno(root)version,base— toolchain config (constructor args)install(ctr)— add the Deno CLI +DENO_DIRcache to any (glibc) containerproject(ws, path, findUp)— resolve the project containing a path (find-up to the nearestdeno.json/deno.jsonc)DenoProjectconfig,source,container@check):lint,test,typeCheck,formatCheckformat(@generate→ reviewable changeset)compile→ standalone binary (File!)formatandcompileare intentionally different kinds:formatis a no-argidempotent generator;
compileis a build artifact you export. No@upand nodependency-edit generators (design §3 has the rationale).
Tests
.dagger/modules/e2einstalls this module and drives it against three sampleprojects (clean, badly-formatted, jsr-dependency). All checks pass:
Verified end-to-end against a real engine (v1.0.0-beta.6).
Deltas from the design (recorded in §0)
compileoutput arg renamedoutput→outputName(clashes with dagger's-o/--output)permissionstake bare names (["net", "read=/tmp"]); the module prefixes--allow-auditdeferred —deno auditisn't in the pinned Deno 2.1.4installtargets glibc bases (thebinbinary is glibc-linked; musl/alpine uses the defaultbase)Workspaceargs work on beta.6; thebasefield default works (cache mount moved intocontainer(ws))Next (v0.2)
Multi-project discovery (
projects,deno.jsonworkspace members),*Allbulkverbs, and per-project checks.
See
README.mdfor usage examples.