@pnpm/workspace.projects-filter 1100.0.25 → 1100.0.26

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.
@@ -6,9 +6,11 @@ import * as find from 'empathic/find';
6
6
  import { safeExeca as execa } from 'execa';
7
7
  import * as micromatch from 'micromatch';
8
8
  export async function getChangedProjects(projectDirs, commit, opts) {
9
- // .git is a directory in regular repos, but a file in worktrees
10
- const gitPath = find.dir('.git', { cwd: opts.workspaceDir }) ??
11
- find.file('.git', { cwd: opts.workspaceDir });
9
+ // .git is a directory in regular repos, but a file in worktrees. The
10
+ // nearest entry of either kind wins, so a worktree checked out inside
11
+ // another repository's tree resolves to the worktree root, matching
12
+ // where git anchors its diff paths.
13
+ const gitPath = find.up('.git', { cwd: opts.workspaceDir });
12
14
  const repoRoot = path.resolve(gitPath ?? opts.workspaceDir, '..');
13
15
  const changedDirs = (await getChangedDirsSinceCommit(commit, opts.workspaceDir, opts.testPattern ?? [], opts.changedFilesIgnorePattern ?? []))
14
16
  .map(changedDir => ({ ...changedDir, dir: path.join(repoRoot, changedDir.dir) }));
@@ -48,6 +50,9 @@ async function getChangedDirsSinceCommit(commit, workingDir, testPattern, change
48
50
  diff = (await execa('git', [
49
51
  'diff',
50
52
  '--name-only',
53
+ // Keeps an option-like `<since>` (`--output=...`) from being
54
+ // parsed as a git option — git rejects it as a bad revision.
55
+ '--end-of-options',
51
56
  commit,
52
57
  '--',
53
58
  workingDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/workspace.projects-filter",
3
- "version": "1100.0.25",
3
+ "version": "1100.0.26",
4
4
  "description": "Filters packages in a workspace",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,19 +27,21 @@
27
27
  "!*.map"
28
28
  ],
29
29
  "dependencies": {
30
+ "@pnpm/config.matcher": "1100.0.1",
31
+ "@pnpm/error": "1100.0.1",
32
+ "@pnpm/workspace.projects-graph": "1100.0.22",
33
+ "@pnpm/workspace.projects-reader": "1101.0.13",
34
+ "@pnpm/workspace.workspace-manifest-reader": "1100.0.9",
30
35
  "empathic": "^2.0.0",
31
36
  "execa": "npm:safe-execa@0.3.0",
32
37
  "is-subdir": "^2.0.0",
33
38
  "micromatch": "^4.0.8",
34
- "ramda": "npm:@pnpm/ramda@0.28.1",
35
- "@pnpm/config.matcher": "1100.0.1",
36
- "@pnpm/workspace.projects-reader": "1101.0.13",
37
- "@pnpm/error": "1100.0.1",
38
- "@pnpm/workspace.workspace-manifest-reader": "1100.0.9",
39
- "@pnpm/workspace.projects-graph": "1100.0.22"
39
+ "ramda": "npm:@pnpm/ramda@0.28.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@jest/globals": "30.4.1",
43
+ "@pnpm/types": "1101.3.2",
44
+ "@pnpm/workspace.projects-filter": "1100.0.26",
43
45
  "@types/is-windows": "^1.0.2",
44
46
  "@types/micromatch": "^4.0.10",
45
47
  "@types/ramda": "0.31.1",
@@ -47,9 +49,7 @@
47
49
  "ci-info": "^4.4.0",
48
50
  "is-windows": "^1.0.2",
49
51
  "tempy": "3.0.0",
50
- "touch": "3.1.1",
51
- "@pnpm/types": "1101.3.2",
52
- "@pnpm/workspace.projects-filter": "1100.0.25"
52
+ "touch": "3.1.1"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=22.13"