Skip to content

Commit 9c6537d

Browse files
committed
chore: update dependencies and fix type issues in tests and stories
1 parent c37d69c commit 9c6537d

6 files changed

Lines changed: 17 additions & 11 deletions

File tree

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"@testing-library/react": "^16.1.0",
5858
"@testing-library/user-event": "^14.3.0",
5959
"@types/node": "^22.10.2",
60+
"@types/react": "^19.2.7",
6061
"autoprefixer": "^7.1.2",
6162
"babel-core": "^7.0.0-bridge.0",
6263
"babel-jest": "^24.8.0",
@@ -135,5 +136,8 @@
135136
},
136137
"publishConfig": {
137138
"access": "public"
139+
},
140+
"overrides": {
141+
"@types/minimatch": "5.1.2"
138142
}
139143
}

playwright-tests/features/responsive/responsive.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Responsive from "./responsive.story";
33

44
test.use({ viewport: { width: 1200, height: 500 } });
55

6-
async function activeSlidesCount(component) {
6+
async function activeSlidesCount(component: any) {
77
return await component.locator(".slick-slide.slick-active").count();
88
}
99

playwright-tests/features/responsive/responsive.story.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react";
2+
// @ts-ignore
23
import Slider from "../../../src-jsx";
34

45
function Responsive() {

playwright-tests/regression/fix-1930/fix-1930.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test("height check in vertical mode when slides < slidesToShow and finite", asyn
1212

1313
const track = component.locator(".slick-track").first();
1414
const box = await track.boundingBox();
15-
await expect(box.height).toEqual(200);
15+
await expect(box?.height).toEqual(200);
1616
});
1717

1818
test("height check in vertical mode when slides < slidesToShow and infinite", async ({
@@ -22,5 +22,5 @@ test("height check in vertical mode when slides < slidesToShow and infinite", as
2222

2323
const track = component.locator(".slick-track").first();
2424
const box = await track.boundingBox();
25-
await expect(box.height).toEqual(200);
25+
await expect(box?.height).toEqual(200);
2626
});

playwright-tests/regression/fix-1930/fix-1930.story.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-ignore
12
import Slider from "../../../src-jsx";
23
import React from "react";
34

tsconfig.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1212

1313
/* Language and Environment */
14-
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14+
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
1515
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16-
// "jsx": "preserve", /* Specify what JSX code is generated. */
16+
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
1717
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
1818
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
1919
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
@@ -25,7 +25,7 @@
2525
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2626

2727
/* Modules */
28-
"module": "commonjs", /* Specify what module code is generated. */
28+
"module": "commonjs" /* Specify what module code is generated. */,
2929
// "rootDir": "./", /* Specify the root folder within your source files. */
3030
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
@@ -55,7 +55,7 @@
5555
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
5656
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
5757
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58-
"outDir": "./dist", /* Specify an output folder for all emitted files. */
58+
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
5959
// "removeComments": true, /* Disable emitting comments. */
6060
// "noEmit": true, /* Disable emitting files from a compilation. */
6161
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
@@ -76,12 +76,12 @@
7676
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
7777
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
7878
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
79-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
79+
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
8080
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
81-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
81+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
8282

8383
/* Type Checking */
84-
"strict": true, /* Enable all strict type-checking options. */
84+
"strict": true /* Enable all strict type-checking options. */,
8585
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
8686
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
8787
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -103,6 +103,6 @@
103103

104104
/* Completeness */
105105
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
106-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
106+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
107107
}
108108
}

0 commit comments

Comments
 (0)