Skip to content

Commit b53d992

Browse files
committed
Use dotenvx
1 parent c245b11 commit b53d992

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.env.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NODE_COMPILE_CACHE="$(pwd)/.cache"

.env.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NODE_COMPILE_CACHE="$(pwd)/.cache"
2+
VITEST=1

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
.DS_Store
22
._.DS_Store
33
Thumbs.db
4-
/.api
4+
/.cache
55
/.env
66
/.nvm
7-
/.tap
87
/.type-coverage
98
/.vscode
109
/coverage

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@
4545
},
4646
"scripts": {
4747
"build": "npm run clean && run-p -c --aggregate-output build:* && run-p -c --aggregate-output build:clean:*",
48-
"build:cjs": "tsc",
49-
"build:esm": "tsc -p tsconfig.esm.json",
50-
"build:clean:cjs": "node scripts/rename-dist-cjs-files.mjs",
51-
"build:clean:esm": "node scripts/rename-dist-esm-files.mjs",
48+
"build:cjs": "dotenvx -q run -f .env.local -- tsc",
49+
"build:esm": "dotenvx -q run -f .env.local -- tsc -p tsconfig.esm.json",
50+
"build:clean:cjs": "dotenvx -q run -f .env.local -- node scripts/rename-dist-cjs-files.mjs",
51+
"build:clean:esm": "dotenvx -q run -f .env.local -- node scripts/rename-dist-esm-files.mjs",
5252
"check": "run-p -c --aggregate-output check:*",
53-
"check:lint": "eslint --report-unused-disable-directives .",
53+
"check:lint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives .",
5454
"check:lint:fix": "npm run check:lint -- --fix",
55-
"check:tsc": "tsc",
55+
"check:tsc": "dotenvx -q run -f .env.local -- tsc",
5656
"coverage": "run-s coverage:*",
5757
"coverage:test": "run-s test:prepare test:unit:coverage",
58-
"coverage:type": "type-coverage --detail",
58+
"coverage:type": "dotenvx -q run -f .env.local -- type-coverage --detail",
5959
"clean": "run-p -c --aggregate-output clean:*",
6060
"clean:dist": "del-cli 'dist'",
6161
"clean:declarations": "del-cli '*.d.ts' '!api*.d.ts'",
6262
"fix": "run-s lint:fix check:lint:fix",
6363
"generate-sdk": "run-s generate-sdk:*",
64-
"generate-sdk:01-prettify": "node scripts/prettify-base-json.mjs",
65-
"generate-sdk:02-generate": "node scripts/generate-types.mjs > types/api.d.ts",
64+
"generate-sdk:01-prettify": "dotenvx -q run -f .env.local -- node scripts/prettify-base-json.mjs",
65+
"generate-sdk:02-generate": "dotenvx -q run -f .env.local -- node scripts/generate-types.mjs > types/api.d.ts",
6666
"generate-sdk:03-clean-api": "npm run fix && npm run fix",
6767
"knip:dependencies": "knip --dependencies",
6868
"knip:exports": "knip --include exports,duplicates",
69-
"lint": "oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
69+
"lint": "dotenvx -q run -f .env.local -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
7070
"lint:fix": "npm run lint -- --fix && npm run lint:fix:fast",
71-
"lint:fix:fast": "biome format --write",
72-
"lint-staged": "lint-staged",
71+
"lint:fix:fast": "dotenvx -q run -f .env.local -- biome format --write",
72+
"lint-staged": "dotenvx -q run -f .env.local -- lint-staged",
7373
"precommit": "lint-staged",
74-
"prepare": "husky",
74+
"prepare": "dotenvx -q run -f .env.local -- husky",
7575
"prepublishOnly": "run-s build",
7676
"test": "run-s check test:*",
77-
"test:prepare": "cross-env VITEST=1 npm run build",
78-
"test:unit": "vitest --run",
79-
"test:unit:update": "vitest --run --update",
80-
"test:unit:coverage": "vitest run --coverage",
77+
"test:prepare": "dotenvx -q run -f .env.test -- npm run build",
78+
"test:unit": "dotenvx -q run -f .env.test -- vitest --run",
79+
"test:unit:update": "dotenvx -q run -f .env.test -- vitest --run --update",
80+
"test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
8181
"test-ci": "run-s build test:*",
8282
"update": "run-p --aggregate-output update:**",
8383
"update:deps": "npx --yes npm-check-updates"
@@ -87,12 +87,12 @@
8787
},
8888
"devDependencies": {
8989
"@biomejs/biome": "1.9.4",
90+
"@dotenvx/dotenvx": "1.44.0",
9091
"@eslint/compat": "1.2.9",
9192
"@eslint/js": "9.26.0",
9293
"@types/node": "22.15.17",
9394
"@typescript-eslint/parser": "8.32.0",
9495
"@vitest/coverage-v8": "3.1.3",
95-
"cross-env": "7.0.3",
9696
"del-cli": "6.0.0",
9797
"eslint": "9.26.0",
9898
"eslint-import-resolver-typescript": "4.3.4",

0 commit comments

Comments
 (0)