豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 32c3bac

Browse files
hanselfmu-chromiumDevtools-frontend LUCI CQ
authored andcommitted
Make collect-strings script compatible with Node v24
According to [1], `import.meta.main` is now a boolean in Node 24, and we can just check its state directly without checking against `import.meta.url`. This CL updates this logic per Node 24 so that our collect-string script runs correctly. [1]: https://nodejs.org/en/blog/release/v24.2.0#importmetamain-is-now-available Bug: 480724539 Change-Id: Iafd721d604dc5c63a34eecedd3c1a9d9f21692d4 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7548063 Reviewed-by: Simon Zünd <szuend@chromium.org> Auto-Submit: Changhao Han <changhaohan@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
1 parent 4d17fb0 commit 32c3bac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/i18n/collect-strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ export function writeStringsToCtcFiles(directory, locale, strings) {
741741
}
742742

743743
// @ts-ignore Test if called from the CLI or as a module.
744-
if (import.meta.url === import.meta.main) {
744+
if (import.meta.main) {
745745
if (process.argv.length === 2) {
746746
throw new Error(
747747
'Provide at least one directory from which to collect strings!',

0 commit comments

Comments
 (0)