Skip to content

Conversation

@octogonz
Copy link
Collaborator

@octogonz octogonz commented Sep 16, 2025

Summary

Overhaul the lfxGraphLoader.ts, fixing a number of parser bugs in the process.

Details

  • Eliminate the @lifaon/path dependency, replacing it with simple/fast handcoded functions. The key point is that we are manipulating well-behaved YAML strings, not actual filesystem paths.
  • Eliminate the custom YAML interaces, instead using the official interfaces from @pnpm/lockfile.types
  • Replace the kludge that downgraded V6.0 -> V5.4 format; instead we now have a fully correct V6.0 loader
  • The Rush workspace's generated temp package.json is no longer displayed as an empty "." entry

How it was tested

  • Unit tests are all passing
  • Tested in some real repos

Impacted documentation

None

@william2958 @iclanton

const rootRelativePath: Path | null = new Path('.').relative(
new Path(containingEntry.packageJsonFolderPath).concat(relativePath)
const rootRelativePath: string = lockfilePath.getAbsolute(
containingEntry.packageJsonFolderPath,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least as of pnpm@8, link: protocol paths are only resolved relative to the package.json section if encountered in importers:. If encountered in packages:, they are resolved relative to the pnpm workspace root.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I guess those semantics are unavoidable, since the package.json folder location is nondeterministic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix: octogonz@6bebad4

@octogonz octogonz merged commit b14a819 into microsoft:main Sep 17, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants