From 73f781851015f1d161079b18b17ed7b5a0b2cd1d Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 12 Nov 2024 22:13:26 -0800 Subject: [PATCH] debug-require: Rename to *.cjs. Signed-off-by: Anders Kaseorg --- .eslintrc.cjs | 2 +- web/debug-require-webpack-plugin.ts | 2 +- web/{debug-require.js => debug-require.cjs} | 0 web/src/bundles/common.ts | 2 +- web/webpack.config.ts | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename web/{debug-require.js => debug-require.cjs} (100%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 84d5b432af..72b8338761 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -291,7 +291,7 @@ module.exports = { }, }, { - files: ["web/debug-require.js"], + files: ["web/debug-require.cjs"], env: { browser: true, es2020: false, diff --git a/web/debug-require-webpack-plugin.ts b/web/debug-require-webpack-plugin.ts index 17a039eafa..5bf154fcb2 100644 --- a/web/debug-require-webpack-plugin.ts +++ b/web/debug-require-webpack-plugin.ts @@ -63,7 +63,7 @@ export default class DebugRequirePlugin implements webpack.WebpackPluginInstance resolver.resolve( {}, import.meta.dirname, - "./debug-require.js", + "./debug-require.cjs", {}, (err?: Error | null, result?: string | false) => { resolve(err ? false : result!); diff --git a/web/debug-require.js b/web/debug-require.cjs similarity index 100% rename from web/debug-require.js rename to web/debug-require.cjs diff --git a/web/src/bundles/common.ts b/web/src/bundles/common.ts index 76c10355d9..d45f289a9d 100644 --- a/web/src/bundles/common.ts +++ b/web/src/bundles/common.ts @@ -1,5 +1,5 @@ import "../sentry.ts"; -import "../../debug-require.js"; +import "../../debug-require.cjs"; import "../alert_popup.ts"; import "../csrf.ts"; import "../blueslip.ts"; diff --git a/web/webpack.config.ts b/web/webpack.config.ts index 11a3c4c20a..02186944b4 100644 --- a/web/webpack.config.ts +++ b/web/webpack.config.ts @@ -84,7 +84,7 @@ const config = ( options: {exposes: "zulip_test"}, }, { - test: path.resolve(import.meta.dirname, "debug-require.js"), + test: path.resolve(import.meta.dirname, "debug-require.cjs"), loader: "expose-loader", options: {exposes: "require"}, },