tsds-web-test-runner 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/command.js +33 -34
- package/dist/cjs/command.js.map +1 -1
- package/dist/esm/command.mjs +32 -33
- package/dist/esm/command.mjs.map +1 -1
- package/package.json +3 -4
package/dist/cjs/command.js
CHANGED
|
@@ -13,7 +13,6 @@ var _url = /*#__PURE__*/ _interop_require_default(require("url"));
|
|
|
13
13
|
var _getoptscompat = /*#__PURE__*/ _interop_require_default(require("getopts-compat"));
|
|
14
14
|
var _linkunlink = require("link-unlink");
|
|
15
15
|
var _queuecb = /*#__PURE__*/ _interop_require_default(require("queue-cb"));
|
|
16
|
-
var _resolve = /*#__PURE__*/ _interop_require_default(require("resolve"));
|
|
17
16
|
var _tsdslib = require("tsds-lib");
|
|
18
17
|
function _interop_require_default(obj) {
|
|
19
18
|
return obj && obj.__esModule ? obj : {
|
|
@@ -50,40 +49,40 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
50
49
|
var __dirname = _path.default.dirname(typeof __filename !== 'undefined' ? __filename : _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()));
|
|
51
50
|
var major = +process.versions.node.split('.')[0];
|
|
52
51
|
var workerWrapper = (0, _tsdslib.wrapWorker)(_path.default.join((0, _tsdslib.packageRoot)(__dirname), 'dist', 'cjs', 'command.js'));
|
|
53
|
-
var wtr = (0, _tsdslib.binPath)(_resolve.default.sync('@web/test-runner/package.json', {
|
|
54
|
-
basedir: __dirname
|
|
55
|
-
}), 'web-test-runner');
|
|
56
52
|
var config = _path.default.resolve((0, _tsdslib.packageRoot)(__dirname), 'dist', 'esm', 'wtr.config.mjs');
|
|
57
|
-
function worker(args, options,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
config
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
function worker(args, options, callback) {
|
|
54
|
+
(0, _tsdslib.which)('wtr', options, function(err, wtr) {
|
|
55
|
+
if (err) return callback(err);
|
|
56
|
+
var cwd = options.cwd || process.cwd();
|
|
57
|
+
var _getopts = (0, _getoptscompat.default)(args, {
|
|
58
|
+
stopEarly: true,
|
|
59
|
+
alias: {
|
|
60
|
+
config: 'c'
|
|
61
|
+
}
|
|
62
|
+
}), _ = _getopts._, opts = _object_without_properties(_getopts, [
|
|
63
|
+
"_"
|
|
64
|
+
]);
|
|
65
|
+
var spawnArgs = [
|
|
66
|
+
wtr
|
|
67
|
+
];
|
|
68
|
+
if (!opts.config) Array.prototype.push.apply(spawnArgs, [
|
|
69
|
+
'--config',
|
|
70
|
+
config
|
|
71
|
+
]);
|
|
72
|
+
Array.prototype.push.apply(spawnArgs, args);
|
|
73
|
+
if (_.length === 0) Array.prototype.push.apply(spawnArgs, [
|
|
74
|
+
'test/**/*.test.{ts,tsx,jsx,mjs}'
|
|
75
|
+
]);
|
|
76
|
+
(0, _linkunlink.link)(cwd, (0, _tsdslib.installPath)(options), function(err, restore) {
|
|
77
|
+
if (err) return callback(err);
|
|
78
|
+
var queue = new _queuecb.default(1);
|
|
79
|
+
queue.defer(_tsdslib.spawn.bind(null, spawnArgs[0], spawnArgs.slice(1), {
|
|
80
|
+
cwd: cwd
|
|
81
|
+
}));
|
|
82
|
+
queue.await(function(err) {
|
|
83
|
+
(0, _linkunlink.unlink)(restore, function(err2) {
|
|
84
|
+
callback(err || err2);
|
|
85
|
+
});
|
|
87
86
|
});
|
|
88
87
|
});
|
|
89
88
|
});
|
package/dist/cjs/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/@typescript/ts-dev-stack/packages/tsds-web-test-runner/src/command.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport getopts from 'getopts-compat';\nimport { link, unlink } from 'link-unlink';\nimport Queue from 'queue-cb';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/@typescript/ts-dev-stack/packages/tsds-web-test-runner/src/command.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport getopts from 'getopts-compat';\nimport { link, unlink } from 'link-unlink';\nimport Queue from 'queue-cb';\nimport { installPath, packageRoot, spawn, which, wrapWorker } from 'tsds-lib';\n\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\nconst major = +process.versions.node.split('.')[0];\nconst workerWrapper = wrapWorker(path.join(packageRoot(__dirname), 'dist', 'cjs', 'command.js'));\nconst config = path.resolve(packageRoot(__dirname), 'dist', 'esm', 'wtr.config.mjs');\n\nfunction worker(args, options, callback) {\n which('wtr', options, (err, wtr) => {\n if (err) return callback(err);\n const cwd = options.cwd || process.cwd();\n const { _, ...opts } = getopts(args, { stopEarly: true, alias: { config: 'c' } });\n const spawnArgs = [wtr];\n if (!opts.config) Array.prototype.push.apply(spawnArgs, ['--config', config]);\n Array.prototype.push.apply(spawnArgs, args);\n if (_.length === 0) Array.prototype.push.apply(spawnArgs, ['test/**/*.test.{ts,tsx,jsx,mjs}']);\n\n link(cwd, installPath(options), (err, restore) => {\n if (err) return callback(err);\n\n const queue = new Queue(1);\n queue.defer(spawn.bind(null, spawnArgs[0], spawnArgs.slice(1), { cwd }));\n queue.await((err) => {\n unlink(restore, (err2) => {\n callback(err || err2);\n });\n });\n });\n });\n}\n\nexport default function testBrowser(args, options, cb) {\n major < 14 ? workerWrapper('stable', args, options, cb) : worker(args, options, cb);\n}\n"],"names":["testBrowser","__dirname","path","dirname","__filename","url","fileURLToPath","major","process","versions","node","split","workerWrapper","wrapWorker","join","packageRoot","config","resolve","worker","args","options","callback","which","err","wtr","cwd","getopts","stopEarly","alias","_","opts","spawnArgs","Array","prototype","push","apply","length","link","installPath","restore","queue","Queue","defer","spawn","bind","slice","await","unlink","err2","cb"],"mappings":";;;;+BAoCA;;;eAAwBA;;;2DApCP;0DACD;oEACI;0BACS;8DACX;uBACiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnE,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAClG,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,gBAAgBC,IAAAA,mBAAU,EAACX,aAAI,CAACY,IAAI,CAACC,IAAAA,oBAAW,EAACd,YAAY,QAAQ,OAAO;AAClF,IAAMe,SAASd,aAAI,CAACe,OAAO,CAACF,IAAAA,oBAAW,EAACd,YAAY,QAAQ,OAAO;AAEnE,SAASiB,OAAOC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrCC,IAAAA,cAAK,EAAC,OAAOF,SAAS,SAACG,KAAKC;QAC1B,IAAID,KAAK,OAAOF,SAASE;QACzB,IAAME,MAAML,QAAQK,GAAG,IAAIjB,QAAQiB,GAAG;QACtC,IAAuBC,WAAAA,IAAAA,sBAAO,EAACP,MAAM;YAAEQ,WAAW;YAAMC,OAAO;gBAAEZ,QAAQ;YAAI;QAAE,IAAzE,AAAEa,IAAeH,SAAfG,GAAMC,kCAASJ;YAAfG;;QACR,IAAME,YAAY;YAACP;SAAI;QACvB,IAAI,CAACM,KAAKd,MAAM,EAAEgB,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAW;YAAC;YAAYf;SAAO;QAC5EgB,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAWZ;QACtC,IAAIU,EAAEO,MAAM,KAAK,GAAGJ,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAW;YAAC;SAAkC;QAE7FM,IAAAA,gBAAI,EAACZ,KAAKa,IAAAA,oBAAW,EAAClB,UAAU,SAACG,KAAKgB;YACpC,IAAIhB,KAAK,OAAOF,SAASE;YAEzB,IAAMiB,QAAQ,IAAIC,gBAAK,CAAC;YACxBD,MAAME,KAAK,CAACC,cAAK,CAACC,IAAI,CAAC,MAAMb,SAAS,CAAC,EAAE,EAAEA,UAAUc,KAAK,CAAC,IAAI;gBAAEpB,KAAAA;YAAI;YACrEe,MAAMM,KAAK,CAAC,SAACvB;gBACXwB,IAAAA,kBAAM,EAACR,SAAS,SAACS;oBACf3B,SAASE,OAAOyB;gBAClB;YACF;QACF;IACF;AACF;AAEe,SAAShD,YAAYmB,IAAI,EAAEC,OAAO,EAAE6B,EAAE;IACnD1C,QAAQ,KAAKK,cAAc,UAAUO,MAAMC,SAAS6B,MAAM/B,OAAOC,MAAMC,SAAS6B;AAClF"}
|
package/dist/esm/command.mjs
CHANGED
|
@@ -3,43 +3,42 @@ import url from 'url';
|
|
|
3
3
|
import getopts from 'getopts-compat';
|
|
4
4
|
import { link, unlink } from 'link-unlink';
|
|
5
5
|
import Queue from 'queue-cb';
|
|
6
|
-
import
|
|
7
|
-
import { binPath, installPath, packageRoot, spawn, wrapWorker } from 'tsds-lib';
|
|
6
|
+
import { installPath, packageRoot, spawn, which, wrapWorker } from 'tsds-lib';
|
|
8
7
|
const __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));
|
|
9
8
|
const major = +process.versions.node.split('.')[0];
|
|
10
9
|
const workerWrapper = wrapWorker(path.join(packageRoot(__dirname), 'dist', 'cjs', 'command.js'));
|
|
11
|
-
const wtr = binPath(resolve.sync('@web/test-runner/package.json', {
|
|
12
|
-
basedir: __dirname
|
|
13
|
-
}), 'web-test-runner');
|
|
14
10
|
const config = path.resolve(packageRoot(__dirname), 'dist', 'esm', 'wtr.config.mjs');
|
|
15
|
-
function worker(args, options,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
config
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
11
|
+
function worker(args, options, callback) {
|
|
12
|
+
which('wtr', options, (err, wtr)=>{
|
|
13
|
+
if (err) return callback(err);
|
|
14
|
+
const cwd = options.cwd || process.cwd();
|
|
15
|
+
const { _, ...opts } = getopts(args, {
|
|
16
|
+
stopEarly: true,
|
|
17
|
+
alias: {
|
|
18
|
+
config: 'c'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const spawnArgs = [
|
|
22
|
+
wtr
|
|
23
|
+
];
|
|
24
|
+
if (!opts.config) Array.prototype.push.apply(spawnArgs, [
|
|
25
|
+
'--config',
|
|
26
|
+
config
|
|
27
|
+
]);
|
|
28
|
+
Array.prototype.push.apply(spawnArgs, args);
|
|
29
|
+
if (_.length === 0) Array.prototype.push.apply(spawnArgs, [
|
|
30
|
+
'test/**/*.test.{ts,tsx,jsx,mjs}'
|
|
31
|
+
]);
|
|
32
|
+
link(cwd, installPath(options), (err, restore)=>{
|
|
33
|
+
if (err) return callback(err);
|
|
34
|
+
const queue = new Queue(1);
|
|
35
|
+
queue.defer(spawn.bind(null, spawnArgs[0], spawnArgs.slice(1), {
|
|
36
|
+
cwd
|
|
37
|
+
}));
|
|
38
|
+
queue.await((err)=>{
|
|
39
|
+
unlink(restore, (err2)=>{
|
|
40
|
+
callback(err || err2);
|
|
41
|
+
});
|
|
43
42
|
});
|
|
44
43
|
});
|
|
45
44
|
});
|
package/dist/esm/command.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/@typescript/ts-dev-stack/packages/tsds-web-test-runner/src/command.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport getopts from 'getopts-compat';\nimport { link, unlink } from 'link-unlink';\nimport Queue from 'queue-cb';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/@typescript/ts-dev-stack/packages/tsds-web-test-runner/src/command.ts"],"sourcesContent":["import path from 'path';\nimport url from 'url';\nimport getopts from 'getopts-compat';\nimport { link, unlink } from 'link-unlink';\nimport Queue from 'queue-cb';\nimport { installPath, packageRoot, spawn, which, wrapWorker } from 'tsds-lib';\n\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\nconst major = +process.versions.node.split('.')[0];\nconst workerWrapper = wrapWorker(path.join(packageRoot(__dirname), 'dist', 'cjs', 'command.js'));\nconst config = path.resolve(packageRoot(__dirname), 'dist', 'esm', 'wtr.config.mjs');\n\nfunction worker(args, options, callback) {\n which('wtr', options, (err, wtr) => {\n if (err) return callback(err);\n const cwd = options.cwd || process.cwd();\n const { _, ...opts } = getopts(args, { stopEarly: true, alias: { config: 'c' } });\n const spawnArgs = [wtr];\n if (!opts.config) Array.prototype.push.apply(spawnArgs, ['--config', config]);\n Array.prototype.push.apply(spawnArgs, args);\n if (_.length === 0) Array.prototype.push.apply(spawnArgs, ['test/**/*.test.{ts,tsx,jsx,mjs}']);\n\n link(cwd, installPath(options), (err, restore) => {\n if (err) return callback(err);\n\n const queue = new Queue(1);\n queue.defer(spawn.bind(null, spawnArgs[0], spawnArgs.slice(1), { cwd }));\n queue.await((err) => {\n unlink(restore, (err2) => {\n callback(err || err2);\n });\n });\n });\n });\n}\n\nexport default function testBrowser(args, options, cb) {\n major < 14 ? workerWrapper('stable', args, options, cb) : worker(args, options, cb);\n}\n"],"names":["path","url","getopts","link","unlink","Queue","installPath","packageRoot","spawn","which","wrapWorker","__dirname","dirname","__filename","fileURLToPath","major","process","versions","node","split","workerWrapper","join","config","resolve","worker","args","options","callback","err","wtr","cwd","_","opts","stopEarly","alias","spawnArgs","Array","prototype","push","apply","length","restore","queue","defer","bind","slice","await","err2","testBrowser","cb"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,aAAa,iBAAiB;AACrC,SAASC,IAAI,EAAEC,MAAM,QAAQ,cAAc;AAC3C,OAAOC,WAAW,WAAW;AAC7B,SAASC,WAAW,EAAEC,WAAW,EAAEC,KAAK,EAAEC,KAAK,EAAEC,UAAU,QAAQ,WAAW;AAE9E,MAAMC,YAAYX,KAAKY,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaZ,IAAIa,aAAa,CAAC,YAAYb,GAAG;AACjH,MAAMc,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,gBAAgBV,WAAWV,KAAKqB,IAAI,CAACd,YAAYI,YAAY,QAAQ,OAAO;AAClF,MAAMW,SAAStB,KAAKuB,OAAO,CAAChB,YAAYI,YAAY,QAAQ,OAAO;AAEnE,SAASa,OAAOC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrClB,MAAM,OAAOiB,SAAS,CAACE,KAAKC;QAC1B,IAAID,KAAK,OAAOD,SAASC;QACzB,MAAME,MAAMJ,QAAQI,GAAG,IAAId,QAAQc,GAAG;QACtC,MAAM,EAAEC,CAAC,EAAE,GAAGC,MAAM,GAAG9B,QAAQuB,MAAM;YAAEQ,WAAW;YAAMC,OAAO;gBAAEZ,QAAQ;YAAI;QAAE;QAC/E,MAAMa,YAAY;YAACN;SAAI;QACvB,IAAI,CAACG,KAAKV,MAAM,EAAEc,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAW;YAAC;YAAYb;SAAO;QAC5Ec,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAWV;QACtC,IAAIM,EAAES,MAAM,KAAK,GAAGJ,MAAMC,SAAS,CAACC,IAAI,CAACC,KAAK,CAACJ,WAAW;YAAC;SAAkC;QAE7FhC,KAAK2B,KAAKxB,YAAYoB,UAAU,CAACE,KAAKa;YACpC,IAAIb,KAAK,OAAOD,SAASC;YAEzB,MAAMc,QAAQ,IAAIrC,MAAM;YACxBqC,MAAMC,KAAK,CAACnC,MAAMoC,IAAI,CAAC,MAAMT,SAAS,CAAC,EAAE,EAAEA,UAAUU,KAAK,CAAC,IAAI;gBAAEf;YAAI;YACrEY,MAAMI,KAAK,CAAC,CAAClB;gBACXxB,OAAOqC,SAAS,CAACM;oBACfpB,SAASC,OAAOmB;gBAClB;YACF;QACF;IACF;AACF;AAEA,eAAe,SAASC,YAAYvB,IAAI,EAAEC,OAAO,EAAEuB,EAAE;IACnDlC,QAAQ,KAAKK,cAAc,UAAUK,MAAMC,SAASuB,MAAMzB,OAAOC,MAAMC,SAASuB;AAClF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsds-web-test-runner",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Development stack for TypeScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"c8",
|
|
@@ -52,8 +52,7 @@
|
|
|
52
52
|
"getopts-compat": "^2.2.5",
|
|
53
53
|
"link-unlink": "^0.1.2",
|
|
54
54
|
"queue-cb": "^1.4.4",
|
|
55
|
-
"
|
|
56
|
-
"tsds-lib": "^1.6.3",
|
|
55
|
+
"tsds-lib": "^1.6.5",
|
|
57
56
|
"webpack-merge": "^6.0.1"
|
|
58
57
|
},
|
|
59
58
|
"devDependencies": {
|
|
@@ -69,5 +68,5 @@
|
|
|
69
68
|
"tsds": {
|
|
70
69
|
"source": "src/index.ts"
|
|
71
70
|
},
|
|
72
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "3326f402728a2136a85dc0cdd7d83cb024dc2dce"
|
|
73
72
|
}
|