Skip to content

Commit 474a5dc

Browse files
nicohrubecclaude
authored andcommitted
fix(bundler-plugin-tests): Normalize prerelease versions in telemetry snapshots
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 816a7a6 commit 474a5dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • dev-packages/bundler-plugin-integration-tests/fixtures

dev-packages/bundler-plugin-integration-tests/fixtures/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ export function readAllFiles(
8181
.replace(/"duration":[\d.]+/g, '"duration":DURATION')
8282
.replace(/"start_timestamp":[\d.]+/g, '"start_timestamp":START_TIMESTAMP')
8383
.replace(/"timestamp":[\d.]+/g, '"timestamp":TIMESTAMP')
84-
.replace(/"release":"[\d.]+"/g, '"release":"PLUGIN_VERSION"')
84+
.replace(/"release":"[\d.]+(?:-[\w.]+)?"/g, '"release":"PLUGIN_VERSION"')
8585
// Normalize the Sentry SDK version (from the bundled-out, now-external `@sentry/core`).
8686
// It tracks the live monorepo version and would otherwise rot this snapshot on every release.
87-
.replace(/"version":"[\d.]+"/g, '"version":"SDK_VERSION"')
87+
.replace(/"version":"[\d.]+(?:-[\w.]+)?"/g, '"version":"SDK_VERSION"')
8888
.replace(/"sample_rand":"\d.?\d*"/g, '"sample_rand":"SAMPLE_RAND"');
8989
} else {
9090
// Normalize Windows line endings for cross-platform snapshots

0 commit comments

Comments
 (0)