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

@storybook/docs-mdx

Package Overview
Dependencies
Maintainers
29
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/docs-mdx - npm Package Compare versions

Comparing version 0.0.1-canary.3.5adaa89.0 to 0.0.1-canary.3.c25ec0c.0

index.mjs

2

dist/esm/analyze.js

@@ -108,3 +108,3 @@ import * as t from '@babel/types';

}
} else if (t.isJSXExpressionContainer(child) && t.isStringLiteral(child.expression)) {// Skip string literals
} else if (t.isJSXExpressionContainer(child)) {// Skip string literals & other JSX expressions
} else {

@@ -111,0 +111,0 @@ throw new Error(`Unexpected JSX child: ${child.type}`);

@@ -28,10 +28,8 @@ import { dedent } from 'ts-dedent';

expect(analyze(input)).toMatchInlineSnapshot(`
Object {
"imports": Array [],
"isTemplate": false,
"name": undefined,
"of": undefined,
"title": "foobar",
}
`);
Object {
"imports": Array [],
"of": undefined,
"title": "foobar",
}
`);
});

@@ -185,6 +183,6 @@ it('template literal title', () => {

const input = dedent`
import * as ButtonStories from './Button.stories';
import meta, { Basic } from './Button.stories';
<Meta of={ButtonStories} />/>
`;
<Meta of={meta} />/>
`;
expect(analyze(input)).toMatchInlineSnapshot(`

@@ -220,3 +218,21 @@ Object {

});
it('MDX comments', () => {
const input = dedent`
import meta, { Basic } from './Button.stories';
<Meta of={meta} />
{/* whatever */}
`;
expect(analyze(input)).toMatchInlineSnapshot(`
Object {
"imports": Array [
"./Button.stories",
],
"of": "./Button.stories",
"title": undefined,
}
`);
});
});
});
{
"name": "@storybook/docs-mdx",
"version": "0.0.1-canary.3.5adaa89.0",
"version": "0.0.1-canary.3.c25ec0c.0",
"description": "Storybook Docs MDX analyzer",
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/docs2-mdx"
"url": "https://github.com/storybookjs/docs-mdx"
},

@@ -12,4 +12,3 @@ "author": "Michael Shilman <michael@lab80.co>",

"type": "module",
"main": "index.cjs",
"module": "dist/esm/index.js",
"main": "index",
"types": "dist/ts/index.d.ts",

@@ -21,2 +20,3 @@ "files": [

"*.d.ts",
"index.mjs",
"index.cjs"

@@ -23,0 +23,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