Skip to content

Commit

Permalink
fix up knip reports
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Jan 23, 2025
1 parent a040bec commit 6c0272a
Show file tree
Hide file tree
Showing 11 changed files with 171 additions and 1,012 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@types/node": "^22.10.9",
"knip": "^5.43.1",
"size-limit": "11.1.2",
"typescript": "^5.7.3",
"zx": "^8.2.4"
"typescript": "^5.7.3"
}
}
1 change: 0 additions & 1 deletion packages/client-react-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
"@testing-library/react": "^16.1.0",
"@total-typescript/shoehorn": "0.1.2",
"@tsconfig/recommended": "1.0.6",
"@types/eslint": "^9.6.1",
"@types/node": "20.12.11",
"@types/react": "^19.0.0",
"concurrently": "8.2.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class ApolloClientBrowserImpl extends ApolloClientClientBaseImpl {
}
}

export class ApolloClientRSCImpl extends ApolloClientBase {
class ApolloClientRSCImpl extends ApolloClientBase {
constructor(options: WrappedApolloClientOptions) {
super(options);
this.setLink(this.link);
Expand Down
6 changes: 3 additions & 3 deletions packages/client-react-streaming/src/transportedQueryRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
type JsonString,
} from "@apollo/client-react-streaming/stream-utils";

export type RestrictedPreloadOptions = {
type RestrictedPreloadOptions = {
fetchPolicy?: "network-only" | "cache-and-network" | "cache-first";
returnPartialData?: false;
nextFetchPolicy?: undefined;
Expand All @@ -45,7 +45,7 @@ export type PreloadTransportedQueryOptions<TVariables, TData> = Omit<
> &
RestrictedPreloadOptions;

export type TransportedQueryRefOptions = TransportedOptions &
type TransportedQueryRefOptions = TransportedOptions &
RestrictedPreloadOptions;

/**
Expand Down Expand Up @@ -141,7 +141,7 @@ export function createTransportedQueryPreloader(
};
}

export function createTransportedQueryRef<
function createTransportedQueryRef<
TData,
TVariables extends OperationVariables,
>(
Expand Down
3 changes: 1 addition & 2 deletions packages/experimental-nextjs-app-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"@internal/test-utils": "workspace:^",
"@microsoft/api-extractor": "7.43.2",
"@tsconfig/recommended": "1.0.6",
"@types/eslint": "^9.6.1",
"@types/node": "20.12.11",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
Expand All @@ -137,7 +136,7 @@
"rimraf": "5.0.5",
"tsup": "8.0.2",
"typescript": "^5.7.3",
"wait-on": "^8.0.1"
"wait-on": "8.0.2"
},
"peerDependencies": {
"@apollo/client": "^3.10.4",
Expand Down
1 change: 1 addition & 0 deletions packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@types/eslint": "9.6.1",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"eslint": "8.57.0",
Expand Down
15 changes: 3 additions & 12 deletions packages/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"test:browser": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=browser\" yarn run test:base",
"test:rsc": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=react-server\" yarn run test:base",
"prepack": "yarn build",
"prepublishOnly": "wait-on ../client-react-streaming/.published --delay 3000 --timeout 30000 && yarn pack -o attw.tgz && attw attw.tgz && rm attw.tgz && yarn run test",
"prepublishOnly": "wait-on ../client-react-streaming/.built --delay 3000 --timeout 60000 && && yarn pack -o attw.tgz && attw attw.tgz && rm attw.tgz && yarn run test",
"test-bundle": "yarn test-bundle:attw && yarn test-bundle:package && yarn test-bundle:publint && yarn test-bundle:shape",
"test-bundle:attw": "attw --pack .",
"test-bundle:package": "yarn workspace monorepo verify-package-json $PWD/package.json",
Expand All @@ -67,30 +67,21 @@
"@apollo/client": "^3.12.6",
"@apollo/client-react-streaming": "workspace:*",
"@arethetypeswrong/cli": "0.15.3",
"@internal/test-utils": "workspace:^",
"@microsoft/api-extractor": "7.43.2",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.1.0",
"@total-typescript/shoehorn": "0.1.2",
"@tsconfig/recommended": "1.0.6",
"@types/node": "20.12.11",
"@types/react": "^19.0.0",
"concurrently": "8.2.2",
"esbuild": "0.24.2",
"eslint": "8.57.0",
"glob": "10.3.12",
"global-jsdom": "24.0.0",
"globstar": "1.0.0",
"graphql": "16.8.1",
"jsdom": "24.0.0",
"publint": "0.2.7",
"react": "^19.0.0",
"react-router": "patch:react-router@npm%3A7.0.2#~/.yarn/patches/react-router-npm-7.0.2-b96f2bd13c.patch",
"rimraf": "5.0.5",
"ts-node": "10.9.2",
"tsup": "8.0.2",
"tsx": "4.7.1",
"typescript": "5.4.5",
"vitest": "1.6.0"
"wait-on": "8.0.2"
},
"peerDependencies": {
"react": "^19",
Expand Down
8 changes: 4 additions & 4 deletions packages/react-router/src/preloader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function createApolloLoaderHandler(
// once that functionality has been added, all this can be removed.

type EventPromiscade = Promiscade<JsonString<ReadableStreamLinkEvent>>;
export type PromiscadedRef = Omit<TransportedQueryRef, "$__apollo_queryRef"> & {
type PromiscadedRef = Omit<TransportedQueryRef, "$__apollo_queryRef"> & {
$__apollo_queryRef: Omit<
TransportedQueryRef["$__apollo_queryRef"],
"stream"
Expand All @@ -69,7 +69,7 @@ export type PromiscadedRef = Omit<TransportedQueryRef, "$__apollo_queryRef"> & {
};
};

export function isPromiscaded(
function isPromiscaded(
queryRef: TransportedQueryRef | PromiscadedRef
): queryRef is PromiscadedRef {
return "promiscade" in queryRef.$__apollo_queryRef;
Expand All @@ -96,7 +96,7 @@ function replaceStreamWithPromiscade(queryRef: TransportedQueryRef) {
* could result in poor timing and have the modified object be sent over the wire instead
* of the one with the promiscade
*/
export function promiscadedRefToStreamRef(
function promiscadedRefToStreamRef(
queryRef: PromiscadedRef
): TransportedQueryRef {
const { promiscade: _, ...restRef } = queryRef.$__apollo_queryRef;
Expand All @@ -111,7 +111,7 @@ export function promiscadedRefToStreamRef(
};
}

export const hydratedRefs = new WeakMap<PromiscadedRef, TransportedQueryRef>();
const hydratedRefs = new WeakMap<PromiscadedRef, TransportedQueryRef>();
/**
* If `obj` is a Promiscaded Ref, creates a new "live" QueryRef
* If `obj` is a Transported Ref, converts it to a "live" QueryRef
Expand Down
13 changes: 5 additions & 8 deletions packages/tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"test:ssr": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=node\" yarn run test:base",
"test:browser": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=browser\" yarn run test:base",
"prepack": "yarn build",
"prepublishOnly": "wait-on ../client-react-streaming/.published --delay 3000 --timeout 30000 && yarn pack -o attw.tgz && attw attw.tgz && rm attw.tgz && yarn run test",
"prepublishOnly": "wait-on ../client-react-streaming/.built --delay 3000 --timeout 60000 && yarn pack -o attw.tgz && attw attw.tgz && rm attw.tgz && yarn run test",
"test-bundle": "yarn test-bundle:attw && yarn test-bundle:package && yarn test-bundle:publint && yarn test-bundle:shape",
"test-bundle:attw": "attw --pack .",
"test-bundle:package": "yarn workspace monorepo verify-package-json $PWD/package.json",
Expand All @@ -73,25 +73,22 @@
"@tanstack/start": "patch:@tanstack/start@npm%3A1.97.3#~/.yarn/patches/@tanstack-start-npm-1.97.3-da273c2822.patch",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.1.0",
"@total-typescript/shoehorn": "0.1.2",
"@tsconfig/recommended": "1.0.6",
"@types/node": "20.12.11",
"@types/react": "^19.0.0",
"concurrently": "8.2.2",
"esbuild": "0.24.2",
"eslint": "8.57.0",
"glob": "10.3.12",
"global-jsdom": "24.0.0",
"globstar": "1.0.0",
"graphql": "16.8.1",
"jsdom": "24.0.0",
"publint": "0.2.7",
"react": "^19.0.0",
"react-error-boundary": "5.0.0",
"rimraf": "5.0.5",
"ts-node": "10.9.2",
"tsup": "8.0.2",
"tsx": "4.7.1",
"typescript": "5.4.5",
"vitest": "1.6.0"
"vitest": "1.6.0",
"wait-on": "8.0.2"
},
"peerDependencies": {
"@tanstack/react-router": "*",
Expand Down
2 changes: 0 additions & 2 deletions packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"private": true,
"version": "0.0.0",
"devDependencies": {
"@testing-library/react-render-stream": "^2.0.0",
"expect": "^29.7.0",
"typescript": "^5.7.3"
},
"type": "module"
Expand Down
Loading

0 comments on commit 6c0272a

Please sign in to comment.