gulp+browserify+FlowからesbuildベースのTypeScript構成へ移行する - #71
Merged
Conversation
unitrad-view側のモダン化(PR #79)で実証済みの構成に合わせ、gulp-sass/browserify/ babelify/Flow/mochaを撤去し、Node製ビルドスクリプト(tools/build.mjs)+esbuild+ TypeScript+node:testへ全面移行した。React本体のロジックは変更していない (型注釈の追加とesbuildのCJS/ESM interop対応のみ)。 - ビルド: tools/lib/*.mjs(esbuild + sass-embedded + postcss + ejs)。confが 1件のみのため、view側の--list一括ビルドやtools/ci/verify配下は移植しない - 型: flow/declare.js相当をsrc/types.d.tsへ。tsconfigはstrict:false/ noImplicitAny:falseの現実的な設定 - superagent依存をfetchベースの自作request.tsへ置き換え、core-jsを撤去 - react-paginateのCJS/ESM interop起因のReact error #130を予防的に修正 - テストはnode:test + 自作tsx-loaderへ移行し、view側同様history/request/ view描画のテストも追加してカバレッジを揃えた - ESLint/Babel/Flow設定一式を削除し、tsc --noEmitの型チェックのみに一本化 - CIにtypecheckステップを追加 新旧ビルドの出力比較: app.css/index.htmlはSHA256まで完全一致、app.jsは 193643 bytes(旧280880 bytes。core-js等の撤去による削減)。型チェック0エラー、 node:testスイート185件全件パス。 view側で見つかった砺波市・白河市・山口・横浜市向けの顧客固有ハードコードは view固有のカスタマイズのため移植していない。Sassの@import→@use移行は このリポジトリで既に完了済み(PR #70)のため対象外。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TBuCdY1AzZrVnRHRXUkLyG
ryuuji
added a commit
that referenced
this pull request
Aug 5, 2026
unitrad-view側のモダン化(PR #79)で実証済みの構成に合わせ、gulp-sass/browserify/ babelify/Flow/mochaを撤去し、Node製ビルドスクリプト(tools/build.mjs)+esbuild+ TypeScript+node:testへ全面移行した。React本体のロジックは変更していない (型注釈の追加とesbuildのCJS/ESM interop対応のみ)。 - ビルド: tools/lib/*.mjs(esbuild + sass-embedded + postcss + ejs)。confが 1件のみのため、view側の--list一括ビルドやtools/ci/verify配下は移植しない - 型: flow/declare.js相当をsrc/types.d.tsへ。tsconfigはstrict:false/ noImplicitAny:falseの現実的な設定 - superagent依存をfetchベースの自作request.tsへ置き換え、core-jsを撤去 - react-paginateのCJS/ESM interop起因のReact error #130を予防的に修正 - テストはnode:test + 自作tsx-loaderへ移行し、view側同様history/request/ view描画のテストも追加してカバレッジを揃えた - ESLint/Babel/Flow設定一式を削除し、tsc --noEmitの型チェックのみに一本化 - CIにtypecheckステップを追加 新旧ビルドの出力比較: app.css/index.htmlはSHA256まで完全一致、app.jsは 193643 bytes(旧280880 bytes。core-js等の撤去による削減)。型チェック0エラー、 node:testスイート185件全件パス。 view側で見つかった特定顧客サイト向けの顧客固有ハードコードは view固有のカスタマイズのため移植していない。Sassの@import→@use移行は このリポジトリで既に完了済み(PR #70)のため対象外。 Claude-Session: https://claude.ai/code/session_01TBuCdY1AzZrVnRHRXUkLyG Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
姉妹リポジトリ
unitrad-viewで2026-07-31にマージされたモダン化(PR #79)と同等の構成へ、unitrad-uiを移行します。tools/build.mjs) + esbuild + TypeScript +node:testsuperagent→ fetchベースの自作src/js/request.tscore-jsを撤去api/app/history/sort/view/*)のロジックは変更していません。型注釈の追加と、esbuildのCJS/ESM interopに起因するreact-paginateのReact error #130対策のみですnode:test+ 自作tools/tsx-loader.mjsへ移行。view側に合わせてhistory/request/Reactコンポーネント描画のテストも追加し、カバレッジを揃えました(既存のapi/sortは移植)tsc --noEmitの型チェックのみに一本化npm run typecheckステップを追加移植しなかったもの
@import→@use移行: このリポジトリでは既に完了済み(refactor(style): 非推奨の Sass @import を @use へ置き換える #70)のため対象外です。むしろunitrad-view側がまだ未着手(顧客config多数への影響が理由で保留中)なので、方向としては本リポジトリが先行していますunitrad-viewのbook.tsxには特定の顧客サイト向けカスタマイズ(特定図書館ID判定・地域別カバー画像表示など)がありましたが、これらはオープンソース版に持ち込むべきではないため除外しています--list一括ビルド、tools/verify/*、tools/ci/*など。confが1件のみの本リポジトリでは過剰なため検証
npm run typecheck: 0エラーnpm test:node:testスイート185件全件パスapp.css・index.htmlは移行前とSHA256まで完全一致。app.jsは193,643 bytes(移行前280,880 bytes。core-js等の撤去による削減)node tools/build.mjs debugでプレビューサーバーを起動し、index.html/app.js/app.cssが正しく配信されることを確認Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01TBuCdY1AzZrVnRHRXUkLyG