react-intersection-observer
Advanced tools
Comparing version 9.11.0 to 9.12.0
declare global { | ||
var IS_REACT_ACT_ENVIRONMENT: boolean; | ||
var jest: { | ||
fn: typeof vi.fn; | ||
} | undefined; | ||
} | ||
@@ -10,3 +13,3 @@ /** | ||
*/ | ||
declare function setupIntersectionMocking(mockFn: typeof jest.fn): void; | ||
declare function setupIntersectionMocking(mockFn: typeof vi.fn): void; | ||
/** | ||
@@ -13,0 +16,0 @@ * Reset the IntersectionObserver mock to its initial state, and clear all the elements being observed. |
@@ -48,4 +48,4 @@ "use strict"; | ||
var observers = /* @__PURE__ */ new Map(); | ||
if (typeof beforeEach !== "undefined" && typeof afterEach !== "undefined") { | ||
beforeEach(() => { | ||
if (typeof beforeAll !== "undefined" && typeof afterEach !== "undefined") { | ||
beforeAll(() => { | ||
if (typeof jest !== "undefined") setupIntersectionMocking(jest.fn); | ||
@@ -52,0 +52,0 @@ else if (typeof vi !== "undefined") { |
{ | ||
"name": "react-intersection-observer", | ||
"version": "9.11.0", | ||
"version": "9.12.0", | ||
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API", | ||
@@ -46,3 +46,4 @@ "type": "commonjs", | ||
"storybook:build": "pnpm build:bundle && pnpm --filter storybook build", | ||
"test": "vitest" | ||
"test": "vitest", | ||
"test:browser": "vitest --workspace=vitest.workspace.ts" | ||
}, | ||
@@ -113,5 +114,7 @@ "keywords": [ | ||
"@testing-library/react": "^16.0.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"@vitest/browser": "^2.0.1", | ||
"@vitest/coverage-istanbul": "^2.0.1", | ||
"jsdom": "^24.1.0", | ||
@@ -121,2 +124,3 @@ "lint-staged": "^15.2.7", | ||
"npm-run-all": "^4.1.5", | ||
"playwright": "^1.45.1", | ||
"react": "^18.3.1", | ||
@@ -128,3 +132,3 @@ "react-dom": "^18.3.1", | ||
"typescript": "^5.5.3", | ||
"vitest": "^1.6.0" | ||
"vitest": "^2.0.1" | ||
}, | ||
@@ -131,0 +135,0 @@ "peerDependenciesMeta": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
149781
1448
0
21