Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
26587a7
feat: source-generated regexes, Native AOT, faster detection and real…
BenjaminAbt Nov 22, 2026
a66cd2c
ci: skip PR validation for draft pull requests
BenjaminAbt Nov 22, 2026
ce8d5dd
feat(aspnetcore): offer an IHttpContextAccessor based accessor next t…
BenjaminAbt Nov 22, 2026
ad85cdb
fix: address review findings for 4.0
BenjaminAbt Nov 22, 2026
b11d004
fix: browser version search, meter switching and MemoryCache keys
BenjaminAbt Nov 22, 2026
9138a20
fix: token boundaries, linear version search, cache size and own meters
BenjaminAbt Nov 22, 2026
bce7be3
fix: findings of independent parser, telemetry and provider reviews
BenjaminAbt Nov 22, 2026
eeaf4f5
fix: reserve cache meters for their lifetime, dispose replaced own me…
BenjaminAbt Nov 22, 2026
2163645
fix: run no listener code under the meter registration lock
BenjaminAbt Nov 22, 2026
f8cedd4
feat!: robots API instead of a mutable public array
BenjaminAbt Nov 22, 2026
4964bfe
refactor(parser): update robot rules handling and telemetry
BenjaminAbt Nov 23, 2026
1126fed
refactor(tests): remove unused telemetry test listeners
BenjaminAbt Nov 23, 2026
5b604cc
test(user-agent-parser): add tests for robot key order and user agents
BenjaminAbt Nov 23, 2026
1fc5d9c
refactor(telemetry): clarify null parameter usage
BenjaminAbt Nov 23, 2026
f5cc9e0
perf: benchmark the captured user-agent corpus and document results
BenjaminAbt Nov 23, 2026
5691833
perf: match the first crawler before decoding the header
BenjaminAbt Nov 23, 2026
f54e5b2
perf: share rule filtering across user-agent detectors
BenjaminAbt Nov 23, 2026
bf01ad2
docs: refresh README benchmarks and chart library timings
BenjaminAbt Nov 23, 2026
549b458
chore: update dependencies for security improvements
BenjaminAbt Nov 24, 2026
389a5c9
chore(package): update NuGet package icon and path
BenjaminAbt Nov 24, 2026
dd7d95e
feat(docs): add library comparison chart for .NET 11
BenjaminAbt Nov 24, 2026
05ef3b0
feat: add feedback
BenjaminAbt Nov 24, 2026
876111f
refactor(telemetry): clean up telemetry comments and structure
BenjaminAbt Nov 24, 2026
bfde3bf
docs(parser): add comments on stack depth and buffer size
BenjaminAbt Nov 24, 2026
ecbef25
perf(parser): optimize header parsing performance and memory usage
BenjaminAbt Nov 24, 2026
28ae2c5
feat(docs): add README files for core and memory cache packages
BenjaminAbt Nov 24, 2026
4821699
chore: rename README.md to readme.md for consistency
BenjaminAbt Nov 24, 2026
9bdd0c8
chore(package): pack a 128 px icon instead of the 512 px logo
BenjaminAbt Nov 25, 2026
7a0f308
chore(package): use single-word NuGet tags
BenjaminAbt Nov 25, 2026
58d7bd6
perf(parser): optimize memory usage in user agent parsing
BenjaminAbt Nov 25, 2026
a9e2c9f
feat(parser): add null checks for user agent methods
BenjaminAbt Nov 26, 2026
8619838
perf(parser): add 128-bit rule index, span overloads, and per-request…
BenjaminAbt Nov 26, 2026
e803502
feat(parser): add equality operators to HttpUserAgentInformation and …
BenjaminAbt Nov 26, 2026
355a44d
chore(build): enable package validation, deterministic CI builds, and…
BenjaminAbt Nov 26, 2026
407bc2f
feat(parser): add IsUnknown, ToString, Macintosh fallback, and modern…
BenjaminAbt Nov 26, 2026
092f4fe
docs: update README and add 2026-11-26 benchmark results
BenjaminAbt Nov 26, 2026
f44e877
docs: update library comparison SVGs, root README, and package READMEs
BenjaminAbt Nov 26, 2026
4aa93c9
docs: scale left Y-axis to 12 ms in library comparison SVGs to avoid …
BenjaminAbt Nov 26, 2026
fbf63f5
chore(sln): remove unused Visual Studio solution file
BenjaminAbt Nov 26, 2026
27c5f23
feat(ci): enhance CI workflows and add package validation
BenjaminAbt Nov 26, 2026
af2ff6c
feat(tests): update test configurations and commands for coverage
BenjaminAbt Nov 26, 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
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Use these commands consistently:
`dotnet build --nologo`

- Test (all):
`dotnet test --nologo`
`dotnet test --no-logo`

- Test (single project):
`dotnet test <path-to-csproj> --nologo`
`dotnet test --project <path-to-csproj> --no-logo`

---

Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
# The workflows pin actions to commit SHAs; Dependabot updates the SHAs and their version comments
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
github-actions:
patterns:
- "*"
commit-message:
prefix: "chore(ci)"
68 changes: 34 additions & 34 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,38 @@ tag-template: 'v$RESOLVED_VERSION'
# Categories for organizing release notes
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
when:
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
- 'fix'
when:
labels:
- 'bug'
- 'fix'
- title: '🔧 Maintenance'
labels:
- 'maintenance'
- 'chore'
- 'refactor'
- 'dependencies'
when:
labels:
- 'maintenance'
- 'chore'
- 'refactor'
- 'dependencies'
- title: '📚 Documentation'
labels:
- 'documentation'
- 'docs'
when:
labels:
- 'documentation'
- 'docs'
- title: '⚡ Performance'
labels:
- 'performance'
when:
labels:
- 'performance'
- title: '🔒 Security'
labels:
- 'security'

# Exclude certain labels from release notes
exclude-labels:
- 'skip-changelog'
- 'wip'
when:
labels:
- 'security'
- type: pre-exclude
when:
labels: ['skip-changelog', 'wip']

# Change template (how each PR is listed)
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
Expand Down Expand Up @@ -72,39 +76,35 @@ template: |

# Automatically label PRs based on modified files
autolabeler:
- label: 'documentation'
- labels: ['documentation']
files:
- '*.md'
- 'docs/**/*'
- label: 'bug'
- labels: ['bug']
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'feature'
- labels: ['feature']
branch:
- '/feature\/.+/'
title:
- '/feature/i'
- label: 'dependencies'
- labels: ['dependencies']
files:
- '**/packages.lock.json'
- '**/*.csproj'
- 'Directory.Packages.props'
- 'Directory.Build.props'
- label: 'github-actions'
- labels: ['github-actions']
files:
- '.github/workflows/**/*'
- label: 'tests'
- labels: ['tests']
files:
- 'tests/**/*'
- '**/*Tests.cs'
- '**/*Test.cs'
- label: 'performance'
- labels: ['performance']
files:
- 'perf/**/*'
- '**/*Benchmark*.cs'

# Version resolver (uses version from workflow input)
version-resolver:
default: patch
101 changes: 84 additions & 17 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
required: false
type: boolean
default: false
create-pack:
description: 'Whether to pack NuGet packages'
upload-packages:
description: 'Whether to upload the NuGet packages as artifacts'
required: false
type: boolean
default: false
Expand All @@ -23,21 +23,25 @@ on:
description: 'The calculated version from NBGV'
value: ${{ jobs.build.outputs.version }}

# Actions are pinned to commit SHAs; Dependabot keeps them up to date.
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
CONFIGURATION: ${{ inputs.configuration }}
outputs:
version: ${{ steps.nbgv.outputs.SemVer2 }}

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # Required for GitVersion
fetch-depth: 0 # Required for NBGV
persist-credentials: false

- name: Setup .NET
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: |
8.0.x
Expand All @@ -47,39 +51,102 @@ jobs:
global-json-file: ./global.json

- name: Calculate Version with NBGV
uses: dotnet/nbgv@master
uses: dotnet/nbgv@705dad19ab067f12f4e9eeaa60812e01edef5d25 # v0.5.2
id: nbgv
with:
setAllVars: true

- name: Version Info
# Latest nuget.org release of the major version in version.json; none for a new major version.
# Set for all following steps: the restore downloads the baseline package, the pack validates against it.
- name: Determine package validation baseline
shell: pwsh
run: |
echo "Calculated version: ${{ steps.nbgv.outputs.SemVer2 }}"
$baseline = ./eng/Get-PackageValidationBaseline.ps1
if ($baseline) {
"PackageValidationBaselineVersion=$baseline" >> $env:GITHUB_ENV
Write-Output "Package validation baseline: $baseline"
}
else {
Write-Output "No package validation baseline: the major version has no release yet"
}

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration ${{ inputs.configuration }} --no-restore /p:Version=${{ steps.nbgv.outputs.SemVer2 }}
env:
PACKAGE_VERSION: ${{ steps.nbgv.outputs.SemVer2 }}
run: dotnet build --configuration "$CONFIGURATION" --no-restore "-p:Version=$PACKAGE_VERSION"

- name: Test
run: dotnet test --configuration ${{ inputs.configuration }} --no-build --verbosity normal --logger "trx;LogFilePrefix=test-results"
run: dotnet test --configuration "$CONFIGURATION" --no-build --output Normal --report-trx --coverlet --results-directory ./TestResults --results-directory-layout per-module

- name: Upload test results
if: always() && inputs.upload-test-results
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-results
path: '**/TestResults/**/*.trx'
path: |
TestResults/**/*.trx
TestResults/**/coverage.cobertura.*.xml

# Always packs to validate the packages (breaking changes against the baseline); also creates the .snupkg symbol packages
- name: Pack NuGet packages
if: inputs.create-pack
run: dotnet pack --configuration ${{ inputs.configuration }} --no-build --output ./artifacts /p:PackageVersion=${{ steps.nbgv.outputs.SemVer2 }}
env:
PACKAGE_VERSION: ${{ steps.nbgv.outputs.SemVer2 }}
run: dotnet pack --configuration "$CONFIGURATION" --no-build --output ./artifacts "-p:PackageVersion=$PACKAGE_VERSION"

- name: Upload NuGet packages
if: inputs.create-pack
uses: actions/upload-artifact@v6
if: inputs.upload-packages
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: nuget-packages
path: ./artifacts/*.nupkg
path: |
./artifacts/*.nupkg
./artifacts/*.snupkg
if-no-files-found: error
retention-days: 30

native-aot:
name: Native AOT (${{ matrix.os }}, ${{ matrix.framework }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
framework: [net8.0, net9.0, net10.0, net11.0]
include:
- os: ubuntu-latest
rid: linux-x64
extension: ''
- os: windows-latest
rid: win-x64
extension: '.exe'

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
11.0.x
global-json-file: ./global.json

- name: Install Native AOT prerequisites
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y clang zlib1g-dev

# The libraries are rooted completely: every trimming or AOT warning fails the publish.
- name: Publish smoke test with Native AOT
run: dotnet publish tests/HttpUserAgentParser.NativeAot.Smoke --configuration Release --framework ${{ matrix.framework }} --runtime ${{ matrix.rid }} --output ./artifacts/aot

- name: Run smoke test
run: ./artifacts/aot/MyCSharp.HttpUserAgentParser.NativeAot.Smoke${{ matrix.extension }}
Loading