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
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config } from "jest";
import type { Config } from "@jest/types";

const config: Config = {
const config: Config.InitialOptions = {
projects: ["packages/*"],
};

Expand Down
94 changes: 84 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react": "^19.1.0",
"ts-jest": "^29.4.0",
"ts-node": "^10.9.2",
"turbo": "^2.5.4",
"turbo": "^2.5.6",
"typescript": "^5.8.3"
},
"packageManager": "npm@10.9.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/testApolloLink";
export * from "./lib/test-apollo-link";
6 changes: 5 additions & 1 deletion packages/handle-abort/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default {
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
displayName: "handle-abort",
transform: {
"^.+\\.[tj]s$": "@swc/jest",
},
moduleFileExtensions: ["ts", "js", "html"],
};

export default config;
2 changes: 1 addition & 1 deletion packages/handle-abort/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/createAbortLink";
export * from "./lib/abort-link";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApolloLink } from "@apollo/client";
import { testApolloLink } from "@apollo-link-debug/core";

import { createAbortLink } from "./createAbortLink";
import { createAbortLink } from "./abort-link";

const OPERATION_NAME = "createAbortLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApolloLink, Operation } from "@apollo/client";
import { onError } from "@apollo/client/link/error";

import { OnAbortCallback, onAbortHandler } from "./options/onAbort";
import { OnAbortCallback, onAbortHandler } from "./options/on-abort";

export type CreateAbortLinkOptions = {
onAbort?: OnAbortCallback;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ApolloLink } from "@apollo/client";
import { testApolloLink } from "@apollo-link-debug/core";

import { createAbortLink } from "../createAbortLink";
import { onAbortHandler } from "./onAbort";
import { createAbortLink } from "../abort-link";
import { onAbortHandler } from "./on-abort";

const OPERATION_NAME = "createAbortLink";

Expand Down
6 changes: 5 additions & 1 deletion packages/handle-aws-x-ray/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default {
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
displayName: "handle-aws-x-ray",
transform: {
"^.+\\.[tj]s$": "@swc/jest",
},
moduleFileExtensions: ["ts", "js", "html"],
};

export default config;
2 changes: 1 addition & 1 deletion packages/handle-aws-x-ray/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/createAwsXRayLink";
export * from "./lib/aws-x-ray-link";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { testApolloLink } from "@apollo-link-debug/core";
import { Headers } from "cross-fetch";

import { createAwsXRayLink } from "./createAwsXRayLink";
import { createAwsXRayLink } from "./aws-x-ray-link";

const OPERATION_NAME = "createAwsXRayLink";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import { ApolloLink, Operation } from "@apollo/client";
import { onError } from "@apollo/client/link/error";
import { parse } from "cookie";

import { OnNoHeadersCallback, onNoHeadersHandler } from "./options/onNoHeaders";
import { OnNoSampleCallback, onNoSampleHandler } from "./options/onNoSample";
import { OnNoTraceIdCallback, onNoTraceIdHandler } from "./options/onNoTraceId";
import { OnResponseCallback, onResponseHandler } from "./options/onResponse";
import {
OnNoHeadersCallback,
onNoHeadersHandler,
} from "./options/on-no-headers";
import { OnNoSampleCallback, onNoSampleHandler } from "./options/on-no-sample";
import {
OnNoTraceIdCallback,
onNoTraceIdHandler,
} from "./options/on-no-trace-id";
import { OnResponseCallback, onResponseHandler } from "./options/on-response";

export type createAwsXRayLinkOptions = {
onResponse?: OnResponseCallback;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { testApolloLink } from "@apollo-link-debug/core";

import { createAwsXRayLink } from "../createAwsXRayLink";
import { onNoHeadersHandler } from "./onNoHeaders";
import { createAwsXRayLink } from "../aws-x-ray-link";
import { onNoHeadersHandler } from "./on-no-headers";

const OPERATION_NAME = "createAwsXRayLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { testApolloLink } from "@apollo-link-debug/core";
import { Headers } from "cross-fetch";

import { createAwsXRayLink } from "../createAwsXRayLink";
import { onNoSampleHandler } from "./onNoSample";
import { createAwsXRayLink } from "../aws-x-ray-link";
import { onNoSampleHandler } from "./on-no-sample";

const OPERATION_NAME = "createAwsXRayLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { testApolloLink } from "@apollo-link-debug/core";

import { createAwsXRayLink } from "../createAwsXRayLink";
import { onNoTraceIdHandler } from "./onNoTraceId";
import { createAwsXRayLink } from "../aws-x-ray-link";
import { onNoTraceIdHandler } from "./on-no-trace-id";

const OPERATION_NAME = "createAwsXRayLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { testApolloLink } from "@apollo-link-debug/core";
import { Headers } from "cross-fetch";

import { createAwsXRayLink } from "../createAwsXRayLink";
import { onResponseHandler } from "./onResponse";
import { createAwsXRayLink } from "../aws-x-ray-link";
import { onResponseHandler } from "./on-response";

const OPERATION_NAME = "createAwsXRayLink";

Expand Down
6 changes: 5 additions & 1 deletion packages/handle-errors/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default {
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
displayName: "handle-errors",
transform: {
"^.+\\.[tj]s$": "@swc/jest",
},
moduleFileExtensions: ["ts", "js", "html"],
};

export default config;
2 changes: 1 addition & 1 deletion packages/handle-errors/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/createErrorsLink";
export * from "./lib/errors-link";
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ApolloLink } from "@apollo/client";
import { testApolloLink } from "@apollo-link-debug/core";
import { GraphQLError, Source } from "graphql";

import { createErrorsLink } from "./createErrorsLink";
import { createErrorsLink } from "./errors-link";

const OPERATION_NAME = "createErrorsLink";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { onError } from "@apollo/client/link/error";
import {
OnGraphQLErrorsCallback,
onGraphQLErrorsHandler,
} from "./options/onGraphQLErrors";
} from "./options/on-graphql-errors";
import {
OnNetworkErrorCallback,
onNetworkErrorHandler,
} from "./options/onNetworkError";
} from "./options/on-network-error";

export type createErrorsLinkOptions = {
onGraphQLErrors?: OnGraphQLErrorsCallback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ApolloLink } from "@apollo/client";
import { testApolloLink } from "@apollo-link-debug/core";
import { GraphQLError, Source } from "graphql";

import { createErrorsLink } from "../createErrorsLink";
import { onGraphQLErrorsHandler } from "./onGraphQLErrors";
import { createErrorsLink } from "../errors-link";
import { onGraphQLErrorsHandler } from "./on-graphql-errors";

const OPERATION_NAME = "createErrorsLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ApolloLink } from "@apollo/client";
import { testApolloLink } from "@apollo-link-debug/core";

import { createErrorsLink } from "../createErrorsLink";
import { onNetworkErrorHandler } from "./onNetworkError";
import { createErrorsLink } from "../errors-link";
import { onNetworkErrorHandler } from "./on-network-error";

const OPERATION_NAME = "createErrorsLink";

Expand Down
6 changes: 5 additions & 1 deletion packages/handle-request/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default {
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
displayName: "handle-request",
transform: {
"^.+\\.[tj]s$": "@swc/jest",
},
moduleFileExtensions: ["ts", "js", "html"],
};

export default config;
2 changes: 1 addition & 1 deletion packages/handle-request/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/createRequestLink";
export * from "./lib/request-link";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { testApolloLink } from "@apollo-link-debug/core";

import { createRequestLink } from "../createRequestLink";
import { onRequestHandler } from "./onRequest";
import { createRequestLink } from "../request-link";
import { onRequestHandler } from "./on-request";

const OPERATION_NAME = "createRequestLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { testApolloLink } from "@apollo-link-debug/core";

import { createRequestLink } from "./createRequestLink";
import { createRequestLink } from "./request-link";

const OPERATION_NAME = "createRequestLink";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApolloLink } from "@apollo/client";

import { OnRequestCallback, onRequestHandler } from "./options/onRequest";
import { OnRequestCallback, onRequestHandler } from "./options/on-request";

export type createRequestLinkOptions = {
onRequest?: OnRequestCallback;
Expand Down
6 changes: 5 additions & 1 deletion packages/handle-timer/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default {
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
displayName: "handle-timer",
transform: {
"^.+\\.[tj]s$": "@swc/jest",
},
moduleFileExtensions: ["ts", "js", "html"],
};

export default config;
2 changes: 1 addition & 1 deletion packages/handle-timer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./lib/createTimerLink";
export * from "./lib/timer-link";
Loading