Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: unify package metadata across runtimes
Generate Deno imports from package metadata so Bun, npm, and JSR do
not maintain separate dependency versions. Track the definition schema
and satisfy Deno's public documentation checks without weakening types.
  • Loading branch information
kjanat committed Jul 17, 2026
commit 2512297cb81db30bd3adf9753e5d49b8df6ee075
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ runs: {
uses: kjanat/runner@master,
uses: denoland/setup-deno@v2,
{ uses: oven-sh/setup-bun@v2, with: { bun-version: latest } },
{ uses: actions/setup-node@v6, with: { node-version: latest } },
{ uses: actions/setup-node@v7, with: { node-version: latest } },
],
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with: { node-version: "${{ matrix.node-version }}" }
- run: runner install --frozen schema:emit
- name: Test in parallel (Bun) (Node ${{ matrix.node-version }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v7
with: { sparse-checkout: ".node-version\npackage.json" }
- { uses: actions/setup-node@v6, with: { node-version-file: .node-version, registry-url: https://registry.npmjs.org/ } }
- { uses: actions/setup-node@v7, with: { node-version-file: .node-version, registry-url: https://registry.npmjs.org/ } }
Comment thread
kjanat marked this conversation as resolved.
Outdated
- { uses: actions/download-artifact@v8, with: { name: tarball } }
- name: Publish to npm
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ $RECYCLE.BIN/
/_*.ts
/*example*.ts
.codex
/dreamcli.schema.json
/.bucket/
.playwright-mcp/
__pycache__
.*_cache
/deno.lock
/import_map.json
23 changes: 23 additions & 0 deletions .importmap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bun
import { writeImportMap } from 'importmapify';
import pkg from '#package.json';

const n = 'ansispeck';
const version = pkg['dependencies'][n].replace(/^(?:npm:)?ansispeck@/, '');
const ansispeck = `jsr:@kjanat/${n}@${version}`;

const out = writeImportMap({
root: import.meta.dirname,
out: 'import_map.json',
additionalImports: {
ansispeck,
'#dreamcli/schema': './src/schema.ts',
},
scopes: {
'./tests/': {
'dreamcli/testkit': 'jsr:@kjanat/dreamcli@^3/testkit',
},
},
});

console.log('Wrote import map to', out);
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v26.4.0
v26.5.0
28 changes: 25 additions & 3 deletions .zed/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"source.fixAll.biome": true,
"source.organizeImports.biome": true
},
"language_servers": ["typescript", "biome", "oxlint", "deno"]
"language_servers": [
"typescript-ls",
"biome",
"oxlint",
"deno",
"!typescript-language-server"
]
},
"TypeScript": {
"formatter": [
Expand All @@ -48,11 +54,27 @@
"source.fixAll.biome": true,
"source.organizeImports.biome": true
},
"language_servers": ["typescript", "biome", "oxlint", "deno", "vue-language-server"]
"language_servers": [
"typescript-ls",
"biome",
"oxlint",
"deno",
"vue-language-server",
"!typescript-language-server"
]
}
},
"lsp": {
"deno": { "settings": { "deno": { "enable": true } } },
"deno": {
"settings": {
"deno": {
"enable": true,
"enablePaths": ["./src", "./scripts/deno-smoke-test.ts"],
"config": "./deno.json",
"importMap": "./import_map.json"
}
}
},
"vtsls": {
"initialization_options": {
// https://github.com/yioneko/vtsls/blob/04c4d90fb4f18dff34d9282cdb7f508aab12cd95/packages/service/configuration.schema.json#L380
Expand Down
5 changes: 3 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ignoreUnknown": true,
"maxSize": 5000000
},
"formatter": { "enabled": false },
"formatter": { "enabled": false, "lineWidth": 100, "indentStyle": "tab" },
"linter": {
"enabled": true,
"rules": {
Expand All @@ -46,7 +46,8 @@
"formatter": {
"enabled": false,
"quoteStyle": "single",
"semicolons": "always"
"semicolons": "always",
"lineWidth": 100
}
},
"json": {
Expand Down
205 changes: 123 additions & 82 deletions bun.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ smol = false
[install]
auto = "auto"
exact = true
linker = "hoisted"
lockfile.save = true

[run]
Expand Down
10 changes: 2 additions & 8 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@
"command": "deno publish"
}
},
"imports": {
"ansispeck": "jsr:@kjanat/ansispeck@^0.2.0",
"#dreamcli": "./src/index.ts",
"#dreamcli/runtime": "./src/runtime.ts",
"#dreamcli/testkit": "./src/testkit.ts",
"#schema": "./dreamcli.schema.json",
"#internals/*": "./src/*"
},
"importMap": "./import_map.json",
"exports": {
".": "./src/index.ts",
"./runtime": "./src/runtime.ts",
Expand Down Expand Up @@ -64,6 +57,7 @@
"fmt": { "exclude": ["**"] },
"lint": { "rules": { "exclude": ["ban-types", "require-await"] } },
"nodeModulesDir": "manual",
"preferPackageJson": false,
"exclude": ["**/*.test.ts", "*.ts", "*cache/", "coverage/", "dist/", "scripts/", "**/*.tpl"],
"minimumDependencyAge": {
"exclude": [
Expand Down
Loading
Loading