Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: align packages from react17 to react18 #225

Merged
merged 5 commits into from
Mar 23, 2024
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
8 changes: 4 additions & 4 deletions components/password-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@types/react": "^17.0.67",
"@types/react-dom": "^17.0.21",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.8",
"@vitest/coverage-c8": "^0.33.0",
"eslint": "^8.56.0",
"jsdom": "^22.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.5.5",
"vitest": "^0.34.6"
},
Expand Down
2 changes: 1 addition & 1 deletion components/password-input/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"outDir": "lib",
"types": ["vitest/globals"]
},
"exclude": ["**/*.spec.*", "vitest.config.ts"]
"exclude": ["vitest.config.ts"]
}
11 changes: 6 additions & 5 deletions components/slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@
"check:unused-deps": "depcheck . --config=depcheck.yml",
"lint": "tsc --noEmit && eslint . --cache",
"test": "vitest run",
"test:update-snapshots": "vitest -u",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^12.1.5",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/react": "^17.0.67",
"@types/react-dom": "^17.0.21",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.8",
"@vitest/coverage-c8": "^0.33.0",
"eslint": "^8.56.0",
"jsdom": "^22.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.5.5",
"vitest": "^0.34.6"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`range-slider > should render 1`] = `
>
<input
data-index="0"
id="slider-thumb-1"
id="slider-thumb-r0"
max="100"
min="0"
type="range"
Expand All @@ -43,7 +43,7 @@ exports[`range-slider > should render 1`] = `
>
<input
data-index="1"
id="slider-thumb-2"
id="slider-thumb-r1"
max="100"
min="0"
type="range"
Expand Down Expand Up @@ -80,7 +80,7 @@ exports[`range-slider > should render 1`] = `
>
<input
data-index="0"
id="slider-thumb-1"
id="slider-thumb-r0"
max="100"
min="0"
type="range"
Expand All @@ -98,7 +98,7 @@ exports[`range-slider > should render 1`] = `
>
<input
data-index="1"
id="slider-thumb-2"
id="slider-thumb-r1"
max="100"
min="0"
type="range"
Expand Down
4 changes: 2 additions & 2 deletions components/slider/src/__snapshots__/slider.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`slider > should render 1`] = `
>
<input
data-index="0"
id="slider-thumb-1"
id="slider-thumb-r0"
max="100"
min="0"
type="range"
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`slider > should render 1`] = `
>
<input
data-index="0"
id="slider-thumb-1"
id="slider-thumb-r0"
max="100"
min="0"
type="range"
Expand Down
2 changes: 1 addition & 1 deletion components/slider/src/range-slider.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import userEvent from "@testing-library/user-event";
import { RangeSlider } from "./range-slider";
import React from "react";
import { getControlRoot } from "./test-helpers";
import { vi } from "vitest";
import { expect, vi } from "vitest";

const expectSliderValues = (elements: HTMLElement[], values: number[]) => {
expect(elements).toHaveLength(values.length);
Expand Down
3 changes: 2 additions & 1 deletion components/slider/src/thumb/thumb.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ChangeEvent } from "react";

export type ThumbSlots = {
root: Slot<"div">;
input: NonNullable<Slot<"input">>;
input: NonNullable<Slot<"input">> & { children?: never };
label: NonNullable<Slot<"span">>;
};

Expand All @@ -17,6 +17,7 @@ export type ThumbProps =
"value"
>
& {
children?: never;
value: number;
handleFocus: () => void;
handleBlur: () => void;
Expand Down
3 changes: 2 additions & 1 deletion components/slider/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"extends": "./tsconfig.src.json",
"compilerOptions": {
"outDir": "lib",
"types": ["vitest/globals"],
"lib": ["es5", "es6", "dom", "dom.iterable"]
},
"include": ["src"],
"exclude": ["**/*.spec.*", "vitest.config.ts"]
"exclude": ["vitest.config.ts", "**/*.spec.*"]
}
10 changes: 5 additions & 5 deletions components/stepper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^12.1.5",
"@types/react": "^17.0.67",
"@types/react-dom": "^17.0.21",
"@testing-library/react": "^14.2.1",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.8",
"@vitest/coverage-c8": "^0.33.0",
"eslint": "^8.56.0",
"jsdom": "^22.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.5.5",
"vitest": "^0.34.6"
},
Expand Down
5 changes: 3 additions & 2 deletions components/stepper/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./tsconfig.src.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib",
"types": ["vitest/globals"]
},
"exclude": ["**/*.spec.*", "vitest.config.ts"]
"exclude": ["vitest.config.ts"]
}
6 changes: 3 additions & 3 deletions components/topbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^12.1.5",
"@types/react": "^17.0.67",
"@types/react-dom": "^17.0.21",
"@testing-library/react": "^14.2.1",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.8",
"@vitest/coverage-c8": "^0.33.0",
"eslint": "^8.56.0",
"jsdom": "^22.1.0",
Expand Down
2 changes: 1 addition & 1 deletion components/topbar/src/application-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
CatchUp20Filled,
Search20Filled,
} from "@fluentui/react-icons";
import { MySystems24Filled } from "@axiscommunications/fluent-icons";
import { defaultMySystemsAppData, isMySystemsAppId } from "./applications";
import { TranslationFn } from "./translation-context";
import React from "react";
import { ApplicationArea } from "./top-bar.types";
import { useApplicationStyles } from "./application.styles";
import { mergeClasses } from "@fluentui/react-components";
import { MySystems24Filled } from "@axiscommunications/fluent-icons";

enum appAreas {
MY_SYSTEMS = "mySystems",
Expand Down
7 changes: 5 additions & 2 deletions components/topbar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"extends": "./tsconfig.src.json",
"compilerOptions": {
"outDir": "lib"
"types": ["vitest/globals"],
"outDir": "lib",
"declaration": false,
"declarationMap": false
},
"include": ["src"],
"exclude": ["**/*.spec.*", "vitest.config.ts"]
"exclude": ["vitest.config.ts"]
}
4 changes: 2 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"devDependencies": {
"@playwright/test": "1.41.2",
"@types/node": "^20.11.18",
"@types/react": "^17.0.67",
"@types/react-dom": "^17.0.21",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.8",
"@types/react-syntax-highlighter": "15.5.11",
"eslint": "^8.56.0",
"typescript": "^4.5.5"
Expand Down
9 changes: 4 additions & 5 deletions examples/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from "react";
import ReactDOM from "react-dom";
import { App } from "./App";
import { ApplicationStateProvider } from "./context/ApplicationStateProvider";
import { createRoot } from "react-dom/client";

const container = document.getElementById("root");
const container = createRoot(document.getElementById("root") as HTMLElement);

ReactDOM.render(
container.render(
<React.StrictMode>
<ApplicationStateProvider>
<App />
</ApplicationStateProvider>
</React.StrictMode>,
container
</React.StrictMode>
);
2 changes: 1 addition & 1 deletion hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lint": "tsc --noEmit && eslint . --cache"
},
"devDependencies": {
"@types/react": "^18.2.24",
"@types/react": "^18.2.65",
"eslint": "^8.56.0",
"react": "^18.2.0",
"typescript": "^4.5.5"
Expand Down
2 changes: 1 addition & 1 deletion icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"devDependencies": {
"@svgr/core": "^5.5.0",
"@types/node": "^20.11.18",
"@types/react": "^18.2.24",
"@types/react": "^18.2.65",
"eslint": "^8.56.0",
"icon-font-generator": "^2.1.11",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion illustrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@types/node": "^20.10.6",
"@types/react": "^18.2.24",
"@types/react": "^18.2.65",
"eslint": "^8.56.0",
"react": "^18.2.0",
"ts-node": "^10.9.2",
Expand Down
Loading
Loading