Skip to content

Commit 690ebea

Browse files
chore(cloudflare): use node parseEnv instead of dotenv (#15447)
1 parent 0f7a223 commit 690ebea

File tree

3 files changed

+161
-160
lines changed

3 files changed

+161
-160
lines changed

packages/integrations/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@astrojs/internal-helpers": "workspace:*",
4545
"@astrojs/underscore-redirects": "workspace:*",
4646
"@cloudflare/vite-plugin": "^1.23.0",
47-
"dotenv": "^17.2.3",
4847
"piccolore": "^0.1.3",
4948
"tinyglobby": "^0.2.15",
5049
"vite": "^7.3.1"
@@ -55,6 +54,7 @@
5554
},
5655
"devDependencies": {
5756
"@cloudflare/workers-types": "^4.20260131.0",
57+
"@types/node": "^25.2.2",
5858
"astro": "workspace:*",
5959
"astro-scripts": "workspace:*",
6060
"cheerio": "1.2.0",

packages/integrations/cloudflare/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
DEFAULT_SESSION_KV_BINDING_NAME,
2020
DEFAULT_IMAGES_BINDING_NAME,
2121
} from './wrangler.js';
22-
import { parse } from 'dotenv';
22+
import { parseEnv } from 'node:util';
2323
import { sessionDrivers } from 'astro/config';
2424
import { createCloudflarePrerenderer } from './prerenderer.js';
2525

@@ -270,7 +270,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
270270
if (existsSync(devVarsPath)) {
271271
try {
272272
const data = readFileSync(devVarsPath, 'utf-8');
273-
const parsed = parse(data);
273+
const parsed = parseEnv(data);
274274
Object.assign(process.env, parsed);
275275
} catch {
276276
logger.error(

0 commit comments

Comments
 (0)