Skip to content

Commit

Permalink
fix: update references to codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Nov 18, 2022
1 parent 539b10c commit 5eed6bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/remix-eslint-config/rules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
2 changes: 1 addition & 1 deletion rollup.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down
10 changes: 5 additions & 5 deletions scripts/run-migration-on-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -32,7 +32,7 @@ const main = async (migration) => {
}

execSync(
`node ${cliPath} migrate --migration ${migration} --force ${examplePath}`,
`node ${cliPath} codemod ${codemod} --force ${examplePath}`,
{ stdio: "inherit" }
);
});
Expand Down

0 comments on commit 5eed6bf

Please sign in to comment.