mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 20:39:05 +00:00
### What does this PR do? Adds `"configVersion"` to bun.lock(b). The version will be used to keep default settings the same if they would be breaking across bun versions. fixes ENG-21389 fixes ENG-21388 ### How did you verify your code works? TODO: - [ ] new project - [ ] existing project without configVersion - [ ] existing project with configVersion - [ ] same as above but with bun.lockb - [ ] configVersion@0 defaults to hoisted linker - [ ] new projects use isolated linker --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
|
|
exports[`should report error on invalid format for package.json 1`] = `
|
|
"1 | foo
|
|
^
|
|
error: Unexpected foo
|
|
at [dir]/package.json:1:1
|
|
ParserError: failed to parse '[dir]/package.json'
|
|
"
|
|
`;
|
|
|
|
exports[`should report error on invalid format for dependencies 1`] = `
|
|
"1 | {"name":"foo","version":"0.0.1","dependencies":[]}
|
|
^
|
|
error: dependencies expects a map of specifiers, e.g.
|
|
"dependencies": {
|
|
<green>"bun"<r>: <green>"latest"<r>
|
|
}
|
|
at [dir]/package.json:1:33
|
|
"
|
|
`;
|
|
|
|
exports[`should report error on invalid format for workspaces 1`] = `
|
|
"1 | {"name":"foo","version":"0.0.1","workspaces":{"packages":{"bar":true}}}
|
|
^
|
|
error: "workspaces.packages" expects an array of strings, e.g.
|
|
"workspaces": {
|
|
"packages": [
|
|
"path/to/package"
|
|
]
|
|
}
|
|
at [dir]/package.json:1:58
|
|
"
|
|
`;
|
|
|
|
exports[`should handle modified git resolutions in bun.lock 1`] = `"{"lockfileVersion":0,"configVersion":1,"workspaces":{"":{"dependencies":{"jquery":"3.7.1"}}},"packages":{"jquery":["jquery@git+ssh://git@github.com/dylan-conway/install-test-8.git#3a1288830817d13da39e9231302261896f8721ea",{},"3a1288830817d13da39e9231302261896f8721ea"]}}"`;
|