[Pkg-javascript-devel] Bug#977535: Bug#977535: Bug#977535: Bug#977535: pkg-js-tools should create node_modules symlink in autopkgtest

Xavier yadd at debian.org
Wed Dec 16 13:15:06 GMT 2020


Le 16/12/2020 à 13:59, Pirate Praveen a écrit :
> 
> 
> On Wed, Dec 16, 2020 at 1:55 pm, Xavier <yadd at debian.org> wrote:
>> No, this fails with an sbuild, except with nocheck of course.
> 
> It built fine for me as well as on the official buildd normally (without
> enabling nocheck).
> 
> See official build logs
> https://buildd.debian.org/status/fetch.php?pkg=node-d3-geo&arch=all&ver=1.11.9-2&stamp=1608048295&raw=0

No:
 OK with my change:
    https://salsa.debian.org/js-team/node-d3-geo/-/jobs/1249624
 Wrong without:
    https://salsa.debian.org/js-team/node-d3-geo/-/jobs/1249635

I fixed pkg-js-autopkgtest locally, but there is still a problem:

$ cat debian/tests/pkg-js/test
(
        cd debian/tests/test_modules/topojson-client
        babeljs -d dist --presets '@babel/preset-env' src/
)
ls -d node_modules/@babel/register && echo "Found local @babel/register"

tape -r @babel/register 'test/**/*.js'

$ ../pkg-js-tools/autopkgtest/runner
# Using package.json
# Node module name is d3-geo
# Build files found: rollup.config.js
# Test files found: test
# Files/dir to be installed from source: test rollup.config.js
# Copy test files
# Copy debian/tests/pkg-js content
'debian/tests/pkg-js' -> '/tmp/smokeIEw8nO/debian/tests/pkg-js'
'debian/tests/pkg-js/.test.swp' ->
'/tmp/smokeIEw8nO/debian/tests/pkg-js/.test.swp'
'debian/tests/pkg-js/test' -> '/tmp/smokeIEw8nO/debian/tests/pkg-js/test'
# Found debian/tests/test_modules directory, let's copy it
'/tmp/smokeIEw8nO/node_modules/topojson-client' ->
'../debian/tests/test_modules/topojson-client'
'/tmp/smokeIEw8nO/node_modules/world-atlas' ->
'../debian/tests/test_modules/world-atlas'
Found debian/nodejs/extlinks
/usr/share/nodejs/@babel/register
'/tmp/smokeIEw8nO/node_modules/@babel/register' ->
'/usr/share/nodejs/@babel/register'
# Searching module in /usr/lib/nodejs/d3-geo
# Searching module in /usr/lib/*/nodejs/d3-geo
# Searching module in /usr/share/nodejs/d3-geo
# Found /usr/share/nodejs/d3-geo
# Searching files to link in /usr/share/nodejs/d3-geo
'./dist' -> '/usr/share/nodejs/d3-geo/dist'
'./package.json' -> '/usr/share/nodejs/d3-geo/package.json'
'./src' -> '/usr/share/nodejs/d3-geo/src'
# Launch debian/tests/pkg-js/test with sh -ex
+ cd debian/tests/test_modules/topojson-client
+ babeljs -d dist --presets @babel/preset-env src/
Successfully compiled 13 files with Babel (698ms).
+ ls -d node_modules/@babel/register
node_modules/@babel/register
+ echo Found local @babel/register
Found local @babel/register
+ tape -r @babel/register test/**/*.js
/tmp/smokeIEw8nO/test/polygonContains-test.js:1
import tape from "tape";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Module._compile (/usr/share/nodejs/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Object.newLoader [as .js]
(/usr/share/nodejs/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at /usr/lib/nodejs/tape/bin/tape:39:9



More information about the Pkg-javascript-devel mailing list