Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 3 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x, 24.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- name: Checkout code
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ This should cause the adapter to crash and the exception to be shown in the sent
-->

## Changelog
### **WORK IN PROGRESS**
### __WORK IN PROGRESS__
- (@Apollon77) Update Sentry SDK to prevent issues in current Node.js versions
- (@GermanBluefox) Updated packages to latest versions

### 3.0.0 (2025-10-13)
Expand Down
24 changes: 14 additions & 10 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,22 @@ class SentryPlugin extends plugin_base_1.PluginBase {
dsn: pluginConfig.dsn,
integrations: [new SentryIntegrations.Dedupe()],
});
if (this.parentIoPackage?.common) {
this.Sentry.setTag('version', this.parentIoPackage.common.installedVersion || this.parentIoPackage.common.version);
const scope = this.Sentry.getCurrentScope();
if (this.parentIoPackage && this.parentIoPackage.common) {
scope.setTag('version', this.parentIoPackage.common.installedVersion || this.parentIoPackage.common.version);
if (this.parentIoPackage.common.installedFrom) {
this.Sentry.setTag('installedFrom', this.parentIoPackage.common.installedFrom);
scope.setTag('installedFrom', this.parentIoPackage.common.installedFrom);
}
else {
this.Sentry.setTag('installedFrom', this.parentIoPackage.common.installedVersion || this.parentIoPackage.common.version);
scope.setTag('installedFrom', this.parentIoPackage.common.installedVersion || this.parentIoPackage.common.version);
}
if (this.settings?.controllerVersion) {
this.Sentry.setTag('jsControllerVersion', this.settings.controllerVersion);
if (this.settings && this.settings.controllerVersion) {
scope.setTag('jsControllerVersion', this.settings.controllerVersion);
}
this.Sentry.setTag('osPlatform', process.platform);
this.Sentry.setTag('nodejsVersion', process.version);
scope.setTag('osPlatform', process.platform);
scope.setTag('nodejsVersion', process.version);
try {
// best effort may fail in the build folder
this.Sentry.setTag('plugin-sentry', require('./package.json').version);
scope.setTag('plugin-sentry', require('./package.json').version);
}
catch {
// ignore
Expand Down Expand Up @@ -209,6 +209,10 @@ class SentryPlugin extends plugin_base_1.PluginBase {
if (!whitelisted) {
return null;
}
return true;
});
if (!whitelisted) {
return null;
Comment on lines +212 to +215
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is duplicated logic in the compiled JavaScript file. Lines 212-216 duplicate the check for "whitelisted" that should be inside the frames.find() callback. This code appears to be unreachable and will cause incorrect behavior. The statements "return true;" on line 212 and the subsequent "if (!whitelisted)" check on lines 214-216 are outside the proper scope and will break the event processor logic.

Suggested change
return true;
});
if (!whitelisted) {
return null;

Copilot uses AI. Check for mistakes.
}
}
return event;
Expand Down
Loading
Loading