@pnpm/workspace.root-finder 1100.0.1 → 1100.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +2 -2
  2. package/package.json +8 -5
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { PnpmError } from '@pnpm/error';
4
- import { findUp } from 'find-up';
4
+ import * as find from 'empathic/find';
5
5
  const WORKSPACE_DIR_ENV_VAR = 'NPM_CONFIG_WORKSPACE_DIR';
6
6
  const WORKSPACE_MANIFEST_FILENAME = 'pnpm-workspace.yaml';
7
7
  const INVALID_WORKSPACE_MANIFEST_FILENAME = [
@@ -17,7 +17,7 @@ export async function findWorkspaceDir(cwd) {
17
17
  const workspaceManifestDirEnvVar = process.env[WORKSPACE_DIR_ENV_VAR] ?? process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()];
18
18
  const workspaceManifestLocation = workspaceManifestDirEnvVar
19
19
  ? path.join(workspaceManifestDirEnvVar, WORKSPACE_MANIFEST_FILENAME)
20
- : await findUp([WORKSPACE_MANIFEST_FILENAME, ...INVALID_WORKSPACE_MANIFEST_FILENAME], { cwd: await getRealPath(cwd) });
20
+ : find.any([WORKSPACE_MANIFEST_FILENAME, ...INVALID_WORKSPACE_MANIFEST_FILENAME], { cwd: await getRealPath(cwd) });
21
21
  if (workspaceManifestLocation && path.basename(workspaceManifestLocation) !== WORKSPACE_MANIFEST_FILENAME) {
22
22
  throw new PnpmError('BAD_WORKSPACE_MANIFEST_NAME', `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`);
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/workspace.root-finder",
3
- "version": "1100.0.1",
3
+ "version": "1100.0.2",
4
4
  "description": "Finds the root of a pnpm workspace",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -8,7 +8,10 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "funding": "https://opencollective.com/pnpm",
11
- "repository": "https://github.com/pnpm/pnpm/tree/main/workspace/root-finder",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/pnpm/pnpm/tree/main/workspace/root-finder"
14
+ },
12
15
  "homepage": "https://github.com/pnpm/pnpm/tree/main/workspace/root-finder#readme",
13
16
  "bugs": {
14
17
  "url": "https://github.com/pnpm/pnpm/issues"
@@ -24,12 +27,12 @@
24
27
  "!*.map"
25
28
  ],
26
29
  "dependencies": {
27
- "find-up": "^8.0.0",
30
+ "empathic": "^2.0.0",
28
31
  "@pnpm/error": "1100.0.0"
29
32
  },
30
33
  "devDependencies": {
31
- "@jest/globals": "30.3.0",
32
- "@pnpm/workspace.root-finder": "1100.0.1"
34
+ "@jest/globals": "30.4.1",
35
+ "@pnpm/workspace.root-finder": "1100.0.2"
33
36
  },
34
37
  "engines": {
35
38
  "node": ">=22.13"