dependabot-bun 0.296.2 → 0.296.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/.eslintrc +11 -0
- data/helpers/README.md +29 -0
- data/helpers/build +26 -0
- data/helpers/jest.config.js +5 -0
- data/helpers/lib/npm/conflicting-dependency-parser.js +78 -0
- data/helpers/lib/npm/index.js +9 -0
- data/helpers/lib/npm/vulnerability-auditor.js +291 -0
- data/helpers/lib/npm6/helpers.js +25 -0
- data/helpers/lib/npm6/index.js +9 -0
- data/helpers/lib/npm6/peer-dependency-checker.js +111 -0
- data/helpers/lib/npm6/remove-dependencies-from-lockfile.js +22 -0
- data/helpers/lib/npm6/subdependency-updater.js +78 -0
- data/helpers/lib/npm6/updater.js +199 -0
- data/helpers/lib/pnpm/index.js +5 -0
- data/helpers/lib/pnpm/lockfile-parser.js +82 -0
- data/helpers/lib/yarn/conflicting-dependency-parser.js +176 -0
- data/helpers/lib/yarn/fix-duplicates.js +80 -0
- data/helpers/lib/yarn/helpers.js +54 -0
- data/helpers/lib/yarn/index.js +14 -0
- data/helpers/lib/yarn/lockfile-parser.js +21 -0
- data/helpers/lib/yarn/peer-dependency-checker.js +132 -0
- data/helpers/lib/yarn/replace-lockfile-declaration.js +57 -0
- data/helpers/lib/yarn/subdependency-updater.js +83 -0
- data/helpers/lib/yarn/updater.js +209 -0
- data/helpers/package-lock.json +28519 -0
- data/helpers/package.json +29 -0
- data/helpers/patches/npm++pacote+9.5.12.patch +14 -0
- data/helpers/run.js +30 -0
- data/helpers/test/npm6/conflicting-dependency-parser.test.js +66 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/deeply-nested/package-lock.json +591 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/deeply-nested/package.json +14 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/nested/package-lock.json +188 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/nested/package.json +14 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/simple/package-lock.json +27 -0
- data/helpers/test/npm6/fixtures/conflicting-dependency-parser/simple/package.json +14 -0
- data/helpers/test/npm6/fixtures/updater/original/package-lock.json +16 -0
- data/helpers/test/npm6/fixtures/updater/original/package.json +9 -0
- data/helpers/test/npm6/fixtures/updater/updated/package-lock.json +16 -0
- data/helpers/test/npm6/helpers.js +21 -0
- data/helpers/test/npm6/updater.test.js +30 -0
- data/helpers/test/pnpm/fixtures/parser/empty_version/pnpm-lock.yaml +72 -0
- data/helpers/test/pnpm/fixtures/parser/no_lockfile_change/pnpm-lock.yaml +2744 -0
- data/helpers/test/pnpm/fixtures/parser/only_dev_dependencies/pnpm-lock.yaml +16 -0
- data/helpers/test/pnpm/fixtures/parser/peer_disambiguation/pnpm-lock.yaml +855 -0
- data/helpers/test/pnpm/lockfile-parser.test.js +62 -0
- data/helpers/test/yarn/conflicting-dependency-parser.test.js +83 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/deeply-nested/yarn.lock +496 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/dev-dependencies/yarn.lock +21 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/nested/yarn.lock +183 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/package.json +14 -0
- data/helpers/test/yarn/fixtures/conflicting-dependency-parser/simple/yarn.lock +21 -0
- data/helpers/test/yarn/fixtures/updater/illegal_character/package.json +8 -0
- data/helpers/test/yarn/fixtures/updater/illegal_character/yarn.lock +14 -0
- data/helpers/test/yarn/fixtures/updater/original/package.json +6 -0
- data/helpers/test/yarn/fixtures/updater/original/yarn.lock +11 -0
- data/helpers/test/yarn/fixtures/updater/updated/yarn.lock +12 -0
- data/helpers/test/yarn/fixtures/updater/with-version-comments/package.json +5 -0
- data/helpers/test/yarn/fixtures/updater/with-version-comments/yarn.lock +13 -0
- data/helpers/test/yarn/helpers.js +18 -0
- data/helpers/test/yarn/updater.test.js +117 -0
- data/lib/dependabot/bun/bun_package_manager.rb +47 -0
- data/lib/dependabot/bun/constraint_helper.rb +359 -0
- data/lib/dependabot/bun/dependency_files_filterer.rb +157 -0
- data/lib/dependabot/bun/file_fetcher/path_dependency_builder.rb +184 -0
- data/lib/dependabot/bun/file_fetcher.rb +402 -0
- data/lib/dependabot/bun/file_parser/bun_lock.rb +140 -0
- data/lib/dependabot/bun/file_parser/lockfile_parser.rb +105 -0
- data/lib/dependabot/bun/file_parser.rb +477 -0
- data/lib/dependabot/bun/file_updater/bun_lockfile_updater.rb +144 -0
- data/lib/dependabot/bun/file_updater/npmrc_builder.rb +256 -0
- data/lib/dependabot/bun/file_updater/package_json_preparer.rb +88 -0
- data/lib/dependabot/bun/file_updater/package_json_updater.rb +378 -0
- data/lib/dependabot/bun/file_updater.rb +203 -0
- data/lib/dependabot/bun/helpers.rb +93 -0
- data/lib/dependabot/bun/language.rb +45 -0
- data/lib/dependabot/bun/metadata_finder.rb +214 -0
- data/lib/dependabot/bun/native_helpers.rb +19 -0
- data/lib/dependabot/bun/package_manager.rb +280 -0
- data/lib/dependabot/bun/package_name.rb +118 -0
- data/lib/dependabot/bun/pnpm_package_manager.rb +55 -0
- data/lib/dependabot/bun/registry_helper.rb +188 -0
- data/lib/dependabot/bun/registry_parser.rb +93 -0
- data/lib/dependabot/bun/requirement.rb +146 -0
- data/lib/dependabot/bun/sub_dependency_files_filterer.rb +82 -0
- data/lib/dependabot/bun/update_checker/conflicting_dependency_resolver.rb +59 -0
- data/lib/dependabot/bun/update_checker/dependency_files_builder.rb +79 -0
- data/lib/dependabot/bun/update_checker/latest_version_finder.rb +448 -0
- data/lib/dependabot/bun/update_checker/library_detector.rb +76 -0
- data/lib/dependabot/bun/update_checker/registry_finder.rb +279 -0
- data/lib/dependabot/bun/update_checker/requirements_updater.rb +206 -0
- data/lib/dependabot/bun/update_checker/subdependency_version_resolver.rb +154 -0
- data/lib/dependabot/bun/update_checker/version_resolver.rb +583 -0
- data/lib/dependabot/bun/update_checker/vulnerability_auditor.rb +164 -0
- data/lib/dependabot/bun/update_checker.rb +455 -0
- data/lib/dependabot/bun/version.rb +138 -0
- data/lib/dependabot/bun/version_selector.rb +61 -0
- data/lib/dependabot/bun.rb +337 -35
- metadata +108 -65
- data/lib/dependabot/javascript/bun/file_fetcher.rb +0 -77
- data/lib/dependabot/javascript/bun/file_parser/bun_lock.rb +0 -156
- data/lib/dependabot/javascript/bun/file_parser/lockfile_parser.rb +0 -55
- data/lib/dependabot/javascript/bun/file_parser.rb +0 -74
- data/lib/dependabot/javascript/bun/file_updater/lockfile_updater.rb +0 -138
- data/lib/dependabot/javascript/bun/file_updater.rb +0 -75
- data/lib/dependabot/javascript/bun/helpers.rb +0 -72
- data/lib/dependabot/javascript/bun/package_manager.rb +0 -48
- data/lib/dependabot/javascript/bun/requirement.rb +0 -11
- data/lib/dependabot/javascript/bun/update_checker/conflicting_dependency_resolver.rb +0 -64
- data/lib/dependabot/javascript/bun/update_checker/dependency_files_builder.rb +0 -47
- data/lib/dependabot/javascript/bun/update_checker/latest_version_finder.rb +0 -450
- data/lib/dependabot/javascript/bun/update_checker/library_detector.rb +0 -76
- data/lib/dependabot/javascript/bun/update_checker/requirements_updater.rb +0 -203
- data/lib/dependabot/javascript/bun/update_checker/subdependency_version_resolver.rb +0 -144
- data/lib/dependabot/javascript/bun/update_checker/version_resolver.rb +0 -525
- data/lib/dependabot/javascript/bun/update_checker/vulnerability_auditor.rb +0 -165
- data/lib/dependabot/javascript/bun/update_checker.rb +0 -440
- data/lib/dependabot/javascript/bun/version.rb +0 -11
- data/lib/dependabot/javascript/shared/constraint_helper.rb +0 -359
- data/lib/dependabot/javascript/shared/dependency_files_filterer.rb +0 -164
- data/lib/dependabot/javascript/shared/file_fetcher.rb +0 -283
- data/lib/dependabot/javascript/shared/file_parser/lockfile_parser.rb +0 -106
- data/lib/dependabot/javascript/shared/file_parser.rb +0 -454
- data/lib/dependabot/javascript/shared/file_updater/npmrc_builder.rb +0 -394
- data/lib/dependabot/javascript/shared/file_updater/package_json_preparer.rb +0 -87
- data/lib/dependabot/javascript/shared/file_updater/package_json_updater.rb +0 -376
- data/lib/dependabot/javascript/shared/file_updater.rb +0 -179
- data/lib/dependabot/javascript/shared/language.rb +0 -45
- data/lib/dependabot/javascript/shared/metadata_finder.rb +0 -209
- data/lib/dependabot/javascript/shared/native_helpers.rb +0 -21
- data/lib/dependabot/javascript/shared/package_manager_detector.rb +0 -72
- data/lib/dependabot/javascript/shared/package_name.rb +0 -118
- data/lib/dependabot/javascript/shared/registry_helper.rb +0 -190
- data/lib/dependabot/javascript/shared/registry_parser.rb +0 -93
- data/lib/dependabot/javascript/shared/requirement.rb +0 -144
- data/lib/dependabot/javascript/shared/sub_dependency_files_filterer.rb +0 -79
- data/lib/dependabot/javascript/shared/update_checker/dependency_files_builder.rb +0 -87
- data/lib/dependabot/javascript/shared/update_checker/registry_finder.rb +0 -358
- data/lib/dependabot/javascript/shared/version.rb +0 -133
- data/lib/dependabot/javascript/shared/version_selector.rb +0 -60
- data/lib/dependabot/javascript.rb +0 -39
@@ -0,0 +1,188 @@
|
|
1
|
+
{
|
2
|
+
"name": "test",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"lockfileVersion": 1,
|
5
|
+
"requires": true,
|
6
|
+
"dependencies": {
|
7
|
+
"abind": {
|
8
|
+
"version": "1.0.5",
|
9
|
+
"resolved": "https://registry.npmjs.org/abind/-/abind-1.0.5.tgz",
|
10
|
+
"integrity": "sha512-dbaEZphdPje0ihqSdWg36Sb8S20TuqQomiz2593oIx+enQ9Q4vDZRjIzhnkWltGRKVKqC28kTribkgRLBexWVQ=="
|
11
|
+
},
|
12
|
+
"ansi-regex": {
|
13
|
+
"version": "2.1.1",
|
14
|
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
15
|
+
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
16
|
+
},
|
17
|
+
"argx": {
|
18
|
+
"version": "4.0.4",
|
19
|
+
"resolved": "https://registry.npmjs.org/argx/-/argx-4.0.4.tgz",
|
20
|
+
"integrity": "sha512-XLWeRTNBJRzQkbMweLIxdtnvpE7iYUBraPwrIJX57FjL4D1RHLMJRM1AyEP6KZHgvjW7TSnxF8MpGic7YdTGOA==",
|
21
|
+
"requires": {
|
22
|
+
"iftype": "^4.0.9"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"askconfig": {
|
26
|
+
"version": "4.0.4",
|
27
|
+
"resolved": "https://registry.npmjs.org/askconfig/-/askconfig-4.0.4.tgz",
|
28
|
+
"integrity": "sha512-fjB/vmAlUKxGVqcz4mLub3xF8m9rkazhqcXRvrDzeey0iaLhcAg2K8bhJL7pKjE2dFP9qDGv3+yXovYMV9XBJQ==",
|
29
|
+
"requires": {
|
30
|
+
"argx": "^4.0.2",
|
31
|
+
"cli-color": "^1.4.0",
|
32
|
+
"objnest": "^5.0.6"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"cli-color": {
|
36
|
+
"version": "1.4.0",
|
37
|
+
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
38
|
+
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
39
|
+
"requires": {
|
40
|
+
"ansi-regex": "^2.1.1",
|
41
|
+
"d": "1",
|
42
|
+
"es5-ext": "^0.10.46",
|
43
|
+
"es6-iterator": "^2.0.3",
|
44
|
+
"memoizee": "^0.4.14",
|
45
|
+
"timers-ext": "^0.1.5"
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"d": {
|
49
|
+
"version": "1.0.1",
|
50
|
+
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
|
51
|
+
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
|
52
|
+
"requires": {
|
53
|
+
"es5-ext": "^0.10.50",
|
54
|
+
"type": "^1.0.1"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"es5-ext": {
|
58
|
+
"version": "0.10.53",
|
59
|
+
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
|
60
|
+
"integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
|
61
|
+
"requires": {
|
62
|
+
"es6-iterator": "~2.0.3",
|
63
|
+
"es6-symbol": "~3.1.3",
|
64
|
+
"next-tick": "~1.0.0"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"es6-iterator": {
|
68
|
+
"version": "2.0.3",
|
69
|
+
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
70
|
+
"integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
|
71
|
+
"requires": {
|
72
|
+
"d": "1",
|
73
|
+
"es5-ext": "^0.10.35",
|
74
|
+
"es6-symbol": "^3.1.1"
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"es6-symbol": {
|
78
|
+
"version": "3.1.3",
|
79
|
+
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
|
80
|
+
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
|
81
|
+
"requires": {
|
82
|
+
"d": "^1.0.1",
|
83
|
+
"ext": "^1.1.2"
|
84
|
+
}
|
85
|
+
},
|
86
|
+
"es6-weak-map": {
|
87
|
+
"version": "2.0.3",
|
88
|
+
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
89
|
+
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
|
90
|
+
"requires": {
|
91
|
+
"d": "1",
|
92
|
+
"es5-ext": "^0.10.46",
|
93
|
+
"es6-iterator": "^2.0.3",
|
94
|
+
"es6-symbol": "^3.1.1"
|
95
|
+
}
|
96
|
+
},
|
97
|
+
"event-emitter": {
|
98
|
+
"version": "0.3.5",
|
99
|
+
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
100
|
+
"integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
|
101
|
+
"requires": {
|
102
|
+
"d": "1",
|
103
|
+
"es5-ext": "~0.10.14"
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"ext": {
|
107
|
+
"version": "1.4.0",
|
108
|
+
"resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
|
109
|
+
"integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
|
110
|
+
"requires": {
|
111
|
+
"type": "^2.0.0"
|
112
|
+
},
|
113
|
+
"dependencies": {
|
114
|
+
"type": {
|
115
|
+
"version": "2.1.0",
|
116
|
+
"resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz",
|
117
|
+
"integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA=="
|
118
|
+
}
|
119
|
+
}
|
120
|
+
},
|
121
|
+
"extend": {
|
122
|
+
"version": "3.0.2",
|
123
|
+
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
124
|
+
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
125
|
+
},
|
126
|
+
"iftype": {
|
127
|
+
"version": "4.0.9",
|
128
|
+
"resolved": "https://registry.npmjs.org/iftype/-/iftype-4.0.9.tgz",
|
129
|
+
"integrity": "sha512-01Klo+04dkDzY193D1GVfOdQzmpqaYFJTAlZKRztkT/BOaU7sSnvxGimSln+7DMqLUP4tpDTNFgxqVPLYZVypA=="
|
130
|
+
},
|
131
|
+
"is-promise": {
|
132
|
+
"version": "2.2.2",
|
133
|
+
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
|
134
|
+
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
|
135
|
+
},
|
136
|
+
"lru-queue": {
|
137
|
+
"version": "0.1.0",
|
138
|
+
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
|
139
|
+
"integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=",
|
140
|
+
"requires": {
|
141
|
+
"es5-ext": "~0.10.2"
|
142
|
+
}
|
143
|
+
},
|
144
|
+
"memoizee": {
|
145
|
+
"version": "0.4.14",
|
146
|
+
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz",
|
147
|
+
"integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==",
|
148
|
+
"requires": {
|
149
|
+
"d": "1",
|
150
|
+
"es5-ext": "^0.10.45",
|
151
|
+
"es6-weak-map": "^2.0.2",
|
152
|
+
"event-emitter": "^0.3.5",
|
153
|
+
"is-promise": "^2.1",
|
154
|
+
"lru-queue": "0.1",
|
155
|
+
"next-tick": "1",
|
156
|
+
"timers-ext": "^0.1.5"
|
157
|
+
}
|
158
|
+
},
|
159
|
+
"next-tick": {
|
160
|
+
"version": "1.0.0",
|
161
|
+
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
162
|
+
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
163
|
+
},
|
164
|
+
"objnest": {
|
165
|
+
"version": "5.0.10",
|
166
|
+
"resolved": "https://registry.npmjs.org/objnest/-/objnest-5.0.10.tgz",
|
167
|
+
"integrity": "sha512-sIXiWbzbaOszhnaioxGyaLvBUF86nnEX/zgTrGskEJsXEqjBwLCsVy+a7Na93mW474lvtSIc3tOYiaXgHQw7Mg==",
|
168
|
+
"requires": {
|
169
|
+
"abind": "^1.0.4",
|
170
|
+
"extend": "^3.0.2"
|
171
|
+
}
|
172
|
+
},
|
173
|
+
"timers-ext": {
|
174
|
+
"version": "0.1.7",
|
175
|
+
"resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
|
176
|
+
"integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
|
177
|
+
"requires": {
|
178
|
+
"es5-ext": "~0.10.46",
|
179
|
+
"next-tick": "1"
|
180
|
+
}
|
181
|
+
},
|
182
|
+
"type": {
|
183
|
+
"version": "1.2.0",
|
184
|
+
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
185
|
+
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "test",
|
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
|
+
"askconfig": "^4.0.4"
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"name": "test",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"lockfileVersion": 1,
|
5
|
+
"requires": true,
|
6
|
+
"dependencies": {
|
7
|
+
"abind": {
|
8
|
+
"version": "1.0.5",
|
9
|
+
"resolved": "https://registry.npmjs.org/abind/-/abind-1.0.5.tgz",
|
10
|
+
"integrity": "sha512-dbaEZphdPje0ihqSdWg36Sb8S20TuqQomiz2593oIx+enQ9Q4vDZRjIzhnkWltGRKVKqC28kTribkgRLBexWVQ=="
|
11
|
+
},
|
12
|
+
"extend": {
|
13
|
+
"version": "3.0.2",
|
14
|
+
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
15
|
+
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
16
|
+
},
|
17
|
+
"objnest": {
|
18
|
+
"version": "4.1.2",
|
19
|
+
"resolved": "https://registry.npmjs.org/objnest/-/objnest-4.1.2.tgz",
|
20
|
+
"integrity": "sha512-VLMIu6RjSrHyesMnlLZBTbNlzrfBEjkcBdq5NM763AG+BLRJm27H43GUTLv3XrtlNn0Ofs+em4G84T7kkXA+1A==",
|
21
|
+
"requires": {
|
22
|
+
"abind": "^1.0.0",
|
23
|
+
"extend": "^3.0.0"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"requires": true,
|
3
|
+
"lockfileVersion": 1,
|
4
|
+
"dependencies": {
|
5
|
+
"is-positive": {
|
6
|
+
"version": "3.1.0",
|
7
|
+
"resolved": "https://registry.npmjs.org/is-positive/-/is-positive-3.1.0.tgz",
|
8
|
+
"integrity": "sha1-hX21hKG6XRyymAUn/DtsQ103sP0="
|
9
|
+
},
|
10
|
+
"left-pad": {
|
11
|
+
"version": "1.0.0",
|
12
|
+
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.0.0.tgz",
|
13
|
+
"integrity": "sha1-yE4kF1gbu46vK549ehIuVyqxrzc="
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"requires": true,
|
3
|
+
"lockfileVersion": 1,
|
4
|
+
"dependencies": {
|
5
|
+
"is-positive": {
|
6
|
+
"version": "3.1.0",
|
7
|
+
"resolved": "https://registry.npmjs.org/is-positive/-/is-positive-3.1.0.tgz",
|
8
|
+
"integrity": "sha1-hX21hKG6XRyymAUn/DtsQ103sP0="
|
9
|
+
},
|
10
|
+
"left-pad": {
|
11
|
+
"version": "1.1.3",
|
12
|
+
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.1.3.tgz",
|
13
|
+
"integrity": "sha512-m3z9QHpSXmd2H8Z5jnSXbGONPty4dFQfH1QpGgivzrEzICgsi50j9S+aGc77EaLoHpbw0BzP5+k1pp2UajTRuw=="
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,21 @@
|
|
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
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
const os = require("os");
|
3
|
+
const fs = require("fs");
|
4
|
+
const { updateDependencyFiles } = require("../../lib/npm6/updater");
|
5
|
+
const helpers = require("./helpers");
|
6
|
+
|
7
|
+
describe("updater", () => {
|
8
|
+
let tempDir;
|
9
|
+
beforeEach(() => {
|
10
|
+
tempDir = fs.mkdtempSync(os.tmpdir() + path.sep);
|
11
|
+
});
|
12
|
+
afterEach(() => fs.rm(tempDir, { recursive: true }, () => {}));
|
13
|
+
|
14
|
+
it("generates an updated package-lock.json", async () => {
|
15
|
+
helpers.copyDependencies("updater/original", tempDir);
|
16
|
+
|
17
|
+
const result = await updateDependencyFiles(tempDir, "package-lock.json", [
|
18
|
+
{
|
19
|
+
name: "left-pad",
|
20
|
+
version: "1.1.3",
|
21
|
+
requirements: [{ file: "package.json", groups: ["dependencies"] }],
|
22
|
+
},
|
23
|
+
]);
|
24
|
+
expect(result).toEqual({
|
25
|
+
"package-lock.json": helpers.loadFixture(
|
26
|
+
"updater/updated/package-lock.json"
|
27
|
+
),
|
28
|
+
});
|
29
|
+
});
|
30
|
+
});
|
@@ -0,0 +1,72 @@
|
|
1
|
+
lockfileVersion: 5.4
|
2
|
+
|
3
|
+
specifiers:
|
4
|
+
etag: 1.7.0
|
5
|
+
fetch-factory: ^0.0.1
|
6
|
+
|
7
|
+
dependencies:
|
8
|
+
fetch-factory:
|
9
|
+
specifier: ^0.0.1
|
10
|
+
version: 0.0.1
|
11
|
+
|
12
|
+
devDependencies:
|
13
|
+
etag:
|
14
|
+
specifier: 1.7.0
|
15
|
+
version: 1.7.0
|
16
|
+
|
17
|
+
packages:
|
18
|
+
|
19
|
+
/encoding/:
|
20
|
+
resolution: {integrity: sha512-bl1LAgiQc4ZWr++pNYUdRe/alecaHFeHxIJ/pNciqGdKXghaTCOwKkbKp6ye7pKZGu/GcaSXFk8PBVhgs+dJdA==}
|
21
|
+
dependencies:
|
22
|
+
iconv-lite: 0.4.15
|
23
|
+
dev: false
|
24
|
+
|
25
|
+
/es6-promise@3.3.1:
|
26
|
+
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
|
27
|
+
dev: false
|
28
|
+
|
29
|
+
/etag@1.7.0:
|
30
|
+
resolution: {integrity: sha512-Mbv5pNpLNPrm1b4rzZlZlfTRpdDr31oiD43N362sIyvSWVNu5Du33EcJGzvEV4YdYLuENB1HzND907cQkFmXNw==}
|
31
|
+
engines: {node: '>= 0.6'}
|
32
|
+
dev: true
|
33
|
+
|
34
|
+
/fetch-factory@0.0.1:
|
35
|
+
resolution: {integrity: sha512-gexRwqIhwzDJ2pJvL0UYfiZwW06/bdYWxAmswFFts7C87CF8i6liApihTk7TZFYMDcQjvvDIvyHv0q379z0aWA==}
|
36
|
+
dependencies:
|
37
|
+
es6-promise: 3.3.1
|
38
|
+
isomorphic-fetch: 2.2.1
|
39
|
+
lodash: 3.10.1
|
40
|
+
dev: false
|
41
|
+
|
42
|
+
/iconv-lite@0.4.15:
|
43
|
+
resolution: {integrity: sha512-RGR+c9Lm+tLsvU57FTJJtdbv2hQw42Yl2n26tVIBaYmZzLN+EGfroUugN/z9nJf9kOXd49hBmpoGr4FEm+A4pw==}
|
44
|
+
engines: {node: '>=0.10.0'}
|
45
|
+
dev: false
|
46
|
+
|
47
|
+
/is-stream@1.1.0:
|
48
|
+
resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==}
|
49
|
+
engines: {node: '>=0.10.0'}
|
50
|
+
dev: false
|
51
|
+
|
52
|
+
/isomorphic-fetch@2.2.1:
|
53
|
+
resolution: {integrity: sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==}
|
54
|
+
dependencies:
|
55
|
+
node-fetch: 1.7.3
|
56
|
+
whatwg-fetch: 3.6.2
|
57
|
+
dev: false
|
58
|
+
|
59
|
+
/lodash@3.10.1:
|
60
|
+
resolution: {integrity: sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ==}
|
61
|
+
dev: false
|
62
|
+
|
63
|
+
/node-fetch@1.7.3:
|
64
|
+
resolution: {integrity: sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==}
|
65
|
+
dependencies:
|
66
|
+
encoding: 0.1.12
|
67
|
+
is-stream: 1.1.0
|
68
|
+
dev: false
|
69
|
+
|
70
|
+
/whatwg-fetch@3.6.2:
|
71
|
+
resolution: {integrity: sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==}
|
72
|
+
dev: false
|