dillon1000/react

Commit

Retain locations when using babel cloneNode in lambdas

It turns out the third parameter to `cloneNode` is ["If the third parameter is 
true, the cloned nodes exclude location 
properties."](https://github.com/babel/babel/blob/c060e5e3d538a174a017edb7e75b07e80ccb55b7/packages/babel-types/src/clone/cloneNode.ts#L35-L39) 
strips away locations if its true, so to fix simply change this to false
Browse files
Changed paths25 files
First-parent comparison
M compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/_bug.capturing-reference-changes-type.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-primitive.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-shadowed-primitive.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capture-param-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-fun-alias-captured-mutate-2.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-fun-alias-captured-mutate-arr-2.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-captured-mutate-arr.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-captured-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-computed-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-receiver-computed-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-alias-receiver-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-mutate-2.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-mutate-nested.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-mutate.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-func-simple-alias.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-function-capture-ref-before-rename.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/capturing-function-decl.expect.md ModifiedD compiler/forget/src/__tests__/fixtures/compiler/error.lambda-with-fbt.expect.md DeletedM compiler/forget/src/__tests__/fixtures/compiler/function-declaration-simple.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/lambda-capture-returned-alias.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/lambda-mutate-shadowed-object.expect.md ModifiedA compiler/forget/src/__tests__/fixtures/compiler/lambda-with-fbt.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/error.lambda-with-fbt.js →compiler/forget/src/__tests__/fixtures/compiler/lambda-with-fbt.js Renamed
Patch

Files changed

Rendering syntax-highlighted changes…