mirror of
https://github.com/anchore/syft.git
synced 2026-08-22 01:53:35 +02:00
fix(javascript): pass a yaml node to the pnpm v5 collision test (#5203)
#5188 changed `pnpmV6LockYaml.Parse` to take a `*yaml.Node` and #5175 added this test against the old `[]byte` signature. both were green on their own branches, so main does not compile. the v9 and v6 cases in the same test already go through the `yamlDocument` helper, this is just the v5 one that was missed. Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
parent
490732aa58
commit
168eb64235
@ -654,18 +654,18 @@ packages:
|
||||
}
|
||||
|
||||
// v5 lockfile with two entries that collapse to the same key (underscore peer-dep suffixes)
|
||||
lockfileV5 := []byte(`
|
||||
lockfileV5 := `
|
||||
lockfileVersion: 5.4
|
||||
packages:
|
||||
/some-pkg/1.0.0_peer-b@2.0.0:
|
||||
resolution: {integrity: sha512-BBB}
|
||||
/some-pkg/1.0.0_peer-a@1.0.0:
|
||||
resolution: {integrity: sha512-AAA}
|
||||
`)
|
||||
`
|
||||
|
||||
for range 10 {
|
||||
parser := &pnpmV6LockYaml{}
|
||||
pkgs, err := parser.Parse(5.4, lockfileV5)
|
||||
pkgs, err := parser.Parse(5.4, yamlDocument(t, lockfileV5))
|
||||
require.NoError(t, err)
|
||||
require.Len(t, pkgs, 1, "expected exactly one package after key collision")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user