@pnpm/find-workspace-dir
Advanced tools
Comparing version 3.0.0 to 3.0.1
# @pnpm/find-workspace-dir | ||
## 3.0.1 | ||
### Patch Changes | ||
- 6e8cedb79: Add support for NPM_CONFIG_WORKSPACE_DIR override environment variable when finding the workspace directory | ||
## 3.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -9,5 +9,10 @@ "use strict"; | ||
const find_up_1 = __importDefault(require("find-up")); | ||
const WORKSPACE_DIR_ENV_VAR = 'NPM_CONFIG_WORKSPACE_DIR'; | ||
const WORKSPACE_MANIFEST_FILENAME = 'pnpm-workspace.yaml'; | ||
async function findWorkspaceDir(cwd) { | ||
const workspaceManifestLocation = await (0, find_up_1.default)([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd }); | ||
var _a; | ||
const workspaceManifestDirEnvVar = (_a = process.env[WORKSPACE_DIR_ENV_VAR]) !== null && _a !== void 0 ? _a : process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()]; | ||
const workspaceManifestLocation = workspaceManifestDirEnvVar | ||
? path_1.default.join(workspaceManifestDirEnvVar, 'pnpm-workspace.yaml') | ||
: await find_up_1.default([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd }); | ||
if (workspaceManifestLocation === null || workspaceManifestLocation === void 0 ? void 0 : workspaceManifestLocation.endsWith('.yml')) { | ||
@@ -14,0 +19,0 @@ throw new error_1.default('BAD_WORKSPACE_MANIFEST_NAME', `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`); |
{ | ||
"name": "@pnpm/find-workspace-dir", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Finds the root of a pnpm workspace", | ||
@@ -14,8 +14,2 @@ "main": "lib/index.js", | ||
}, | ||
"scripts": { | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts", | ||
"test": "pnpm run compile", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/find-workspace-dir", | ||
@@ -34,3 +28,9 @@ "keywords": [ | ||
}, | ||
"funding": "https://opencollective.com/pnpm" | ||
"funding": "https://opencollective.com/pnpm", | ||
"scripts": { | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts test/**/*.ts", | ||
"_test": "jest", | ||
"test": "pnpm run compile && pnpm run _test", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" | ||
} | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
5234
7
23
3