Socket
Socket
Sign inDemoInstall

react-intersection-observer

Package Overview
Dependencies
Maintainers
1
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intersection-observer - npm Package Compare versions

Comparing version 9.11.0 to 9.12.0

5

dist/test-utils.d.ts
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.

4

dist/test-utils.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc