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

@loki/integration-core

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loki/integration-core - npm Package Compare versions

Comparing version 0.22.0 to 0.23.0

4

package.json
{
"name": "@loki/integration-core",
"version": "0.22.0",
"version": "0.23.0",
"description": "Loki storybook integration core lib",

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

},
"gitHead": "0afc976871107720e6eddcf70f5a582a9dc958b0"
"gitHead": "510fd0501e27efde006d906b60a0cf1e41c49015"
}

@@ -11,19 +11,19 @@ /* eslint object-shorthand: 0, prefer-arrow-callback: 0, no-var: 0, no-console: 0 */

const originalStoriesOf = storybook.storiesOf;
const skippedStories = {};
function wrapWithSkipStory(add, kind, isDeprecatedCall) {
return function skipStory(story, storyFn, parameters) {
if (isDeprecatedCall && !warnedSkipDeprecation) {
function wrapWithSkipStory(add) {
return function skipStory(story, storyFn, parameters = {}) {
if (!warnedSkipDeprecation) {
warnedSkipDeprecation = true;
console.warn(
'[DEPRECATED] `.add.skip(...)` is deprecated. Please use `.lokiSkip(...)` instead.'
'[DEPRECATED] `.add.skip(...)` and `.lokiSkip(...)` are deprecated. Please pass `{ loki: { skip: true } }` in the third parameter instead.'
);
}
if (!skippedStories[kind]) {
skippedStories[kind] = [];
}
skippedStories[kind].push(story);
return add(story, storyFn, parameters);
return add(story, storyFn, {
...parameters,
loki: {
...(parameters.loki || {}),
skip: true,
},
});
};

@@ -68,5 +68,5 @@ }

const stories = originalStoriesOf(kind, module);
stories.add.skip = wrapWithSkipStory(stories.add.bind(stories), kind, true);
stories.add.skip = wrapWithSkipStory(stories.add.bind(stories), kind);
stories.add.async = wrapWithAsyncStory(stories.add.bind(stories), true);
stories.add.async.skip = wrapWithSkipStory(stories.add.async, kind, true);
stories.add.async.skip = wrapWithSkipStory(stories.add.async, kind);
stories.add.skip.async = wrapWithAsyncStory(stories.add.skip, true);

@@ -109,18 +109,8 @@

function getStorybook() {
return storybook.getStorybook().map(function(component) {
const { kind, stories } = component;
const skipped = skippedStories[kind];
if (skipped) {
return {
kind: kind,
skipped: skipped,
stories: stories.filter(function(story) {
return skipped.indexOf(story.name) === -1;
}),
};
}
return component;
});
return storybook
.raw()
.filter(
({ parameters }) =>
!parameters || !parameters.loki || !parameters.loki.skip
);
}

@@ -127,0 +117,0 @@

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