update package security#1046
Open
pandigresik wants to merge 1 commit into
Open
Conversation
|
🔄 AI PR Review sedang antri di server...
|
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.
PR #1110 — Security Update Packages & Build System Fix
Branch:
fix/security_update→rilis-devDeskripsi Singkat
Memperbarui package NPM dan Composer yang memiliki celah keamanan (CVE), serta melakukan penyesuaian kode akibat breaking changes dari upgrade major tersebut. Update ini mencakup:
require is not defined,$(...).select2 is not a function, dual jQuery)Perubahan yang Dilakukan
1. Update Dependensi Composer
alexusmai/laravel-file-manager^3.0^3.3.2intervention/image^2.7^3.11intervention/image-laravel^1.5mews/captcha^3.3^3.4mews/purifier^3.4^3.4(lock update)post-install-cmduntuk publish laravel assets2. Update Dependensi NPM
vite^4.0.0^7.0.0laravel-vite-plugin^0.7.2^2.0.0summernote(override)0.8.200.9.1admin-lteoverride3. Migrasi Intervention/Image v2 → v3 (Breaking Changes)
File berubah:
app/Helpers/general.phpapp/Http/Controllers/Api/IdentitasController.phpconfig/app.phpconfig/image.php(baru)Perubahan API:
4. Konfigurasi Vite — CommonJS & Build Fixes
File berubah:
vite.config.js,vite.config-web.jscommonjsOptionsbaru — menangani module CJS (select2, jsvalidation, daterangepicker) agarrequire()ditransformasi dengan benarinclude: [/node_modules/, /select2-bridge/, /jsvalidation/]transformMixedEsModules: truedefaultIsModuleExports: true['**/node_modules/select2/**']mencegah double jQuery injection ke select2splitVendorChunkPlugin()dihapus — sudah deprecated di Vite 5+admin-lte(dari sebelumnya terpisahdatatables) untuk mengatasi circular dependency dan urutan load5. Perbaikan Loading jQuery Plugins
File berubah:
resources/js/bootstrap.js,resources/js/web.js, file baruresources/js/select2-bridge.cjsSelect2:
import 'select2/dist/js/select2.full.min'(side-effect, factory tidak pernah dipanggil)bootstrap.js: import via bridgeselect2-bridge.cjs, laluselect2Factory(window, $)web.js:import select2 from 'select2/...'laluselect2(window, $).cjsmemastikan Rollup/CJS plugin memproses file ini sebagai CommonJSDataTables:
.min.js→.mjs(ESM native) untuk tree-shaking lebih baikdatatables.net-responsivedandatatables.net-selectyang sebelumnya tidak diimporapp.scssDual jQuery (Penyebab
$(...).daterangepicker is not a function):<script src="vendor/jquery/jquery.min.js">dipindah ke dalam blok@if(!mix))6. Security Policy
File:
app/Policies/CustomCSPPolicy.phpconnect-srcuntukhttps://unpkg.com/leaflet@1.9.4/dist/leaflet.js.map7. Public Vendor Assets
File baru:
public/vendor/jquery/8. Rebuilt Asset Bundles
public/build/danpublic/build-web/di-rebuild dengan Vite 7, menghasilkan ulang:admin-lte-*.js,app-*.js,tinymce-*.js,web-*.jsAlasan Perubahan
overridesdi package.json untuk memaksa summernote ke 0.9.1commonjsOptionsmenghasilkanrequire is not defineduntuk module CJS (select2, jsvalidation). Konfigurasi CJS plugin diperlukan<script>tag berbeda instance dengan jQuery dari Vite bundle, menyebabkan plugin jQuery tidak terdaftar pada instance yang benarDampak Perubahan
Positif
require is not definedhilangRisiko
splitVendorChunkPlugindihapus — vendor chunking mungkin berbedaTesting Checklist
Build & Deploy
npm run buildberhasil tanpa errornpm run build-webberhasil tanpa errorUpload & Image Processing
Halaman dengan jQuery Plugins
Web Build (Public Facing)
build-web— halaman publik tidak errorSummernote
Security
npm audit/composer audit)Regression
Screenshots / Video
simplescreenrecorder-2026-05-29_09.08.12.mp4
simplescreenrecorder-2026-05-29_09.09.35.mp4
simplescreenrecorder-2026-05-29_09.07.22.mp4