From dc44bca85b19481267ae5f7c0c271f8a5a126654 Mon Sep 17 00:00:00 2001 From: Jeremy JIANG Date: Tue, 28 Jan 2025 00:59:25 +0800 Subject: [PATCH 1/2] fix(react-compiler-healthcheck): Add shebang to banner (#32225) ## Summary PR https://github.com/facebook/react/pull/31963 migrated the bundler from Rollup to esbuild, but the `react-compiler-healthcheck` script lacks a shebang, leading to issues with `npx` not being able to execute it. https://github.com/facebook/react/blob/dc7578290f1bc55c358bee3a7eeb5e5f4551adfd/compiler/packages/react-compiler-healthcheck/rollup.config.js#L60-L78 https://github.com/facebook/react/blob/9eabb37338e6bea18441dec58a4284fe00ee09ae/compiler/packages/react-compiler-healthcheck/scripts/build.js#L38-L53 ## How did you test this change? **Before** (fail) ```shell (main)> npx --version 10.5.0 (main)> npx react-compiler-healthcheck /home/jeremy/.npm/_npx/67b118a83a29962c/node_modules/.bin/react-compiler-healthcheck: line 1: /bin: Is a directory /home/jeremy/.npm/_npx/67b118a83a29962c/node_modules/.bin/react-compiler-healthcheck: line 2: syntax error near unexpected token `(' /home/jeremy/.npm/_npx/67b118a83a29962c/node_modules/.bin/react-compiler-healthcheck: line 2: ` * Copyright (c) Meta Platforms, Inc. and affiliates.' ``` **After** ```shell (main)> npx react-compiler-healthcheck Successfully compiled 108 out of 146 components. StrictMode usage not found. Found no usage of incompatible libraries. ``` --- compiler/packages/react-compiler-healthcheck/scripts/build.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/packages/react-compiler-healthcheck/scripts/build.js b/compiler/packages/react-compiler-healthcheck/scripts/build.js index b8e0f88d6c8a5..e7b36fd1cd008 100755 --- a/compiler/packages/react-compiler-healthcheck/scripts/build.js +++ b/compiler/packages/react-compiler-healthcheck/scripts/build.js @@ -36,7 +36,9 @@ const config = { format: 'cjs', platform: 'node', banner: { - js: `/** + js: `#!/usr/bin/env node + +/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the From ddc26c9db16a7be2f05eacc6f0228f42eeff3803 Mon Sep 17 00:00:00 2001 From: Eli White Date: Mon, 27 Jan 2025 10:10:40 -0800 Subject: [PATCH 2/2] Swap to Eli's new GitHub username in Maintainers file (#32237) ## Summary ## How did you test this change? --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index f204a5ca66def..6c7b2644b09d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20,6 +20,6 @@ rickhanlonii sebmarkbage sethwebster sophiebits -TheSavior +elicwhite tyao1 yuzhi