Skip to content

Commit 7eb442f

Browse files
committed
Use .ts extensions instead of .js
See microsoft/TypeScript#59767
1 parent bc40226 commit 7eb442f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+218
-216
lines changed

packages/inngest/src/api/api.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { type fetch } from "cross-fetch";
2-
import { type ExecutionVersion } from "../components/execution/InngestExecution.js";
2+
import { type ExecutionVersion } from "../components/execution/InngestExecution.ts";
33
import {
44
defaultDevServerHost,
55
defaultInngestApiBaseUrl,
6-
} from "../helpers/consts.js";
7-
import { devServerAvailable } from "../helpers/devserver.js";
8-
import { type Mode } from "../helpers/env.js";
9-
import { getErrorMessage } from "../helpers/errors.js";
10-
import { fetchWithAuthFallback } from "../helpers/net.js";
11-
import { hashSigningKey } from "../helpers/strings.js";
12-
import { err, ok, type Result } from "../types.js";
6+
} from "../helpers/consts.ts";
7+
import { devServerAvailable } from "../helpers/devserver.ts";
8+
import { type Mode } from "../helpers/env.ts";
9+
import { getErrorMessage } from "../helpers/errors.ts";
10+
import { fetchWithAuthFallback } from "../helpers/net.ts";
11+
import { hashSigningKey } from "../helpers/strings.ts";
12+
import { err, ok, type Result } from "../types.ts";
1313
import {
1414
batchSchema,
1515
errorSchema,
1616
stepsSchemas,
1717
type BatchResponse,
1818
type ErrorResponse,
1919
type StepsResponse,
20-
} from "./schema.js";
20+
} from "./schema.ts";
2121

2222
type FetchT = typeof fetch;
2323

packages/inngest/src/api/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { z } from "zod";
2-
import { ExecutionVersion } from "../components/execution/InngestExecution.js";
3-
import { jsonErrorSchema, type EventPayload } from "../types.js";
2+
import { ExecutionVersion } from "../components/execution/InngestExecution.ts";
3+
import { jsonErrorSchema, type EventPayload } from "../types.ts";
44

55
export const errorSchema = z.object({
66
error: z.string(),

packages/inngest/src/astro.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import {
1717
InngestCommHandler,
1818
type ServeHandlerOptions,
19-
} from "./components/InngestCommHandler.js";
20-
import { type SupportedFrameworkName } from "./types.js";
19+
} from "./components/InngestCommHandler.ts";
20+
import { type SupportedFrameworkName } from "./types.ts";
2121

2222
/**
2323
* The name of the framework, used to identify the framework in Inngest

packages/inngest/src/bun.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
import {
2828
type InternalServeHandlerOptions,
2929
type ServeHandlerOptions,
30-
} from "./components/InngestCommHandler.js";
31-
import { serve as serveEdge } from "./edge.js";
32-
import { type SupportedFrameworkName } from "./types.js";
30+
} from "./components/InngestCommHandler.ts";
31+
import { serve as serveEdge } from "./edge.ts";
32+
import { type SupportedFrameworkName } from "./types.ts";
3333

3434
/**
3535
* The name of the framework, used to identify the framework in Inngest

packages/inngest/src/cloudflare.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
import {
3636
InngestCommHandler,
3737
type ServeHandlerOptions,
38-
} from "./components/InngestCommHandler.js";
39-
import { type Either } from "./helpers/types.js";
40-
import { type SupportedFrameworkName } from "./types.js";
38+
} from "./components/InngestCommHandler.ts";
39+
import { type Either } from "./helpers/types.ts";
40+
import { type SupportedFrameworkName } from "./types.ts";
4141

4242
/**
4343
* The name of the framework, used to identify the framework in Inngest

packages/inngest/src/components/EventSchemas.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { type internalEvents } from "../helpers/consts.js";
1+
import { type internalEvents } from "../helpers/consts.ts";
22
import {
33
type IsEmptyObject,
44
type IsStringLiteral,
55
type Simplify,
6-
} from "../helpers/types.js";
7-
import type * as z from "../helpers/validators/zod.js";
6+
} from "../helpers/types.ts";
7+
import type * as z from "../helpers/validators/zod.ts";
88
import {
99
type EventPayload,
1010
type FailureEventPayload,
1111
type FinishedEventPayload,
1212
type InvokedEventPayload,
1313
type ScheduledTimerEventPayload,
14-
} from "../types.js";
14+
} from "../types.ts";
1515

1616
/**
1717
* Declares the shape of an event schema we expect from the user. This may be

packages/inngest/src/components/Inngest.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InngestApi } from "../api/api.js";
1+
import { InngestApi } from "../api/api.ts";
22
import {
33
defaultDevServerHost,
44
defaultInngestApiBaseUrl,
@@ -7,32 +7,32 @@ import {
77
envKeys,
88
headerKeys,
99
logPrefix,
10-
} from "../helpers/consts.js";
11-
import { devServerAvailable, devServerUrl } from "../helpers/devserver.js";
10+
} from "../helpers/consts.ts";
11+
import { devServerAvailable, devServerUrl } from "../helpers/devserver.ts";
1212
import {
1313
allProcessEnv,
1414
getFetch,
1515
getMode,
1616
inngestHeaders,
1717
processEnv,
1818
type Mode,
19-
} from "../helpers/env.js";
20-
import { fixEventKeyMissingSteps, prettyError } from "../helpers/errors.js";
21-
import { type Jsonify } from "../helpers/jsonify.js";
22-
import { stringify } from "../helpers/strings.js";
19+
} from "../helpers/env.ts";
20+
import { fixEventKeyMissingSteps, prettyError } from "../helpers/errors.ts";
21+
import { type Jsonify } from "../helpers/jsonify.ts";
22+
import { stringify } from "../helpers/strings.ts";
2323
import {
2424
type AsArray,
2525
type IsNever,
2626
type SendEventPayload,
2727
type SimplifyDeep,
2828
type SingleOrArray,
2929
type WithoutInternal,
30-
} from "../helpers/types.js";
30+
} from "../helpers/types.ts";
3131
import {
3232
DefaultLogger,
3333
ProxyLogger,
3434
type Logger,
35-
} from "../middleware/logger.js";
35+
} from "../middleware/logger.ts";
3636
import {
3737
sendEventResponseSchema,
3838
type ClientOptions,
@@ -44,10 +44,10 @@ import {
4444
type SendEventOutput,
4545
type SendEventResponse,
4646
type TriggersFromClient,
47-
} from "../types.js";
48-
import { type EventSchemas } from "./EventSchemas.js";
49-
import { InngestFunction } from "./InngestFunction.js";
50-
import { type InngestFunctionReference } from "./InngestFunctionReference.js";
47+
} from "../types.ts";
48+
import { type EventSchemas } from "./EventSchemas.ts";
49+
import { InngestFunction } from "./InngestFunction.ts";
50+
import { type InngestFunctionReference } from "./InngestFunctionReference.ts";
5151
import {
5252
InngestMiddleware,
5353
getHookStack,
@@ -56,7 +56,7 @@ import {
5656
type MiddlewareRegisterFn,
5757
type MiddlewareRegisterReturn,
5858
type SendEventHookStack,
59-
} from "./InngestMiddleware.js";
59+
} from "./InngestMiddleware.ts";
6060

6161
/**
6262
* Capturing the global type of fetch so that we can reliably access it below.

packages/inngest/src/components/InngestCommHandler.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import debug from "debug";
22
import { z } from "zod";
3-
import { ServerTiming } from "../helpers/ServerTiming.js";
3+
import { ServerTiming } from "../helpers/ServerTiming.ts";
44
import {
55
debugPrefix,
66
defaultInngestApiBaseUrl,
@@ -12,9 +12,9 @@ import {
1212
probe as probeEnum,
1313
queryKeys,
1414
syncKind,
15-
} from "../helpers/consts.js";
16-
import { devServerAvailable, devServerUrl } from "../helpers/devserver.js";
17-
import { enumFromValue } from "../helpers/enum.js";
15+
} from "../helpers/consts.ts";
16+
import { devServerAvailable, devServerUrl } from "../helpers/devserver.ts";
17+
import { enumFromValue } from "../helpers/enum.ts";
1818
import {
1919
allProcessEnv,
2020
devServerHost,
@@ -26,19 +26,19 @@ import {
2626
parseAsBoolean,
2727
platformSupportsStreaming,
2828
type Env,
29-
} from "../helpers/env.js";
30-
import { rethrowError, serializeError } from "../helpers/errors.js";
29+
} from "../helpers/env.ts";
30+
import { rethrowError, serializeError } from "../helpers/errors.ts";
3131
import {
3232
fetchAllFnData,
3333
parseFnData,
3434
undefinedToNull,
3535
type FnData,
36-
} from "../helpers/functions.js";
37-
import { fetchWithAuthFallback, signDataWithKey } from "../helpers/net.js";
38-
import { runAsPromise } from "../helpers/promises.js";
39-
import { createStream } from "../helpers/stream.js";
40-
import { hashEventKey, hashSigningKey, stringify } from "../helpers/strings.js";
41-
import { type MaybePromise } from "../helpers/types.js";
36+
} from "../helpers/functions.ts";
37+
import { fetchWithAuthFallback, signDataWithKey } from "../helpers/net.ts";
38+
import { runAsPromise } from "../helpers/promises.ts";
39+
import { createStream } from "../helpers/stream.ts";
40+
import { hashEventKey, hashSigningKey, stringify } from "../helpers/strings.ts";
41+
import { type MaybePromise } from "../helpers/types.ts";
4242
import {
4343
functionConfigSchema,
4444
inBandSyncRequestBodySchema,
@@ -53,21 +53,21 @@ import {
5353
type RegisterRequest,
5454
type SupportedFrameworkName,
5555
type UnauthenticatedIntrospection,
56-
} from "../types.js";
57-
import { version } from "../version.js";
58-
import { type Inngest } from "./Inngest.js";
56+
} from "../types.ts";
57+
import { version } from "../version.ts";
58+
import { type Inngest } from "./Inngest.ts";
5959
import {
6060
type CreateExecutionOptions,
6161
type InngestFunction,
62-
} from "./InngestFunction.js";
62+
} from "./InngestFunction.ts";
6363
import {
6464
ExecutionVersion,
6565
PREFERRED_EXECUTION_VERSION,
6666
type ExecutionResult,
6767
type ExecutionResultHandler,
6868
type ExecutionResultHandlers,
6969
type InngestExecutionOptions,
70-
} from "./execution/InngestExecution.js";
70+
} from "./execution/InngestExecution.ts";
7171

7272
/**
7373
* A set of options that can be passed to a serve handler, intended to be used

packages/inngest/src/components/InngestFunction.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { internalEvents, queryKeys } from "../helpers/consts.js";
2-
import { timeStr } from "../helpers/strings.js";
3-
import { type RecursiveTuple, type StrictUnion } from "../helpers/types.js";
1+
import { internalEvents, queryKeys } from "../helpers/consts.ts";
2+
import { timeStr } from "../helpers/strings.ts";
3+
import { type RecursiveTuple, type StrictUnion } from "../helpers/types.ts";
44
import {
55
type Cancellation,
66
type ConcurrencyOption,
@@ -9,19 +9,19 @@ import {
99
type TimeStr,
1010
type TimeStrBatch,
1111
type TriggersFromClient,
12-
} from "../types.js";
13-
import { type GetEvents, type Inngest } from "./Inngest.js";
12+
} from "../types.ts";
13+
import { type GetEvents, type Inngest } from "./Inngest.ts";
1414
import {
1515
type InngestMiddleware,
1616
type MiddlewareRegisterReturn,
17-
} from "./InngestMiddleware.js";
17+
} from "./InngestMiddleware.ts";
1818
import {
1919
ExecutionVersion,
2020
type IInngestExecution,
2121
type InngestExecutionOptions,
22-
} from "./execution/InngestExecution.js";
23-
import { createV0InngestExecution } from "./execution/v0.js";
24-
import { createV1InngestExecution } from "./execution/v1.js";
22+
} from "./execution/InngestExecution.ts";
23+
import { createV0InngestExecution } from "./execution/v0.ts";
24+
import { createV1InngestExecution } from "./execution/v1.ts";
2525

2626
/**
2727
* A stateless Inngest function, wrapping up function configuration and any

packages/inngest/src/components/InngestFunctionReference.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { type IsAny, type Simplify } from "../helpers/types.js";
1+
import { type IsAny, type Simplify } from "../helpers/types.ts";
22
import {
33
type ResolveSchema,
44
type ValidSchemaInput,
55
type ValidSchemaOutput,
6-
} from "../helpers/validators/index.js";
6+
} from "../helpers/validators/index.ts";
77
import {
88
type MinimalEventPayload,
99
type PayloadForAnyInngestFunction,
10-
} from "../types.js";
11-
import { type GetFunctionOutput } from "./Inngest.js";
12-
import { type InngestFunction } from "./InngestFunction.js";
10+
} from "../types.ts";
11+
import { type GetFunctionOutput } from "./Inngest.ts";
12+
import { type InngestFunction } from "./InngestFunction.ts";
1313

1414
/**
1515
* A reference to an `InngestFunction` that can be used to represent both local

packages/inngest/src/components/InngestMiddleware.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import { cacheFn, waterfall } from "../helpers/functions.js";
1+
import { cacheFn, waterfall } from "../helpers/functions.ts";
22
import {
33
type Await,
44
type MaybePromise,
55
type ObjectAssign,
66
type PartialK,
77
type Simplify,
8-
} from "../helpers/types.js";
8+
} from "../helpers/types.ts";
99
import {
1010
type BaseContext,
1111
type EventPayload,
1212
type IncomingOp,
1313
type OutgoingOp,
1414
type SendEventBaseOutput,
1515
type TriggersFromClient,
16-
} from "../types.js";
17-
import { type Inngest } from "./Inngest.js";
18-
import { type InngestFunction } from "./InngestFunction.js";
16+
} from "../types.ts";
17+
import { type Inngest } from "./Inngest.ts";
18+
import { type InngestFunction } from "./InngestFunction.ts";
1919

2020
/**
2121
* A middleware that can be registered with Inngest to hook into various

packages/inngest/src/components/InngestStepTools.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { z } from "zod";
2-
import { logPrefix } from "../helpers/consts.js";
3-
import { type Jsonify } from "../helpers/jsonify.js";
4-
import { timeStr } from "../helpers/strings.js";
2+
import { logPrefix } from "../helpers/consts.ts";
3+
import { type Jsonify } from "../helpers/jsonify.ts";
4+
import { timeStr } from "../helpers/strings.ts";
55
import {
66
type ExclusiveKeys,
77
type ParametersExceptFirst,
88
type SendEventPayload,
99
type SimplifyDeep,
1010
type WithoutInternalStr,
11-
} from "../helpers/types.js";
11+
} from "../helpers/types.ts";
1212
import {
1313
StepOpCode,
1414
type EventPayload,
@@ -21,18 +21,18 @@ import {
2121
type StepOptionsOrId,
2222
type TriggerEventFromFunction,
2323
type TriggersFromClient,
24-
} from "../types.js";
24+
} from "../types.ts";
2525
import {
2626
type ClientOptionsFromInngest,
2727
type GetEvents,
2828
type GetFunctionOutput,
2929
type Inngest,
30-
} from "./Inngest.js";
31-
import { InngestFunction } from "./InngestFunction.js";
32-
import { InngestFunctionReference } from "./InngestFunctionReference.js";
33-
import { gemini, openai, type AiAdapter } from "./ai/index.js";
30+
} from "./Inngest.ts";
31+
import { InngestFunction } from "./InngestFunction.ts";
32+
import { InngestFunctionReference } from "./InngestFunctionReference.ts";
33+
import { gemini, openai, type AiAdapter } from "./ai/index.ts";
3434

35-
import { type InngestExecution } from "./execution/InngestExecution.js";
35+
import { type InngestExecution } from "./execution/InngestExecution.ts";
3636

3737
export interface FoundStep extends HashedOp {
3838
hashedId: string;

packages/inngest/src/components/StepError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { deserializeError } from "../helpers/errors.js";
2-
import { jsonErrorSchema } from "../types.js";
1+
import { deserializeError } from "../helpers/errors.ts";
2+
import { jsonErrorSchema } from "../types.ts";
33

44
/**
55
* An error that represents a step exhausting all retries and failing. This is

packages/inngest/src/components/ai/adapters/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type AiAdapter, type types } from "../adapter.js";
1+
import { type AiAdapter, type types } from "../adapter.ts";
22

33
/**
44
* An OpenAI model using the OpenAI format for I/O.

0 commit comments

Comments
 (0)