Skip to content

fix(create-frontend): pin jQuery to 3.7.1 for basercms4 projects#901

Open
teppei-d wants to merge 1 commit into
d-zero-dev:devfrom
teppei-d:fix/pin-jquery-to-v3
Open

fix(create-frontend): pin jQuery to 3.7.1 for basercms4 projects#901
teppei-d wants to merge 1 commit into
d-zero-dev:devfrom
teppei-d:fix/pin-jquery-to-v3

Conversation

@teppei-d
Copy link
Copy Markdown
Collaborator

背景

plopfile.jsjquery: 'latest' と指定していたため、2026年1月リリースの jQuery 4.0.0 が取得されていた。
jQuery 4.0 では $.isFunction() をはじめとする非推奨 API が完全削除されており(Upgrade Guide)、colorbox などの依存プラグインが動作しない状態になっていた。

変更内容

  • pkg.dependencies['jquery'] = 'latest''3.7.1' に固定(jQuery 3系最新版)
  • 回帰防止のため、basercms4 生成時に jquery3.7.1 であることを検証するテストを追加

動作確認

jQuery 3.7.1 を適用した環境で、動作しなくなっていたスライドショーが正常に動作することを確認済み。

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
delete pkg.devDependencies['@burger-editor/local'];
pkg.dependencies['@burger-editor/css'] = '2';
pkg.dependencies['jquery'] = 'latest';
pkg.dependencies['jquery'] = '3.7.1'; // jQuery 4系で削除されたAPIとの互換性のため3系の最新版を利用
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7.1 に固定しなければいけない理由をもう少し具体的にコメントで残したほうがいいかなと思いました!
互換性がないコードは isFunction() だけでしょうか?
それらの互換性がない関数はどのファイルが実行していますか?colorbox?だけ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arktds
はい。デモページでエラーになっていたのはisFunction()だけでした。 原因は bge_functions.min.js → jquery.colorbox-min.js の流れで、colorbox が jQuery 4.0 で削除された$.isFunction()に依存しているためです。
以下のようにコメントを修正予定ですがいかがでしょうか?
// colorbox が jQuery 4.0 で削除された $.isFunction() に依存するため 3.x 最新版(3.7.1)に固定

スクリーンショット 2026-05-29 20 10 52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants