Skip to content

Commit fc6e39c

Browse files
motatoesclaude
andcommitted
Fix TS SDK ESM imports: use nodenext module resolution with .js extensions
Switches from bundler to nodenext moduleResolution so emitted JS includes explicit .js extensions, fixing module resolution errors for Node.js ESM consumers. Bumps TypeScript SDK to 0.5.7. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4665adb commit fc6e39c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencomputer/sdk",
3-
"version": "0.5.6",
3+
"version": "0.5.7",
44
"description": "TypeScript SDK for OpenComputer - cloud sandbox platform",
55
"type": "module",
66
"main": "dist/index.js",

sdks/typescript/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export { Sandbox, type SandboxOpts } from "./sandbox";
2-
export { Filesystem, type EntryInfo } from "./filesystem";
3-
export { Commands, type ProcessResult, type RunOpts } from "./commands";
4-
export { Pty, type PtySession, type PtyOpts } from "./pty";
5-
export { Templates, type TemplateInfo } from "./template";
1+
export { Sandbox, type SandboxOpts } from "./sandbox.js";
2+
export { Filesystem, type EntryInfo } from "./filesystem.js";
3+
export { Commands, type ProcessResult, type RunOpts } from "./commands.js";
4+
export { Pty, type PtySession, type PtyOpts } from "./pty.js";
5+
export { Templates, type TemplateInfo } from "./template.js";

sdks/typescript/src/sandbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Filesystem } from "./filesystem";
2-
import { Commands } from "./commands";
3-
import { Pty } from "./pty";
1+
import { Filesystem } from "./filesystem.js";
2+
import { Commands } from "./commands.js";
3+
import { Pty } from "./pty.js";
44

55
function resolveApiUrl(url: string): string {
66
const base = url.replace(/\/+$/, "");

sdks/typescript/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"target": "ES2022",
4-
"module": "ESNext",
5-
"moduleResolution": "bundler",
4+
"module": "nodenext",
5+
"moduleResolution": "nodenext",
66
"lib": ["ES2022", "DOM"],
77
"outDir": "dist",
88
"rootDir": "src",

0 commit comments

Comments
 (0)