Skip to content

Commit 1d6a38d

Browse files
authored
GR: Add npm lockfile read tests (#853)
Added tests for reading package-lock.json into deps.dev graphs. I set up the test data by publishing packages to a local private registry, so the lockfiles/graphs aren't massive. I'm trying to work out a way to mock the npm registry before I do the lockfile writing tests.
1 parent a90d443 commit 1d6a38d

File tree

5 files changed

+437
-31
lines changed

5 files changed

+437
-31
lines changed

internal/resolution/lockfile/fixtures/npm_v1/package-lock.json

+54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "r",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"@fake-registry/a": "^1.2.3",
13+
"@fake-registry/b": "^1.0.1"
14+
},
15+
"devDependencies": {
16+
"a-dev": "npm:@fake-registry/a@^2.3.4"
17+
}
18+
}

internal/resolution/lockfile/fixtures/npm_v2/package-lock.json

+188
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)