Skip to content

Commit f21ebed

Browse files
authored
Add typescript@rc to test for [email protected] (#500)
## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Adds `typescript@rc` (currently `[email protected]`). This is used to test the 5.4 release candidate to resolve any issues before it ships. When it does, we'll move this PR to target `[email protected]` and merge, including a changeset if any changes needed to be made. We should ship this change once the final build is submitted at the beginning of March. See microsoft/TypeScript#56948 ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A - [x] Added unit/integration tests - [x] Added changesets if applicable ## Related - microsoft/TypeScript#56948
1 parent affbdae commit f21ebed

19 files changed

+421
-83
lines changed

.changeset/forty-poems-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"inngest": patch
3+
---
4+
5+
Add support for `[email protected]`

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
matrix:
5151
tsVersion:
5252
- 'latest'
53+
- 'rc'
5354
- '~5.3.0'
5455
- '~5.2.0'
5556
- '~5.1.0'

packages/inngest/etc/inngest.api.md

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/inngest/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@
180180
"ms": "^2.1.3",
181181
"serialize-error-cjs": "^0.1.3",
182182
"strip-ansi": "^5.2.0",
183-
"type-fest": "^3.13.1",
184183
"type-plus": "^5.1.0",
185184
"zod": "~3.22.3"
186185
},

packages/inngest/src/components/EventSchemas.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import { type Simplify } from "type-fest";
21
import { type internalEvents } from "../helpers/consts";
3-
import { type IsEmptyObject, type IsStringLiteral } from "../helpers/types";
2+
import {
3+
type IsEmptyObject,
4+
type IsStringLiteral,
5+
type Simplify,
6+
} from "../helpers/types";
47
import type * as z from "../helpers/validators/zod";
58
import {
69
type EventPayload,

packages/inngest/src/components/Inngest.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { type IfNever, type Jsonify } from "type-fest";
2-
import { type SimplifyDeep } from "type-fest/source/merge-deep";
1+
import { type IsNever } from "type-plus";
32
import { InngestApi } from "../api/api";
43
import {
54
defaultDevServerHost,
@@ -18,10 +17,12 @@ import {
1817
type Mode,
1918
} from "../helpers/env";
2019
import { fixEventKeyMissingSteps, prettyError } from "../helpers/errors";
20+
import { type Jsonify } from "../helpers/jsonify";
2121
import { stringify } from "../helpers/strings";
2222
import {
2323
type ExclusiveKeys,
2424
type SendEventPayload,
25+
type SimplifyDeep,
2526
type WithoutInternal,
2627
} from "../helpers/types";
2728
import { DefaultLogger, ProxyLogger, type Logger } from "../middleware/logger";
@@ -817,11 +818,9 @@ export type GetFunctionOutputFromInngestFunction<
817818
TFunction extends InngestFunction.Any,
818819
// eslint-disable-next-line @typescript-eslint/no-explicit-any
819820
> = TFunction extends InngestFunction<any, any, any, any, infer IHandler>
820-
? IfNever<
821-
SimplifyDeep<Jsonify<Awaited<ReturnType<IHandler>>>>,
822-
null,
823-
SimplifyDeep<Jsonify<Awaited<ReturnType<IHandler>>>>
824-
>
821+
? IsNever<SimplifyDeep<Jsonify<ReturnType<IHandler>>>> extends true
822+
? null
823+
: SimplifyDeep<Jsonify<ReturnType<IHandler>>>
825824
: unknown;
826825

827826
/**
@@ -837,11 +836,9 @@ export type GetFunctionOutputFromReferenceInngestFunction<
837836
TFunction extends InngestFunctionReference.Any,
838837
// eslint-disable-next-line @typescript-eslint/no-explicit-any
839838
> = TFunction extends InngestFunctionReference<any, infer IOutput>
840-
? IfNever<
841-
SimplifyDeep<Jsonify<IOutput>>,
842-
null,
843-
SimplifyDeep<Jsonify<IOutput>>
844-
>
839+
? IsNever<SimplifyDeep<Jsonify<IOutput>>> extends true
840+
? null
841+
: SimplifyDeep<Jsonify<IOutput>>
845842
: unknown;
846843

847844
/**

packages/inngest/src/components/InngestFunction.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ import {
4040
type OutgoingOp,
4141
} from "@local/types";
4242
import { fromPartial } from "@total-typescript/shoehorn";
43-
import { type IsEqual } from "type-fest";
44-
import { assertType } from "type-plus";
43+
import { assertType, type IsEqual } from "type-plus";
4544
import { createClient, runFnWithStack } from "../test/helpers";
4645

4746
type TestEvents = {

packages/inngest/src/components/InngestFunctionReference.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { type Simplify } from "type-fest";
2-
import { type IsAny } from "../helpers/types";
1+
import { type IsAny, type Simplify } from "../helpers/types";
32
import {
43
type ResolveSchema,
54
type ValidSchemaInput,

packages/inngest/src/components/InngestMiddleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { ExecutionVersion } from "@local/components/execution/InngestExecution";
44
import { Inngest } from "@local/components/Inngest";
55
import { referenceFunction } from "@local/components/InngestFunctionReference";
66
import { InngestMiddleware } from "@local/components/InngestMiddleware";
7+
import { type IsUnknown } from "@local/helpers/types";
78
import { StepOpCode } from "@local/types";
8-
import { type IsUnknown } from "type-fest";
99
import { assertType, type IsEqual } from "type-plus";
1010
import { createClient, runFnWithStack, testClientId } from "../test/helpers";
1111

packages/inngest/src/components/InngestMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { type Simplify } from "type-fest";
21
import { cacheFn, waterfall } from "../helpers/functions";
32
import {
43
type Await,
54
type MaybePromise,
65
type ObjectAssign,
76
type PartialK,
7+
type Simplify,
88
} from "../helpers/types";
99
import {
1010
type BaseContext,

0 commit comments

Comments
 (0)