Skip to content
Source
Sign inSign up
TanStack/intent

fix: discover pnpm 11 isolated global package roots #207

OpenMohith26(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/207/headopened

Showing 8 changed files with 33 additions and 18 deletions (loading 5).

x
0 of 8 viewed, 8 left
5 additions and 0 deletions.changeset/global-pnpm-skill-discovery.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/intent': patch
+---
+​
+Discover pnpm 11 isolated global package roots so `list --global` finds globally installed intent-enabled packages.
6 additions and 2 deletionspackages/intent/src/discovery/register.tsModified
View file
@@ -70,9 +70,13 @@
target: NodeModulesScanTarget,
source: IntentPackage['source'] = 'local',
): void {
- if (!target.path || !target.exists || target.scanned) return
+ if (target.scanned || !target.exists) return
+ const paths = target.paths ?? (target.path ? [target.path] : [])
+ if (paths.length === 0) return
target.scanned = true
- scanNodeModulesDir(target.path, source)
+ for (const path of paths) {
+ scanNodeModulesDir(path, source)
+ }
​
function tryRegister(
22 additions and 16 deletionspackages/intent/src/discovery/scanner.tsModified
View file
@@ -11,6 +11,7 @@
nodeReadFs,