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

@loki/browser

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loki/browser - npm Package Compare versions

Comparing version 0.34.0 to 0.35.0

6

package.json
{
"name": "@loki/browser",
"version": "0.34.0",
"version": "0.35.0",
"description": "Loki browser integration",

@@ -23,3 +23,3 @@ "keywords": [

"dependencies": {
"@loki/integration-core": "^0.34.0"
"@loki/integration-core": "^0.35.0"
},

@@ -29,3 +29,3 @@ "publishConfig": {

},
"gitHead": "5f435d19c109fe729aef370349d34380b1044045"
"gitHead": "ddcb39c9d0d30e5b9bfc3c30e27544c921d46f19"
}

@@ -6,2 +6,5 @@ /* eslint-disable no-underscore-dangle */

(window.__STORYBOOK_CLIENT_API__ && window.__STORYBOOK_CLIENT_API__.raw) ||
(window.__STORYBOOK_PREVIEW__ &&
window.__STORYBOOK_PREVIEW__.extract &&
window.__STORYBOOK_PREVIEW__.storyStore.raw) ||
(window.loki && window.loki.getStorybook);

@@ -23,9 +26,2 @@ if (!getStorybook) {

if (
window.__STORYBOOK_CLIENT_API__.storyStore &&
window.__STORYBOOK_CLIENT_API__.storyStore.cacheAllCSFFiles
) {
await window.__STORYBOOK_CLIENT_API__.storyStore.cacheAllCSFFiles();
}
const isSerializable = (value) => {

@@ -40,2 +36,33 @@ try {

if (window.__STORYBOOK_PREVIEW__ && window.__STORYBOOK_PREVIEW__.extract) {
// New official API to extract stories from preview
await window.__STORYBOOK_PREVIEW__.extract();
// Deprecated, will be removed in V9
const stories = window.__STORYBOOK_PREVIEW__.storyStore.raw();
return stories
.map((component) => ({
id: component.id,
kind: component.kind,
story: component.story,
parameters: Object.fromEntries(
Object.entries(component.parameters || {}).filter(
([key, value]) =>
!key.startsWith('__') &&
!blockedParams.includes(key) &&
isSerializable(value)
)
),
}))
.filter(({ parameters }) => !parameters.loki || !parameters.loki.skip);
}
if (
window.__STORYBOOK_CLIENT_API__.storyStore &&
window.__STORYBOOK_CLIENT_API__.storyStore.cacheAllCSFFiles
) {
await window.__STORYBOOK_CLIENT_API__.storyStore.cacheAllCSFFiles();
}
return getStorybook()

@@ -42,0 +69,0 @@ .map((component) => ({

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