From c78ecb0c123a71888e1165d17bfc22daf40ceb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Tue, 24 Sep 2024 10:19:40 +0200 Subject: [PATCH] fix!: correct working directory BREAKING CHANGE: Minimum supported Node.js >= 20.11.0 Ref: https://nodejs.org/api/esm.html#importmetadirname --- package-lock.json | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d12bb0e..4bff27f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "undici": "6.19.8" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.11.0" }, "funding": { "type": "buymeacoffee", diff --git a/package.json b/package.json index 9b9d686..dddd464 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ ], "type": "module", "engines": { - "node": ">=18.0.0" + "node": ">=20.11.0" }, "scripts": { "lint:typescript": "tsc --noEmit", diff --git a/src/constants.ts b/src/constants.ts index 03ba3c8..f633088 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,6 +2,6 @@ import path from "node:path" export const NAME = "editorconfig-checker" export const VERSION = process.env.EC_VERSION ?? "latest" -export const CWD = process.cwd() +export const CWD = path.join(import.meta.dirname, "..") export const BIN_PATH = path.join(CWD, "bin") export const COMBINED_PATH = path.join(BIN_PATH, VERSION)