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

Replace imported values in computed optional member expressions #8187

Merged
merged 3 commits into from Jun 7, 2022

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Jun 2, 2022

Closes #8186
Regression from #8121

This return that we have for member expressions was missing from the optional member expression codepath

let key = match match_property_name(&member) {
Some(v) => v.0,
_ => return Expr::Member(member.fold_children_with(self)),
};

(so before, it always skipped member.prop when it should only skip it for static cases)

@parcel-benchmark
Copy link

parcel-benchmark commented Jun 2, 2022

Benchmark Results

Kitchen Sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

React HackerNews ✅

Timings

Description Time Difference
Cold 11.36s -146.00ms
Cached 560.00ms +53.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/logo.c5bb83f1.png 246.00b +0.00b 5.84s +715.00ms ⚠️

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 2.01m -1.28s
Cached 2.94s +133.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Three.js ✅

Timings

Description Time Difference
Cold 8.34s +15.00ms
Cached 335.00ms -2.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@mischnic mischnic requested a review from devongovett June 7, 2022 15:17
@devongovett devongovett merged commit a5b43a3 into v2 Jun 7, 2022
@devongovett devongovett deleted the optional-chain-export-fixup branch June 7, 2022 16:07
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.

Optional chaining is not working with dynamic property name imported from another file
3 participants