Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

upgrade dependencies to the latest #321

Merged
merged 1 commit into from
May 15, 2021
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"airbnb",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"prettier",
"plugin:jest/recommended",
"plugin:react-hooks/recommended"
],
Expand Down
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,48 +33,49 @@
"example": "ts-node example/example",
"build": "rollup -c && prettier --write './lib/index.d.ts'",
"test": "jest",
"lint": "eslint -c .eslintrc.json --ext ts,tsx src"
"lint": "eslint -c .eslintrc.json --ext ts,tsx src",
"format": "eslint -c .eslintrc.json --ext ts,tsx src --fix && prettier --write './src/**/*.(ts|tsx)'"
},
"peerDependencies": {
"react": ">=16.8.0 || >=17"
},
"dependencies": {
"prop-types": "^15.7.2",
"react-dom": "^17.0.1",
"react-reconciler": "^0.26.1",
"ts-graphviz": "^0.14.0"
"react-dom": "^17.0.2",
"react-reconciler": "^0.26.2",
"ts-graphviz": "^0.15.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.8",
"@testing-library/react": "^11.2.3",
"@testing-library/react-hooks": "^4.0.0",
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.2.7",
"@testing-library/react-hooks": "^5.1.2",
"@types/prop-types": "^15.7.3",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-reconciler": "^0.18.0",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"eslint": "^7.17.0",
"@types/react": "^17.0.5",
"@types/react-dom": "^17.0.5",
"@types/react-reconciler": "^0.26.1",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"eslint": "^7.26.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.1",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^ 7.22.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^26.6.3",
"jest-graphviz": "^0.4.0",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-test-renderer": "^17.0.1",
"rollup": "^2.36.1",
"prettier": "^2.3.0",
"react": "^17.0.2",
"react-test-renderer": "^17.0.2",
"rollup": "^2.48.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^2.0.1",
"rollup-plugin-dts": "^3.0.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"ts-jest": "^26.4.4",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^26.5.6",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
"typescript": "^4.2.4"
}
}
80 changes: 45 additions & 35 deletions src/hooks/__tests__/utils/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,52 @@ import { Graph } from '../../../components/Graph';
import { GraphvizContext } from '../../../components/contexts/GraphvizContext';
import { Subgraph } from '../../../components/Subgraph';

export const context = (): FC => ({ children }) => {
return <GraphvizContext.Provider value={{}}>{children}</GraphvizContext.Provider>;
};
export const context =
(): FC =>
({ children }) => {
return <GraphvizContext.Provider value={{}}>{children}</GraphvizContext.Provider>;
};

export const digraph = (props: ComponentProps<typeof Digraph> = {}): FC => ({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Digraph {...props}>{children}</Digraph>
</GraphvizContext.Provider>
);
};
export const digraph =
(props: ComponentProps<typeof Digraph> = {}): FC =>
({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Digraph {...props}>{children}</Digraph>
</GraphvizContext.Provider>
);
};

export const digraphInSubgraph = (props: ComponentProps<typeof Subgraph> = {}): FC => ({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Digraph>
<Subgraph {...props}>{children}</Subgraph>
</Digraph>
</GraphvizContext.Provider>
);
};
export const digraphInSubgraph =
(props: ComponentProps<typeof Subgraph> = {}): FC =>
({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Digraph>
<Subgraph {...props}>{children}</Subgraph>
</Digraph>
</GraphvizContext.Provider>
);
};

export const graph = (props: ComponentProps<typeof Graph> = {}): FC => ({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Graph {...props}>{children}</Graph>
</GraphvizContext.Provider>
);
};
export const graph =
(props: ComponentProps<typeof Graph> = {}): FC =>
({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Graph {...props}>{children}</Graph>
</GraphvizContext.Provider>
);
};

export const graphInSubgraph = (props: ComponentProps<typeof Subgraph> = {}): FC => ({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Graph>
<Subgraph {...props}>{children}</Subgraph>
</Graph>
</GraphvizContext.Provider>
);
};
export const graphInSubgraph =
(props: ComponentProps<typeof Subgraph> = {}): FC =>
({ children }) => {
return (
<GraphvizContext.Provider value={{}}>
<Graph>
<Subgraph {...props}>{children}</Subgraph>
</Graph>
</GraphvizContext.Provider>
);
};
43 changes: 39 additions & 4 deletions src/renderer/reconciler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Container = Record<string, never>;

type Instance = any;
type TextInstance = any;
type SuspenseInstance = any;
type HydratableInstance = any;
type PublicInstance = any;
type HostContext = any;
Expand All @@ -29,14 +30,48 @@ export class HostConfig
Container,
Instance,
TextInstance,
SuspenseInstance,
HydratableInstance,
PublicInstance,
HostContext,
UpdatePayload,
ChildSet,
ChildSet, // TODO Placeholder for undocumented API
TimeoutHandle,
NoTimeout
> {
>
{
preparePortalMount(containerInfo: Container): void {
// NoOp
}

scheduleTimeout(fn: (...args: unknown[]) => unknown, delay?: number) {
// NoOp
}

cancelTimeout(id: any): void {
// NoOp
}

queueMicrotask(fn: () => void): void {
// NoOp
}

cloneInstance?: any;

cloneFundamentalInstance?: any;

createContainerChildSet?: any;

appendChildToContainerChildSet?: any;

finalizeContainerChildren?: any;

replaceContainerChildren?: any;

cloneHiddenInstance?: any;

cloneHiddenTextInstance?: any;

public now = Date.now;

public setTimeout = setTimeout;
Expand Down Expand Up @@ -72,8 +107,8 @@ export class HostConfig
return parentHostContext;
}

public prepareForCommit(containerInfo: Container): void {
// NoOp
public prepareForCommit(containerInfo: Container): Record<string, any> | null {
return null;
}

public resetAfterCommit(containerInfo: Container): void {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ClusterMap } from '../components/contexts/ClusterMap';
const noop = (): void => undefined;

export function render(element: ReactElement, context: Context): number {
const container = reconciler.createContainer({}, false, false);
const container = reconciler.createContainer({}, 0, false, null);
// Clusters
return reconciler.updateContainer(
createElement(
Expand Down
Loading