π OpenHands: AI-Driven Development
fix: switch @openhands/typescript-client from git dep to npm registry (#779)
Rohit Malhotra43c10810da75
diff --git a/__tests__/package-library.test.ts b/__tests__/package-library.test.tsindex 8c106b0e40..c006aa1451 100644--- a/__tests__/package-library.test.ts+++ b/__tests__/package-library.test.ts@@ -12,6 +12,8 @@ const packageJson = JSON.parse(types: string;exports: Record<string, unknown>;scripts: Record<string, string>;+ dependencies?: Record<string, string>;+ devDependencies?: Record<string, string>;};describe("package library metadata", () => {@@ -49,6 +51,29 @@ describe("package library metadata", () => {});});+ // Git dependencies break `npm install -g` because npm clones the repo and+ // runs the prepare script without devDependencies. All packages should be+ // referenced from a registry; only @openhands/extensions is allowed as a git+ // dep until it is published to npm.+ it("does not use git dependencies (except @openhands/extensions)", () => {+ const GIT_DEP_PATTERN = /^(git[+:]|github:|bitbucket:|gitlab:|[a-zA-Z0-9_-]+\/)/;+ const ALLOWED_GIT_DEPS = new Set(["@openhands/extensions"]);++ const allDeps = {+ ...packageJson.dependencies,+ ...packageJson.devDependencies,+ };++ const violations = Object.entries(allDeps)+ .filter(+ ([name, version]) =>+ GIT_DEP_PATTERN.test(version) && !ALLOWED_GIT_DEPS.has(name),+ )+ .map(([name, version]) => `${name}: ${version}`);++ expect(violations).toEqual([]);+ });+it("uses local dev commands without Docker", () => {expect(packageJson.scripts.dev).toBe("node --env-file-if-exists=.env scripts/dev-with-automation.mjs",diff --git a/package-lock.json b/package-lock.jsonindex 7206c1c89e..ec4ceb81f6 100644--- a/package-lock.json+++ b/package-lock.json@@ -13,7 +13,7 @@"@microlink/react-json-view": "1.31.20","@monaco-editor/react": "4.7.0","@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#7b33f64ffccf95f7ccd2ec640aeae84ab1cc2c75",- "@openhands/typescript-client": "git+https://github.com/OpenHands/typescript-client.git#v1.23.2",+ "@openhands/typescript-client": "1.23.3","@react-router/node": "7.14.2","@react-router/serve": "7.14.2","@tailwindcss/vite": "4.2.4",@@ -3454,9 +3454,9 @@}},"node_modules/@openhands/typescript-client": {- "version": "0.1.1",- "resolved": "git+ssh://[email protected]/OpenHands/typescript-client.git#082d4d46d4ae16f383b94884c7f0924640432203",- "integrity": "sha512-0OIRjvaAIhg4+yH245BCXoSiB9SDFPqxQ+HNsnG3CtZrszYXQkl9+x6nL/hoKuUff1NMVeeaT9Wucm1PqweYMg==",+ "version": "1.23.3",+ "resolved": "https://registry.npmjs.org/@openhands/typescript-client/-/typescript-client-1.23.3.tgz",+ "integrity": "sha512-tkUt1XeGUfmgnmf8BYQvbhYfiDp4eC/g7VAbLmHEmoRTCNvoKjACBs/gc8q9XxdgjyUM4RJwYiVOugP/bHAtrQ==","license": "MIT","dependencies": {"@openrouter/sdk": "^0.12.35",diff --git a/package.json b/package.jsonindex f3fd5b8d87..a928308167 100644--- a/package.json+++ b/package.json@@ -24,7 +24,7 @@"@microlink/react-json-view": "1.31.20","@monaco-editor/react": "4.7.0","@openhands/extensions": "git+https://github.com/OpenHands/extensions.git#7b33f64ffccf95f7ccd2ec640aeae84ab1cc2c75",- "@openhands/typescript-client": "git+https://github.com/OpenHands/typescript-client.git#v1.23.2",+ "@openhands/typescript-client": "1.23.3","@react-router/node": "7.14.2","@react-router/serve": "7.14.2","@tailwindcss/vite": "4.2.4",