Skip to content

Conversation

cexbrayat
Copy link
Member

I was trying to update VTU 2.x from Vue beta.15 to beta.16 (beta.17 is the same), and we are having some regressions.

It looks like an SFC with just a template tag was passed to transformVNodeArgs as:
{ render: [Function: render], name: 'component-without-name' }
and now is passed as:
{ render: [Function: render] }
As we need the name for stubbing/shallow mount, we have test failures.

@cexbrayat
Copy link
Member Author

PR is now green with the second commit. Do not merge right now, as I need to think about it, and document properly.

@lmiller1990 lmiller1990 self-requested a review July 1, 2020 10:09
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

mutating the local component might lead to some weirdness but an un-optimal solution is better than a broken library, let's merge this and do a release.

for (const registrationName in locallyRegisteredComponents) {
const component = locallyRegisteredComponents[registrationName]
if (!component['name'] && !component['displayName']) {
component['name'] = registrationName
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this mutation is going to cause and problems 🤔

@lmiller1990 lmiller1990 merged commit 97fada0 into vuejs:master Jul 1, 2020
@cexbrayat
Copy link
Member Author

@lmiller1990 please wait before releasing. I think we can do better (at least, document and test this). Evan commented on Dicsord with a similar idea, but in way that might not lead to problems as this one. But I need to find some time to try it.

@lmiller1990
Copy link
Member

lmiller1990 commented Jul 1, 2020

I did a release before I saw this, I thought this bug was problematic enough to warrant a release (still in alpha so yeah). Either way, people using stubs will be having a problem, but this should be less problematic than straight up not working, right? 🤔

I will also try to find some time to work on this, been busy between triaging issues in V1, docs...

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