並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 9 件 / 9件

新着順 人気順

codemodの検索結果1 - 9 件 / 9件

  • TypeScript の codemod ツール開発時の失敗談と得た知見メモ

    更新履歴 (2025-05-15) ts-morph の API で躓いたポイントの具体例を追記 (2025-05-13) 公開 Codemod とは Codemod(コードモッド)とは、"Code Modification"(コード修正)の略語で、プログラムを使ってコードベース全体にわたる変更やリファクタリングを自動的に行うプロセスや、そのためのツールを指します。 手作業で一つ一つコードを修正する代わりに、スクリプト(codemodスクリプトやトランスフォームと呼ばれる)を実行することで、大規模なコードベースに対しても一貫性のある変更を効率的かつ正確に適用することを目的としています。 主な目的と用途: APIの変更への追従: ライブラリやフレームワークがバージョンアップし、古いAPIが非推奨になったり、使い方が変わったりした場合に、コードベース全体の該当箇所を新しいAPIの呼び出し方に自

      TypeScript の codemod ツール開発時の失敗談と得た知見メモ
    • AI に codemod を書かせて大規模リファクタリングに立ち向かう

      リファクタリングをしていて、ガッと数十ファイルにわたって一括で書き換えたいような場面、みなさんもありますよね? 場合によっては数百かもしれません。 (「そんなに広範囲に影響する時点で設計が悪いのでは?」という指摘はあるかもしれませんが、この記事では横に置いておきます。) この記事は、「AI に codemod を書かせて、それを実行すると書き換えが楽ですよ」というお話です。codemod のことを全く知らなくても、AI に書いてもらえば今日から使っていけるはずです。やることは簡単で、要は以下の手順を回すだけです。 「これをこう書き換える codemod を作って」と AI にお願いする codemod を実行して書き換える 書き換え結果を確認 満足できなかったら、codemod を調整して 2 に戻る 書き換え完了 なお、TypeScript を例に説明をしていますが、言語を問わずに応用で

        AI に codemod を書かせて大規模リファクタリングに立ち向かう
      • GitHub - antfu/eslint-plugin-command: Comment-as-command for one-off codemod with ESLint.

        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

          GitHub - antfu/eslint-plugin-command: Comment-as-command for one-off codemod with ESLint.
        • GitHub - yanaemon/moment-to-dayjs-codemod

          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

            GitHub - yanaemon/moment-to-dayjs-codemod
          • GitHub - Airtable/typescript-migration-codemod: The codemod Airtable used when migrating from Flow to TypeScript

            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              GitHub - Airtable/typescript-migration-codemod: The codemod Airtable used when migrating from Flow to TypeScript
            • Codemod partnering with the React team

              We’re excited to announce that we are partnering with the React team to build and maintain the react-codemod repo, offering open-source codemods to enhance the migration experience for React 19 and beyond. React 19 MigrationTo kick things off, we've released 10 new codemods and recipes to assist with upgrading to React 19. Upgrade your React project with the following command: For more details, re

                Codemod partnering with the React team
              • Codemod PlatformでCodemodがより身近になる日が来るかもしれない

                Codemod Platform とは Codemod Platform は codemod の開発とシェアに特化したプラットフォームです。 様々な開発者が開発した codemod を VSCode の拡張機能・コマンドラインから実行できることで以下のような作業の効率化を目指しています。 フレームワークのアップグレード 大規模なリファクタリング 定型的なプログラミング作業 どんな codemod が公開されているのか 公開されている codemod の数 は 160 個ほどです。また、ほとんどがこのツールの開発元自身が作成・公開しているものになっています。(2024/08/01 時点) codemod の種類に関しては Next.js や React に関する codemod を中心に公開されており、React18 から 19 へのマイグレーションに関する codemod を紹介しているペ

                  Codemod PlatformでCodemodがより身近になる日が来るかもしれない
                • Next.js の codemod を読む

                  OGP はマイグレーション作業感を出そうと「工事現場 鉄骨 クレーン」で AI 生成した。前から思っているのだが大体生成に失敗する。あまり精度が良くないのは古くからある無料のものを使っているからなのだが、そろそろ自前でお絵描き AI をホスティングしてもいいかもと思いつつある。 Next.js の codemod 今回の v12 から v13 へのアップグレードガイドでも紹介されていますが、Next.js ではマイグレーションを支援する codemod が存在します。 FYI: https://nextjs.org/docs/upgrading#upgrading-from-12-to-13 codemod はいろんなところで耳にはするものの改めて考えるとどう意味かわからなかったのですが、一般的な言葉かは知らないものの調べたところ https://github.com/facebookar

                    Next.js の codemod を読む
                  • GitHub - eps1lon/types-react-codemod: Collection of transforms for jscodeshift related to `@types/react`

                    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                      GitHub - eps1lon/types-react-codemod: Collection of transforms for jscodeshift related to `@types/react`
                    1