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

fix(compile-sfc): remove optional check #5958

Merged
merged 1 commit into from May 23, 2022
Merged

Conversation

jineshjin
Copy link
Contributor

npx depcheck was failing with latest version
image

@netlify
Copy link

netlify bot commented May 19, 2022

👷 Deploy request for vuejs-coverage pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b719151

@netlify
Copy link

netlify bot commented May 19, 2022

👷 Deploy request for vue-next-template-explorer pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b719151

@netlify
Copy link

netlify bot commented May 19, 2022

👷 Deploy request for vue-sfc-playground pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b719151

@liulinboyi
Copy link
Member

Starting with v3.2.34-beta.1, the compiled product is es2020, which requires node version node 14+ and uses new javascript features such as ?..

Related commit build: output es2020 (target node 14+) for cjs/server builds.

@jineshjin
Copy link
Contributor Author

@jineshjin jineshjin changed the title fix(compile-sfc): should work with depcheck fix(compile-sfc): remove optional check May 19, 2022
@liulinboyi
Copy link
Member

Already checking here https://github.com/vuejs/core/blob/main/packages/compiler-sfc/src/rewriteDefault.ts#L54 so is that needed?

You are right, it is not necessary.

@yyx990803
Copy link
Member

fixed via cf55480

@yyx990803 yyx990803 closed this May 20, 2022
@zhmushan
Copy link
Contributor

@yyx990803 This PR is not intended to fix the problem that Nodejs12 cannot run, but to remove unnecessary optional check.

@yyx990803
Copy link
Member

yyx990803 commented May 20, 2022

The optional chaining is unnecessary, but the intention was to fix the syntax in Node 12.

This can be merged as a refactor/chore but not a fix.

@yyx990803 yyx990803 reopened this May 20, 2022
@yyx990803 yyx990803 merged commit 0cd21ba into vuejs:main May 23, 2022
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

4 participants