tsds-validate 1.5.6 → 1.6.0
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 +66 -7
- package/dist/cjs/command.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/command.js +16 -8
- package/dist/esm/command.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +13 -13
package/dist/cjs/command.js
CHANGED
|
@@ -17,33 +17,92 @@ var _tsdsbiome = /*#__PURE__*/ _interop_require_default(require("tsds-biome"));
|
|
|
17
17
|
var _tsdsbuild = /*#__PURE__*/ _interop_require_default(require("tsds-build"));
|
|
18
18
|
var _tsdstypedoc = /*#__PURE__*/ _interop_require_default(require("tsds-typedoc"));
|
|
19
19
|
var _url = /*#__PURE__*/ _interop_require_default(require("url"));
|
|
20
|
+
function _define_property(obj, key, value) {
|
|
21
|
+
if (key in obj) {
|
|
22
|
+
Object.defineProperty(obj, key, {
|
|
23
|
+
value: value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = value;
|
|
30
|
+
}
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
20
33
|
function _interop_require_default(obj) {
|
|
21
34
|
return obj && obj.__esModule ? obj : {
|
|
22
35
|
default: obj
|
|
23
36
|
};
|
|
24
37
|
}
|
|
38
|
+
function _object_spread(target) {
|
|
39
|
+
for(var i = 1; i < arguments.length; i++){
|
|
40
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
41
|
+
var ownKeys = Object.keys(source);
|
|
42
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
43
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
ownKeys.forEach(function(key) {
|
|
48
|
+
_define_property(target, key, source[key]);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
function ownKeys(object, enumerableOnly) {
|
|
54
|
+
var keys = Object.keys(object);
|
|
55
|
+
if (Object.getOwnPropertySymbols) {
|
|
56
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
57
|
+
if (enumerableOnly) {
|
|
58
|
+
symbols = symbols.filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
keys.push.apply(keys, symbols);
|
|
63
|
+
}
|
|
64
|
+
return keys;
|
|
65
|
+
}
|
|
66
|
+
function _object_spread_props(target, source) {
|
|
67
|
+
source = source != null ? source : {};
|
|
68
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
69
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
70
|
+
} else {
|
|
71
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
72
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return target;
|
|
76
|
+
}
|
|
25
77
|
var major = +process.versions.node.split('.')[0];
|
|
26
|
-
var version = major > 18 ? 'local' : 'stable';
|
|
27
78
|
var __dirname = _path.default.dirname(typeof __filename === 'undefined' ? _url.default.fileURLToPath(require("url").pathToFileURL(__filename).toString()) : __filename);
|
|
28
79
|
var dist = _path.default.join(__dirname, '..');
|
|
29
|
-
|
|
30
|
-
function worker(args, options, callback) {
|
|
80
|
+
function run(args, options, callback) {
|
|
31
81
|
try {
|
|
32
82
|
var depcheck = (0, _resolvebinsync.default)('depcheck');
|
|
33
83
|
var sortPackageJSON = (0, _resolvebinsync.default)('sort-package-json');
|
|
84
|
+
var spawnOptions = _object_spread_props(_object_spread({}, options), {
|
|
85
|
+
encoding: 'utf8'
|
|
86
|
+
});
|
|
34
87
|
var queue = new _queuecb.default(1);
|
|
35
88
|
queue.defer(_tsdsbiome.default.bind(null, args, options));
|
|
36
89
|
queue.defer(_tsdsbuild.default.bind(null, args, options));
|
|
37
|
-
queue.defer(_crossspawncb.default.bind(null, sortPackageJSON, [],
|
|
38
|
-
queue.defer(_crossspawncb.default.bind(null, depcheck, [],
|
|
90
|
+
queue.defer(_crossspawncb.default.bind(null, sortPackageJSON, [], spawnOptions));
|
|
91
|
+
queue.defer(_crossspawncb.default.bind(null, depcheck, [], spawnOptions));
|
|
39
92
|
queue.defer(_tsdstypedoc.default.bind(null, args, options));
|
|
40
93
|
queue.await(callback);
|
|
41
94
|
} catch (err) {
|
|
42
|
-
console.log(err.message);
|
|
43
95
|
return callback(err);
|
|
44
96
|
}
|
|
45
97
|
}
|
|
98
|
+
// Node 20.10+ required for import attributes syntax used by sort-package-json
|
|
99
|
+
var worker = major >= 20 ? run : (0, _nodeversioncall.bind)('>=10', _path.default.join(dist, 'cjs', 'command.js'), {
|
|
100
|
+
callbacks: true
|
|
101
|
+
});
|
|
46
102
|
function publish(args, options, callback) {
|
|
47
|
-
|
|
103
|
+
worker(args, options, function(err) {
|
|
104
|
+
if (err) console.log(err.stderr || err.message);
|
|
105
|
+
callback(err);
|
|
106
|
+
});
|
|
48
107
|
}
|
|
49
108
|
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
package/dist/cjs/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/_later/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await(callback);\n } catch (err) {\n return callback(err);\n }\n}\n\n// Node 20.10+ required for import attributes syntax used by sort-package-json\nconst worker = major >= 20 ? run : bind('>=10', path.join(dist, 'cjs', 'command.js'), { callbacks: true });\n\nexport default function publish(args: string[], options: CommandOptions, callback: CommandCallback) {\n worker(args, options, (err: SpawnError) => {\n if (err) console.log(err.stderr || err.message);\n callback(err);\n });\n}\n"],"names":["publish","major","process","versions","node","split","__dirname","path","dirname","__filename","url","fileURLToPath","dist","join","run","args","options","callback","depcheck","resolveBin","sortPackageJSON","spawnOptions","encoding","queue","Queue","defer","format","bind","build","spawn","docs","await","err","worker","callbacks","console","log","stderr","message"],"mappings":";;;;+BAoCA;;;eAAwBA;;;mEApCe;+BAClB;2DACJ;8DACC;qEACK;gEACJ;gEACD;kEAED;0DACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhB,IAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,e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["/Users/kevin/Dev/OpenSource/_later/tsds-validate/src/index.ts"],"sourcesContent":["export { default } from './command.ts';\n"],"names":["default"],"mappings":";;;;+BAASA;;;eAAAA,kBAAO;;;gEAAQ"}
|
package/dist/esm/command.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import spawn from 'cross-spawn-cb';
|
|
2
|
-
import {
|
|
2
|
+
import { bind } from 'node-version-call';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import Queue from 'queue-cb';
|
|
5
5
|
import resolveBin from 'resolve-bin-sync';
|
|
@@ -8,26 +8,34 @@ import build from 'tsds-build';
|
|
|
8
8
|
import docs from 'tsds-typedoc';
|
|
9
9
|
import url from 'url';
|
|
10
10
|
const major = +process.versions.node.split('.')[0];
|
|
11
|
-
const version = major > 18 ? 'local' : 'stable';
|
|
12
11
|
const __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);
|
|
13
12
|
const dist = path.join(__dirname, '..');
|
|
14
|
-
|
|
15
|
-
function worker(args, options, callback) {
|
|
13
|
+
function run(args, options, callback) {
|
|
16
14
|
try {
|
|
17
15
|
const depcheck = resolveBin('depcheck');
|
|
18
16
|
const sortPackageJSON = resolveBin('sort-package-json');
|
|
17
|
+
const spawnOptions = {
|
|
18
|
+
...options,
|
|
19
|
+
encoding: 'utf8'
|
|
20
|
+
};
|
|
19
21
|
const queue = new Queue(1);
|
|
20
22
|
queue.defer(format.bind(null, args, options));
|
|
21
23
|
queue.defer(build.bind(null, args, options));
|
|
22
|
-
queue.defer(spawn.bind(null, sortPackageJSON, [],
|
|
23
|
-
queue.defer(spawn.bind(null, depcheck, [],
|
|
24
|
+
queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));
|
|
25
|
+
queue.defer(spawn.bind(null, depcheck, [], spawnOptions));
|
|
24
26
|
queue.defer(docs.bind(null, args, options));
|
|
25
27
|
queue.await(callback);
|
|
26
28
|
} catch (err) {
|
|
27
|
-
console.log(err.message);
|
|
28
29
|
return callback(err);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
// Node 20.10+ required for import attributes syntax used by sort-package-json
|
|
33
|
+
const worker = major >= 20 ? run : bind('>=10', path.join(dist, 'cjs', 'command.js'), {
|
|
34
|
+
callbacks: true
|
|
35
|
+
});
|
|
31
36
|
export default function publish(args, options, callback) {
|
|
32
|
-
|
|
37
|
+
worker(args, options, (err)=>{
|
|
38
|
+
if (err) console.log(err.stderr || err.message);
|
|
39
|
+
callback(err);
|
|
40
|
+
});
|
|
33
41
|
}
|
package/dist/esm/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/_later/tsds-validate/src/command.ts"],"sourcesContent":["import spawn, { type SpawnError } from 'cross-spawn-cb';\nimport { bind } from 'node-version-call';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport resolveBin from 'resolve-bin-sync';\nimport format from 'tsds-biome';\nimport build from 'tsds-build';\nimport type { CommandCallback, CommandOptions } from 'tsds-lib';\nimport docs from 'tsds-typedoc';\nimport url from 'url';\n\nconst major = +process.versions.node.split('.')[0];\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst dist = path.join(__dirname, '..');\n\nfunction run(args: string[], options: CommandOptions, callback: CommandCallback) {\n try {\n const depcheck = resolveBin('depcheck');\n const sortPackageJSON = resolveBin('sort-package-json');\n const spawnOptions = { ...options, encoding: 'utf8' };\n\n const queue = new Queue(1);\n queue.defer(format.bind(null, args, options));\n queue.defer(build.bind(null, args, options));\n queue.defer(spawn.bind(null, sortPackageJSON, [], spawnOptions));\n queue.defer(spawn.bind(null, depcheck, [], spawnOptions));\n queue.defer(docs.bind(null, args, options));\n queue.await(callback);\n } catch (err) {\n return callback(err);\n }\n}\n\n// Node 20.10+ required for import attributes syntax used by sort-package-json\nconst worker = major >= 20 ? run : bind('>=10', path.join(dist, 'cjs', 'command.js'), { callbacks: true });\n\nexport default function publish(args: string[], options: CommandOptions, callback: CommandCallback) {\n worker(args, options, (err: SpawnError) => {\n if (err) console.log(err.stderr || err.message);\n callback(err);\n });\n}\n"],"names":["spawn","bind","path","Queue","resolveBin","format","build","docs","url","major","process","versions","node","split","__dirname","dirname","__filename","fileURLToPath","dist","join","run","args","options","callback","depcheck","sortPackageJSON","spawnOptions","encoding","queue","defer","await","err","worker","callbacks","publish","console","log","stderr","message"],"mappings":"AAAA,OAAOA,WAAgC,iBAAiB;AACxD,SAASC,IAAI,QAAQ,oBAAoB;AACzC,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,OAAOC,gBAAgB,mBAAmB;AAC1C,OAAOC,YAAY,aAAa;AAChC,OAAOC,WAAW,aAAa;AAE/B,OAAOC,UAAU,eAAe;AAChC,OAAOC,SAAS,MAAM;AAEtB,MAAMC,QAAQ,CAACC,QAAQC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE;AAClD,MAAMC,YAAYZ,KAAKa,OAAO,CAAC,OAAOC,eAAe,cAAcR,IAAIS,aAAa,CAAC,YAAYT,GAAG,IAAIQ;AACxG,MAAME,OAAOhB,KAAKiB,IAAI,CAACL,WAAW;AAElC,SAASM,IAAIC,IAAc,EAAEC,OAAuB,EAAEC,QAAyB;IAC7E,IAAI;QACF,MAAMC,WAAWpB,WAAW;QAC5B,MAAMqB,kBAAkBrB,WAAW;QACnC,MAAMsB,eAAe;YAAE,GAAGJ,OAAO;YAAEK,UAAU;QAAO;QAEpD,MAAMC,QAAQ,IAAIzB,MAAM;QACxByB,MAAMC,KAAK,CAACxB,OAAOJ,IAAI,CAAC,MAAMoB,MAAMC;QACpCM,MAAMC,KAAK,CAACvB,MAAML,IAAI,CAAC,MAAMoB,MAAMC;QACnCM,MAAMC,KAAK,CAAC7B,MAAMC,IAAI,CAAC,MAAMwB,iBAAiB,EAAE,EAAEC;QAClDE,MAAMC,KAAK,CAAC7B,MAAMC,IAAI,CAAC,MAAMuB,UAAU,EAAE,EAAEE;QAC3CE,MAAMC,KAAK,CAACtB,KAAKN,IAAI,CAAC,MAAMoB,MAAMC;QAClCM,MAAME,KAAK,CAACP;IACd,EAAE,OAAOQ,KAAK;QACZ,OAAOR,SAASQ;IAClB;AACF;AAEA,8EAA8E;AAC9E,MAAMC,SAASvB,SAAS,KAAKW,MAAMnB,KAAK,QAAQC,KAAKiB,IAAI,CAACD,MAAM,OAAO,eAAe;IAAEe,WAAW;AAAK;AAExG,eAAe,SAASC,QAAQb,IAAc,EAAEC,OAAuB,EAAEC,QAAyB;IAChGS,OAAOX,MAAMC,SAAS,CAACS;QACrB,IAAIA,KAAKI,QAAQC,GAAG,CAACL,IAAIM,MAAM,IAAIN,IAAIO,OAAO;QAC9Cf,SAASQ;IACX;AACF"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/_later/tsds-validate/src/index.ts"],"sourcesContent":["export { default } from './command.ts';\n"],"names":["default"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsds-validate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Development stack for TypeScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"c8",
|
|
@@ -42,28 +42,28 @@
|
|
|
42
42
|
"version": "tsds version"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"cross-spawn-cb": "^
|
|
45
|
+
"cross-spawn-cb": "^3.0.0",
|
|
46
46
|
"depcheck": "^1.4.7",
|
|
47
|
-
"node-version-call": "^
|
|
48
|
-
"queue-cb": "^1.
|
|
47
|
+
"node-version-call": "^3.0.0",
|
|
48
|
+
"queue-cb": "^1.6.3",
|
|
49
49
|
"resolve-bin-sync": "^1.0.12",
|
|
50
|
-
"sort-package-json": "
|
|
51
|
-
"tsds-biome": "^1.
|
|
52
|
-
"tsds-build": "^1.
|
|
53
|
-
"tsds-lib": "^1.
|
|
54
|
-
"tsds-typedoc": "^1.20.
|
|
50
|
+
"sort-package-json": "2.15.1",
|
|
51
|
+
"tsds-biome": "^1.21.1",
|
|
52
|
+
"tsds-build": "^1.21.1",
|
|
53
|
+
"tsds-lib": "^1.21.1",
|
|
54
|
+
"tsds-typedoc": "^1.20.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/mocha": "*",
|
|
58
58
|
"@types/node": "*",
|
|
59
|
-
"module-link-unlink": "^1.0
|
|
59
|
+
"module-link-unlink": "^1.1.0",
|
|
60
60
|
"node-version-use": "*",
|
|
61
|
-
"os-shim": "^0.1.
|
|
62
|
-
"resolve": "^1.
|
|
61
|
+
"os-shim": "^0.1.3",
|
|
62
|
+
"resolve": "^1.22.11",
|
|
63
63
|
"short-hash": "^1.0.0",
|
|
64
64
|
"ts-dev-stack": "*",
|
|
65
65
|
"tsds-config": "*",
|
|
66
|
-
"tsds-lib-test": "^1.
|
|
66
|
+
"tsds-lib-test": "^1.20.0"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=0.8"
|