@lowlighter/run 1.0.2 → 1.0.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/command.ts CHANGED
@@ -1,9 +1,15 @@
1
+ /**
2
+ * @module
3
+ * A wrapper around `Deno.command` that provides a better handling of stdio for interactive processes.
4
+ */
5
+
1
6
  // Imports
2
7
  import type { Arg, Nullable, Promisable } from "@libs/typing"
3
8
  import { Logger, type loglevel } from "@libs/logger"
4
9
  import { TextLineStream } from "@std/streams"
5
10
  import { debounce } from "@std/async/debounce"
6
11
  import { delay } from "@std/async/delay"
12
+ export type { Logger, loglevel, Promisable }
7
13
 
8
14
  /** Run options. */
9
15
  export type options = {
@@ -80,7 +86,9 @@ const encoder = new TextEncoder()
80
86
  /** Text decoder */
81
87
  const decoder = new TextDecoder()
82
88
 
89
+ /** Asynchronous version of {@link command}. */
83
90
  export function command(bin: string, args: string[], options?: options & { sync?: false }): Promise<result>
91
+ /** Synchronous version of {@link command}. */
84
92
  export function command(bin: string, args: string[], options?: options & { sync: true }): result
85
93
  /**
86
94
  * Run a command.
package/deno.jsonc CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "icon": "⏯️",
3
3
  "name": "@libs/run",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "Utilities to run subprocess.",
6
6
  "keywords": [
7
7
  "subprocess",
@@ -28,8 +28,8 @@
28
28
  "@std/async/delay": "jsr:@std/async@0.224.2/delay",
29
29
  "@std/async/debounce": "jsr:@std/async@0.224.2/debounce",
30
30
  "@std/streams": "jsr:@std/streams@0.224.5",
31
- "@libs/logger": "jsr:@libs/logger@1",
32
- "@libs/testing": "jsr:@libs/testing@1",
31
+ "@libs/logger": "jsr:@libs/logger@1.1.3",
32
+ "@libs/testing": "jsr:@libs/testing@2",
33
33
  "@libs/typing": "jsr:@libs/typing@2"
34
34
  },
35
35
  "test:permissions": {
@@ -42,11 +42,12 @@
42
42
  },
43
43
  "tasks": {
44
44
  "test": "deno test --allow-run=deno,node,bun,npx --no-prompt --coverage --clean --trace-leaks --doc",
45
- "dev": "deno fmt && deno task test --filter='/^\\[deno\\]/' && deno coverage --exclude=.js --detailed && deno lint && deno publish --dry-run --quiet --allow-dirty",
46
- "dev:future": "DENO_FUTURE=1 && deno task dev",
47
- "coverage": "deno task test --filter='/^\\[deno\\]/' --quiet && deno coverage --exclude=.js",
48
- "ci": "deno fmt --check && deno task test --filter='/^\\[node|bun \\]/' --quiet && deno coverage --exclude=.js && deno lint",
49
- "ci:coverage": "deno task coverage --html && sleep 1 && mkdir -p ../coverage && rm -rf ../coverage/run && mv coverage/html ../coverage/run"
45
+ "dev": "deno fmt && deno task test --filter='/^\\[deno\\]/' && deno coverage --exclude=.js --detailed && deno task lint",
46
+ "test:deno": "deno fmt --check && deno task test --filter='/^\\[deno\\]/' --quiet && deno coverage --exclude=.js && deno lint",
47
+ "test:deno-future": "DENO_FUTURE=1 && deno task test:deno",
48
+ "test:others": "deno fmt --check && deno task test --filter='/^\\[node|bun \\]/' --quiet && deno coverage --exclude=.js && deno lint",
49
+ "coverage:html": "deno fmt --check && deno task test --filter='/^\\[deno\\]/' --quiet && deno coverage --exclude=.js && deno lint",
50
+ "lint": "deno fmt --check && deno lint && deno doc --lint mod.ts && deno publish --dry-run --quiet --allow-dirty"
50
51
  },
51
52
  "lint": {
52
53
  "rules": {
package/deno.lock CHANGED
@@ -2,53 +2,65 @@
2
2
  "version": "3",
3
3
  "packages": {
4
4
  "specifiers": {
5
- "jsr:@libs/logger@1": "jsr:@libs/logger@1.1.2",
6
- "jsr:@libs/testing@1": "jsr:@libs/testing@1.1.0",
7
- "jsr:@libs/typing@2": "jsr:@libs/typing@2.3.0",
8
- "jsr:@std/assert@^0.225.3": "jsr:@std/assert@0.225.3",
5
+ "jsr:@libs/logger@1.1.3": "jsr:@libs/logger@1.1.3",
6
+ "jsr:@libs/testing@2": "jsr:@libs/testing@2.0.0",
7
+ "jsr:@libs/typing@2": "jsr:@libs/typing@2.6.0",
8
+ "jsr:@libs/typing@2.6": "jsr:@libs/typing@2.6.0",
9
+ "jsr:@std/assert@0.226.0": "jsr:@std/assert@0.226.0",
10
+ "jsr:@std/assert@1.0.0-rc.2": "jsr:@std/assert@1.0.0-rc.2",
9
11
  "jsr:@std/async@0.224.2": "jsr:@std/async@0.224.2",
10
12
  "jsr:@std/bytes@^1.0.0-rc.3": "jsr:@std/bytes@1.0.1",
11
13
  "jsr:@std/bytes@^1.0.1-rc.3": "jsr:@std/bytes@1.0.1",
12
- "jsr:@std/expect@0.224.3": "jsr:@std/expect@0.224.3",
14
+ "jsr:@std/expect@0.224.5": "jsr:@std/expect@0.224.5",
15
+ "jsr:@std/http@0.224.5": "jsr:@std/http@0.224.5",
13
16
  "jsr:@std/internal@^1.0.0": "jsr:@std/internal@1.0.1",
14
17
  "jsr:@std/io@^0.224.1": "jsr:@std/io@0.224.3",
15
- "jsr:@std/path@0.225.1": "jsr:@std/path@0.225.1",
18
+ "jsr:@std/path@0.225.2": "jsr:@std/path@0.225.2",
16
19
  "jsr:@std/streams@0.224.5": "jsr:@std/streams@0.224.5"
17
20
  },
18
21
  "jsr": {
19
- "@libs/logger@1.1.2": {
20
- "integrity": "7d718f54c9a5d1c00f570051bee0217e3b282e8c2131144ec55c794a8ebd5d4f"
22
+ "@libs/logger@1.1.3": {
23
+ "integrity": "a359d5ce4aa9f2508b1515ad6f48f41e9dfbc2250ebaa1fd9059930b3a9bab3a"
21
24
  },
22
- "@libs/testing@1.1.0": {
23
- "integrity": "961fed690ee11a6f0f2cf8ed759b9b3a5c40ca24d319ba6c18cbbdaf73f1b29b",
25
+ "@libs/testing@2.0.0": {
26
+ "integrity": "a1cb40f127ec8ab3a37814beb13ff604b5aacbf9da633b413b243b7fcbd2309a",
24
27
  "dependencies": [
25
28
  "jsr:@libs/run@1",
26
- "jsr:@std/expect@0.224.3",
27
- "jsr:@std/path@0.225.1"
29
+ "jsr:@libs/typing@2",
30
+ "jsr:@std/assert@0.226.0",
31
+ "jsr:@std/expect@0.224.5",
32
+ "jsr:@std/http@0.224.5",
33
+ "jsr:@std/path@0.225.2"
28
34
  ]
29
35
  },
30
- "@libs/typing@2.3.0": {
31
- "integrity": "8a03098b2d63763bc3b45b58f6e847d9c085405db83330c588aecb6b670587d0"
36
+ "@libs/typing@2.6.0": {
37
+ "integrity": "07a1ee52fa6d769d68d95d7310bac7dd608932c91760a0bc8a95ce6de3630603"
32
38
  },
33
- "@std/assert@0.225.3": {
34
- "integrity": "b3c2847aecf6955b50644cdb9cf072004ea3d1998dd7579fc0acb99dbb23bd4f",
39
+ "@std/assert@0.226.0": {
40
+ "integrity": "0dfb5f7c7723c18cec118e080fec76ce15b4c31154b15ad2bd74822603ef75b3",
35
41
  "dependencies": [
36
42
  "jsr:@std/internal@^1.0.0"
37
43
  ]
38
44
  },
45
+ "@std/assert@1.0.0-rc.2": {
46
+ "integrity": "0484eab1d76b55fca1c3beaff485a274e67dd3b9f065edcbe70030dfc0b964d3"
47
+ },
39
48
  "@std/async@0.224.2": {
40
49
  "integrity": "4d277d6e165df43d5e061ba0ef3edfddb8e8d558f5b920e3e6b1d2614b44d074"
41
50
  },
42
51
  "@std/bytes@1.0.1": {
43
52
  "integrity": "e57c9b243932b95a4c3672f8a038cdadea7492efeeb6b8a774844fee70426815"
44
53
  },
45
- "@std/expect@0.224.3": {
46
- "integrity": "eacd71aaa426472bf04ddde7e0765b0b360d3ffa33ad2ca05a96fd7052caea41",
54
+ "@std/expect@0.224.5": {
55
+ "integrity": "ae6e57ee6f23a2fd5ae130cb84448eef182354cb902e1a2a98d64c72ac3a5a1c",
47
56
  "dependencies": [
48
- "jsr:@std/assert@^0.225.3",
57
+ "jsr:@std/assert@1.0.0-rc.2",
49
58
  "jsr:@std/internal@^1.0.0"
50
59
  ]
51
60
  },
61
+ "@std/http@0.224.5": {
62
+ "integrity": "b03b5d1529f6c423badfb82f6640f9f2557b4034cd7c30655ba5bb447ff750a4"
63
+ },
52
64
  "@std/internal@1.0.1": {
53
65
  "integrity": "6f8c7544d06a11dd256c8d6ba54b11ed870aac6c5aeafff499892662c57673e6"
54
66
  },
@@ -58,8 +70,8 @@
58
70
  "jsr:@std/bytes@^1.0.1-rc.3"
59
71
  ]
60
72
  },
61
- "@std/path@0.225.1": {
62
- "integrity": "8c3220635a73730eb51fe43de9e10b79e2724a5bb8638b9355d35ae012fd9429"
73
+ "@std/path@0.225.2": {
74
+ "integrity": "0f2db41d36b50ef048dcb0399aac720a5348638dd3cb5bf80685bf2a745aa506"
63
75
  },
64
76
  "@std/streams@0.224.5": {
65
77
  "integrity": "bcde7818dd5460d474cdbd674b15f6638b9cd73cd64e52bd852fba2bd4d8ec91",
@@ -73,8 +85,8 @@
73
85
  "remote": {},
74
86
  "workspace": {
75
87
  "dependencies": [
76
- "jsr:@libs/logger@1",
77
- "jsr:@libs/testing@1",
88
+ "jsr:@libs/logger@1.1.3",
89
+ "jsr:@libs/testing@2",
78
90
  "jsr:@libs/typing@2",
79
91
  "jsr:@std/async@0.224.2",
80
92
  "jsr:@std/streams@0.224.5"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowlighter/run",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "scripts": {},
6
6
  "dependencies": {},