Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: path can being falsy #1029

Closed
wants to merge 1 commit into from
Closed

Conversation

ndelangen
Copy link

@ndelangen ndelangen commented Nov 27, 2020

I'm running into this:

WARNING in ./src/stories/components/ButtonTs.vue
Module Warning (from /Users/dev/Projects/GitHub/storybook/core/node_modules/vue-docgen-loader/lib/index.js):
[vue-docgen-loader] failed to parse the component file with docgen-api: Cannot read property 'leadingComments' of null
 @ ./src/stories/components/button-ts.stories.js 54:0-38 82:13-21 87:16-24
 @ ./src/stories sync ^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(js|mdx))$
 @ ./.storybook/generated-stories-entry.js
 @ multi /Users/dev/Projects/GitHub/storybook/core/lib/core/dist/server/common/polyfills.js /Users/dev/Projects/GitHub/storybook/core/lib/core/dist/server/preview/globals.js ./.storybook/storybook-init-framework-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/docs/dist/frameworks/common/config.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/docs/dist/frameworks/vue/config.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/actions/dist/preset/addDecorator.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/actions/dist/preset/addArgs.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/links/dist/preset/addDecorator.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/knobs/dist/preset/addDecorator.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/backgrounds/dist/preset/addDecorator.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/backgrounds/dist/preset/addParameter.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/a11y/dist/a11yRunner.js-generated-other-entry.js /Users/dev/Projects/GitHub/storybook/core/addons/a11y/dist/a11yHighlight.js-generated-other-entry.js ./.storybook/preview.js-generated-config-entry.js ./.storybook/generated-stories-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined

can be seen here:
https://app.circleci.com/pipelines/github/storybookjs/storybook/15225/workflows/61a1c1db-3033-4aa0-b6dd-55e171344580/jobs/281856

Seems related to #753 & storybookjs/storybook#9745

Fix in a different file seems related:
1d3d29e

Here's the PR I'm working on in storybook:
storybookjs/storybook#13289

thank you for your time and consideration 馃檱

@ndelangen ndelangen changed the title fix path can being falsy fix: path can being falsy Nov 27, 2020
@codecov
Copy link

codecov bot commented Nov 27, 2020

Codecov Report

Merging #1029 (799e6f3) into dev (bf42ccc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #1029   +/-   ##
=======================================
  Coverage   63.69%   63.69%           
=======================================
  Files         178      178           
  Lines        4873     4873           
  Branches     1440     1441    +1     
=======================================
  Hits         3104     3104           
  Misses       1697     1697           
  Partials       72       72           
Impacted Files Coverage 螖
packages/vue-docgen-api/src/utils/getDocblock.ts 100.00% <100.00%> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update bf42ccc...799e6f3. Read the comment docs.

@elevatebart
Copy link
Member

Thank you @ndelangen for taking the time to create a PR here.
I believe what you are trying to fix is already fixed by the build coming up in a few minutes.

check out this issue #1027 for which I added those tests:

it('should not fail when no comments are on a Vue.extends', () => {
const src = `export default Vue.extends({})`
const def = parse(src).get('default')
expect(() => {
if (def) {
componentHandler(documentation, def)
}
}).not.toThrow()
})

and a fix.

@elevatebart elevatebart closed this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants