Skip to content

Commit fc62672

Browse files
committed
sort imports
1 parent 6006c3a commit fc62672

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

packages/nuxt/src/runtime/hooks/captureErrorHook.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import * as SentryNode from '@sentry/node';
2+
// eslint-disable-next-line import/no-extraneous-dependencies
23
import { H3Error } from 'h3';
3-
import { extractErrorContext, flushIfServerless } from '../utils';
44
import type { CapturedErrorContext } from 'nitropack';
5+
import { extractErrorContext, flushIfServerless } from '../utils';
56

67
/**
78
* Hook that can be added in a Nitro plugin. It captures an error and sends it to Sentry.

packages/nuxt/src/runtime/plugins/sentry-cloudflare.server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { wrapRequestHandler, setAsyncLocalStorageAsyncContextStrategy } from '@sentry/cloudflare';
2-
import type { NitroApp, NitroAppPlugin } from 'nitropack';
3-
import type { CloudflareOptions } from '@sentry/cloudflare';
41
import type { ExecutionContext } from '@cloudflare/workers-types';
2+
import type { CloudflareOptions } from '@sentry/cloudflare';
3+
import { setAsyncLocalStorageAsyncContextStrategy, wrapRequestHandler } from '@sentry/cloudflare';
4+
import type { NitroApp, NitroAppPlugin } from 'nitropack';
55
import type { NuxtRenderHTMLContext } from 'nuxt/app';
6-
import { addSentryTracingMetaTags } from '../utils';
76
import { sentryCaptureErrorHook } from '../hooks/captureErrorHook';
7+
import { addSentryTracingMetaTags } from '../utils';
88

99
interface CfEventType {
1010
protocol: string;

packages/nuxt/src/runtime/plugins/sentry.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { type EventHandler } from 'h3';
44
// eslint-disable-next-line import/no-extraneous-dependencies
55
import { defineNitroPlugin } from 'nitropack/runtime';
66
import type { NuxtRenderHTMLContext } from 'nuxt/app';
7-
import { addSentryTracingMetaTags, flushIfServerless } from '../utils';
87
import { sentryCaptureErrorHook } from '../hooks/captureErrorHook';
8+
import { addSentryTracingMetaTags, flushIfServerless } from '../utils';
99

1010
export default defineNitroPlugin(nitroApp => {
1111
nitroApp.h3App.handler = patchEventHandler(nitroApp.h3App.handler);

packages/nuxt/src/runtime/utils.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import type { ClientOptions, Context } from '@sentry/core';
2-
import { flush, GLOBAL_OBJ, logger, vercelWaitUntil } from '@sentry/core';
3-
import { captureException, getClient, getTraceMetaTags, logger } from '@sentry/core';
2+
import {
3+
captureException,
4+
flush,
5+
getClient,
6+
getTraceMetaTags,
7+
GLOBAL_OBJ,
8+
logger,
9+
vercelWaitUntil,
10+
} from '@sentry/core';
11+
import * as SentryNode from '@sentry/node';
412
import type { VueOptions } from '@sentry/vue/src/types';
513
import type { CapturedErrorContext } from 'nitropack';
614
import type { NuxtRenderHTMLContext } from 'nuxt/app';
715
import type { ComponentPublicInstance } from 'vue';
8-
import * as SentryNode from '@sentry/node';
916

1017
/**
1118
* Extracts the relevant context information from the error context (H3Event in Nitro Error)

0 commit comments

Comments
 (0)