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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dry await destructure #4596

Merged
merged 6 commits into from
May 11, 2020
Merged

Conversation

tanhauhau
Copy link
Member

Fixes #4560

@Conduitry
Copy link
Member

It looks like this PR also renamed some tests to mark one as 'skip' and one as 'solo'.

@tanhauhau tanhauhau force-pushed the tanhauhau/dry-await branch from e51eabf to 05ef2ab Compare March 25, 2020 01:10
@tanhauhau
Copy link
Member Author

@Conduitry oops. i've unmarked the solo test. i skipped the test for destructure with default value. or should i remove that test?

@tanhauhau tanhauhau force-pushed the tanhauhau/dry-await branch 2 times, most recently from d7fc082 to 0629cee Compare March 25, 2020 03:47
@tanhauhau tanhauhau force-pushed the tanhauhau/dry-await branch from 0629cee to 6298bf9 Compare March 27, 2020 00:55
@Conduitry
Copy link
Member

Why are you disabling the test at all?

In v3.20.1, I can see that default values in destructuring are supported for {#await} but not {#each}. In DRYing the code, does this make {#await} no longer able to use default values? When you were removing the duplicate code, I would have expected {#each} to gain support for default values in destructuring, not for {#await} to lose it.

Copy link
Member

@Conduitry Conduitry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's been some incompatible work on master in the meantime, unfortunately. There's not a merge conflict, but there's an additional usage of parser.read_destructure_pattern which this PR does not account for.

edit: It looks like the additional usage is coming from #4490.

@tanhauhau tanhauhau force-pushed the tanhauhau/dry-await branch from 091166e to 7944796 Compare May 10, 2020 04:29
@tanhauhau
Copy link
Member Author

@Conduitry rebased master and fixed that usage.

@tanhauhau tanhauhau requested a review from Conduitry May 11, 2020 14:02
@Conduitry Conduitry merged commit 37cc588 into sveltejs:master May 11, 2020
vadirn added a commit to vadirn/svelte that referenced this pull request May 12, 2020
* dry {#each}/{#await} destructuring (sveltejs#4596)

* set .value while setting .__value during spread (sveltejs#4809)

* update changelog

Co-authored-by: Tan Li Hau <[email protected]>
Co-authored-by: Daniel Imfeld <[email protected]>
Co-authored-by: Conduitry <[email protected]>
@tanhauhau tanhauhau deleted the tanhauhau/dry-await branch May 22, 2020 01:11
taylorzane pushed a commit to taylorzane/svelte that referenced this pull request Dec 17, 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.

DRY await destructure and each destructure code
2 participants