From 89c3aac6e18ffeadeeb72667a5c8d2acbc8f12f5 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Fri, 11 Feb 2022 06:09:02 -0800 Subject: [PATCH] Remove `@babel/plugin-transform-object-assign` from preprocessor Summary: React Native has an *implicit* dev dependency on this transform via `metro-react-native-babel-transformer`. The transform replaces `Object.assign` with `babelHelpers.extend`, but `Object.assign` has been available natively since node 4. We intend remove it from metro (https://github.com/facebook/metro/pull/745) as it's no longer needed by any supported runtime - removing RN's small dependency in advance so RN's tests won't break when we do. Changelog: [Internal][Changed] - Remove `babel/plugin-transform-object-assign` from jest preprocessor Reviewed By: motiz88 Differential Revision: D34110208 fbshipit-source-id: 064f8241461fb338de1cd8b53077e8660301aa77 --- jest/preprocessor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/jest/preprocessor.js b/jest/preprocessor.js index f5e34763d84019..b4fae006b41fd5 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -92,7 +92,6 @@ module.exports = { {loose: true}, // dont 'a'.concat('b'), just use 'a'+'b' ], [require('@babel/plugin-transform-exponentiation-operator')], - [require('@babel/plugin-transform-object-assign')], [require('@babel/plugin-transform-for-of'), {loose: true}], [require('@babel/plugin-transform-react-display-name')], [require('@babel/plugin-transform-react-jsx-source')],