Skip to content

fix(transformer/object-rest-spread): arrow function expressions with object rest patterns#12185

Merged
Dunqing merged 9 commits intooxc-project:mainfrom
cod1r:fix-object-rest-spread-with-arrow-fn-transform
Jul 15, 2025
Merged

fix(transformer/object-rest-spread): arrow function expressions with object rest patterns#12185
Dunqing merged 9 commits intooxc-project:mainfrom
cod1r:fix-object-rest-spread-with-arrow-fn-transform

Conversation

@cod1r
Copy link
Contributor

@cod1r cod1r commented Jul 10, 2025

close: #12184

I couldn't figure out where exactly to put tests regarding object rest spread and arrow function transformation.

Probably somewhere underneath tasks/transform_conformance

@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 10, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Jul 10, 2025
@cod1r cod1r changed the title fix: #12184 fix(transformer/object-rest-spread): #12184 Jul 10, 2025
@github-actions github-actions bot added the C-bug Category - Bug label Jul 10, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12185 will not alter performance

Comparing cod1r:fix-object-rest-spread-with-arrow-fn-transform (9c20a77) with main (f130a0c)

Summary

✅ 34 untouched benchmarks

cod1r added 2 commits July 10, 2025 02:41
…ub.com:cod1r/oxc into fix-object-rest-spread-with-arrow-fn-transform
@Dunqing
Copy link
Member

Dunqing commented Jul 12, 2025

Have you found that your test fails? Generally, we use babelHelpers.helper instead of injecting a helper function in tests. By the way, you can run just test-transform --filter TEST-PATH to test what code it transformed.

@cod1r
Copy link
Contributor Author

cod1r commented Jul 12, 2025

Oh ye sry, I was thinking there'd be some way to get the right output but didn't know how to get it. I just thought I'd use the babel playground and get it there by pasting in the input.js contents 😄 .

@Dunqing
Copy link
Member

Dunqing commented Jul 12, 2025

Oh ye sry, I was thinking there'd be some way to get the right output but didn't know how to get it. I just thought I'd use the babel playground and get it there by pasting in the input.js contents 😄 .

You can get a correct output from the Babel playground, but you should add @babel/plugin-external-helper. See Babel Playground

@Dunqing
Copy link
Member

Dunqing commented Jul 14, 2025

There is a conflict in oxc.snap.md, can you run just test-transform to update it?

@Dunqing Dunqing changed the title fix(transformer/object-rest-spread): #12184 fix(transformer/object-rest-spread): arrow function expressions with object rest patterns Jul 14, 2025
Copy link
Member

@Dunqing Dunqing left a comment

Choose a reason for hiding this comment

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

Thanks!

@Dunqing Dunqing merged commit c7b1056 into oxc-project:main Jul 15, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

transformer bug involving object rest spread and arrow function transformation

2 participants