Skip to content
Merged
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: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module.exports = {
'types/**',
'scripts/*.js',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
reportUnusedDisableDirectives: true,
overrides: [
{
Expand All @@ -36,6 +39,9 @@ module.exports = {
parserOptions: {
project: ['tsconfig.test.json'],
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['scripts/**/*.ts'],
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
needs.job_get_metadata.outputs.changed_any_code == 'true' ||
needs.job_get_metadata.outputs.is_base_branch == 'true' ||
needs.job_get_metadata.outputs.is_release == 'true' ||
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false')
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false' && needs.job_get_metadata.outputs.changed_any_code == 'true')
steps:
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
uses: actions/checkout@v6
Expand Down Expand Up @@ -1144,15 +1144,6 @@ jobs:
retention-days: 7
if-no-files-found: ignore

- name: Deploy Astro to Cloudflare
uses: cloudflare/wrangler-action@v3
if: matrix.test-application == 'cloudflare-astro'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}
workingDirectory: ${{ runner.temp }}/test-application

job_required_jobs_passed:
name: All required jobs passed or were skipped
needs:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

## 10.32.1

- fix(cloudflare): Add hono transaction name when error is thrown ([#18529](https://github.com/getsentry/sentry-javascript/pull/18529))
- fix(ember): Make `implementation` field optional (`hash` routes) ([#18564](https://github.com/getsentry/sentry-javascript/pull/18564))
- fix(vercelai): Fix input token count ([#18574](https://github.com/getsentry/sentry-javascript/pull/18574))

<details>
<summary> <strong>Internal Changes</strong> </summary>

- chore(lint): prefer 'unknown' to 'any', fix lint warnings
- chore(test): Remove `cloudflare-astro` e2e test ([#18567](https://github.com/getsentry/sentry-javascript/pull/18567))

</details>

## 10.32.0

### Important Changes
Comment on lines +13 to 23

This comment was marked as outdated.

Expand Down
7 changes: 7 additions & 0 deletions dev-packages/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: ['../.eslintrc.js'],
rules: {
// tests often have just cause to do evil
'@typescript-eslint/no-explicit-any': 'off',
},
};
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
node: true,
},
// todo: remove regexp plugin from here once we add it to base.js eslint config for the whole project
extends: ['../../.eslintrc.js', 'plugin:regexp/recommended'],
extends: ['../.eslintrc.js', 'plugin:regexp/recommended'],
plugins: ['regexp'],
ignorePatterns: [
'suites/**/subject.js',
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/bundler-tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: ['../../.eslintrc.js'],
extends: ['../.eslintrc.js'],
parserOptions: {
sourceType: 'module',
},
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/clear-cache-gh-action/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
// todo: remove regexp plugin from here once we add it to base.js eslint config for the whole project
extends: ['../../.eslintrc.js', 'plugin:regexp/recommended'],
extends: ['../.eslintrc.js', 'plugin:regexp/recommended'],
plugins: ['regexp'],
parserOptions: {
sourceType: 'module',
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/cloudflare-integration-tests/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
node: true,
},
// todo: remove regexp plugin from here once we add it to base.js eslint config for the whole project
extends: ['../../.eslintrc.js', 'plugin:regexp/recommended'],
extends: ['../.eslintrc.js', 'plugin:regexp/recommended'],
plugins: ['regexp'],
overrides: [
{
Expand Down
3 changes: 2 additions & 1 deletion dev-packages/cloudflare-integration-tests/expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function expectedEvent(event: Event): Event {
});
}

export function eventEnvelope(event: Event): Envelope {
export function eventEnvelope(event: Event, includeSampleRand = false): Envelope {
return [
{
event_id: UUID_MATCHER,
Expand All @@ -69,6 +69,7 @@ export function eventEnvelope(event: Event): Envelope {
public_key: 'public',
trace_id: UUID_MATCHER,
sample_rate: expect.any(String),
...(includeSampleRand && { sample_rand: expect.stringMatching(/^[01](\.\d+)?$/) }),
sampled: expect.any(String),
transaction: expect.any(String),
},
Expand Down
3 changes: 2 additions & 1 deletion dev-packages/cloudflare-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"dependencies": {
"@langchain/langgraph": "^1.0.1",
"@sentry/cloudflare": "10.32.0"
"@sentry/cloudflare": "10.32.0",
"hono": "^4.0.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250922.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import * as Sentry from '@sentry/cloudflare';
import { Hono } from 'hono';

interface Env {
SENTRY_DSN: string;
}

const app = new Hono<{ Bindings: Env }>();

app.get('/', c => {
return c.text('Hello from Hono on Cloudflare!');
});

app.get('/json', c => {
return c.json({ message: 'Hello from Hono', framework: 'hono', platform: 'cloudflare' });
});

app.get('/error', () => {
throw new Error('Test error from Hono app');
});

app.get('/hello/:name', c => {
const name = c.req.param('name');
return c.text(`Hello, ${name}!`);
});

export default Sentry.withSentry(
(env: Env) => ({
dsn: env.SENTRY_DSN,
tracesSampleRate: 1.0,
}),
app,
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { expect, it } from 'vitest';
import { eventEnvelope } from '../../../expect';
import { createRunner } from '../../../runner';

it('Hono app captures errors', async ({ signal }) => {
const runner = createRunner(__dirname)
// First envelope: error event from Hono error handler
.expect(
eventEnvelope(
{
level: 'error',
transaction: 'GET /error',
exception: {
values: [
{
type: 'Error',
value: 'Test error from Hono app',
stacktrace: {
frames: expect.any(Array),
},
mechanism: { type: 'auto.faas.hono.error_handler', handled: false },
},
],
},
request: {
headers: expect.any(Object),
method: 'GET',
url: expect.any(String),
},
},
true,
),
)
// Second envelope: transaction event
.expect(envelope => {
const transactionEvent = envelope[1]?.[0]?.[1];
expect(transactionEvent).toEqual(
expect.objectContaining({
type: 'transaction',
transaction: 'GET /error',
contexts: expect.objectContaining({
trace: expect.objectContaining({
op: 'http.server',
status: 'internal_error',
}),
}),
}),
);
})
.start(signal);
await runner.makeRequest('get', '/error', { expectError: true });
await runner.completed();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "hono-basic-worker",
"compatibility_date": "2025-06-17",
"main": "index.ts",
"compatibility_flags": ["nodejs_compat"]
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { GoogleGenAIChat, GoogleGenAIClient, GoogleGenAIResponse } from '@s
export class MockGoogleGenAI implements GoogleGenAIClient {
public models: {
generateContent: (...args: unknown[]) => Promise<GoogleGenAIResponse>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
generateContentStream: (...args: unknown[]) => Promise<AsyncGenerator<GoogleGenAIResponse, any, unknown>>;
};
public chats: {
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
node: true,
},
// todo: remove regexp plugin from here once we add it to base.js eslint config for the whole project
extends: ['../../.eslintrc.js', 'plugin:regexp/recommended'],
extends: ['../.eslintrc.js', 'plugin:regexp/recommended'],
plugins: ['regexp'],
ignorePatterns: ['test-applications/**', 'tmp/**'],
parserOptions: {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading