Le jeudi 30 octobre 2025, 00:48:12 heure normale d’Europe centrale Jérémy Lal a écrit :
> Le mer. 29 oct. 2025 à 23:12, Bastien Roucaries <rouca@debian.org> a écrit :
>
> > Hi,
> >
> > Only highligh.js block removal of this two packages
> >
> > Can someone get a glimpse ?
> >
> > I will soon fill a RM bug
> >
>
> I don't think it's necessary:
Could you push and upload ? I will then ask RM
I "almost" got highlight.js right, however, I'm a bit stuck because it builds fine with
node-glob/experimental (10) but not node-glob/unstable (8).
Is it worth trying to make it compatible with glob 8 ?
rouca
> highlight.js/experimental can be built using tools/build.js, an extra
> module (dependency-resolver, quite old and small), and this patch:
>
> --- highlight.js-10.0.1+dfsg1.orig/tools/build.js
> +++ highlight.js-10.0.1+dfsg1/tools/build.js
> @@ -74,8 +74,8 @@ commander
> '[all, browser, cdn, node]',
> 'browser')
> .parse(process.argv);
> -
> -commander.target = commander.target.toLowerCase();
> +const opts = commander.opts();
> +commander.target = opts.target.toLowerCase();
>
> dir.root = path.dirname(__dirname);
> dir.buildRoot = path.join(dir.root, 'build');
> @@ -84,7 +84,7 @@ async function doTarget(target, buildDir
> const build = require(`./build_${target}`);
> process.env.BUILD_DIR = buildDir;
> await clean(buildDir);
> - await build.build({languages: commander.args, minify: commander.minify});
> + await build.build({languages: commander.args, minify: opts.minify});
> };
>
> async function doBuild() {
> --- highlight.js-10.0.1+dfsg1.orig/tools/build_browser.js
> +++ highlight.js-10.0.1+dfsg1/tools/build_browser.js
> @@ -1,6 +1,6 @@
> const _ = require('lodash');
> const fs = require("fs").promises;
> -const glob = require("glob-promise");
> +const { glob } = require("glob");
> const path = require("path");
> const zlib = require('zlib');
> const Terser = require("terser");
> @@ -25,7 +25,7 @@ async function buildBrowser(options) {
> languages = filter(languages, options["languages"]);
>
> await installDocs();
> - await installDemo(languages);
> + // await installDemo(languages);
>
> log("Preparing languages.")
> await Promise.all(
> --- highlight.js-10.0.1+dfsg1.orig/tools/lib/external_language.js
> +++ highlight.js-10.0.1+dfsg1/tools/lib/external_language.js
> @@ -1,6 +1,6 @@
> const fs = require("fs")
> const fsProm = require("fs").promises
> -const glob = require("glob-promise")
> +const { glob } = require("glob")
> const path = require("path")
>
> const MODULE_DEFINER = /module\.exports\.definer\s*=/;
> --- highlight.js-10.0.1+dfsg1.orig/tools/lib/language.js
> +++ highlight.js-10.0.1+dfsg1/tools/lib/language.js
> @@ -97,7 +97,7 @@ async function compileLanguage (language
> async function getLanguages() {
> let languages = [];
> glob.sync("./src/languages/*.js").forEach((file) => {
> - languages.push(Language.fromFile(file));
> + languages.push(Language.fromFile("./" + file));
> });
> let extraPackages = await getThirdPartyPackages();
> for (let ext of extraPackages) {
>