* The workspace packages and path dependencies as package.json files * declare them now, read again from disk, and their fingerprint (see * `workspaceFingerprint`). The resolver keeps the map for its lifetime, so * a sync calls this to see a manifest edit; when the map moved, the * resol
(knownManifests?: readonly string[])
| 3451 | * one, and the caller re-opens what was linked by it. |
| 3452 | */ |
| 3453 | refreshWorkspacePackages(knownManifests?: readonly string[]): string { |
| 3454 | // `knownManifests`: where the manifests are, when the caller can tell that |
| 3455 | // a walk would find the ones it found last time (see trustedManifestList). |
| 3456 | // Each is read again all the same, so an edit to one is seen. |
| 3457 | const { packages: fresh, discovery } = loadWorkspacePackagesAndManifests(this.projectRoot, knownManifests); |
| 3458 | if (discovery) this.workspaceDiscovery = discovery; |
| 3459 | const fingerprint = workspaceFingerprint(fresh); |
| 3460 | if (this.workspacePackages === undefined || workspaceFingerprint(this.workspacePackages) !== fingerprint) { |
| 3461 | this.workspacePackages = fresh; |
| 3462 | this.clearCaches(); |
| 3463 | } |
| 3464 | return fingerprint; |
| 3465 | } |
| 3466 | |
| 3467 | /** The walk the workspace map was last read by (see ManifestDiscovery), or null before any. */ |
| 3468 | getWorkspaceDiscovery(): ManifestDiscovery | null { |
no test coverage detected