Socket
Socket
Sign inDemoInstall

@emotion/cache

Package Overview
Dependencies
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/cache - npm Package Compare versions

Comparing version 11.5.0 to 11.6.0

36

CHANGELOG.md
# @emotion/cache
## 11.6.0
### Minor Changes
- [#2521](https://github.com/emotion-js/emotion/pull/2521) [`516fe458`](https://github.com/emotion-js/emotion/commit/516fe458058c9ec8218740472b301e935801ebbc) Thanks [@mnajdova](https://github.com/mnajdova)! - Added `insertionPoint` option to the `createCache`. It can be used to insert rules after the specified element. For example, to use it with the `CacheProvider` from `@emotion/react` you can do this:
```jsx
const head = document.querySelector('head')
// <meta name="emotion-insertion-point" content="">
const emotionInsertionPoint = document.createElement('meta')
emotionInsertionPoint.setAttribute('name', 'emotion-insertion-point')
emotionInsertionPoint.setAttribute('content', '')
head.appendChild(emotionInsertionPoint)
// the emotion sheets should be inserted right after the meta tag
const cache = createCache({
key: 'my-app',
insertionPoint: emotionInsertionPoint
})
function App() {
return (
<CacheProvider value={cache}>
<Main />
</CacheProvider>
)
}
```
### Patch Changes
- Updated dependencies [[`9e82a991`](https://github.com/emotion-js/emotion/commit/9e82a991624b18c20c46c5974e8a127c94a54711)]:
- @emotion/sheet@1.1.0
## 11.5.0

@@ -4,0 +40,0 @@

3

dist/emotion-cache.browser.cjs.js

@@ -323,3 +323,4 @@ 'use strict';

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -326,0 +327,0 @@ nonce: options.nonce,

@@ -319,3 +319,4 @@ import { StyleSheet } from '@emotion/sheet';

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -322,0 +323,0 @@ nonce: options.nonce,

@@ -393,3 +393,4 @@ 'use strict';

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -396,0 +397,0 @@ nonce: options.nonce,

@@ -138,3 +138,4 @@ "use strict";

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -141,0 +142,0 @@ nonce: options.nonce,

@@ -384,3 +384,4 @@ import { StyleSheet } from '@emotion/sheet';

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -387,0 +388,0 @@ nonce: options.nonce,

{
"name": "@emotion/cache",
"version": "11.5.0",
"version": "11.6.0",
"description": "emotion's cache",

@@ -19,3 +19,3 @@ "main": "dist/emotion-cache.cjs.js",

"@emotion/memoize": "^0.7.4",
"@emotion/sheet": "^1.0.3",
"@emotion/sheet": "^1.1.0",
"@emotion/utils": "^1.0.0",

@@ -22,0 +22,0 @@ "@emotion/weak-memoize": "^0.2.5",

@@ -56,3 +56,3 @@ # @emotion/cache

A DOM node that emotion will insert all of its style tags into. This is useful for inserting styles into iframes.
A DOM node that emotion will insert all of its style tags into. This is useful for inserting styles into iframes or windows.

@@ -59,0 +59,0 @@ ### `prepend`

@@ -31,3 +31,4 @@ // @flow

speedy?: boolean,
prepend?: boolean
prepend?: boolean,
insertionPoint?: HTMLElement
}

@@ -256,3 +257,4 @@

speedy: options.speedy,
prepend: options.prepend
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),

@@ -259,0 +261,0 @@ nonce: options.nonce,

@@ -39,5 +39,7 @@ // Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>

speedy?: boolean
/** @deprecate use `insertionPoint` instead */
prepend?: boolean
insertionPoint?: HTMLElement
}
export default function createCache(options: Options): EmotionCache
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