react-responsive
Advanced tools
Comparing version 10.0.0-beta.1 to 10.0.0
{ | ||
"name": "react-responsive", | ||
"description": "Media queries in react for responsive design", | ||
"version": "10.0.0-beta.1", | ||
"homepage": "http://github.com/contra/react-responsive", | ||
"version": "10.0.0", | ||
"homepage": "http://github.com/yocontra/react-responsive", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/contra/react-responsive.git" | ||
"url": "git://github.com/yocontra/react-responsive.git" | ||
}, | ||
@@ -18,4 +18,3 @@ "author": "Contra <yo@contra.io> (https://contra.io)", | ||
"dist", | ||
"src", | ||
"types" | ||
"src" | ||
], | ||
@@ -37,5 +36,5 @@ "keywords": [ | ||
"hyphenate-style-name": "^1.0.0", | ||
"matchmediaquery": "^0.3.0", | ||
"matchmediaquery": "^0.4.2", | ||
"prop-types": "^15.6.1", | ||
"shallow-equal": "^1.2.1" | ||
"shallow-equal": "^3.1.0" | ||
}, | ||
@@ -46,3 +45,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^11.0.0", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/chai": "^4.3.1", | ||
@@ -56,23 +55,24 @@ "@types/hyphenate-style-name": "^1.0.0", | ||
"@types/react-dom": "^18.0.0", | ||
"@types/sinon": "^10.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.19.0", | ||
"@typescript-eslint/parser": "^5.19.0", | ||
"chai": "^4.1.2", | ||
"@types/sinon": "^17.0.0", | ||
"@typescript-eslint/eslint-plugin": "^7.0.0", | ||
"@typescript-eslint/parser": "^7.0.0", | ||
"chai": "^5.0.0", | ||
"cross-env": "^7.0.0", | ||
"eslint": "^8.13.0", | ||
"eslint-plugin-compat": "^4.0.2", | ||
"gh-pages": "^4.0.0", | ||
"jsdom": "^21.0.0", | ||
"gh-pages": "^6.0.0", | ||
"jsdom": "^24.0.0", | ||
"match-media-mock": "^0.1.1", | ||
"mocha": "^10.0.0", | ||
"prettier": "^2.8.7", | ||
"prettier": "^3.0.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"rollup": "^3.10.0", | ||
"rollup-plugin-node-externals": "^5.1.0", | ||
"rollup": "^4.0.0", | ||
"rollup-plugin-node-externals": "^7.0.0", | ||
"should": "^13.2.1", | ||
"sinon": "^15.0.0", | ||
"ts-node": "^10.0.0", | ||
"typedoc": "^0.23.14", | ||
"typescript": "^5.0.0" | ||
"sinon": "^17.0.0", | ||
"tslib": "^2.6.2", | ||
"tsx": "^4.7.1", | ||
"typedoc": "^0.25.12", | ||
"typescript": "^5.4.2" | ||
}, | ||
@@ -90,8 +90,8 @@ "scripts": { | ||
"lint": "eslint --ext=ts,tsx . src test --fix && prettier . src test --write", | ||
"test": "npx mocha -R spec --require ts-node/register ./test/setup.js test/*_test.{ts,tsx}", | ||
"test": "npx mocha -R spec ./test/setup.js test/*_test.{ts,tsx}", | ||
"docs": "typedoc src/index.ts && gh-pages -d docs" | ||
}, | ||
"engines": { | ||
"node": ">=0.10" | ||
"node": ">=14" | ||
} | ||
} |
@@ -92,3 +92,3 @@ # react-responsive [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] | ||
For a list of all possible shorthands and value types see https://github.com/contra/react-responsive/blob/master/src/mediaQuery.ts#L9. | ||
For a list of all possible shorthands and value types see https://github.com/yocontra/react-responsive/blob/master/src/mediaQuery.ts#L9. | ||
@@ -175,2 +175,11 @@ Any numbers given as shorthand will be expanded to px (`1234` will become `'1234px'`). | ||
If you use next.js, structure your import like this to disable server-side rendering for components that use this library: | ||
```js | ||
import dynamic from 'next/dynamic' | ||
const MediaQuery = dynamic(() => import('react-responsive'), { | ||
ssr: false | ||
}) | ||
``` | ||
##### Testing | ||
@@ -177,0 +186,0 @@ |
@@ -21,6 +21,9 @@ import { useRef, useEffect, useContext, useState } from 'react' | ||
return keys.reduce((result, key) => { | ||
result[hyphenate(key)] = obj[key] | ||
return result | ||
}, {} as Record<string, (typeof obj)[K]>) | ||
return keys.reduce( | ||
(result, key) => { | ||
result[hyphenate(key)] = obj[key] | ||
return result | ||
}, | ||
{} as Record<string, (typeof obj)[K]> | ||
) | ||
} | ||
@@ -27,0 +30,0 @@ |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
351
0
57482
31
21
909
+ Addedmatchmediaquery@0.4.2(transitive)
+ Addedshallow-equal@3.1.0(transitive)
- Removedmatchmediaquery@0.3.1(transitive)
- Removedshallow-equal@1.2.1(transitive)
Updatedmatchmediaquery@^0.4.2
Updatedshallow-equal@^3.1.0