New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/find-workspace-dir

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/find-workspace-dir - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

lib/index.js.map

6

CHANGELOG.md
# @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 @@

7

lib/index.js

@@ -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}`);

16

package.json
{
"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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc