Skip to content

Commit e0fb183

Browse files
feat(deno): migrate root package.json → deno.json imports (Class B, standards#253 longtail) (#15)
excel-economic-numbers-tool is a ReScript-driven Office add-in (Excel + LibreOffice). The package.json had `@microsoft/office-js` as the lone runtime dep + `@rescript/core` + `rescript` as devDeps. Class B migration: - Add `npm:rescript@^12.0.0` + `npm:@rescript/core@^1.6.0` + `npm:@microsoft/office-js@^1.1.0` to `deno.json` `imports`. - Replace the broken bare `rescript build` in the `build` task with the canonical `deno run -A --node-modules-dir=auto npm:rescript@^12.0.0` pattern (the bare form would fail in Deno-only environments — Deno doesn't have npx). - Add `nodeModulesDir: "auto"` for rescript's install lifecycle. - Delete `package.json` (now redundant — `deno.json` covers all runtime + dev deps + scripts). Office host integration unaffected: `@microsoft/office-js` is loaded by the Office host from the served manifest, not from the local `node_modules/`. Deno's `--node-modules-dir=auto` regenerates the local `node_modules/` at build time for rescript's lifecycle hooks. Per per-repo follow-up tracker for standards#253 (campaign closed 2026-05-31, longtail tracked in project_estate_npm_to_deno_2026_05_28.md). Refs hyperpolymath/standards#253. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7f80e0f commit e0fb183

2 files changed

Lines changed: 9 additions & 53 deletions

File tree

deno.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"tasks": {
66
"dev": "deno run --watch --allow-net --allow-read --allow-env src/server.ts",
77
"start": "deno run --allow-net --allow-read --allow-env src/server.ts",
8-
"build": "rescript build && deno bundle src/mod.ts dist/economic-toolkit.js",
8+
"rescript:build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 build",
9+
"rescript:clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean",
10+
"build": "deno task rescript:build && deno bundle src/mod.ts dist/economic-toolkit.js",
911
"build:excel": "just build-excel",
1012
"build:libre": "just build-libre",
1113
"test": "deno test --allow-net --allow-read --allow-env",
@@ -54,6 +56,10 @@
5456
"@std/path": "jsr:@std/path@^1.0.0",
5557
"@std/fs": "jsr:@std/fs@^1.0.0",
5658
"@std/http": "jsr:@std/http@^1.0.0",
57-
"@std/testing": "jsr:@std/testing@^1.0.0"
58-
}
59+
"@std/testing": "jsr:@std/testing@^1.0.0",
60+
"rescript": "npm:rescript@^12.0.0",
61+
"@rescript/core": "npm:@rescript/core@^1.6.0",
62+
"@microsoft/office-js": "npm:@microsoft/office-js@^1.1.0"
63+
},
64+
"nodeModulesDir": "auto"
5965
}

package.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)