dependabot-npm_and_yarn 0.133.4 → 0.134.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/package-lock.json +8015 -12785
- data/helpers/package.json +2 -3
- data/lib/dependabot/npm_and_yarn/helpers.rb +1 -1
- data/lib/dependabot/npm_and_yarn/update_checker/version_resolver.rb +41 -8
- metadata +6 -21
- data/helpers/lib/npm7/index.js +0 -5
- data/helpers/lib/npm7/peer-dependency-checker.js +0 -77
- data/helpers/test/npm7/conflicting-dependency-parser.test.js +0 -67
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/deeply-nested/package-lock.json +0 -1291
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/deeply-nested/package.json +0 -14
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/nested/package-lock.json +0 -411
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/nested/package.json +0 -14
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/simple/package-lock.json +0 -64
- data/helpers/test/npm7/fixtures/conflicting-dependency-parser/simple/package.json +0 -14
- data/helpers/test/npm7/fixtures/peer-dependency-checker/peer_dependency/package-lock.json +0 -290
- data/helpers/test/npm7/fixtures/peer-dependency-checker/peer_dependency/package.json +0 -23
- data/helpers/test/npm7/fixtures/peer-dependency-checker/peer_dependency_multiple/package-lock.json +0 -965
- data/helpers/test/npm7/fixtures/peer-dependency-checker/peer_dependency_multiple/package.json +0 -10
- data/helpers/test/npm7/helpers.js +0 -21
- data/helpers/test/npm7/peer-dependency-checker.test.js +0 -107
@@ -1,21 +0,0 @@
|
|
1
|
-
const path = require("path");
|
2
|
-
const fs = require("fs");
|
3
|
-
|
4
|
-
module.exports = {
|
5
|
-
loadFixture: (fixturePath) =>
|
6
|
-
fs.readFileSync(path.join(__dirname, "fixtures", fixturePath)).toString(),
|
7
|
-
|
8
|
-
copyDependencies: (sourceDir, destDir) => {
|
9
|
-
const srcPackageJson = path.join(
|
10
|
-
__dirname,
|
11
|
-
`fixtures/${sourceDir}/package.json`
|
12
|
-
);
|
13
|
-
fs.copyFileSync(srcPackageJson, `${destDir}/package.json`);
|
14
|
-
|
15
|
-
const srcLockfile = path.join(
|
16
|
-
__dirname,
|
17
|
-
`fixtures/${sourceDir}/package-lock.json`
|
18
|
-
);
|
19
|
-
fs.copyFileSync(srcLockfile, `${destDir}/package-lock.json`);
|
20
|
-
},
|
21
|
-
};
|
@@ -1,107 +0,0 @@
|
|
1
|
-
const path = require("path");
|
2
|
-
const os = require("os");
|
3
|
-
const fs = require("fs");
|
4
|
-
const rimraf = require("rimraf");
|
5
|
-
const {
|
6
|
-
checkPeerDependencies,
|
7
|
-
} = require("../../lib/npm7/peer-dependency-checker");
|
8
|
-
const helpers = require("./helpers");
|
9
|
-
|
10
|
-
describe("checkPeerDependencies", () => {
|
11
|
-
let tempDir;
|
12
|
-
beforeEach(() => {
|
13
|
-
tempDir = fs.mkdtempSync(os.tmpdir() + path.sep);
|
14
|
-
});
|
15
|
-
afterEach(() => rimraf.sync(tempDir));
|
16
|
-
|
17
|
-
it("updating a dependency with a peer requirement", async () => {
|
18
|
-
helpers.copyDependencies(
|
19
|
-
"peer-dependency-checker/peer_dependency",
|
20
|
-
tempDir
|
21
|
-
);
|
22
|
-
|
23
|
-
await expect(
|
24
|
-
checkPeerDependencies(tempDir, "react-dom", "16.14.0", [
|
25
|
-
{
|
26
|
-
file: "package.json",
|
27
|
-
requirement: "16.14.0",
|
28
|
-
groups: ["dependencies"],
|
29
|
-
source: null,
|
30
|
-
},
|
31
|
-
])
|
32
|
-
).rejects.toThrow(
|
33
|
-
"react-dom@16.14.0 requires a peer of react@^16.14.0 but none is installed."
|
34
|
-
);
|
35
|
-
});
|
36
|
-
|
37
|
-
it("updating a dependency that is a peer requirement", async () => {
|
38
|
-
helpers.copyDependencies(
|
39
|
-
"peer-dependency-checker/peer_dependency",
|
40
|
-
tempDir
|
41
|
-
);
|
42
|
-
|
43
|
-
await expect(
|
44
|
-
checkPeerDependencies(tempDir, "react", "16.14.0", [
|
45
|
-
{
|
46
|
-
file: "package.json",
|
47
|
-
requirement: "16.14.0",
|
48
|
-
groups: ["dependencies"],
|
49
|
-
source: null,
|
50
|
-
},
|
51
|
-
])
|
52
|
-
).rejects.toThrow(
|
53
|
-
"react-dom@15.2.0 requires a peer of react@^15.2.0 but none is installed."
|
54
|
-
);
|
55
|
-
});
|
56
|
-
|
57
|
-
it("updating a dependency that is a peer requirement of multiple dependencies", async () => {
|
58
|
-
helpers.copyDependencies(
|
59
|
-
"peer-dependency-checker/peer_dependency_multiple",
|
60
|
-
tempDir
|
61
|
-
);
|
62
|
-
|
63
|
-
await expect(
|
64
|
-
checkPeerDependencies(
|
65
|
-
tempDir,
|
66
|
-
"react",
|
67
|
-
"0.14.2",
|
68
|
-
[
|
69
|
-
{
|
70
|
-
file: "package.json",
|
71
|
-
requirement: "0.14.2",
|
72
|
-
groups: ["dependencies"],
|
73
|
-
source: null,
|
74
|
-
},
|
75
|
-
],
|
76
|
-
[
|
77
|
-
{
|
78
|
-
name: "react",
|
79
|
-
version: "15.2.0",
|
80
|
-
requirements: [
|
81
|
-
{
|
82
|
-
file: "package.json",
|
83
|
-
requirement: "15.2.0",
|
84
|
-
groups: ["dependencies"],
|
85
|
-
source: null,
|
86
|
-
},
|
87
|
-
],
|
88
|
-
},
|
89
|
-
{
|
90
|
-
name: "react-dom",
|
91
|
-
version: "15.2.0",
|
92
|
-
requirements: [
|
93
|
-
{
|
94
|
-
file: "package.json",
|
95
|
-
requirement: "15.2.0",
|
96
|
-
groups: ["dependencies"],
|
97
|
-
source: null,
|
98
|
-
},
|
99
|
-
],
|
100
|
-
},
|
101
|
-
]
|
102
|
-
)
|
103
|
-
).rejects.toThrow(
|
104
|
-
"react-tabs@1.1.0 requires a peer of react@^0.14.9 || ^15.3.0 but none is installed."
|
105
|
-
);
|
106
|
-
});
|
107
|
-
});
|