Skip to content

Commit

Permalink
chore: enable deno workspaces
Browse files Browse the repository at this point in the history
Deno workspaces enable JSR dependencies to resolve to local copies.
This essentially turns all of the packages' tests into tests for `@libs/testing`.
  • Loading branch information
lishaduck committed Jun 7, 2024
1 parent d5cc205 commit c687964
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/deno_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const root = fromFileUrl(import.meta.resolve("../"))
const global = JSONC.parse(await Deno.readTextFile(resolve(root, "deno.jsonc"))) as Record<string, unknown>
const imports = { "@std/jsonc": "jsr:@std/jsonc@0.224.0", "@std/yaml": "jsr:@std/yaml@0.224.0" } as record<string>
const log = new Logger()
const order = ["icon", "name", "version", "description", "keywords", "license", "author", "funding", "homepage", "playground", "supported", "repository", "npm", "deno.land/x", "exports", "unstable", "lock", "imports", "test:permissions", "tasks", "lint", "fmt"]
const order = ["icon", "name", "version", "description", "keywords", "license", "author", "funding", "homepage", "playground", "supported", "repository", "npm", "deno.land/x", "exports", "unstable", "lock", "imports", "test:permissions", "tasks", "lint", "fmt", "workspaces"]

// Load local configurations
const packages = []
Expand Down Expand Up @@ -47,7 +47,7 @@ for await (const { path } of expandGlob(`*/deno.jsonc`, { root })) {
// Register local imports
for (const [key, value] of Object.entries(local.imports ?? {})) {
if ((key in imports) && (imports[key] !== value)) {
log.warn({ package: packages.at(-1), dependency: key }).warn("previous registered with a different version")
log.warn({ package: packages.at(-1), dependency: key }).warn("previously registered with a different version")
}
imports[key] = value
}
Expand Down
15 changes: 14 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,18 @@
"**/wasm_*",
"**/*.mjs"
]
}
},
"workspaces": [
"bundle/",
"crypto/",
"diff/",
"logger/",
"orm/",
"qrcode/",
"reactive/",
"run/",
"testing/",
"typing/",
"xml/"
]
}

0 comments on commit c687964

Please sign in to comment.