Commit 5e43132
authored
Make SDK ESM-only; convert VS extension to ESM (#425)
The SDK previously dual-published both ESM and CJS via tsconfig.cjs.json.
With module: Node16, tsc respected the SDK's "type": "module" and emitted
ESM syntax into dist/cjs/, which Node's CJS loader then rejected at
runtime. Production paths (CLI, MCP, VSIX bundle) all consumed the ESM
build, so the broken CJS output went unnoticed until vscode-test loaded
out/test/*.js as CJS and required the SDK transitively (#422 added the
first such SDK import to webdav-mappings.ts).
Drop the CJS build entirely and simplify the SDK exports map to ESM-only.
Convert the VS extension package to "type": "module" so its tsc test
compile emits ESM; rename the esbuild output to dist/extension.cjs (still
CJS-formatted, since VS Code requires a CJS extension entry) and point
main at the new filename. Replace two __dirname usages in tests with
fileURLToPath(import.meta.url). Re-enable the VS extension test step.1 parent 5bd9fe3 commit 5e43132
9 files changed
Lines changed: 91 additions & 309 deletions
File tree
- .changeset
- .github/workflows
- packages
- b2c-tooling-sdk
- b2c-vs-extension
- scripts
- src/test
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
0 commit comments