Commit 2af9932
committed
test(version): add check for packages field version in package-lock.json
The previous test only checked packageLockJson.version at the root level,
but missed the version field inside packageLockJson.packages[''].
This update adds validation for:
- packageLockJson.packages[''].version matches package.json version
- packageLockJson.packages[''].name matches package.json name
This ensures all version fields in package-lock.json are consistent with
package.json.
Change-Id: I3e0423cf84ab202d997ea9431b69a99e82a3641d
Co-developed-by: Claude <noreply@anthropic.com>1 parent 13b6743 commit 2af9932
1 file changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
165 | 194 | | |
0 commit comments