@pnpm/find-workspace-dir
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs_1 = __importDefault(require("fs")); | ||
const path_1 = __importDefault(require("path")); | ||
@@ -17,3 +18,3 @@ const error_1 = __importDefault(require("@pnpm/error")); | ||
? path_1.default.join(workspaceManifestDirEnvVar, 'pnpm-workspace.yaml') | ||
: await (0, find_up_1.default)([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd }); | ||
: await (0, find_up_1.default)([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd: await getRealPath(cwd) }); | ||
if (workspaceManifestLocation === null || workspaceManifestLocation === void 0 ? void 0 : workspaceManifestLocation.endsWith('.yml')) { | ||
@@ -25,2 +26,13 @@ throw new error_1.default('BAD_WORKSPACE_MANIFEST_NAME', `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`); | ||
exports.default = findWorkspaceDir; | ||
async function getRealPath(path) { | ||
return new Promise((resolve) => { | ||
// We need to resolve the real native path for case-insensitive file systems. | ||
// For example, we can access file as C:\Code\Project as well as c:\code\projects | ||
// Without this we can face a problem when try to install packages with -w flag, | ||
// when root dir is using c:\code\projects but packages were found by C:\Code\Project | ||
fs_1.default.realpath.native(path, function (err, resolvedPath) { | ||
resolve(err !== null ? path : resolvedPath); | ||
}); | ||
}); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pnpm/find-workspace-dir", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Finds the root of a pnpm workspace", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@pnpm/find-workspace-dir": "3.0.2" | ||
"@pnpm/find-workspace-dir": "3.0.3" | ||
}, | ||
@@ -33,0 +33,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5724
35
0
4