-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(cli): parse package.json and pnpm-lock.yaml using streaming io (…
…#7296) This avoids putting the entire lockfile into memory all at once just to iterate over it once and throw it away. --- ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): no - Suggested release notes appear below: yes Memory improvements to js `aspect configure` ### Test plan - Covered by existing test cases GitOrigin-RevId: ac5ef37ffcdba9db4108632d62fdfc9f4de8b981
- Loading branch information
Showing
6 changed files
with
66 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package gazelle | ||
|
||
func parsePnpmLockDependenciesV9(yamlFileContent []byte) (WorkspacePackageVersionMap, error) { | ||
import "io" | ||
|
||
func parsePnpmLockDependenciesV9(yamlReader io.Reader) (WorkspacePackageVersionMap, error) { | ||
// The top-level lockfile object is the same as v6 for the WorkspacePackageVersionMap requirements | ||
return parsePnpmLockDependenciesV6(yamlFileContent) | ||
return parsePnpmLockDependenciesV6(yamlReader) | ||
} |