dependabot-npm_and_yarn 0.350.0 → 0.352.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/helpers/build +1 -1
- data/helpers/lib/npm6/peer-dependency-checker.js +0 -1
- data/helpers/lib/npm6/subdependency-updater.js +0 -1
- data/helpers/lib/npm6/updater.js +0 -1
- data/helpers/package-lock.json +1027 -1010
- data/helpers/package.json +3 -3
- data/lib/dependabot/npm_and_yarn/constraint_helper.rb +9 -2
- data/lib/dependabot/npm_and_yarn/dependency_grapher/lockfile_generator.rb +217 -0
- data/lib/dependabot/npm_and_yarn/dependency_grapher.rb +174 -0
- data/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb +34 -15
- data/lib/dependabot/npm_and_yarn/file_updater/pnpm_lockfile_updater.rb +4 -0
- data/lib/dependabot/npm_and_yarn/file_updater/yarn_lockfile_updater.rb +4 -0
- data/lib/dependabot/npm_and_yarn/helpers.rb +59 -1
- data/lib/dependabot/npm_and_yarn/native_helpers.rb +0 -6
- data/lib/dependabot/npm_and_yarn/registry_helper.rb +12 -4
- data/lib/dependabot/npm_and_yarn.rb +1 -0
- metadata +6 -4
|
@@ -46,7 +46,8 @@ module Dependabot
|
|
|
46
46
|
env_variables[COREPACK_NPM_REGISTRY_ENV] = registry
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
# NOTE: We only set the registry, not the token
|
|
50
|
+
# The token should be configured in .npmrc for security
|
|
50
51
|
|
|
51
52
|
env_variables
|
|
52
53
|
end
|
|
@@ -87,7 +88,15 @@ module Dependabot
|
|
|
87
88
|
|
|
88
89
|
@credentials.each do |cred|
|
|
89
90
|
next unless cred["type"] == "npm_registry" # Skip if not an npm registry
|
|
90
|
-
|
|
91
|
+
|
|
92
|
+
# Handle both Credential objects and plain hashes
|
|
93
|
+
replaces_base = if cred.respond_to?(:replaces_base?)
|
|
94
|
+
cred.replaces_base?
|
|
95
|
+
else
|
|
96
|
+
cred["replaces-base"]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
next unless replaces_base # Skip if not a reverse-proxy registry
|
|
91
100
|
|
|
92
101
|
# Set the registry if it's not already set
|
|
93
102
|
registries[:registry] ||= cred["registry"]
|
|
@@ -95,10 +104,9 @@ module Dependabot
|
|
|
95
104
|
# Set the token if it's not already set
|
|
96
105
|
registries[:auth_token] ||= cred["token"]
|
|
97
106
|
end
|
|
107
|
+
|
|
98
108
|
registries
|
|
99
109
|
end
|
|
100
|
-
|
|
101
|
-
# Find registry and token in .npmrc or .yarnrc file
|
|
102
110
|
sig do
|
|
103
111
|
params(
|
|
104
112
|
file: T.nilable(Dependabot::DependencyFile),
|
|
@@ -10,6 +10,7 @@ require "dependabot/npm_and_yarn/file_updater"
|
|
|
10
10
|
require "dependabot/npm_and_yarn/metadata_finder"
|
|
11
11
|
require "dependabot/npm_and_yarn/requirement"
|
|
12
12
|
require "dependabot/npm_and_yarn/version"
|
|
13
|
+
require "dependabot/npm_and_yarn/dependency_grapher"
|
|
13
14
|
|
|
14
15
|
require "dependabot/pull_request_creator/labeler"
|
|
15
16
|
Dependabot::PullRequestCreator::Labeler
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-npm_and_yarn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.352.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.352.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.352.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -313,6 +313,8 @@ files:
|
|
|
313
313
|
- lib/dependabot/npm_and_yarn.rb
|
|
314
314
|
- lib/dependabot/npm_and_yarn/constraint_helper.rb
|
|
315
315
|
- lib/dependabot/npm_and_yarn/dependency_files_filterer.rb
|
|
316
|
+
- lib/dependabot/npm_and_yarn/dependency_grapher.rb
|
|
317
|
+
- lib/dependabot/npm_and_yarn/dependency_grapher/lockfile_generator.rb
|
|
316
318
|
- lib/dependabot/npm_and_yarn/file_fetcher.rb
|
|
317
319
|
- lib/dependabot/npm_and_yarn/file_fetcher/path_dependency_builder.rb
|
|
318
320
|
- lib/dependabot/npm_and_yarn/file_parser.rb
|
|
@@ -359,7 +361,7 @@ licenses:
|
|
|
359
361
|
- MIT
|
|
360
362
|
metadata:
|
|
361
363
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
362
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
364
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.352.0
|
|
363
365
|
rdoc_options: []
|
|
364
366
|
require_paths:
|
|
365
367
|
- lib
|