Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix deprecation script
Jakub Novak1d16e44c42bf
diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.jsonindex 8b4461b8f..b13f6c029 100644--- a/packages/js-sdk/package.json+++ b/packages/js-sdk/package.json@@ -33,7 +33,7 @@"generate": "openapi-typescript ../../spec/openapi.yml -x api_key --support-array-length --alphabetize --output src/api/schema.gen.ts","check-deps": "knip","update-deps": "ncu -u && pnpm i",- "postPublish": "npm pkg set 'name'='@e2b/sdk' && pnpm publish --no-git-checks && npm pkg set 'name'='e2b' && (pnpm deprecate @e2b/sdk@$(npm pkg get version | tr -d \\\") \"The package '@e2b/sdk' has been renamed to 'e2b'. Please uninstall the old one and install the new 'npm uninstall @e2b/sdk && npm install e2b'.\" || exit 0)"+ "postPublish": "./scripts/post-publish.sh"},"peerDependencies": {"openai": "^4.17.4"diff --git a/packages/js-sdk/scripts/post-publish.sh b/packages/js-sdk/scripts/post-publish.shnew file mode 100755index 000000000..31fc44df8--- /dev/null+++ b/packages/js-sdk/scripts/post-publish.sh@@ -0,0 +1,4 @@+npm pkg set 'name'='@e2b/sdk'+npm publish --no-git-checks+npm pkg set 'name'='e2b'+npm deprecate "@e2b/sdk@$(npm pkg get version | tr -d \")" "The package '@e2b/sdk' has been renamed to 'e2b'. Please uninstall the old one and install the new 'npm uninstall @e2b/sdk && npm install e2b'." || true