spawn-term 3.3.2 → 3.3.3
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/compat.js.map +1 -1
- package/dist/esm/compat.js +4 -4
- package/dist/esm/compat.js.map +1 -1
- package/package.json +8 -8
package/dist/cjs/compat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.endsWith wrapper for Node.js 0.8+\n * - Uses native endsWith on Node 4.0+ / ES2015+\n * - Falls back to lastIndexOf on Node 0.8-3.x\n */\
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.endsWith wrapper for Node.js 0.8+\n * - Uses native endsWith on Node 4.0+ / ES2015+\n * - Falls back to lastIndexOf on Node 0.8-3.x\n */\nconst hasEndsWith = typeof String.prototype.endsWith === 'function';\n\nexport function stringEndsWith(str: string, search: string, position?: number): boolean {\n if (hasEndsWith) {\n return str.endsWith(search, position);\n }\n const len = position === undefined ? str.length : position;\n return str.lastIndexOf(search) === len - search.length;\n}\n\n/**\n * Array.prototype.find wrapper for Node.js 0.8+\n * - Uses native find on Node 4.0+ / ES2015+\n * - Falls back to loop on Node 0.8-3.x\n */\nconst hasArrayFind = typeof Array.prototype.find === 'function';\n\nexport function arrayFind<T>(arr: T[], predicate: (item: T, index: number, arr: T[]) => boolean): T | undefined {\n if (hasArrayFind) {\n return arr.find(predicate);\n }\n for (let i = 0; i < arr.length; i++) {\n if (predicate(arr[i], i, arr)) return arr[i];\n }\n return undefined;\n}\n"],"names":["arrayFind","stringEndsWith","hasEndsWith","String","prototype","endsWith","str","search","position","len","undefined","length","lastIndexOf","hasArrayFind","Array","find","arr","predicate","i"],"mappings":";;;;;;;;;;;QA2BgBA;eAAAA;;QAfAC;eAAAA;;;AAZhB;;;CAGC,GAED;;;;CAIC,GACD,IAAMC,cAAc,OAAOC,OAAOC,SAAS,CAACC,QAAQ,KAAK;AAElD,SAASJ,eAAeK,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC3E,IAAIN,aAAa;QACf,OAAOI,IAAID,QAAQ,CAACE,QAAQC;IAC9B;IACA,IAAMC,MAAMD,aAAaE,YAAYJ,IAAIK,MAAM,GAAGH;IAClD,OAAOF,IAAIM,WAAW,CAACL,YAAYE,MAAMF,OAAOI,MAAM;AACxD;AAEA;;;;CAIC,GACD,IAAME,eAAe,OAAOC,MAAMV,SAAS,CAACW,IAAI,KAAK;AAE9C,SAASf,UAAagB,GAAQ,EAAEC,SAAwD;IAC7F,IAAIJ,cAAc;QAChB,OAAOG,IAAID,IAAI,CAACE;IAClB;IACA,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIL,MAAM,EAAEO,IAAK;QACnC,IAAID,UAAUD,GAAG,CAACE,EAAE,EAAEA,GAAGF,MAAM,OAAOA,GAAG,CAACE,EAAE;IAC9C;IACA,OAAOR;AACT"}
|
package/dist/esm/compat.js
CHANGED
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
* String.prototype.endsWith wrapper for Node.js 0.8+
|
|
6
6
|
* - Uses native endsWith on Node 4.0+ / ES2015+
|
|
7
7
|
* - Falls back to lastIndexOf on Node 0.8-3.x
|
|
8
|
-
*/
|
|
8
|
+
*/ const hasEndsWith = typeof String.prototype.endsWith === 'function';
|
|
9
9
|
export function stringEndsWith(str, search, position) {
|
|
10
10
|
if (hasEndsWith) {
|
|
11
11
|
return str.endsWith(search, position);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
const len = position === undefined ? str.length : position;
|
|
14
14
|
return str.lastIndexOf(search) === len - search.length;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Array.prototype.find wrapper for Node.js 0.8+
|
|
18
18
|
* - Uses native find on Node 4.0+ / ES2015+
|
|
19
19
|
* - Falls back to loop on Node 0.8-3.x
|
|
20
|
-
*/
|
|
20
|
+
*/ const hasArrayFind = typeof Array.prototype.find === 'function';
|
|
21
21
|
export function arrayFind(arr, predicate) {
|
|
22
22
|
if (hasArrayFind) {
|
|
23
23
|
return arr.find(predicate);
|
|
24
24
|
}
|
|
25
|
-
for(
|
|
25
|
+
for(let i = 0; i < arr.length; i++){
|
|
26
26
|
if (predicate(arr[i], i, arr)) return arr[i];
|
|
27
27
|
}
|
|
28
28
|
return undefined;
|
package/dist/esm/compat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.endsWith wrapper for Node.js 0.8+\n * - Uses native endsWith on Node 4.0+ / ES2015+\n * - Falls back to lastIndexOf on Node 0.8-3.x\n */\
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.endsWith wrapper for Node.js 0.8+\n * - Uses native endsWith on Node 4.0+ / ES2015+\n * - Falls back to lastIndexOf on Node 0.8-3.x\n */\nconst hasEndsWith = typeof String.prototype.endsWith === 'function';\n\nexport function stringEndsWith(str: string, search: string, position?: number): boolean {\n if (hasEndsWith) {\n return str.endsWith(search, position);\n }\n const len = position === undefined ? str.length : position;\n return str.lastIndexOf(search) === len - search.length;\n}\n\n/**\n * Array.prototype.find wrapper for Node.js 0.8+\n * - Uses native find on Node 4.0+ / ES2015+\n * - Falls back to loop on Node 0.8-3.x\n */\nconst hasArrayFind = typeof Array.prototype.find === 'function';\n\nexport function arrayFind<T>(arr: T[], predicate: (item: T, index: number, arr: T[]) => boolean): T | undefined {\n if (hasArrayFind) {\n return arr.find(predicate);\n }\n for (let i = 0; i < arr.length; i++) {\n if (predicate(arr[i], i, arr)) return arr[i];\n }\n return undefined;\n}\n"],"names":["hasEndsWith","String","prototype","endsWith","stringEndsWith","str","search","position","len","undefined","length","lastIndexOf","hasArrayFind","Array","find","arrayFind","arr","predicate","i"],"mappings":"AAAA;;;CAGC,GAED;;;;CAIC,GACD,MAAMA,cAAc,OAAOC,OAAOC,SAAS,CAACC,QAAQ,KAAK;AAEzD,OAAO,SAASC,eAAeC,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC3E,IAAIP,aAAa;QACf,OAAOK,IAAIF,QAAQ,CAACG,QAAQC;IAC9B;IACA,MAAMC,MAAMD,aAAaE,YAAYJ,IAAIK,MAAM,GAAGH;IAClD,OAAOF,IAAIM,WAAW,CAACL,YAAYE,MAAMF,OAAOI,MAAM;AACxD;AAEA;;;;CAIC,GACD,MAAME,eAAe,OAAOC,MAAMX,SAAS,CAACY,IAAI,KAAK;AAErD,OAAO,SAASC,UAAaC,GAAQ,EAAEC,SAAwD;IAC7F,IAAIL,cAAc;QAChB,OAAOI,IAAIF,IAAI,CAACG;IAClB;IACA,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIN,MAAM,EAAEQ,IAAK;QACnC,IAAID,UAAUD,GAAG,CAACE,EAAE,EAAEA,GAAGF,MAAM,OAAOA,GAAG,CAACE,EAAE;IAC9C;IACA,OAAOT;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spawn-term",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Formats spawn with for terminal grouping",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"spawn",
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@xterm/headless": "^5.5.0",
|
|
46
|
-
"cross-spawn-cb": "^2.4.
|
|
47
|
-
"install-module-linked": "^1.3.
|
|
46
|
+
"cross-spawn-cb": "^2.4.12",
|
|
47
|
+
"install-module-linked": "^1.3.13",
|
|
48
48
|
"on-one": "^1.0.8",
|
|
49
49
|
"queue-cb": "^1.6.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/mocha": "^10.0.10",
|
|
53
|
-
"@types/node": "^
|
|
53
|
+
"@types/node": "^25.0.1",
|
|
54
54
|
"@types/react": "^19.2.7",
|
|
55
55
|
"cr": "^0.1.0",
|
|
56
56
|
"ink": "^6.5.1",
|
|
57
57
|
"is-version": "^1.0.7",
|
|
58
|
-
"node-version-use": "^1.
|
|
58
|
+
"node-version-use": "^2.1.5",
|
|
59
59
|
"pinkie-promise": "^2.0.1",
|
|
60
|
-
"react": "^19.2.
|
|
61
|
-
"ts-dev-stack": "^1.21.
|
|
62
|
-
"tsds-config": "^0.2.
|
|
60
|
+
"react": "^19.2.3",
|
|
61
|
+
"ts-dev-stack": "^1.21.3",
|
|
62
|
+
"tsds-config": "^0.2.1"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=0.8"
|