Compare commits

...

5 Commits

Author SHA1 Message Date
Kevin Bond e660662294 Prepare for 3.28.6 hotfix release 2025-09-16 11:27:13 -07:00
Kevin Bond 62e78078b7 Updated changelog manually for hotfix release 2025-09-15 16:17:11 -07:00
Kevin Bond 43319d166e bump version to 3.28.5 for hotfix 2025-09-15 16:07:06 -07:00
Bee 4cdd7d56d7 fix process.env access for posthog (#6231)
* fix process.env access in build script

- Add CLINE_ENVIRONMENT=production to esbuild define config
- Remove fallback empty strings for API keys in build config
- Simplify optional chaining to direct property access for process.env
- Ensure consistent environment variable handling across config files

* verify CI secrets

* revert temp test
2025-09-15 16:03:48 -07:00
Bee 730feeca1d Add environment variable injection to esbuild config (#6225)
* Add environment variable injection to esbuild config

Inject TELEMETRY_SERVICE_API_KEY, ERROR_SERVICE_API_KEY, and CLINE_ENVIRONMENT
at build time for production builds.

* add changeset

* update
2025-09-15 16:03:43 -07:00
6 changed files with 30 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Add environment variable injection to esbuild config
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## [3.28.6]
- Bump package version
## [3.28.5]
- Fixed issue with Posthog API key related to telemetry
## [3.28.4]
- Fix bug where some Windows machines had API request hanging
+10 -1
View File
@@ -130,7 +130,16 @@ const baseConfig = {
sourcemap: !production,
logLevel: "silent",
define: production
? { "import.meta.url": "_importMetaUrl", "process.env.IS_DEV": JSON.stringify(!production) }
? {
"import.meta.url": "_importMetaUrl",
"process.env.IS_DEV": JSON.stringify(!production),
...(process.env.TELEMETRY_SERVICE_API_KEY && process.env.ERROR_SERVICE_API_KEY
? {
"process.env.TELEMETRY_SERVICE_API_KEY": JSON.stringify(process.env.TELEMETRY_SERVICE_API_KEY),
"process.env.ERROR_SERVICE_API_KEY": JSON.stringify(process.env.ERROR_SERVICE_API_KEY),
}
: {}),
}
: { "import.meta.url": "_importMetaUrl" },
tsconfig: path.resolve(__dirname, "tsconfig.json"),
plugins: [
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "claude-dev",
"version": "3.28.3",
"version": "3.28.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claude-dev",
"version": "3.28.3",
"version": "3.28.6",
"license": "Apache-2.0",
"dependencies": {
"@anthropic-ai/sdk": "^0.37.0",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "claude-dev",
"displayName": "Cline",
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
"version": "3.28.4",
"version": "3.28.6",
"icon": "assets/icons/icon.png",
"engines": {
"vscode": "^1.84.0"
+4 -4
View File
@@ -25,7 +25,7 @@ export interface PostHogClientValidConfig extends PostHogClientConfig {
* process.env.CI will always be true in the CI environment, during both testing and publishing step,
* so it is not a reliable indicator of the environment.
*/
const useDevEnv = process?.env?.IS_DEV === "true" || process?.env?.CLINE_ENVIRONMENT === "local"
const useDevEnv = process.env.IS_DEV === "true" || process.env.CLINE_ENVIRONMENT === "local"
/**
* PostHog configuration for Production Environment.
@@ -35,13 +35,13 @@ const useDevEnv = process?.env?.IS_DEV === "true" || process?.env?.CLINE_ENVIRON
* NOTE: The development environment variables should be retrieved from 1password shared vault.
*/
export const posthogConfig: PostHogClientConfig = {
apiKey: process?.env?.TELEMETRY_SERVICE_API_KEY,
errorTrackingApiKey: process?.env?.ERROR_SERVICE_API_KEY,
apiKey: process.env.TELEMETRY_SERVICE_API_KEY,
errorTrackingApiKey: process.env.ERROR_SERVICE_API_KEY,
host: "https://data.cline.bot",
uiHost: useDevEnv ? "https://us.i.posthog.com" : "https://us.posthog.com",
}
const isTestEnv = process?.env?.E2E_TEST === "true" || process?.env?.IS_TEST === "true"
const isTestEnv = process.env.E2E_TEST === "true" || process.env.IS_TEST === "true"
export function isPostHogConfigValid(config: PostHogClientConfig): config is PostHogClientValidConfig {
// Allow invalid config in test environment to enable mocking and stubbing