diff --git a/packages/remix-eslint-config/rules/core.js b/packages/remix-eslint-config/rules/core.js index 81a12b49c3a..aff9275c304 100644 --- a/packages/remix-eslint-config/rules/core.js +++ b/packages/remix-eslint-config/rules/core.js @@ -14,7 +14,7 @@ const WARN = 1; const ERROR = 2; const getReplaceRemixImportsMessage = (packageName) => - `All \`remix\` exports are considered deprecated as of v1.3.3. Please use \`@remix-run/${packageName}\` instead. You can run \`remix migrate --migration replace-remix-imports\` to automatically migrate your code.`; + `All \`remix\` exports are considered deprecated as of v1.3.3. Please use \`@remix-run/${packageName}\` instead. Run \`npx @remix-run/dev@latest codemod replace-remix-magic-imports\` to automatically migrate your code.`; const replaceRemixImportsOptions = [ { diff --git a/rollup.utils.js b/rollup.utils.js index 3da6ce8d310..6a0d4301b48 100644 --- a/rollup.utils.js +++ b/rollup.utils.js @@ -196,7 +196,7 @@ function magicExportsPlugin({ packageName, version }) { if (magicExports.values) { let deprecationFunctions = // eslint-disable-next-line no-template-curly-in-string - "const getDeprecatedMessage = (symbol, packageName) => `All \\`remix\\` exports are considered deprecated as of v1.3.3. Please import \\`${symbol}\\` from \\`${packageName}\\` instead. You can run \\`remix migrate --migration replace-remix-imports\\` to automatically migrate your code.`;\n" + + "const getDeprecatedMessage = (symbol, packageName) => `All \\`remix\\` exports are considered deprecated as of v1.3.3. Please import \\`${symbol}\\` from \\`${packageName}\\` instead. Run \\`npx @remix-run/dev@latest codemod replace-remix-magic-imports\\` to automatically migrate your code.`;\n" + "const warn = (fn, message) => (...args) => {\n" + " console.warn(message);\n" + " return fn(...args);\n" + diff --git a/scripts/run-migration-on-examples.js b/scripts/run-migration-on-examples.js index 12875b1fa30..160a6f24623 100644 --- a/scripts/run-migration-on-examples.js +++ b/scripts/run-migration-on-examples.js @@ -3,11 +3,11 @@ const { readdir, stat } = require("fs/promises"); const { join } = require("path"); /** - * @param {string} migration + * @param {string} codemod */ -const main = async (migration) => { - if (!migration) { - console.error("Please specify a migration to run"); +const main = async (codemod) => { + if (!codemod) { + console.error("Please specify a codemod to run"); process.exit(1); } @@ -32,7 +32,7 @@ const main = async (migration) => { } execSync( - `node ${cliPath} migrate --migration ${migration} --force ${examplePath}`, + `node ${cliPath} codemod ${codemod} --force ${examplePath}`, { stdio: "inherit" } ); });