Skip to content

Commit 433bacf

Browse files
authored
[6.0] Remove chosen (#45018)
* Remove chosen * missed tag.js * Update minify-vendor.mjs * Update patches.mjs
1 parent 89f9d4a commit 433bacf

File tree

11 files changed

+1
-528
lines changed

11 files changed

+1
-528
lines changed

build/build-modules-js/init/minify-vendor.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const RootPath = process.cwd();
88

99
const folders = [
1010
'media/vendor/accessibility/js',
11-
'media/vendor/chosen/js',
1211
'media/vendor/debugbar',
1312
'media/vendor/diff/js',
1413
'media/vendor/es-module-shims/js',

build/build-modules-js/init/patches.mjs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,9 @@ const RootPath = process.cwd();
1010
*
1111
* @returns {Promise}
1212
*/
13-
export const patchPackages = async (options) => {
13+
export const patchPackages = async () => {
1414
const mediaVendorPath = join(RootPath, 'media/vendor');
1515

16-
// Joomla's hack to expose the chosen base classes so we can extend it ourselves
17-
// (it was better than the many hacks we had before. But I'm still ashamed of myself).
18-
const dest = join(mediaVendorPath, 'chosen');
19-
const chosenPath = `${dest}/${options.settings.vendors['chosen-js'].js['chosen.jquery.js']}`;
20-
let ChosenJs = await readFile(chosenPath, { encoding: 'utf8' });
21-
ChosenJs = ChosenJs.replace(
22-
'}).call(this);',
23-
` document.AbstractChosen = AbstractChosen;
24-
document.Chosen = Chosen;
25-
}).call(this);`,
26-
);
27-
await writeFile(chosenPath, ChosenJs, { encoding: 'utf8', mode: 0o644 });
28-
2916
// Include the v5 shim for Font Awesome
3017
const faPath = join(mediaVendorPath, 'fontawesome-free/scss/fontawesome.scss');
3118
const newScss = (await readFile(faPath, { encoding: 'utf8' })).concat(`

build/build-modules-js/settings.json

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -631,40 +631,6 @@
631631
}
632632
]
633633
},
634-
"chosen-js": {
635-
"name": "chosen",
636-
"js": {
637-
"chosen.jquery.js": "js/chosen.jquery.js"
638-
},
639-
"css": {
640-
"chosen.css": "css/chosen.css",
641-
"chosen-sprite.png": "css/chosen-sprite.png",
642-
643-
},
644-
"provideAssets": [
645-
{
646-
"name": "chosen",
647-
"type": "style",
648-
"uri": "chosen.css"
649-
},
650-
{
651-
"name": "chosen",
652-
"type": "script",
653-
"uri": "chosen.jquery.js",
654-
"dependencies": [
655-
"jquery"
656-
]
657-
},
658-
{
659-
"name": "chosen",
660-
"type": "preset",
661-
"dependencies": [
662-
"chosen#style",
663-
"chosen#script"
664-
]
665-
}
666-
]
667-
},
668634
"accessibility": {
669635
"name": "accessibility",
670636
"licenseFilename": "LICENSE",

build/media_source/legacy/js/ajax-chosen.es5.js

Lines changed: 0 additions & 161 deletions
This file was deleted.

build/media_source/legacy/js/joomla-chosen.es5.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)