Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
52fe589
Update implicit nuget dependencies
jmarolf Apr 20, 2023
ebb9581
Updated nuget.config to only have one package source url
jmarolf Apr 20, 2023
81d91e3
Add custom nuget updater tool
brettfo Nov 10, 2023
23fabaf
Run unit tests on built container
brettfo May 25, 2023
4896f97
Add Binding Redirects
jmarolf Jun 1, 2023
3145e62
Don't overwrite sdk ProjectReference version unless it's an exact match
brettfo Jun 2, 2023
8779840
Also look for proj files in repo folder
jmarolf Jun 7, 2023
a511c00
Do not create PRs in unsupported scenarios
jmarolf Jun 8, 2023
527f1e3
Add unit tests for `app.config`/`web.config` binding redirects.
brettfo Jun 15, 2023
bdd191d
NuGet: Adds the ability to update version properties
JoeRobich Jun 20, 2023
e03d634
NuGet: Add support for GlobalPackageVersion and VersionOverride
JoeRobich Jun 21, 2023
0bfa0f3
Reset repo files after run of NuGet updater
JoeRobich Jun 22, 2023
73bdd32
Update peer dependencies along with primary and only update if TFM is…
brettfo Jun 22, 2023
8921a83
Update NuGet FileFetcher to look for .proj files
JoeRobich Jun 29, 2023
7e82121
Include analyzer packages when calculating dependencies.
JoeRobich Jun 30, 2023
fdde9bd
Normalize updated content after running NuGetUpdater
JoeRobich Jul 6, 2023
41a1d42
Refactored NuGetUpdater code.
JoeRobich Jul 7, 2023
c2e7887
Fixed typo in moved code.
JoeRobich Jul 12, 2023
a45d5f5
Revert logic for file path
brbayes-msft Jul 12, 2023
c64abc8
Enhance update_checker to also return peer dependencies
JoeRobich Jul 19, 2023
15ae2bb
Make vulnerable transient NuGet packages top-level
JoeRobich Jul 20, 2023
a4c7364
Fix up_to_date check for transient dependency
JoeRobich Jul 20, 2023
a3e5428
Refactor NuGetUpdater CLI tool to better support sub-commands
JoeRobich Jul 24, 2023
7cfbe03
Update update_checker to only return compatible package versions
JoeRobich Jul 28, 2023
3b37b7a
Improve top-level dependency and tfm lookup
JoeRobich Jul 31, 2023
798ed6a
Always run the NuGet SdkUpdater.
JoeRobich Aug 2, 2023
87633f3
Update NuGet package compatibility check
JoeRobich Aug 4, 2023
dc98736
Fix path normalization
JoeRobich Aug 7, 2023
fdc346f
Handle additional azure url feed formats
JoeRobich Aug 8, 2023
f4298b2
Only update peer dependencies whose version is too low
JoeRobich Aug 8, 2023
1af8ae8
Adds test for adding a binding redirect. Fixes indentation issues
JoeRobich Aug 9, 2023
55b4e55
Update SdkUpdater to pin transitive dependencies when able.
JoeRobich Aug 14, 2023
11901b0
Remove platform version when parsing NuGetFramework from TFM
JoeRobich Aug 15, 2023
48f6d35
Fix package compatibility check
JoeRobich Aug 16, 2023
ce2fdfa
Improve compatibility check and add caching
JoeRobich Aug 23, 2023
217977f
Use include? instead of contains? when checking for substring
JoeRobich Sep 8, 2023
662fcd8
Fix NuGet.config resolution and copying when determining dependencies.
JoeRobich Sep 8, 2023
d3ca18a
Disable parsing global.json and dotnet-tools.json until updates are s…
JoeRobich Sep 8, 2023
464f367
Handle nil being returned for project reference path.
JoeRobich Sep 8, 2023
4038f90
Update vcr cassettes
JoeRobich Sep 11, 2023
acaa750
When fixing up BOM compare updated content with the original dependen…
JoeRobich Sep 23, 2023
da1e055
fix: use negative lookbehind for newline matching
JamieMagee Sep 26, 2023
f852b70
Support exact version match NuGet syntax
JoeRobich Sep 26, 2023
fa4f465
Fix issues where NuGet dependencies can't be found.
brettfo Sep 27, 2023
40dccba
use xpath to parse build files to allow for invalid msbuild xml
brettfo Sep 28, 2023
b63903b
Encapsulate build file logic into separate types.
JoeRobich Oct 2, 2023
24e7cc7
Add dotnet-tools.json and global.json support
JoeRobich Oct 4, 2023
2f92621
Use `msbuild /pp` to preprocess project files
brettfo Oct 6, 2023
e47e0c8
don't return duplicate files based on relative paths
brettfo Oct 9, 2023
7194acb
report specific error if submodule is not present
brettfo Oct 10, 2023
d33746d
Clean up commented ruby tests
ryanbrandenburg Oct 11, 2023
25da041
lock dependency to specific version
brettfo Oct 12, 2023
1985b1d
Allow non-building projects to be scanned
brettfo Oct 20, 2023
c071646
Fix path computation of projects from solution files
brettfo Oct 25, 2023
e26a267
Dedup all files based on their absolute path
brettfo Oct 26, 2023
2a4259a
Update existing pinned package version
brettfo Oct 31, 2023
250c98a
Use exact version matching when calculating package dependencies
brettfo Nov 6, 2023
c70c24e
Retain comments when updating JSON build files
brettfo Nov 7, 2023
edc5c57
Fix edge cases in json comment retainer
brettfo Nov 7, 2023
0dd3b8a
Embed all resources in all NuGet projects
brettfo Nov 8, 2023
4c2f995
Use `NuGetVersion` instead of `SemanticVersion` to allow 4-part versi…
brettfo Nov 8, 2023
55b64ef
Remove unused requires
deivid-rodriguez Nov 17, 2023
ff82a3e
Remove VCR from UpdateChecker::VersionFinder specs
deivid-rodriguez Nov 13, 2023
3025ae3
Make spec file runnable in isolation
deivid-rodriguez Nov 14, 2023
a83d43f
Remove VCR from UpdateChecker specs
deivid-rodriguez Nov 14, 2023
a6d2448
Remove VCR from FileParser specs
deivid-rodriguez Nov 14, 2023
a81792b
bin/tapioca gem
deivid-rodriguez Nov 14, 2023
b9f33a3
Remove VCR from FileParser::ProjectFileParser specs
deivid-rodriguez Nov 14, 2023
1cf84db
Remove VCR from TfmFinder specs
deivid-rodriguez Nov 14, 2023
4f17949
Move vcr tag to the spec using it
deivid-rodriguez Nov 14, 2023
b9c764d
Remove file fetcher edge case
deivid-rodriguez Nov 15, 2023
2a1594a
Prefer `.each` to `.map` since return value is ignored
deivid-rodriguez Nov 15, 2023
701e69d
Fix duplicated files issues when using dry-run from macOS
deivid-rodriguez Nov 15, 2023
2bdb0e3
remove contribution line from README
brettfo Nov 15, 2023
51439a3
Install native helpers as dependabot user
deivid-rodriguez Nov 17, 2023
9e52a39
Also mount nuget helpers in dev image
deivid-rodriguez Nov 17, 2023
c2fdf1e
Cleanup native helpers path
deivid-rodriguez Nov 17, 2023
1c93d46
Install dotnet to a more standard location
deivid-rodriguez Nov 17, 2023
38f006c
Move native helper built tool inside /opt/nuget
deivid-rodriguez Nov 17, 2023
23e8e3d
Allow nuget/helpers/build to also install native helpers
deivid-rodriguez Nov 17, 2023
34562a7
Don't make tmp world-writable
deivid-rodriguez Nov 17, 2023
1e1ca56
Introduce final new lines and remove BOMs
deivid-rodriguez Nov 17, 2023
870910b
Add a new smoke test for nuget
deivid-rodriguez Nov 17, 2023
ebb50cb
include build-only packages in dependency list
brettfo Nov 21, 2023
57c0f85
improve property handling around the `Condition` attribute
brettfo Nov 22, 2023
38d5044
report specific error if no changes were made
brettfo Nov 22, 2023
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
6 changes: 6 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ tar xzvf ./*.tar.gz >/dev/null 2>&1
sudo mv dependabot /usr/local/bin
rm ./*.tar.gz

# The image comes loaded with 8.0 preview SDK, but we need a stable 7.0 runtime for running tests
sudo wget https://dot.net/v1/dotnet-install.sh
sudo chmod +x dotnet-install.sh
sudo ./dotnet-install.sh -c 7.0 --runtime dotnet --install-dir /usr/local/dotnet/current
sudo rm ./dotnet-install.sh

echo "export LOCAL_GITHUB_ACCESS_TOKEN=$GITHUB_TOKEN" >> ~/.bashrc
7 changes: 7 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- { path: npm_and_yarn, name: yarn-berry, ecosystem: npm }
- { path: npm_and_yarn, name: yarn-berry-workspaces, ecosystem: npm }
- { path: nuget, name: nuget, ecosystem: nuget }
- { path: nuget, name: nuget-resolvability, ecosystem: nuget }
- { path: pub, name: pub, ecosystem: pub }
- { path: python, name: pip, ecosystem: pip }
- { path: python, name: pipenv, ecosystem: pip }
Expand Down Expand Up @@ -198,6 +199,12 @@ jobs:
- 'common/**'
- 'updater/**'
- 'nuget/**'
'nuget-resolvability':
- .github/workflows/smoke.yml
- .dockerignore
- Dockerfile.updater-core
- 'common/**'
- 'updater/**'
pip:
- .github/workflows/smoke.yml
- .dockerignore
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "nuget/helpers/lib/NuGet.Client"]
path = nuget/helpers/lib/NuGet.Client
url = https://github.com/NuGet/NuGet.Client
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
},
"jest.pathToJest": "${workspaceFolder}/npm_and_yarn/helpers/node_modules/.bin/jest",
"jest.pathToConfig": "${workspaceFolder}/npm_and_yarn/helpers/jest.config.js",
"sorbet.enabled": true
"sorbet.enabled": true,
"dotnet.defaultSolution": "nuget/helpers/lib/NuGetUpdater/NuGetUpdater.sln"
}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,6 @@ the following:
company's offering then we DO NOT give you permission to use Dependabot-Core
to do so.

All contributions to Dependabot Core implicitly transfer the IP of that contribution to
GitHub, Inc. where it will be licensed the same way as above.

## History

Dependabot and Dependabot-Core started life as [Bump](https://github.com/gocardless/bump) and
Expand Down
1 change: 1 addition & 0 deletions bin/docker-dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ docker run --rm -ti \
-v "$(pwd)/nuget/.rubocop.yml:$CODE_DIR/nuget/.rubocop.yml" \
-v "$(pwd)/nuget/Gemfile:$CODE_DIR/nuget/Gemfile" \
-v "$(pwd)/nuget/dependabot-nuget.gemspec:$CODE_DIR/nuget/dependabot-nuget.gemspec" \
-v "$(pwd)/nuget/helpers:$CODE_DIR/nuget/helpers" \
-v "$(pwd)/nuget/lib:$CODE_DIR/nuget/lib" \
-v "$(pwd)/nuget/script:$CODE_DIR/nuget/script" \
-v "$(pwd)/nuget/spec:$CODE_DIR/nuget/spec" \
Expand Down
30 changes: 30 additions & 0 deletions nuget/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
FROM ghcr.io/dependabot/dependabot-updater-core

USER root

ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt"

# Install .NET SDK dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libicu-dev=70.1-2 \
&& rm -rf /var/lib/apt/lists/*

# Install .NET SDK
ARG DOTNET_SDK_VERSION=7.0.305
ARG DOTNET_SDK_INSTALL_URL=https://dot.net/v1/dotnet-install.sh
ENV DOTNET_INSTALL_DIR=/usr/local/dotnet/current
ENV DOTNET_NOLOGO=true
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
ENV NUGET_SCRATCH=/opt/nuget/helpers/tmp

RUN cd /tmp \
&& curl --location --output dotnet-install.sh "${DOTNET_SDK_INSTALL_URL}" \
&& chmod +x dotnet-install.sh \
&& mkdir -p "${DOTNET_INSTALL_DIR}" \
&& ./dotnet-install.sh --version "${DOTNET_SDK_VERSION}" --install-dir "${DOTNET_INSTALL_DIR}" \
&& rm dotnet-install.sh

ENV PATH="${PATH}:${DOTNET_INSTALL_DIR}"
RUN dotnet --list-sdks

USER dependabot
COPY --chown=dependabot:dependabot nuget/helpers /opt/nuget/helpers
RUN bash /opt/nuget/helpers/build

COPY --chown=dependabot:dependabot nuget $DEPENDABOT_HOME/nuget
COPY --chown=dependabot:dependabot common $DEPENDABOT_HOME/common
Expand Down
1 change: 1 addition & 0 deletions nuget/dependabot-nuget.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
spec.files = Dir["lib/**/*"]

spec.add_dependency "dependabot-common", Dependabot::VERSION
spec.add_dependency "rubyzip", ">= 2.3.2", "< 3.0"

common_gemspec.development_dependencies.each do |dep|
spec.add_development_dependency dep.name, *dep.requirement.as_list
Expand Down
40 changes: 40 additions & 0 deletions nuget/helpers/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -e

if [ -z "$DEPENDABOT_NATIVE_HELPERS_PATH" ]; then
echo "Unable to build, DEPENDABOT_NATIVE_HELPERS_PATH is not set"
exit 1
fi

helpers_dir=$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)

if [ ! -f "$helpers_dir/lib/NuGet.Client/NuGet.sln" ]; then
echo "NuGet.sln not found; please run 'git submodule update --init --recursive' and try again"
exit 1
fi

install_dir="$DEPENDABOT_NATIVE_HELPERS_PATH/nuget"
mkdir -p "$install_dir"

cp -r \
"$helpers_dir/lib" \
"$install_dir"

os="$(uname -s | tr '[:upper:]' '[:lower:]')"
arch=$(dpkg --print-architecture)
if [ "$arch" = "amd64" ]; then
arch="x64"
fi

echo "building NuGetUpdater tool"
cd "$install_dir/lib/NuGetUpdater/NuGetUpdater.Cli"
dotnet publish \
--configuration Release \
--output "$install_dir/NuGetUpdater" \
--framework net7.0 \
--runtime "$os-$arch"
dotnet clean

echo "verifying NuGetUpdater tool"
"$install_dir/NuGetUpdater/NuGetUpdater.Cli" --version
1 change: 1 addition & 0 deletions nuget/helpers/lib/NuGet.Client
Submodule NuGet.Client added at b46f5f
Loading