From 3b3fd74f4ebb0070481334501ac0ffee9113436b Mon Sep 17 00:00:00 2001 From: Amber Date: Wed, 4 Feb 2026 09:16:28 -0700 Subject: [PATCH] chore: package invocations with dotenv --- astro.config.mjs | 1 + package-lock.json | 14 ++++++++++++++ package.json | 15 ++++++++------- vitest.config.js | 1 + 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 74c40d9df..953ae5c9c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,3 +1,4 @@ +import "dotenv/config"; import { defineConfig } from "astro/config"; import starlight from "@astrojs/starlight"; import sitemap from "@astrojs/sitemap"; diff --git a/package-lock.json b/package-lock.json index f8382410f..2e408dfc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@astrojs/sitemap": "^3.7.0", "@defenseunicorns/eslint-config": "^1.1.2", "@vitest/coverage-v8": "^4.0.18", + "dotenv": "^17.2.3", "esbuild": "^0.27.2", "husky": "^9.1.7", "linkinator": "^7.5.3", @@ -4225,6 +4226,19 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dset": { "version": "3.1.4", "license": "MIT", diff --git a/package.json b/package.json index 6bd431cb7..6c9365a0a 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "scripts" ], "scripts": { - "astro": "node --env-file=.env node_modules/.bin/astro", + "astro": "astro", "build": "bash scripts/build.sh", - "dev": "node --env-file=.env node_modules/.bin/astro dev", + "dev": "astro dev", "format:check": "npm run format:code && npm run format:markdown && npm run format:prettier -- --check", "format:code": "eslint .", "format:fix": "npm run format:code -- --fix && npm run format:markdown -- --fix && npm run format:prettier -- --write", @@ -16,11 +16,11 @@ "format:prettier": "prettier .", "linkcheck": "bash .github/workflows/scripts/linkcheck.sh", "prepare": "husky", - "preview": "node --env-file=.env node_modules/.bin/astro preview", - "start": "node --env-file=.env node_modules/.bin/astro dev", - "test": "node --env-file=.env ./node_modules/.bin/vitest run scripts/tests/ && npm run linkcheck", - "test:coverage": "node --env-file=.env ./node_modules/.bin/vitest run scripts/tests/ --coverage", - "test:watch": "node --env-file=.env ./node_modules/.bin/vitest" + "preview": "astro preview", + "start": "astro dev", + "test": "vitest run scripts/tests/ && npm run linkcheck", + "test:coverage": "vitest run scripts/tests/ --coverage", + "test:watch": "vitest" }, "dependencies": { "@astrojs/starlight": "^0.37.4", @@ -49,6 +49,7 @@ "@astrojs/sitemap": "^3.7.0", "@defenseunicorns/eslint-config": "^1.1.2", "@vitest/coverage-v8": "^4.0.18", + "dotenv": "^17.2.3", "esbuild": "^0.27.2", "husky": "^9.1.7", "linkinator": "^7.5.3", diff --git a/vitest.config.js b/vitest.config.js index 5a14f386b..71b367bda 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,3 +1,4 @@ +import "dotenv/config"; import { defineConfig } from "vitest/config"; export default defineConfig({