[Pkg-javascript-devel] Bug#954585: should.js: FTBFS: dh_auto_test: error: cd ./should-equal && sh -e ../debian/nodejs/should-equal/test returned exit code 1
Lucas Nussbaum
lucas at debian.org
Sun Mar 22 08:24:15 GMT 2020
Source: should.js
Version: 13.2.3~dfsg-2
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200321 ftbfs-bullseye
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules build
> dh build --with nodejs
> dh_update_autotools_config
> dh_autoreconf
> dh_auto_configure --buildsystem=nodejs
> mkdir node_modules
> ln -s /usr/share/nodejs/rollup-plugin-node-resolve ./node_modules/
> ln -s ../should-equal node_modules/should-equal
> ln -s ../should-format node_modules/should-format
> ln -s ../should-type node_modules/should-type
> ln -s ../should-type-adaptors node_modules/should-type-adaptors
> ln -s ../should-util node_modules/should-util
> dh_auto_build --buildsystem=nodejs
> Found debian/nodejs/should-equal/build
> cd ./should-equal && sh -e ../debian/nodejs/should-equal/build
> (!) You have passed an unrecognized option
> Unknown CLI flag: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18. Allowed options: acorn, acornInjectPlugins, amd, assetFileNames, banner, c, cache, chunkFileNames, chunkGroupingSize, compact, config, context, d, dir, dynamicImportFunction, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, exports, extend, external, f, file, footer, format, freeze, g, globals, h, i, indent, inlineDynamicImports, input, interop, intro, m, manualChunks, moduleContext, n, name, namespaceToStringTag, noConflict, o, onwarn, outro, paths, perf, plugins, preferConst, preserveModules, preserveSymlinks, shimMissingExports, silent, sourcemap, sourcemapExcludeSources, sourcemapFile, strict, treeshake, v, w, watch
>
> index.js → stdout...
> 'use strict';
>
> function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
>
> var t = _interopDefault(require('should-type'));
>
> function format(msg) {
> var args = arguments;
> for (var i = 1, l = args.length; i < l; i++) {
> msg = msg.replace(/%s/, args[i]);
> }
> return msg;
> }
>
> var hasOwnProperty = Object.prototype.hasOwnProperty;
>
> function EqualityFail(a, b, reason, path) {
> this.a = a;
> this.b = b;
> this.reason = reason;
> this.path = path;
> }
>
> function typeToString(tp) {
> return tp.type + (tp.cls ? "(" + tp.cls + (tp.sub ? " " + tp.sub : "") + ")" : "");
> }
>
> var PLUS_0_AND_MINUS_0 = "+0 is not equal to -0";
> var DIFFERENT_TYPES = "A has type %s and B has type %s";
> var EQUALITY = "A is not equal to B";
> var EQUALITY_PROTOTYPE = "A and B have different prototypes";
> var WRAPPED_VALUE = "A wrapped value is not equal to B wrapped value";
> var FUNCTION_SOURCES = "function A is not equal to B by source code value (via .toString call)";
> var MISSING_KEY = "%s has no key %s";
> var SET_MAP_MISSING_KEY = "Set/Map missing key %s";
>
> var DEFAULT_OPTIONS = {
> checkProtoEql: true,
> checkSubType: true,
> plusZeroAndMinusZeroEqual: true,
> collectAllFails: false
> };
>
> function setBooleanDefault(property, obj, opts, defaults) {
> obj[property] = typeof opts[property] !== "boolean" ? defaults[property] : opts[property];
> }
>
> var METHOD_PREFIX = "_check_";
>
> function EQ(opts, a, b, path) {
> opts = opts || {};
>
> setBooleanDefault("checkProtoEql", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("plusZeroAndMinusZeroEqual", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("checkSubType", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("collectAllFails", this, opts, DEFAULT_OPTIONS);
>
> this.a = a;
> this.b = b;
>
> this._meet = opts._meet || [];
>
> this.fails = opts.fails || [];
>
> this.path = path || [];
> }
>
> function ShortcutError(fail) {
> this.name = "ShortcutError";
> this.message = "fail fast";
> this.fail = fail;
> }
>
> ShortcutError.prototype = Object.create(Error.prototype);
>
> EQ.checkStrictEquality = function(a, b) {
> this.collectFail(a !== b, EQUALITY);
> };
>
> EQ.add = function add(type, cls, sub, f) {
> var args = Array.prototype.slice.call(arguments);
> f = args.pop();
> EQ.prototype[METHOD_PREFIX + args.join("_")] = f;
> };
>
> EQ.prototype = {
> check: function() {
> try {
> this.check0();
> } catch (e) {
> if (e instanceof ShortcutError) {
> return [e.fail];
> }
> throw e;
> }
> return this.fails;
> },
>
> check0: function() {
> var a = this.a;
> var b = this.b;
>
> // equal a and b exit early
> if (a === b) {
> // check for +0 !== -0;
> return this.collectFail(a === 0 && 1 / a !== 1 / b && !this.plusZeroAndMinusZeroEqual, PLUS_0_AND_MINUS_0);
> }
>
> var typeA = t(a);
> var typeB = t(b);
>
> // if objects has different types they are not equal
> if (typeA.type !== typeB.type || typeA.cls !== typeB.cls || typeA.sub !== typeB.sub) {
> return this.collectFail(true, format(DIFFERENT_TYPES, typeToString(typeA), typeToString(typeB)));
> }
>
> // as types the same checks type specific things
> var name1 = typeA.type,
> name2 = typeA.type;
> if (typeA.cls) {
> name1 += "_" + typeA.cls;
> name2 += "_" + typeA.cls;
> }
> if (typeA.sub) {
> name2 += "_" + typeA.sub;
> }
>
> var f =
> this[METHOD_PREFIX + name2] ||
> this[METHOD_PREFIX + name1] ||
> this[METHOD_PREFIX + typeA.type] ||
> this.defaultCheck;
>
> f.call(this, this.a, this.b);
> },
>
> collectFail: function(comparison, reason, showReason) {
> if (comparison) {
> var res = new EqualityFail(this.a, this.b, reason, this.path);
> res.showReason = !!showReason;
>
> this.fails.push(res);
>
> if (!this.collectAllFails) {
> throw new ShortcutError(res);
> }
> }
> },
>
> checkPlainObjectsEquality: function(a, b) {
> // compare deep objects and arrays
> // stacks contain references only
> //
> var meet = this._meet;
> var m = this._meet.length;
> while (m--) {
> var st = meet[m];
> if (st[0] === a && st[1] === b) {
> return;
> }
> }
>
> // add `a` and `b` to the stack of traversed objects
> meet.push([a, b]);
>
> // TODO maybe something else like getOwnPropertyNames
> var key;
> for (key in b) {
> if (hasOwnProperty.call(b, key)) {
> if (hasOwnProperty.call(a, key)) {
> this.checkPropertyEquality(key);
> } else {
> this.collectFail(true, format(MISSING_KEY, "A", key));
> }
> }
> }
>
> // ensure both objects have the same number of properties
> for (key in a) {
> if (hasOwnProperty.call(a, key)) {
> this.collectFail(!hasOwnProperty.call(b, key), format(MISSING_KEY, "B", key));
> }
> }
>
> meet.pop();
>
> if (this.checkProtoEql) {
> //TODO should i check prototypes for === or use eq?
> this.collectFail(Object.getPrototypeOf(a) !== Object.getPrototypeOf(b), EQUALITY_PROTOTYPE, true);
> }
> },
>
> checkPropertyEquality: function(propertyName) {
> var _eq = new EQ(this, this.a[propertyName], this.b[propertyName], this.path.concat([propertyName]));
> _eq.check0();
> },
>
> defaultCheck: EQ.checkStrictEquality
> };
>
> EQ.add(t.NUMBER, function(a, b) {
> this.collectFail((a !== a && b === b) || (b !== b && a === a) || (a !== b && a === a && b === b), EQUALITY);
> });
>
> [t.SYMBOL, t.BOOLEAN, t.STRING].forEach(function(tp) {
> EQ.add(tp, EQ.checkStrictEquality);
> });
>
> EQ.add(t.FUNCTION, function(a, b) {
> // functions are compared by their source code
> this.collectFail(a.toString() !== b.toString(), FUNCTION_SOURCES);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.REGEXP, function(a, b) {
> // check regexp flags
> var flags = ["source", "global", "multiline", "lastIndex", "ignoreCase", "sticky", "unicode"];
> while (flags.length) {
> this.checkPropertyEquality(flags.shift());
> }
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.DATE, function(a, b) {
> //check by timestamp only (using .valueOf)
> this.collectFail(+a !== +b, EQUALITY);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> [t.NUMBER, t.BOOLEAN, t.STRING].forEach(function(tp) {
> EQ.add(t.OBJECT, tp, function(a, b) {
> //primitive type wrappers
> this.collectFail(a.valueOf() !== b.valueOf(), WRAPPED_VALUE);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
> });
>
> EQ.add(t.OBJECT, function(a, b) {
> this.checkPlainObjectsEquality(a, b);
> });
>
> [t.ARRAY, t.ARGUMENTS, t.TYPED_ARRAY].forEach(function(tp) {
> EQ.add(t.OBJECT, tp, function(a, b) {
> this.checkPropertyEquality("length");
>
> this.checkPlainObjectsEquality(a, b);
> });
> });
>
> EQ.add(t.OBJECT, t.ARRAY_BUFFER, function(a, b) {
> this.checkPropertyEquality("byteLength");
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.ERROR, function(a, b) {
> this.checkPropertyEquality("name");
> this.checkPropertyEquality("message");
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.BUFFER, function(a) {
> this.checkPropertyEquality("length");
>
> var l = a.length;
> while (l--) {
> this.checkPropertyEquality(l);
> }
>
> //we do not check for user properties because
> //node Buffer have some strange hidden properties
> });
>
> function checkMapByKeys(a, b) {
> var iteratorA = a.keys();
>
> for (var nextA = iteratorA.next(); !nextA.done; nextA = iteratorA.next()) {
> var key = nextA.value;
> var hasKey = b.has(key);
> this.collectFail(!hasKey, format(SET_MAP_MISSING_KEY, key));
>
> if (hasKey) {
> var valueB = b.get(key);
> var valueA = a.get(key);
>
> eq(valueA, valueB, this);
> }
> }
> }
>
> function checkSetByKeys(a, b) {
> var iteratorA = a.keys();
>
> for (var nextA = iteratorA.next(); !nextA.done; nextA = iteratorA.next()) {
> var key = nextA.value;
> var hasKey = b.has(key);
> this.collectFail(!hasKey, format(SET_MAP_MISSING_KEY, key));
> }
> }
>
> EQ.add(t.OBJECT, t.MAP, function(a, b) {
> this._meet.push([a, b]);
>
> checkMapByKeys.call(this, a, b);
> checkMapByKeys.call(this, b, a);
>
> this._meet.pop();
>
> this.checkPlainObjectsEquality(a, b);
> });
> EQ.add(t.OBJECT, t.SET, function(a, b) {
> this._meet.push([a, b]);
>
> checkSetByKeys.call(this, a, b);
> checkSetByKeys.call(this, b, a);
>
> this._meet.pop();
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> function eq(a, b, opts) {
> return new EQ(opts, a, b).check();
> }
>
> eq.EQ = EQ;
>
> module.exports = eq;
> (!) Unresolved dependencies
> https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
> should-type (imported by index.js)
> created stdout in 75ms
> (!) You have passed an unrecognized option
> Unknown CLI flag: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18. Allowed options: acorn, acornInjectPlugins, amd, assetFileNames, banner, c, cache, chunkFileNames, chunkGroupingSize, compact, config, context, d, dir, dynamicImportFunction, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, exports, extend, external, f, file, footer, format, freeze, g, globals, h, i, indent, inlineDynamicImports, input, interop, intro, m, manualChunks, moduleContext, n, name, namespaceToStringTag, noConflict, o, onwarn, outro, paths, perf, plugins, preferConst, preserveModules, preserveSymlinks, shimMissingExports, silent, sourcemap, sourcemapExcludeSources, sourcemapFile, strict, treeshake, v, w, watch
>
> index.js → stdout...
> import t from 'should-type';
>
> function format(msg) {
> var args = arguments;
> for (var i = 1, l = args.length; i < l; i++) {
> msg = msg.replace(/%s/, args[i]);
> }
> return msg;
> }
>
> var hasOwnProperty = Object.prototype.hasOwnProperty;
>
> function EqualityFail(a, b, reason, path) {
> this.a = a;
> this.b = b;
> this.reason = reason;
> this.path = path;
> }
>
> function typeToString(tp) {
> return tp.type + (tp.cls ? "(" + tp.cls + (tp.sub ? " " + tp.sub : "") + ")" : "");
> }
>
> var PLUS_0_AND_MINUS_0 = "+0 is not equal to -0";
> var DIFFERENT_TYPES = "A has type %s and B has type %s";
> var EQUALITY = "A is not equal to B";
> var EQUALITY_PROTOTYPE = "A and B have different prototypes";
> var WRAPPED_VALUE = "A wrapped value is not equal to B wrapped value";
> var FUNCTION_SOURCES = "function A is not equal to B by source code value (via .toString call)";
> var MISSING_KEY = "%s has no key %s";
> var SET_MAP_MISSING_KEY = "Set/Map missing key %s";
>
> var DEFAULT_OPTIONS = {
> checkProtoEql: true,
> checkSubType: true,
> plusZeroAndMinusZeroEqual: true,
> collectAllFails: false
> };
>
> function setBooleanDefault(property, obj, opts, defaults) {
> obj[property] = typeof opts[property] !== "boolean" ? defaults[property] : opts[property];
> }
>
> var METHOD_PREFIX = "_check_";
>
> function EQ(opts, a, b, path) {
> opts = opts || {};
>
> setBooleanDefault("checkProtoEql", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("plusZeroAndMinusZeroEqual", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("checkSubType", this, opts, DEFAULT_OPTIONS);
> setBooleanDefault("collectAllFails", this, opts, DEFAULT_OPTIONS);
>
> this.a = a;
> this.b = b;
>
> this._meet = opts._meet || [];
>
> this.fails = opts.fails || [];
>
> this.path = path || [];
> }
>
> function ShortcutError(fail) {
> this.name = "ShortcutError";
> this.message = "fail fast";
> this.fail = fail;
> }
>
> ShortcutError.prototype = Object.create(Error.prototype);
>
> EQ.checkStrictEquality = function(a, b) {
> this.collectFail(a !== b, EQUALITY);
> };
>
> EQ.add = function add(type, cls, sub, f) {
> var args = Array.prototype.slice.call(arguments);
> f = args.pop();
> EQ.prototype[METHOD_PREFIX + args.join("_")] = f;
> };
>
> EQ.prototype = {
> check: function() {
> try {
> this.check0();
> } catch (e) {
> if (e instanceof ShortcutError) {
> return [e.fail];
> }
> throw e;
> }
> return this.fails;
> },
>
> check0: function() {
> var a = this.a;
> var b = this.b;
>
> // equal a and b exit early
> if (a === b) {
> // check for +0 !== -0;
> return this.collectFail(a === 0 && 1 / a !== 1 / b && !this.plusZeroAndMinusZeroEqual, PLUS_0_AND_MINUS_0);
> }
>
> var typeA = t(a);
> var typeB = t(b);
>
> // if objects has different types they are not equal
> if (typeA.type !== typeB.type || typeA.cls !== typeB.cls || typeA.sub !== typeB.sub) {
> return this.collectFail(true, format(DIFFERENT_TYPES, typeToString(typeA), typeToString(typeB)));
> }
>
> // as types the same checks type specific things
> var name1 = typeA.type,
> name2 = typeA.type;
> if (typeA.cls) {
> name1 += "_" + typeA.cls;
> name2 += "_" + typeA.cls;
> }
> if (typeA.sub) {
> name2 += "_" + typeA.sub;
> }
>
> var f =
> this[METHOD_PREFIX + name2] ||
> this[METHOD_PREFIX + name1] ||
> this[METHOD_PREFIX + typeA.type] ||
> this.defaultCheck;
>
> f.call(this, this.a, this.b);
> },
>
> collectFail: function(comparison, reason, showReason) {
> if (comparison) {
> var res = new EqualityFail(this.a, this.b, reason, this.path);
> res.showReason = !!showReason;
>
> this.fails.push(res);
>
> if (!this.collectAllFails) {
> throw new ShortcutError(res);
> }
> }
> },
>
> checkPlainObjectsEquality: function(a, b) {
> // compare deep objects and arrays
> // stacks contain references only
> //
> var meet = this._meet;
> var m = this._meet.length;
> while (m--) {
> var st = meet[m];
> if (st[0] === a && st[1] === b) {
> return;
> }
> }
>
> // add `a` and `b` to the stack of traversed objects
> meet.push([a, b]);
>
> // TODO maybe something else like getOwnPropertyNames
> var key;
> for (key in b) {
> if (hasOwnProperty.call(b, key)) {
> if (hasOwnProperty.call(a, key)) {
> this.checkPropertyEquality(key);
> } else {
> this.collectFail(true, format(MISSING_KEY, "A", key));
> }
> }
> }
>
> // ensure both objects have the same number of properties
> for (key in a) {
> if (hasOwnProperty.call(a, key)) {
> this.collectFail(!hasOwnProperty.call(b, key), format(MISSING_KEY, "B", key));
> }
> }
>
> meet.pop();
>
> if (this.checkProtoEql) {
> //TODO should i check prototypes for === or use eq?
> this.collectFail(Object.getPrototypeOf(a) !== Object.getPrototypeOf(b), EQUALITY_PROTOTYPE, true);
> }
> },
>
> checkPropertyEquality: function(propertyName) {
> var _eq = new EQ(this, this.a[propertyName], this.b[propertyName], this.path.concat([propertyName]));
> _eq.check0();
> },
>
> defaultCheck: EQ.checkStrictEquality
> };
>
> EQ.add(t.NUMBER, function(a, b) {
> this.collectFail((a !== a && b === b) || (b !== b && a === a) || (a !== b && a === a && b === b), EQUALITY);
> });
>
> [t.SYMBOL, t.BOOLEAN, t.STRING].forEach(function(tp) {
> EQ.add(tp, EQ.checkStrictEquality);
> });
>
> EQ.add(t.FUNCTION, function(a, b) {
> // functions are compared by their source code
> this.collectFail(a.toString() !== b.toString(), FUNCTION_SOURCES);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.REGEXP, function(a, b) {
> // check regexp flags
> var flags = ["source", "global", "multiline", "lastIndex", "ignoreCase", "sticky", "unicode"];
> while (flags.length) {
> this.checkPropertyEquality(flags.shift());
> }
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.DATE, function(a, b) {
> //check by timestamp only (using .valueOf)
> this.collectFail(+a !== +b, EQUALITY);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
>
> [t.NUMBER, t.BOOLEAN, t.STRING].forEach(function(tp) {
> EQ.add(t.OBJECT, tp, function(a, b) {
> //primitive type wrappers
> this.collectFail(a.valueOf() !== b.valueOf(), WRAPPED_VALUE);
> // check user properties
> this.checkPlainObjectsEquality(a, b);
> });
> });
>
> EQ.add(t.OBJECT, function(a, b) {
> this.checkPlainObjectsEquality(a, b);
> });
>
> [t.ARRAY, t.ARGUMENTS, t.TYPED_ARRAY].forEach(function(tp) {
> EQ.add(t.OBJECT, tp, function(a, b) {
> this.checkPropertyEquality("length");
>
> this.checkPlainObjectsEquality(a, b);
> });
> });
>
> EQ.add(t.OBJECT, t.ARRAY_BUFFER, function(a, b) {
> this.checkPropertyEquality("byteLength");
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.ERROR, function(a, b) {
> this.checkPropertyEquality("name");
> this.checkPropertyEquality("message");
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> EQ.add(t.OBJECT, t.BUFFER, function(a) {
> this.checkPropertyEquality("length");
>
> var l = a.length;
> while (l--) {
> this.checkPropertyEquality(l);
> }
>
> //we do not check for user properties because
> //node Buffer have some strange hidden properties
> });
>
> function checkMapByKeys(a, b) {
> var iteratorA = a.keys();
>
> for (var nextA = iteratorA.next(); !nextA.done; nextA = iteratorA.next()) {
> var key = nextA.value;
> var hasKey = b.has(key);
> this.collectFail(!hasKey, format(SET_MAP_MISSING_KEY, key));
>
> if (hasKey) {
> var valueB = b.get(key);
> var valueA = a.get(key);
>
> eq(valueA, valueB, this);
> }
> }
> }
>
> function checkSetByKeys(a, b) {
> var iteratorA = a.keys();
>
> for (var nextA = iteratorA.next(); !nextA.done; nextA = iteratorA.next()) {
> var key = nextA.value;
> var hasKey = b.has(key);
> this.collectFail(!hasKey, format(SET_MAP_MISSING_KEY, key));
> }
> }
>
> EQ.add(t.OBJECT, t.MAP, function(a, b) {
> this._meet.push([a, b]);
>
> checkMapByKeys.call(this, a, b);
> checkMapByKeys.call(this, b, a);
>
> this._meet.pop();
>
> this.checkPlainObjectsEquality(a, b);
> });
> EQ.add(t.OBJECT, t.SET, function(a, b) {
> this._meet.push([a, b]);
>
> checkSetByKeys.call(this, a, b);
> checkSetByKeys.call(this, b, a);
>
> this._meet.pop();
>
> this.checkPlainObjectsEquality(a, b);
> });
>
> function eq(a, b, opts) {
> return new EQ(opts, a, b).check();
> }
>
> eq.EQ = EQ;
>
> export default eq;
> (!) Unresolved dependencies
> https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
> should-type (imported by index.js)
> created stdout in 74ms
> Found debian/nodejs/should-type/build
> cd ./should-type && sh -e ../debian/nodejs/should-type/build
> (!) You have passed an unrecognized option
> Unknown CLI flag: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17. Allowed options: acorn, acornInjectPlugins, amd, assetFileNames, banner, c, cache, chunkFileNames, chunkGroupingSize, compact, config, context, d, dir, dynamicImportFunction, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, exports, extend, external, f, file, footer, format, freeze, g, globals, h, i, indent, inlineDynamicImports, input, interop, intro, m, manualChunks, moduleContext, n, name, namespaceToStringTag, noConflict, o, onwarn, outro, paths, perf, plugins, preferConst, preserveModules, preserveSymlinks, shimMissingExports, silent, sourcemap, sourcemapExcludeSources, sourcemapFile, strict, treeshake, v, w, watch
>
> index.js → stdout...
> 'use strict';
>
> var types = {
> NUMBER: 'number',
> UNDEFINED: 'undefined',
> STRING: 'string',
> BOOLEAN: 'boolean',
> OBJECT: 'object',
> FUNCTION: 'function',
> NULL: 'null',
> ARRAY: 'array',
> REGEXP: 'regexp',
> DATE: 'date',
> ERROR: 'error',
> ARGUMENTS: 'arguments',
> SYMBOL: 'symbol',
> ARRAY_BUFFER: 'array-buffer',
> TYPED_ARRAY: 'typed-array',
> DATA_VIEW: 'data-view',
> MAP: 'map',
> SET: 'set',
> WEAK_SET: 'weak-set',
> WEAK_MAP: 'weak-map',
> PROMISE: 'promise',
>
> // node buffer
> BUFFER: 'buffer',
>
> // dom html element
> HTML_ELEMENT: 'html-element',
> HTML_ELEMENT_TEXT: 'html-element-text',
> DOCUMENT: 'document',
> WINDOW: 'window',
> FILE: 'file',
> FILE_LIST: 'file-list',
> BLOB: 'blob',
>
> HOST: 'host',
>
> XHR: 'xhr',
>
> // simd
> SIMD: 'simd'
> };
>
> /*
> * Simple data function to store type information
> * @param {string} type Usually what is returned from typeof
> * @param {string} cls Sanitized @Class via Object.prototype.toString
> * @param {string} sub If type and cls the same, and need to specify somehow
> * @private
> * @example
> *
> * //for null
> * new Type('null');
> *
> * //for Date
> * new Type('object', 'date');
> *
> * //for Uint8Array
> *
> * new Type('object', 'typed-array', 'uint8');
> */
> function Type(type, cls, sub) {
> if (!type) {
> throw new Error('Type class must be initialized at least with `type` information');
> }
> this.type = type;
> this.cls = cls;
> this.sub = sub;
> }
>
> Type.prototype = {
> toString: function(sep) {
> sep = sep || ';';
> var str = [this.type];
> if (this.cls) {
> str.push(this.cls);
> }
> if (this.sub) {
> str.push(this.sub);
> }
> return str.join(sep);
> },
>
> toTryTypes: function() {
> var _types = [];
> if (this.sub) {
> _types.push(new Type(this.type, this.cls, this.sub));
> }
> if (this.cls) {
> _types.push(new Type(this.type, this.cls));
> }
> _types.push(new Type(this.type));
>
> return _types;
> }
> };
>
> var toString = Object.prototype.toString;
>
>
>
> /**
> * Function to store type checks
> * @private
> */
> function TypeChecker() {
> this.checks = [];
> }
>
> TypeChecker.prototype = {
> add: function(func) {
> this.checks.push(func);
> return this;
> },
>
> addBeforeFirstMatch: function(obj, func) {
> var match = this.getFirstMatch(obj);
> if (match) {
> this.checks.splice(match.index, 0, func);
> } else {
> this.add(func);
> }
> },
>
> addTypeOf: function(type, res) {
> return this.add(function(obj, tpeOf) {
> if (tpeOf === type) {
> return new Type(res);
> }
> });
> },
>
> addClass: function(cls, res, sub) {
> return this.add(function(obj, tpeOf, objCls) {
> if (objCls === cls) {
> return new Type(types.OBJECT, res, sub);
> }
> });
> },
>
> getFirstMatch: function(obj) {
> var typeOf = typeof obj;
> var cls = toString.call(obj);
>
> for (var i = 0, l = this.checks.length; i < l; i++) {
> var res = this.checks[i].call(this, obj, typeOf, cls);
> if (typeof res !== 'undefined') {
> return { result: res, func: this.checks[i], index: i };
> }
> }
> },
>
> getType: function(obj) {
> var match = this.getFirstMatch(obj);
> return match && match.result;
> }
> };
>
> var main = new TypeChecker();
>
> //TODO add iterators
>
> main
> .addTypeOf(types.NUMBER, types.NUMBER)
> .addTypeOf(types.UNDEFINED, types.UNDEFINED)
> .addTypeOf(types.STRING, types.STRING)
> .addTypeOf(types.BOOLEAN, types.BOOLEAN)
> .addTypeOf(types.FUNCTION, types.FUNCTION)
> .addTypeOf(types.SYMBOL, types.SYMBOL)
> .add(function(obj) {
> if (obj === null) {
> return new Type(types.NULL);
> }
> })
> .addClass('[object String]', types.STRING)
> .addClass('[object Boolean]', types.BOOLEAN)
> .addClass('[object Number]', types.NUMBER)
> .addClass('[object Array]', types.ARRAY)
> .addClass('[object RegExp]', types.REGEXP)
> .addClass('[object Error]', types.ERROR)
> .addClass('[object Date]', types.DATE)
> .addClass('[object Arguments]', types.ARGUMENTS)
>
> .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER)
> .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8')
> .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8')
> .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped')
> .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16')
> .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16')
> .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32')
> .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32')
> .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32')
> .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64')
>
> .addClass('[object Bool16x8]', types.SIMD, 'bool16x8')
> .addClass('[object Bool32x4]', types.SIMD, 'bool32x4')
> .addClass('[object Bool8x16]', types.SIMD, 'bool8x16')
> .addClass('[object Float32x4]', types.SIMD, 'float32x4')
> .addClass('[object Int16x8]', types.SIMD, 'int16x8')
> .addClass('[object Int32x4]', types.SIMD, 'int32x4')
> .addClass('[object Int8x16]', types.SIMD, 'int8x16')
> .addClass('[object Uint16x8]', types.SIMD, 'uint16x8')
> .addClass('[object Uint32x4]', types.SIMD, 'uint32x4')
> .addClass('[object Uint8x16]', types.SIMD, 'uint8x16')
>
> .addClass('[object DataView]', types.DATA_VIEW)
> .addClass('[object Map]', types.MAP)
> .addClass('[object WeakMap]', types.WEAK_MAP)
> .addClass('[object Set]', types.SET)
> .addClass('[object WeakSet]', types.WEAK_SET)
> .addClass('[object Promise]', types.PROMISE)
> .addClass('[object Blob]', types.BLOB)
> .addClass('[object File]', types.FILE)
> .addClass('[object FileList]', types.FILE_LIST)
> .addClass('[object XMLHttpRequest]', types.XHR)
> .add(function(obj) {
> if ((typeof Promise === types.FUNCTION && obj instanceof Promise) ||
> (typeof obj.then === types.FUNCTION)) {
> return new Type(types.OBJECT, types.PROMISE);
> }
> })
> .add(function(obj) {
> if (typeof Buffer !== 'undefined' && obj instanceof Buffer) {// eslint-disable-line no-undef
> return new Type(types.OBJECT, types.BUFFER);
> }
> })
> .add(function(obj) {
> if (typeof Node !== 'undefined' && obj instanceof Node) {
> return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName);
> }
> })
> .add(function(obj) {
> // probably at the begginging should be enough these checks
> if (obj.Boolean === Boolean && obj.Number === Number && obj.String === String && obj.Date === Date) {
> return new Type(types.OBJECT, types.HOST);
> }
> })
> .add(function() {
> return new Type(types.OBJECT);
> });
>
> /**
> * Get type information of anything
> *
> * @param {any} obj Anything that could require type information
> * @return {Type} type info
> * @private
> */
> function getGlobalType(obj) {
> return main.getType(obj);
> }
>
> getGlobalType.checker = main;
> getGlobalType.TypeChecker = TypeChecker;
> getGlobalType.Type = Type;
>
> Object.keys(types).forEach(function(typeName) {
> getGlobalType[typeName] = types[typeName];
> });
>
> module.exports = getGlobalType;
> created stdout in 60ms
> (!) You have passed an unrecognized option
> Unknown CLI flag: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17. Allowed options: acorn, acornInjectPlugins, amd, assetFileNames, banner, c, cache, chunkFileNames, chunkGroupingSize, compact, config, context, d, dir, dynamicImportFunction, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalOptimizeChunks, experimentalTopLevelAwait, exports, extend, external, f, file, footer, format, freeze, g, globals, h, i, indent, inlineDynamicImports, input, interop, intro, m, manualChunks, moduleContext, n, name, namespaceToStringTag, noConflict, o, onwarn, outro, paths, perf, plugins, preferConst, preserveModules, preserveSymlinks, shimMissingExports, silent, sourcemap, sourcemapExcludeSources, sourcemapFile, strict, treeshake, v, w, watch
>
> index.js → stdout...
> var types = {
> NUMBER: 'number',
> UNDEFINED: 'undefined',
> STRING: 'string',
> BOOLEAN: 'boolean',
> OBJECT: 'object',
> FUNCTION: 'function',
> NULL: 'null',
> ARRAY: 'array',
> REGEXP: 'regexp',
> DATE: 'date',
> ERROR: 'error',
> ARGUMENTS: 'arguments',
> SYMBOL: 'symbol',
> ARRAY_BUFFER: 'array-buffer',
> TYPED_ARRAY: 'typed-array',
> DATA_VIEW: 'data-view',
> MAP: 'map',
> SET: 'set',
> WEAK_SET: 'weak-set',
> WEAK_MAP: 'weak-map',
> PROMISE: 'promise',
>
> // node buffer
> BUFFER: 'buffer',
>
> // dom html element
> HTML_ELEMENT: 'html-element',
> HTML_ELEMENT_TEXT: 'html-element-text',
> DOCUMENT: 'document',
> WINDOW: 'window',
> FILE: 'file',
> FILE_LIST: 'file-list',
> BLOB: 'blob',
>
> HOST: 'host',
>
> XHR: 'xhr',
>
> // simd
> SIMD: 'simd'
> };
>
> /*
> * Simple data function to store type information
> * @param {string} type Usually what is returned from typeof
> * @param {string} cls Sanitized @Class via Object.prototype.toString
> * @param {string} sub If type and cls the same, and need to specify somehow
> * @private
> * @example
> *
> * //for null
> * new Type('null');
> *
> * //for Date
> * new Type('object', 'date');
> *
> * //for Uint8Array
> *
> * new Type('object', 'typed-array', 'uint8');
> */
> function Type(type, cls, sub) {
> if (!type) {
> throw new Error('Type class must be initialized at least with `type` information');
> }
> this.type = type;
> this.cls = cls;
> this.sub = sub;
> }
>
> Type.prototype = {
> toString: function(sep) {
> sep = sep || ';';
> var str = [this.type];
> if (this.cls) {
> str.push(this.cls);
> }
> if (this.sub) {
> str.push(this.sub);
> }
> return str.join(sep);
> },
>
> toTryTypes: function() {
> var _types = [];
> if (this.sub) {
> _types.push(new Type(this.type, this.cls, this.sub));
> }
> if (this.cls) {
> _types.push(new Type(this.type, this.cls));
> }
> _types.push(new Type(this.type));
>
> return _types;
> }
> };
>
> var toString = Object.prototype.toString;
>
>
>
> /**
> * Function to store type checks
> * @private
> */
> function TypeChecker() {
> this.checks = [];
> }
>
> TypeChecker.prototype = {
> add: function(func) {
> this.checks.push(func);
> return this;
> },
>
> addBeforeFirstMatch: function(obj, func) {
> var match = this.getFirstMatch(obj);
> if (match) {
> this.checks.splice(match.index, 0, func);
> } else {
> this.add(func);
> }
> },
>
> addTypeOf: function(type, res) {
> return this.add(function(obj, tpeOf) {
> if (tpeOf === type) {
> return new Type(res);
> }
> });
> },
>
> addClass: function(cls, res, sub) {
> return this.add(function(obj, tpeOf, objCls) {
> if (objCls === cls) {
> return new Type(types.OBJECT, res, sub);
> }
> });
> },
>
> getFirstMatch: function(obj) {
> var typeOf = typeof obj;
> var cls = toString.call(obj);
>
> for (var i = 0, l = this.checks.length; i < l; i++) {
> var res = this.checks[i].call(this, obj, typeOf, cls);
> if (typeof res !== 'undefined') {
> return { result: res, func: this.checks[i], index: i };
> }
> }
> },
>
> getType: function(obj) {
> var match = this.getFirstMatch(obj);
> return match && match.result;
> }
> };
>
> var main = new TypeChecker();
>
> //TODO add iterators
>
> main
> .addTypeOf(types.NUMBER, types.NUMBER)
> .addTypeOf(types.UNDEFINED, types.UNDEFINED)
> .addTypeOf(types.STRING, types.STRING)
> .addTypeOf(types.BOOLEAN, types.BOOLEAN)
> .addTypeOf(types.FUNCTION, types.FUNCTION)
> .addTypeOf(types.SYMBOL, types.SYMBOL)
> .add(function(obj) {
> if (obj === null) {
> return new Type(types.NULL);
> }
> })
> .addClass('[object String]', types.STRING)
> .addClass('[object Boolean]', types.BOOLEAN)
> .addClass('[object Number]', types.NUMBER)
> .addClass('[object Array]', types.ARRAY)
> .addClass('[object RegExp]', types.REGEXP)
> .addClass('[object Error]', types.ERROR)
> .addClass('[object Date]', types.DATE)
> .addClass('[object Arguments]', types.ARGUMENTS)
>
> .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER)
> .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8')
> .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8')
> .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped')
> .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16')
> .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16')
> .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32')
> .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32')
> .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32')
> .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64')
>
> .addClass('[object Bool16x8]', types.SIMD, 'bool16x8')
> .addClass('[object Bool32x4]', types.SIMD, 'bool32x4')
> .addClass('[object Bool8x16]', types.SIMD, 'bool8x16')
> .addClass('[object Float32x4]', types.SIMD, 'float32x4')
> .addClass('[object Int16x8]', types.SIMD, 'int16x8')
> .addClass('[object Int32x4]', types.SIMD, 'int32x4')
> .addClass('[object Int8x16]', types.SIMD, 'int8x16')
> .addClass('[object Uint16x8]', types.SIMD, 'uint16x8')
> .addClass('[object Uint32x4]', types.SIMD, 'uint32x4')
> .addClass('[object Uint8x16]', types.SIMD, 'uint8x16')
>
> .addClass('[object DataView]', types.DATA_VIEW)
> .addClass('[object Map]', types.MAP)
> .addClass('[object WeakMap]', types.WEAK_MAP)
> .addClass('[object Set]', types.SET)
> .addClass('[object WeakSet]', types.WEAK_SET)
> .addClass('[object Promise]', types.PROMISE)
> .addClass('[object Blob]', types.BLOB)
> .addClass('[object File]', types.FILE)
> .addClass('[object FileList]', types.FILE_LIST)
> .addClass('[object XMLHttpRequest]', types.XHR)
> .add(function(obj) {
> if ((typeof Promise === types.FUNCTION && obj instanceof Promise) ||
> (typeof obj.then === types.FUNCTION)) {
> return new Type(types.OBJECT, types.PROMISE);
> }
> })
> .add(function(obj) {
> if (typeof Buffer !== 'undefined' && obj instanceof Buffer) {// eslint-disable-line no-undef
> return new Type(types.OBJECT, types.BUFFER);
> }
> })
> .add(function(obj) {
> if (typeof Node !== 'undefined' && obj instanceof Node) {
> return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName);
> }
> })
> .add(function(obj) {
> // probably at the begginging should be enough these checks
> if (obj.Boolean === Boolean && obj.Number === Number && obj.String === String && obj.Date === Date) {
> return new Type(types.OBJECT, types.HOST);
> }
> })
> .add(function() {
> return new Type(types.OBJECT);
> });
>
> /**
> * Get type information of anything
> *
> * @param {any} obj Anything that could require type information
> * @return {Type} type info
> * @private
> */
> function getGlobalType(obj) {
> return main.getType(obj);
> }
>
> getGlobalType.checker = main;
> getGlobalType.TypeChecker = TypeChecker;
> getGlobalType.Type = Type;
>
> Object.keys(types).forEach(function(typeName) {
> getGlobalType[typeName] = types[typeName];
> });
>
> export default getGlobalType;
> created stdout in 60ms
> Found debian/nodejs/./build
> cd ./. && sh -e debian/nodejs/./build
>
> ./lib/umd.js → ./should.js...
> (!) node-resolve plugin: The onwrite hook used by plugin node-resolve is deprecated. The generateBundle hook should be used instead.
> created ./should.js in 376ms
>
> lib/index.js → cjs/should.js...
> (!) Unresolved dependencies
> https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
> should-type (imported by lib/should.js, lib/ext/eql.js)
> should-equal (imported by lib/should.js, lib/ext/eql.js, lib/ext/contain.js, lib/ext/property.js, lib/ext/match.js, lib/ext/_assert.js)
> should-format (imported by lib/should.js, lib/util.js, lib/format.js, lib/config.js)
> should-util (imported by lib/assertion-error.js, lib/assertion.js, lib/ext/assert.js, lib/ext/property.js, lib/ext/error.js)
> should-type-adaptors (imported by lib/config.js, lib/ext/eql.js, lib/ext/contain.js, lib/ext/property.js, lib/ext/match.js)
> created cjs/should.js in 203ms
>
> lib/index.js → es6/should.js...
> (!) Unresolved dependencies
> https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
> should-type (imported by lib/should.js, lib/ext/eql.js)
> should-equal (imported by lib/should.js, lib/ext/eql.js, lib/ext/contain.js, lib/ext/property.js, lib/ext/match.js, lib/ext/_assert.js)
> should-format (imported by lib/should.js, lib/util.js, lib/format.js, lib/config.js)
> should-util (imported by lib/assertion-error.js, lib/assertion.js, lib/ext/assert.js, lib/ext/property.js, lib/ext/error.js)
> should-type-adaptors (imported by lib/config.js, lib/ext/eql.js, lib/ext/contain.js, lib/ext/property.js, lib/ext/match.js)
> created es6/should.js in 207ms
> dh_auto_test --buildsystem=nodejs
> cd ./should-equal && sh -e ../debian/nodejs/should-equal/test
> /<<PKGBUILDDIR>>/should-equal/index.js:1
> import t from "should-type";
> ^
>
> SyntaxError: Unexpected identifier
> at Module._compile (internal/modules/cjs/loader.js:723:23)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
> at Module.load (internal/modules/cjs/loader.js:653:32)
> at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
> at Function.Module._load (internal/modules/cjs/loader.js:585:3)
> at Module.require (internal/modules/cjs/loader.js:692:17)
> at require (internal/modules/cjs/helpers.js:25:18)
> at Object.<anonymous> (/<<PKGBUILDDIR>>/should-equal/test.js:2:13)
> at Module._compile (internal/modules/cjs/loader.js:778:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
> at Module.load (internal/modules/cjs/loader.js:653:32)
> at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
> at Function.Module._load (internal/modules/cjs/loader.js:585:3)
> at Module.require (internal/modules/cjs/loader.js:692:17)
> at require (internal/modules/cjs/helpers.js:25:18)
> at /usr/share/nodejs/mocha/lib/mocha.js:311:36
> at Array.forEach (<anonymous>)
> at Mocha.loadFiles (/usr/share/nodejs/mocha/lib/mocha.js:308:14)
> at Mocha.run (/usr/share/nodejs/mocha/lib/mocha.js:849:10)
> at Object.exports.singleRun (/usr/share/nodejs/mocha/lib/cli/run-helpers.js:108:16)
> at exports.runMocha (/usr/share/nodejs/mocha/lib/cli/run-helpers.js:143:13)
> at Object.exports.handler.argv [as handler] (/usr/share/nodejs/mocha/lib/cli/run.js:305:3)
> at Object.runCommand (/usr/share/nodejs/yargs/lib/command.js:240:40)
> at Object.parseArgs [as _parseArgs] (/usr/share/nodejs/yargs/yargs.js:1173:35)
> at Object.parse (/usr/share/nodejs/yargs/yargs.js:618:25)
> at Object.exports.main (/usr/share/nodejs/mocha/lib/cli/cli.js:68:6)
> at Object.<anonymous> (/usr/share/nodejs/mocha/bin/mocha:133:29)
> at Module._compile (internal/modules/cjs/loader.js:778:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
> at Module.load (internal/modules/cjs/loader.js:653:32)
> at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
> at Function.Module._load (internal/modules/cjs/loader.js:585:3)
> at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
> at startup (internal/bootstrap/node.js:283:19)
> at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
> dh_auto_test: error: cd ./should-equal && sh -e ../debian/nodejs/should-equal/test returned exit code 1
The full build log is available from:
http://qa-logs.debian.net/2020/03/21/should.js_13.2.3~dfsg-2_unstable.log
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.
More information about the Pkg-javascript-devel
mailing list