[Pkg-javascript-devel] Bug#1000425: node-cheerio: FTBFS in sid
Gianfranco Costamagna
locutusofborg at debian.org
Mon Nov 22 22:45:10 GMT 2021
control: tags -1 patch
Hello, I just discovered that the following patch, extracted from a big upstream refactor fixed the build/test
Description: Fix build failure with part of upstream patch
Origin: https://github.com/cheeriojs/cheerio/commit/b64cb31bb0d40d9d912a4e3a24a5ad22a5cdfced
Bug-Debian: https://bugs.debian.org/1000425
Last-Update: 2021-11-22
--- node-cheerio-1.0.0~rc~10+~cs13.5.2.orig/src/cheerio.ts
+++ node-cheerio-1.0.0~rc~10+~cs13.5.2/src/cheerio.ts
@@ -79,9 +79,9 @@ export class Cheerio<T> implements Array
: null;
if (elements) {
- elements.forEach((elem, idx) => {
- this[idx] = elem;
- });
+ for (let idx = 0; idx < elements.length; idx++) {
+ this[idx] = elements[idx];
+ }
this.length = elements.length;
return this;
}
G.
On Mon, 22 Nov 2021 23:39:21 +0100 Gianfranco Costamagna <locutusofborg at debian.org> wrote:
> Source: node-cheerio
> Version: 1.0.0~rc~10+~cs13.5.2-4
> Severity: serious
>
> Hello, some changes in sid made the package FTBFS
>
> debian/rules binary
> dh binary
> dh_update_autotools_config
> dh_autoreconf
> dh_auto_configure --buildsystem=nodejs
> mkdir node_modules
> ln -s /usr/share/nodejs/css-what ./node_modules/
> ln -s /usr/share/nodejs/domelementtype ./node_modules/
> ln -s /usr/share/nodejs/jest-diff ./node_modules/
> ln -s /usr/share/nodejs/pretty-format ./node_modules/
> ln -s /usr/share/nodejs/ts-jest ./node_modules/
> ln -s /usr/share/nodejs/tslib ./node_modules/
> mkdir -p ./node_modules/\@types
> ln -s /usr/share/nodejs/\@types/node ./node_modules/\@types/
> ln -s /usr/share/nodejs/\@types/parse5 ./node_modules/\@types/
> cp -rL /usr/share/nodejs/css-select ./node_modules/
> cp -rL /usr/share/nodejs/domhandler ./node_modules/
> cp -rL /usr/share/nodejs/dom-serializer ./node_modules/
> cp -rL /usr/share/nodejs/domutils ./node_modules/
> cp -rL /usr/share/nodejs/htmlparser2 ./node_modules/
> mkdir -p ./node_modules/\@types
> cp -rL /usr/share/nodejs/\@types/jest ./node_modules/\@types
> ln -s ../cheerio-select node_modules/cheerio-select
> ln -s ../parse5-htmlparser2-tree-adapter node_modules/parse5-htmlparser2-tree-adapter
> ln -s ../../types-parse5-htmlparser2-tree-adapter node_modules/\@types/parse5-htmlparser2-tree-adapter
> debian/rules override_dh_auto_build
> make[1]: Entering directory '/node-cheerio-1.0.0~rc~10+~cs13.5.2'
> dh_auto_build --buildsystem=nodejs
> Found debian/nodejs/cheerio-select/build
> cd ./cheerio-select && sh -ex ../debian/nodejs/cheerio-select/build
> + tsc
> No build command found, searching known files
> No build command found, searching known files
> tsc
> src/cheerio.ts:83:9 - error TS2322: Type 'Node' is not assignable to type 'T'.
> 'T' could be instantiated with an arbitrary type which could be unrelated to 'Node'.
>
> 83 this[idx] = elem;
> ~~~~~~~~~
>
>
> Found 1 error.
>
> make[1]: *** [debian/rules:12: override_dh_auto_build] Error 2
> make[1]: Leaving directory '/node-cheerio-1.0.0~rc~10+~cs13.5.2'
>
>
> Can you please have a look? thanks
>
> Gianfranco
>
>
More information about the Pkg-javascript-devel
mailing list