Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@i-am-the-slime
Copy link
Contributor

This is in response to #554

In my local testing it works, however it only works for the first story in the export list, is this what we want?
Otherwise I could probably loop but the code would be a bit more involved.

@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2024

🦋 Changeset detected

Latest commit: a9465c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@ladle/react Patch
example Patch
test-addons Patch
test-babel Patch
test-config Patch
test-config-ts Patch
test-css Patch
test-decorators Patch
test-playwright Patch
test-programmatic Patch
test-provider Patch
test-baseweb Patch
test-msw Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tajo
Copy link
Owner

tajo commented Apr 10, 2024

In my local testing it works, however it only works for the first story in the export list, is this what we want?

It should definitely work for multiple stories/specifiers. Also, tests need to be added.

This is an interesting case:

const joe = 'joe';

export { joe, joe as jim }

Should parse outjoe and jim

@i-am-the-slime i-am-the-slime force-pushed the patch-1 branch 2 times, most recently from deeea17 to 64dc654 Compare April 11, 2024 18:02
@i-am-the-slime
Copy link
Contributor Author

i-am-the-slime commented Apr 11, 2024

@tajo

It now

  • parses all stories in the block
  • uses the exported name if there is one
  • has a test for this

It doesn't resolve the original AST node of what's being exported so it misses the "function/class/variable" check.
I don't know how to do that. I hope it's okay even without this check.

@i-am-the-slime
Copy link
Contributor Author

@tajo Could you have another look, please?

@tajo
Copy link
Owner

tajo commented May 31, 2024

lgtm

@tajo tajo merged commit 755fd68 into tajo:main May 31, 2024
@tajo tajo mentioned this pull request May 31, 2024
@i-am-the-slime
Copy link
Contributor Author

lgtmt

@i-am-the-slime i-am-the-slime deleted the patch-1 branch June 1, 2024 10:44
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.

2 participants