diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index 6f29942..140c25a 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -20,5 +20,6 @@ jobs: with: name: ${{ matrix.name }} path: ${{ matrix.path }} + pr-strategy: update secrets: api-token: ${{ secrets.CI_DEPLOY_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d09ee3a..2e4111a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - Transaction sampling ([#38](https://github.com/getsentry/sentry-powershell/pull/41)) +### Dependencies + +- Bump Dotnet SDK from v4.1.2 to v4.3.0 ([#44](https://github.com/getsentry/sentry-powershell/pull/44)) + - [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#430) + - [diff](https://github.com/getsentry/sentry-dotnet/compare/4.1.2...4.3.0) + ## 0.0.2 ### Various fixes & improvements diff --git a/dependencies/Sentry.properties b/dependencies/Sentry.properties index 7572731..14673a3 100644 --- a/dependencies/Sentry.properties +++ b/dependencies/Sentry.properties @@ -1,3 +1,3 @@ -version = 4.1.2 +version = 4.3.0 repo = https://github.com/getsentry/sentry-dotnet license = MIT diff --git a/modules/Sentry/public/Out-Sentry.ps1 b/modules/Sentry/public/Out-Sentry.ps1 index 0dc3e2b..c670fb8 100644 --- a/modules/Sentry/public/Out-Sentry.ps1 +++ b/modules/Sentry/public/Out-Sentry.ps1 @@ -101,7 +101,7 @@ function Out-Sentry return [Sentry.SentrySdk]::CaptureEvent($event_, [System.Action[Sentry.Scope]] { param([Sentry.Scope]$scope) - [Sentry.ScopeExtensions]::AddEventProcessor($scope, $processor) + $scope.AddEventProcessor($processor) # Execute the script block in the caller's scope (nothing to do $scope) & set the automatic $_ variable to the $scope object. $scope | ForEach-Object $EditScope diff --git a/modules/Sentry/public/Start-Sentry.ps1 b/modules/Sentry/public/Start-Sentry.ps1 index 6bb3149..e272dec 100644 --- a/modules/Sentry/public/Start-Sentry.ps1 +++ b/modules/Sentry/public/Start-Sentry.ps1 @@ -21,8 +21,8 @@ function Start-Sentry $options.ShutDownTimeout = $options.FlushTimeout $options.ReportAssembliesMode = [Sentry.ReportAssembliesMode]::None $options.IsGlobalModeEnabled = $true - [Sentry.sentryOptionsExtensions]::AddIntegration($options, [ScopeIntegration]::new()) - [Sentry.sentryOptionsExtensions]::AddEventProcessor($options, [EventUpdater]::new()) + $options.AddIntegration([ScopeIntegration]::new()) + $options.AddEventProcessor([EventUpdater]::new()) if ($DebugPreference -eq 'SilentlyContinue') { @@ -61,7 +61,7 @@ function Start-Sentry } # Workaround for https://github.com/getsentry/sentry-dotnet/issues/3141 - [Sentry.SentryOptionsExtensions]::DisableAppDomainProcessExitFlush($options) + $options.DisableAppDomainProcessExitFlush() } process { diff --git a/tests/init.tests.ps1 b/tests/init.tests.ps1 index a33a600..7f40233 100644 --- a/tests/init.tests.ps1 +++ b/tests/init.tests.ps1 @@ -41,7 +41,7 @@ Describe 'SentrySdk' { $testIntegration = [TestIntegration]::new() Start-Sentry { $_.Dsn = 'https://key@127.0.0.1/1' - [Sentry.sentryOptionsExtensions]::AddIntegration($_, $testIntegration) + $_.AddIntegration($testIntegration) } [Sentry.SentrySdk]::IsEnabled | Should -Be $true $testIntegration.Options | Should -BeOfType [Sentry.SentryOptions] diff --git a/tests/scope.tests.ps1 b/tests/scope.tests.ps1 index f4b797a..b8a59a7 100644 --- a/tests/scope.tests.ps1 +++ b/tests/scope.tests.ps1 @@ -15,9 +15,7 @@ Describe 'Edit-SentryScope' { } It 'adds a file attachment via global scope' { - Edit-SentryScope { - [Sentry.ScopeExtensions]::AddAttachment($_, $PSCommandPath) - } + Edit-SentryScope { $_.AddAttachment($PSCommandPath) } 'message' | Out-Sentry $transport.Envelopes.Count | Should -Be 1 [Sentry.Protocol.Envelopes.Envelope]$envelope = $transport.Envelopes.ToArray()[0] @@ -29,7 +27,7 @@ Describe 'Edit-SentryScope' { It 'adds a byte attachment via local scope' { 'message' | Out-Sentry -EditScope { [byte[]] $data = 1, 2, 3, 4, 5 - [Sentry.ScopeExtensions]::AddAttachment($_, $data, 'filename.bin') + $_.AddAttachment($data, 'filename.bin') } $transport.Envelopes.Count | Should -Be 1 [Sentry.Protocol.Envelopes.Envelope]$envelope = $transport.Envelopes.ToArray()[0]