Skip to content

Commit

Permalink
fix: remove autoload .env, avoid other library(like next.js) depe…
Browse files Browse the repository at this point in the history
…nds `.env` with load order
  • Loading branch information
tianyingchun committed May 29, 2024
1 parent 9614c49 commit e8ccc44
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-plants-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/ts-node-paths": patch
---

Remove autoload `.env`, avoid other library(like `next.js`) depends `.env` with load order
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
},
"dependencies": {
"colorette": "^2.0.20",
"dotenv": "^16.4.5",
"get-tsconfig": "^4.7.5",
"pkg-up": "^5.0.0",
"ts-node": "11.0.0-beta.1",
Expand Down
4 changes: 0 additions & 4 deletions src/path-alias.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { config } from 'dotenv';
import { fileURLToPath } from 'node:url';
import { HYPERSE_TS_NODE, HYPERSE_TS_NODE_PATHS } from './constants.js';
import { Tsconfig } from './tsconfig/index.js';
import { CompilerOptions } from './types/tsconfig.js';

// Parses the *.env file
config();

class PathAlias {
#opts: CompilerOptions;
get opts(): CompilerOptions {
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,6 @@ __metadata:
colorette: "npm:^2.0.20"
commitizen: "npm:4.3.0"
cz-conventional-changelog: "npm:3.3.0"
dotenv: "npm:^16.4.5"
eslint: "npm:^9.3.0"
execa: "npm:^9.1.0"
get-tsconfig: "npm:^4.7.5"
Expand Down Expand Up @@ -3006,13 +3005,6 @@ __metadata:
languageName: node
linkType: hard

"dotenv@npm:^16.4.5":
version: 16.4.5
resolution: "dotenv@npm:16.4.5"
checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8
languageName: node
linkType: hard

"dotenv@npm:^8.1.0":
version: 8.6.0
resolution: "dotenv@npm:8.6.0"
Expand Down

0 comments on commit e8ccc44

Please sign in to comment.