Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
70a7acd
Add nub ecosystem (draft, held) modeled on bun
colinhacks Jul 7, 2026
e1560b5
Register nub ecosystem in omnibus + updater setup
colinhacks Jul 7, 2026
24c579a
nub ecosystem: address self-review (B1/S1/grammar) + pnpm-v9 fixtures
colinhacks Jul 7, 2026
2541aae
Register nub in the package-manager lookup
colinhacks Jul 7, 2026
ff7d519
nub FileUpdater: pin-restore version mechanic + pnpm-v9 fixtures
colinhacks Jul 7, 2026
9c963dd
nub ecosystem: green suite (336 examples, 0 failures, 3 pending)
colinhacks Jul 7, 2026
4b694f0
Wire nub ecosystem into CI/infra
colinhacks Jul 7, 2026
0f36669
nub version_resolver: re-ground peer-dep probe to nub grammar (V1)
colinhacks Jul 7, 2026
5f4531d
nub_lock: explicit require of nub_package_manager (load-order robustn…
colinhacks Jul 7, 2026
d1daaba
nub: reuse npm_and_yarn pnpm-format classes via gemspec dep + aliases
colinhacks Jul 7, 2026
9381565
nub: drop dead yarn/PnP cruft + reuse npm_and_yarn PnpmErrorHandler
colinhacks Jul 7, 2026
c260553
nub: cover git-dependency ref-change updates; document unsupported sa…
colinhacks Jul 7, 2026
3472c24
nub: copy full npm_and_yarn lib into the updater image
colinhacks Jul 7, 2026
58781f2
nub: pin updater image to @nubjs/nub@0.4.1 (has #355 update <pkg>@<ver>)
colinhacks Jul 8, 2026
787bc0d
nub FileUpdater: one-shot `nub update <pkg>@<ver>` (0.4.1) — enables …
colinhacks Jul 8, 2026
ba4cd04
nub: fix Sorbet errors + Rubocop offenses
colinhacks Jul 9, 2026
4abca3b
nub: register dependabot-nub in the updater Gemfile
colinhacks Jul 9, 2026
7dc5d4b
nub: bump helpers' form-data to 2.5.6
colinhacks Jul 9, 2026
aae3c23
nub: bump 3 alias files to # typed: strong
colinhacks Jul 9, 2026
f5f04bd
nub: register nub in remaining ecosystem enumeration lists
colinhacks Jul 10, 2026
dba36db
nub: remove spec fixtures unused by the nub spec suite
colinhacks Jul 10, 2026
0e5d692
nub: remove unused npm@6 from helpers
colinhacks Jul 10, 2026
eb9cea2
nub: patch high-severity vulns in helpers lockfile
colinhacks Jul 11, 2026
4cebac3
nub: remove inert yarn helper stack; eliminate js-yaml vuln
colinhacks Jul 12, 2026
8b99258
Merge remote-tracking branch 'origin/main' into feat/nub-ecosystem
colinhacks Aug 3, 2026
0c57d18
nub: declare dependabot-nub in the omnibus gemspec
colinhacks Aug 3, 2026
c0271d3
nub: read the git source type via DependencyRequirement#source_string
colinhacks Aug 3, 2026
5a16fcf
nub: pin the updater image to @nubjs/nub@0.6.0
colinhacks Aug 4, 2026
3b4da94
Merge remote-tracking branch 'origin/main' into feat/nub-ecosystem
colinhacks Aug 4, 2026
d1899ad
nub: drop redundant T.let wrappers flagged by Sorbet cops
colinhacks Aug 4, 2026
9564ec9
Merge remote-tracking branch 'origin/main' into feat/nub-ecosystem
colinhacks Aug 28, 2026
801a144
nub: register the ecosystem in the root bundle, Sorbet config and dep…
colinhacks Aug 28, 2026
8292a47
nub: move requirement access to the DependencyRequirement typed readers
colinhacks Aug 28, 2026
fce694b
nub: pin the updater image to @nubjs/nub@0.8.0
colinhacks Aug 28, 2026
723858b
nub: bump the tar override to 7.5.22 to clear five node-tar advisories
colinhacks Aug 28, 2026
f861ea8
nub: make the CodeQL-flagged regexes possessive
colinhacks Aug 28, 2026
63636cd
nub: clear the remaining vulnerable helper pins
colinhacks Aug 28, 2026
0fb2ea8
Merge remote-tracking branch 'origin/main' into feat/nub-ecosystem
colinhacks Aug 28, 2026
6e8eb7f
nub: bump @npmcli/arborist to ^9.4.0 to clear the pacote advisory
colinhacks Aug 29, 2026
b48c96c
nub: pin @tootallnate/once to 2.0.1 to clear its advisory
colinhacks Aug 29, 2026
38b84ad
Merge remote-tracking branch 'origin/main' into feat/nub-ecosystem
colinhacks Aug 31, 2026
003a078
nub: use disable-next for the ClassLength directive
colinhacks Aug 31, 2026
3462951
nub: call turbo_tests2 in the CI test script
colinhacks Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/ci-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ nix:
npm_and_yarn:
- *shared
- 'npm_and_yarn/**'
nub:
- *shared
- 'nub/**'
nuget:
- *shared
- 'nuget/**'
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ updates:
directories:
- "/bun/helpers"
- "/npm_and_yarn/helpers"
- "/nub/helpers"
schedule:
interval: "weekly"
day: "sunday"
Expand Down
3 changes: 3 additions & 0 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@

"L: sbt":
- '(sbt)'

"L: nub":
- '(nub)'
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- any-glob-to-any-file:
- bun/**
- npm_and_yarn/**
- nub/**

"L: java:gradle":
- changed-files:
Expand Down
3 changes: 3 additions & 0 deletions .github/smoke-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ nix:
npm_and_yarn:
- *common
- 'npm_and_yarn/**'
nub:
- *common
- 'nub/**'
nuget:
- *common
- 'nuget/**'
Expand Down
5 changes: 5 additions & 0 deletions .github/smoke-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@
"test": "npm",
"ecosystem": "npm"
},
{
"core": "nub",
"test": "nub",
"ecosystem": "nub"
},
{
"core": "nuget",
"test": "nuget-resolvability",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- { path: maven, name: maven, ecosystem: maven }
- { path: nix, name: nix, ecosystem: nix }
- { path: npm_and_yarn, name: npm_and_yarn, ecosystem: npm }
- { path: nub, name: nub, ecosystem: nub }
- { path: nuget, name: nuget, ecosystem: nuget }
- { path: opentofu, name: opentofu, ecosystem: opentofu }
- { path: pre_commit, name: pre_commit, ecosystem: pre-commit }
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.updater-core
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ COPY --chown=dependabot:dependabot --parents */.bundle */*.gemspec common/lib/de
# Entries are either "<name>" (gem lives in a directory matching its name) or
# "<name>:<dir>" when multiple gems share a directory (e.g. dependabot-docker
# and dependabot-docker_compose both ship from docker/).
ARG ECOSYSTEM_LIST="bazel bun bundler cargo composer conda deno devcontainers docker docker_compose:docker dotnet_sdk elm git_submodules github_actions go_modules gradle helm hex julia maven nix npm_and_yarn nuget opentofu pre_commit pub python rust_toolchain sbt silent swift terraform uv vcpkg"
ARG ECOSYSTEM_LIST="bazel bun bundler cargo composer conda deno devcontainers docker docker_compose:docker dotnet_sdk elm git_submodules github_actions go_modules gradle helm hex julia maven nix npm_and_yarn nub nuget opentofu pre_commit pub python rust_toolchain sbt silent swift terraform uv vcpkg"
# prevent having all the source in every ecosystem image
RUN for entry in $ECOSYSTEM_LIST; do \
name="${entry%%:*}"; \
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ gem "dependabot-hex", path: "hex"
gem "dependabot-julia", path: "julia"
gem "dependabot-maven", path: "maven"
gem "dependabot-npm_and_yarn", path: "npm_and_yarn"
gem "dependabot-nub", path: "nub"
gem "dependabot-nuget", path: "nuget"
gem "dependabot-opentofu", path: "opentofu"
gem "dependabot-pre_commit", path: "pre_commit"
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ PATH
dependabot-npm_and_yarn (0.394.0)
dependabot-common (= 0.394.0)

PATH
remote: nub
specs:
dependabot-nub (0.394.0)
dependabot-common (= 0.394.0)
dependabot-npm_and_yarn (= 0.394.0)

PATH
remote: nuget
specs:
Expand Down Expand Up @@ -498,6 +505,7 @@ DEPENDENCIES
dependabot-julia!
dependabot-maven!
dependabot-npm_and_yarn!
dependabot-nub!
dependabot-nuget!
dependabot-opentofu!
dependabot-pre_commit!
Expand Down Expand Up @@ -569,6 +577,7 @@ CHECKSUMS
dependabot-julia (0.394.0)
dependabot-maven (0.394.0)
dependabot-npm_and_yarn (0.394.0)
dependabot-nub (0.394.0)
dependabot-nuget (0.394.0)
dependabot-opentofu (0.394.0)
dependabot-pre_commit (0.394.0)
Expand Down
6 changes: 6 additions & 0 deletions bin/docker-dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ docker run --rm -ti \
-v "$(pwd)/npm_and_yarn/lib:$CODE_DIR/npm_and_yarn/lib" \
-v "$(pwd)/npm_and_yarn/script:$CODE_DIR/npm_and_yarn/script" \
-v "$(pwd)/npm_and_yarn/spec:$CODE_DIR/npm_and_yarn/spec" \
-v "$(pwd)/nub/.rubocop.yml:$CODE_DIR/nub/.rubocop.yml" \
-v "$(pwd)/nub/dependabot-nub.gemspec:$CODE_DIR/nub/dependabot-nub.gemspec" \
-v "$(pwd)/nub/helpers:$CODE_DIR/nub/helpers" \
-v "$(pwd)/nub/lib:$CODE_DIR/nub/lib" \
-v "$(pwd)/nub/script:$CODE_DIR/nub/script" \
-v "$(pwd)/nub/spec:$CODE_DIR/nub/spec" \
-v "$(pwd)/nuget/.rubocop.yml:$CODE_DIR/nuget/.rubocop.yml" \
-v "$(pwd)/nuget/dependabot-nuget.gemspec:$CODE_DIR/nuget/dependabot-nuget.gemspec" \
-v "$(pwd)/nuget/helpers:$CODE_DIR/nuget/helpers" \
Expand Down
4 changes: 4 additions & 0 deletions bin/dry-run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# - hex
# - maven
# - npm_and_yarn
# - nub
# - nuget
# - pip (includes pipenv)
# - pre_commit
Expand Down Expand Up @@ -81,6 +82,7 @@
$LOAD_PATH << "./maven/lib"
$LOAD_PATH << "./nix/lib"
$LOAD_PATH << "./npm_and_yarn/lib"
$LOAD_PATH << "./nub/lib"
$LOAD_PATH << "./nuget/lib"
$LOAD_PATH << "./pre_commit/lib"
$LOAD_PATH << "./pub/lib"
Expand Down Expand Up @@ -139,6 +141,7 @@
require "dependabot/julia"
require "dependabot/maven"
require "dependabot/npm_and_yarn"
require "dependabot/nub"
require "dependabot/nuget"
require "dependabot/pre_commit"
require "dependabot/pub"
Expand Down Expand Up @@ -390,6 +393,7 @@
hex
maven
npm_and_yarn
nub
nuget
pip
pre_commit
Expand Down
1 change: 1 addition & 0 deletions common/lib/dependabot/config/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def self.parse(config)
"mix" => "hex",
"nix" => "nix",
"npm" => "npm_and_yarn",
"nub" => "nub",
"nuget" => "nuget",
"opentofu" => "opentofu",
"pip" => "pip",
Expand Down
1 change: 1 addition & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ variable "ECOSYSTEMS" {
{ name = "maven", image = "maven", dockerfile = "maven/Dockerfile" },
{ name = "nix", image = "nix", dockerfile = "nix/Dockerfile" },
{ name = "npm_and_yarn", image = "npm", dockerfile = "npm_and_yarn/Dockerfile" },
{ name = "nub", image = "nub", dockerfile = "nub/Dockerfile" },
{ name = "nuget", image = "nuget", dockerfile = "nuget/Dockerfile" },
{ name = "pre_commit", image = "pre-commit", dockerfile = "pre_commit/Dockerfile" },
{ name = "pub", image = "pub", dockerfile = "pub/Dockerfile" },
Expand Down
1 change: 1 addition & 0 deletions nub/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BUNDLE_GEMFILE: "../dependabot-updater/Gemfile"
7 changes: 7 additions & 0 deletions nub/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.bundle/*
!.bundle/config
/.env
/tmp
/dependabot-*.gem
/helpers/node_modules
/helpers/install-dir
48 changes: 48 additions & 0 deletions nub/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
inherit_from: ../.rubocop.yml

Sorbet/ForbidTUnsafe:
Exclude:
- lib/dependabot/nub/update_checker.rb
- lib/dependabot/nub/update_checker/latest_version_finder.rb
- lib/dependabot/nub/update_checker/version_resolver.rb

# The lib below models parsed package.json / npm-registry / lockfile JSON, which is genuinely
# heterogeneous — the same `T::Hash[String, T.untyped]` shapes bun and npm_and_yarn carry. Those
# gems grandfather the identical files under Sorbet/ForbidTUntyped in the root .rubocop_todo.yml;
# nub cannot, because script/sorbet-untyped-ratchet forbids adding NEW files to that list, so the
# exclusion lives here per-gem instead. Same rationale as the RSpec/Lint entries below.
Sorbet/ForbidTUntyped:
Exclude:
- lib/dependabot/nub/dependency_files_filterer.rb
- lib/dependabot/nub/file_fetcher.rb
- lib/dependabot/nub/file_parser.rb
- lib/dependabot/nub/file_parser/lockfile_parser.rb
- lib/dependabot/nub/file_parser/nub_lock.rb
- lib/dependabot/nub/file_updater.rb
- lib/dependabot/nub/file_updater/package_json_updater.rb
- lib/dependabot/nub/metadata_finder.rb
- lib/dependabot/nub/package/package_details_fetcher.rb
- lib/dependabot/nub/package/registry_finder.rb
- lib/dependabot/nub/package_manager.rb
- lib/dependabot/nub/registry_helper.rb
- lib/dependabot/nub/registry_parser.rb
- lib/dependabot/nub/update_checker.rb
- lib/dependabot/nub/update_checker/latest_version_finder.rb
- lib/dependabot/nub/update_checker/library_detector.rb
- lib/dependabot/nub/update_checker/requirements_updater.rb
- lib/dependabot/nub/update_checker/version_resolver.rb
- lib/dependabot/nub/update_checker/vulnerability_auditor.rb

# ERR_PATTERNS follows a `private` — harmless (constants ignore visibility). bun grandfathers the
# byte-identical bun_lockfile_updater.rb for this cop in the root todo.
Lint/UselessConstantScoping:
Exclude:
- lib/dependabot/nub/file_updater/nub_lockfile_updater.rb

# Stubbing idioms inherited from bun's update_checker_spec, which bun/npm_and_yarn grandfather.
RSpec/AnyInstance:
Exclude:
- spec/dependabot/nub/update_checker_spec.rb
RSpec/StubbedMock:
Exclude:
- spec/dependabot/nub/update_checker_spec.rb
43 changes: 43 additions & 0 deletions nub/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# syntax=docker.io/docker/dockerfile:1.20
FROM ghcr.io/dependabot/dependabot-updater-core

# Check for updates at https://github.com/nubjs/nub/releases
ARG NUB_VERSION=0.8.0

# See https://github.com/nodesource/distributions#installation-instructions
ARG NODEJS_VERSION=24

# Install Node and nub.
# nub is distributed as @nubjs/nub with per-platform binary optionalDependencies
# (@nubjs/nub-<platform>) placed by its postinstall; the container is linux-x64 (glibc).
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODEJS_VERSION}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g @nubjs/nub@$NUB_VERSION \
&& rm -rf ~/.npm

USER dependabot

# Use our custom CA bundle.
ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt

# Silence warning messages that aren't useful within the Dependabot context.
# These env vars are consumed by the Dependabot native helpers, which rely on npm/pnpm.
# CAUTION: `NPM_CONFIG_*` vars take precedence over the user's .npmrc settings. For these it always makes sense, but for
# other non-default configs it might be better to set them in a global .npmrc instead so users' .npmrc settings are respected.
ENV NPM_CONFIG_AUDIT=false \
NPM_CONFIG_FUND=false

ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt"
COPY --chown=dependabot:dependabot nub/helpers /opt/nub/helpers
RUN bash /opt/nub/helpers/build

# nub depends on dependabot-npm_and_yarn (nub.lock is pnpm-lock v9, so nub reuses its
# pnpm-format Ruby classes). The updater-core base only stubs sibling ecosystems, so the
# full npm_and_yarn lib must be copied in — same pattern as pre_commit/Dockerfile.
COPY --chown=dependabot:dependabot --parents nub npm_and_yarn common $DEPENDABOT_HOME/
COPY --chown=dependabot:dependabot updater $DEPENDABOT_HOME/dependabot-updater
18 changes: 18 additions & 0 deletions nub/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## `dependabot-nub`

Nub support for [`dependabot-core`][core-repo].

### Running locally

1. Start a development shell

```
$ bin/docker-dev-shell nub
```

2. Run tests
```
[dependabot-core-dev] ~ $ cd nub && rspec
```

[core-repo]: https://github.com/dependabot/dependabot-core
43 changes: 43 additions & 0 deletions nub/dependabot-nub.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
common_gemspec =
Bundler.load_gemspec_uncached("../common/dependabot-common.gemspec")

spec.name = "dependabot-nub"
spec.summary = "Provides Dependabot support for Javascript"
spec.description = "Dependabot-Nub provides support for bumping Javascript libraries via " \
"Dependabot. " \
"If you want support for multiple package managers, you probably want the meta-gem " \
"dependabot-omnibus."

spec.author = common_gemspec.author
spec.email = common_gemspec.email
spec.homepage = common_gemspec.homepage
spec.license = common_gemspec.license

spec.metadata = {
"bug_tracker_uri" => common_gemspec.metadata["bug_tracker_uri"],
"changelog_uri" => common_gemspec.metadata["changelog_uri"]
}

spec.version = common_gemspec.version
spec.required_ruby_version = common_gemspec.required_ruby_version
spec.required_rubygems_version = common_gemspec.required_ruby_version

spec.require_path = "lib"
spec.files = []

spec.add_dependency "dependabot-common", Dependabot::VERSION
# nub.lock is byte-compatible with pnpm-lock v9, so nub reuses npm_and_yarn's
# pnpm-format classes (aliased/subclassed) rather than re-cloning them.
spec.add_dependency "dependabot-npm_and_yarn", Dependabot::VERSION

common_gemspec.development_dependencies.each do |dep|
spec.add_development_dependency dep.name, *dep.requirement.as_list
end

next unless File.exist?("../.gitignore")

spec.files += `git -C #{__dir__} ls-files lib helpers -z`.split("\x0")
end
11 changes: 11 additions & 0 deletions nub/helpers/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": [
"prettier"
],
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": "latest"
}
}
29 changes: 29 additions & 0 deletions nub/helpers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Native JavaScript helpers
-------------------------

This directory contains helper functions for npm and yarn, natively written in
Javascript so that we can utilize the package managers internal APIs and other
native tooling for these ecosystems.

These helpers are called from the Ruby code via `run.js`, they are passed
arguments via stdin and return JSON data to stdout.

## Testing

When working on these helpers, it's convenient to write some high level tests in
JavaScript to make it easier to debug the code.

You can now run the tests from this directory by running:

```
yarn test path/to/test.js
```

### Debugging

In order to run an interactive debugger:

- `node --inspect-brk node_modules/.bin/jest --runInBand path/to/test/test.js`
- In Chrome, navigate to `chrome://inspect`
- Click `Open dedicated DevTools for Node`
- You'll now be able to interactively debug using the Chrome dev tools.
Loading
Loading