Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-responsive

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive - npm Package Compare versions

Comparing version 10.0.0-beta.1 to 10.0.0

46

package.json
{
"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

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