ctx-core 5.18.8 → 5.18.9

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.
@@ -5,8 +5,9 @@ import { process_release_name } from '../process_release_name/index.js'
5
5
  * @see {@link https://stackoverflow.com/a/70981544/142571}
6
6
  */
7
7
  export const crypto = globalThis.crypto
8
+ let node_crypto = 'node:crypto'
8
9
  export async function crypto_() {
9
10
  return (
10
11
  crypto
11
- || process_release_name && import('node:crypto').then(mod=>mod.webcrypto))
12
+ || process_release_name && import(node_crypto).then(mod=>mod.webcrypto))
12
13
  }
@@ -1,5 +1,6 @@
1
1
  import { process_release_name } from '../process_release_name/index.js'
2
2
  import { waitfor } from '../waitfor/index.js'
3
+ let node_fs_promises = 'node:fs/promises'
3
4
  /**
4
5
  * @param {string}path
5
6
  * @returns {Promise<boolean>}
@@ -8,7 +9,7 @@ import { waitfor } from '../waitfor/index.js'
8
9
  export async function file_exists_(path) {
9
10
  return (
10
11
  (process_release_name ?? false)
11
- && import('node:fs/promises').then(({ access, constants })=>
12
+ && import(node_fs_promises).then(({ access, constants })=>
12
13
  access(path, constants.F_OK)
13
14
  .then(()=>true)
14
15
  .catch(()=>false)))
@@ -1,8 +1,9 @@
1
1
  import { process_release_name } from '../process_release_name/index.js'
2
+ let node_path = 'node:path'
2
3
  export function is_entry_file_(url, entry_path) {
3
4
  if (!process_release_name) return false
4
5
  return (
5
- import('node:path').then(({ resolve })=>
6
+ import(node_path).then(({ resolve })=>
6
7
  new URL(url).pathname === resolve(entry_path ?? process.argv[1]))
7
8
  )
8
9
  }
@@ -1,5 +1,7 @@
1
1
  import { crypto_ } from '../crypto/index.js'
2
2
  import { url__join } from '../url__join/index.js'
3
+ let node_fs_promises = 'node:fs/promises'
4
+ let node_os = 'node:os'
3
5
  /**
4
6
  * @param {string}[dir_path]
5
7
  * @param {string}[extension]
@@ -13,9 +15,9 @@ export async function tempfile_path_(
13
15
  if (dir_path == null) {
14
16
  dir_path =
15
17
  typeof window === 'undefined'
16
- ? await import('node:fs/promises')
18
+ ? await import(node_fs_promises)
17
19
  .then(fs=>
18
- import('node:os')
20
+ import(node_os)
19
21
  .then(os=>
20
22
  fs.realpath(os.tmpdir())))
21
23
  : null
package/html/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { html_ } from '../html/index.js'
1
+ import { html_ } from './/index.js'
2
2
  import { html_attr_, raw__html_attr_ } from '../all/html_attr/index.js'
3
3
  import { html_attrs_ } from '../all/html_attrs/index.js'
4
4
  import { html_class_, html_class__ } from '../all/html_class/index.js'
package/html/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { html_ } from '../html/index.js'
1
+ import { html_ } from './/index.js'
2
2
  import { html_attr_, raw__html_attr_ } from '../all/html_attr/index.js'
3
3
  import { html_attrs_ } from '../all/html_attrs/index.js'
4
4
  import { html_class_, html_class__ } from '../all/html_class/index.js'
package/package.json CHANGED
@@ -1,250 +1,250 @@
1
1
  {
2
- "name": "ctx-core",
3
- "version": "5.18.8",
4
- "description": "ctx-core core library",
5
- "keywords": [
6
- "ctx-core",
7
- "array",
8
- "combinators",
9
- "function",
10
- "object",
11
- "set"
12
- ],
13
- "homepage": "https://github.com/ctx-core/ctx-core#readme",
14
- "bugs": {
15
- "url": "https://github.com/ctx-core/ctx-core/issues"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/ctx-core/ctx-core.git"
20
- },
21
- "license": "Apache-2.0",
22
- "author": "Brian Takita",
23
- "type": "module",
24
- "files": [
25
- "*.d.ts",
26
- "*.js",
27
- "*.json",
28
- "all",
29
- "array",
30
- "atob",
31
- "base16",
32
- "be",
33
- "btoa",
34
- "buffer",
35
- "chain",
36
- "class",
37
- "cli-args",
38
- "color",
39
- "combinators",
40
- "crypto",
41
- "currency",
42
- "data",
43
- "date",
44
- "debounce",
45
- "deep_equal",
46
- "env",
47
- "error",
48
- "falsy",
49
- "fetch",
50
- "fibonacci",
51
- "fs",
52
- "function",
53
- "functional",
54
- "html",
55
- "http",
56
- "math",
57
- "matrix",
58
- "nullish",
59
- "number",
60
- "object",
61
- "promise",
62
- "queue",
63
- "random",
64
- "regex",
65
- "rmemo",
66
- "run",
67
- "set",
68
- "sleep",
69
- "string",
70
- "tempfile",
71
- "test",
72
- "time",
73
- "tuple",
74
- "types",
75
- "uri",
76
- "uuid",
77
- "package.json"
78
- ],
79
- "types": "./src/index.d.ts",
80
- "exports": {
81
- ".": "./index.js",
82
- "./all": "./all/index.js",
83
- "./array": "./array/index.js",
84
- "./atob": "./atob/index.js",
85
- "./base16": "./base16/index.js",
86
- "./be": "./be/index.js",
87
- "./btoa": "./btoa/index.js",
88
- "./buffer": "./buffer/index.js",
89
- "./chain": "./chain/index.js",
90
- "./class": "./class/index.js",
91
- "./cli-args": "./cli-args/index.js",
92
- "./color": "./color/index.js",
93
- "./combinators": "./combinators/index.js",
94
- "./crypto": "./crypto/index.js",
95
- "./currency": "./currency/index.js",
96
- "./data": "./data/index.js",
97
- "./date": "./date/index.js",
98
- "./debounce": "./debounce/index.js",
99
- "./deep_equal": "./deep_equal/index.js",
100
- "./env": "./env/index.js",
101
- "./error": "./error/index.js",
102
- "./falsy": "./falsy/index.js",
103
- "./fetch": "./fetch/index.js",
104
- "./fibonacci": "./fibonacci/index.js",
105
- "./fs": "./fs/index.js",
106
- "./function": "./function/index.js",
107
- "./functional": "./functional/index.js",
108
- "./html": "./html/index.js",
109
- "./http": "./http/index.js",
110
- "./math": "./math/index.js",
111
- "./matrix": "./matrix/index.js",
112
- "./nullish": "./nullish/index.js",
113
- "./number": "./number/index.js",
114
- "./object": "./object/index.js",
115
- "./promise": "./promise/index.js",
116
- "./queue": "./queue/index.js",
117
- "./random": "./random/index.js",
118
- "./regex": "./regex/index.js",
119
- "./rmemo": "./rmemo/index.js",
120
- "./run": "./run/index.js",
121
- "./set": "./set/index.js",
122
- "./sleep": "./sleep/index.js",
123
- "./string": "./string/index.js",
124
- "./tempfile": "./tempfile/index.js",
125
- "./test": "./test/index.js",
126
- "./time": "./time/index.js",
127
- "./tuple": "./tuple/index.js",
128
- "./types": "./types/index.js",
129
- "./uri": "./uri/index.js",
130
- "./uuid": "./uuid/index.js",
131
- "./package.json": "./package.json"
132
- },
133
- "devDependencies": {
134
- "@arethetypeswrong/cli": "^0.13.5",
135
- "@ctx-core/preprocess": "^0.1.1",
136
- "@size-limit/preset-small-lib": "^11.0.1",
137
- "@types/node": "^20.11.2",
138
- "@types/sinon": "^17.0.3",
139
- "c8": "^9.1.0",
140
- "check-dts": "^0.7.2",
141
- "esbuild": "^0.19.11",
142
- "esmock": "^2.6.2",
143
- "sinon": "^17.0.1",
144
- "size-limit": "^11.0.1",
145
- "tsx": "^4.7.0",
146
- "typescript": "next",
147
- "uvu": "^0.5.6"
148
- },
149
- "publishConfig": {
150
- "access": "public",
151
- "cache": "~/.npm"
152
- },
153
- "sideEffects": false,
154
- "size-limit": [
155
- {
156
- "name": "ctx_",
157
- "import": {
158
- "./be": "{ ctx_ }"
159
- },
160
- "limit": "33 B"
161
- },
162
- {
163
- "name": "ns_ctx_",
164
- "import": {
165
- "./be": "{ ns_ctx_ }"
166
- },
167
- "limit": "85 B"
168
- },
169
- {
170
- "name": "be_",
171
- "import": {
172
- "./be": "{ be_ }"
173
- },
174
- "limit": "99 B"
175
- },
176
- {
177
- "name": "be_ ctx_",
178
- "import": {
179
- "./be": "{ be_, ctx_ }"
180
- },
181
- "limit": "131 B"
182
- },
183
- {
184
- "name": "be_ ns_ctx_",
185
- "import": {
186
- "./be": "{ be_, ctx_, ns_ctx_ }"
187
- },
188
- "limit": "190 B"
189
- },
190
- {
191
- "name": "be_ ctx_ ns_ctx_",
192
- "import": {
193
- "./be": "{ be_, ctx_, ns_ctx_ }"
194
- },
195
- "limit": "190 B"
196
- },
197
- {
198
- "name": "memo_",
199
- "import": {
200
- "./rmemo": "{ memo_ }"
201
- },
202
- "limit": "352 B"
203
- },
204
- {
205
- "name": "memo_ sig_",
206
- "import": {
207
- "./rmemo": "{ sig_, memo_ }"
208
- },
209
- "limit": "370 B"
210
- },
211
- {
212
- "name": "memo_ sig_ be_ ctx_",
213
- "import": {
214
- "./rmemo": "{ sig_, memo_, be_, ctx_ }"
215
- },
216
- "limit": "471 B"
217
- },
218
- {
219
- "name": "memo_ sig_ be_ ctx_ be_memo_pair_ be_sig_triple_",
220
- "import": {
221
- "./rmemo": "{ sig_, memo_, be_, ctx_, be_memo_pair_, be_sig_triple_ }"
222
- },
223
- "limit": "576 B"
224
- },
225
- {
226
- "name": "uuid",
227
- "import": {
228
- "./uuid": "{ uuid_ }"
229
- },
230
- "limit": "39 B"
231
- },
232
- {
233
- "name": "short uuid",
234
- "import": {
235
- "./uuid": "{ short_uuid_ }"
236
- },
237
- "limit": "116 B"
238
- }
239
- ],
240
- "scripts": {
241
- "build": ":",
242
- "clean": ":",
243
- "exec": "$@",
244
- "test": "pnpm run /^test:/",
245
- "test:size": "size-limit",
246
- "test:type": "check-dts",
247
- "test:unit": "NODE_OPTIONS=--loader=esmock tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
248
- "disable:test:coverage": "c8 pnpm test:unit"
249
- }
250
- }
2
+ "name": "ctx-core",
3
+ "version": "5.18.9",
4
+ "description": "ctx-core core library",
5
+ "keywords": [
6
+ "ctx-core",
7
+ "array",
8
+ "combinators",
9
+ "function",
10
+ "object",
11
+ "set"
12
+ ],
13
+ "homepage": "https://github.com/ctx-core/ctx-core#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/ctx-core/ctx-core/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/ctx-core/ctx-core.git"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "author": "Brian Takita",
23
+ "type": "module",
24
+ "files": [
25
+ "*.d.ts",
26
+ "*.js",
27
+ "*.json",
28
+ "all",
29
+ "array",
30
+ "atob",
31
+ "base16",
32
+ "be",
33
+ "btoa",
34
+ "buffer",
35
+ "chain",
36
+ "class",
37
+ "cli-args",
38
+ "color",
39
+ "combinators",
40
+ "crypto",
41
+ "currency",
42
+ "data",
43
+ "date",
44
+ "debounce",
45
+ "deep_equal",
46
+ "env",
47
+ "error",
48
+ "falsy",
49
+ "fetch",
50
+ "fibonacci",
51
+ "fs",
52
+ "function",
53
+ "functional",
54
+ "html",
55
+ "http",
56
+ "math",
57
+ "matrix",
58
+ "nullish",
59
+ "number",
60
+ "object",
61
+ "promise",
62
+ "queue",
63
+ "random",
64
+ "regex",
65
+ "rmemo",
66
+ "run",
67
+ "set",
68
+ "sleep",
69
+ "string",
70
+ "tempfile",
71
+ "test",
72
+ "time",
73
+ "tuple",
74
+ "types",
75
+ "uri",
76
+ "uuid",
77
+ "package.json"
78
+ ],
79
+ "exports": {
80
+ ".": "./index.js",
81
+ "./all": "./all/index.js",
82
+ "./array": "./array/index.js",
83
+ "./atob": "./atob/index.js",
84
+ "./base16": "./base16/index.js",
85
+ "./be": "./be/index.js",
86
+ "./btoa": "./btoa/index.js",
87
+ "./buffer": "./buffer/index.js",
88
+ "./chain": "./chain/index.js",
89
+ "./class": "./class/index.js",
90
+ "./cli-args": "./cli-args/index.js",
91
+ "./color": "./color/index.js",
92
+ "./combinators": "./combinators/index.js",
93
+ "./crypto": "./crypto/index.js",
94
+ "./currency": "./currency/index.js",
95
+ "./data": "./data/index.js",
96
+ "./date": "./date/index.js",
97
+ "./debounce": "./debounce/index.js",
98
+ "./deep_equal": "./deep_equal/index.js",
99
+ "./env": "./env/index.js",
100
+ "./error": "./error/index.js",
101
+ "./falsy": "./falsy/index.js",
102
+ "./fetch": "./fetch/index.js",
103
+ "./fibonacci": "./fibonacci/index.js",
104
+ "./fs": "./fs/index.js",
105
+ "./function": "./function/index.js",
106
+ "./functional": "./functional/index.js",
107
+ "./html": "./html/index.js",
108
+ "./http": "./http/index.js",
109
+ "./math": "./math/index.js",
110
+ "./matrix": "./matrix/index.js",
111
+ "./nullish": "./nullish/index.js",
112
+ "./number": "./number/index.js",
113
+ "./object": "./object/index.js",
114
+ "./promise": "./promise/index.js",
115
+ "./queue": "./queue/index.js",
116
+ "./random": "./random/index.js",
117
+ "./regex": "./regex/index.js",
118
+ "./rmemo": "./rmemo/index.js",
119
+ "./run": "./run/index.js",
120
+ "./set": "./set/index.js",
121
+ "./sleep": "./sleep/index.js",
122
+ "./string": "./string/index.js",
123
+ "./tempfile": "./tempfile/index.js",
124
+ "./test": "./test/index.js",
125
+ "./time": "./time/index.js",
126
+ "./tuple": "./tuple/index.js",
127
+ "./types": "./types/index.js",
128
+ "./uri": "./uri/index.js",
129
+ "./uuid": "./uuid/index.js",
130
+ "./package.json": "./package.json"
131
+ },
132
+ "scripts": {
133
+ "build": ":",
134
+ "clean": ":",
135
+ "exec": "$@",
136
+ "prepublishOnly": "pnpm clean && pnpm build && pnpm test",
137
+ "test": "pnpm run /^test:/",
138
+ "test:size": "size-limit",
139
+ "test:type": "check-dts",
140
+ "test:unit": "NODE_OPTIONS=--loader=esmock tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
141
+ "disable:test:coverage": "c8 pnpm test:unit"
142
+ },
143
+ "devDependencies": {
144
+ "@arethetypeswrong/cli": "^0.13.5",
145
+ "@ctx-core/preprocess": "^0.1.1",
146
+ "@size-limit/preset-small-lib": "^11.0.1",
147
+ "@types/node": "^20.11.2",
148
+ "@types/sinon": "^17.0.3",
149
+ "c8": "^9.1.0",
150
+ "check-dts": "^0.7.2",
151
+ "esbuild": "^0.19.11",
152
+ "esmock": "^2.6.2",
153
+ "sinon": "^17.0.1",
154
+ "size-limit": "^11.0.1",
155
+ "tsx": "^4.7.0",
156
+ "typescript": "next",
157
+ "uvu": "^0.5.6"
158
+ },
159
+ "publishConfig": {
160
+ "access": "public",
161
+ "cache": "~/.npm"
162
+ },
163
+ "sideEffects": false,
164
+ "size-limit": [
165
+ {
166
+ "name": "ctx_",
167
+ "import": {
168
+ "./be": "{ ctx_ }"
169
+ },
170
+ "limit": "33 B"
171
+ },
172
+ {
173
+ "name": "ns_ctx_",
174
+ "import": {
175
+ "./be": "{ ns_ctx_ }"
176
+ },
177
+ "limit": "85 B"
178
+ },
179
+ {
180
+ "name": "be_",
181
+ "import": {
182
+ "./be": "{ be_ }"
183
+ },
184
+ "limit": "99 B"
185
+ },
186
+ {
187
+ "name": "be_ ctx_",
188
+ "import": {
189
+ "./be": "{ be_, ctx_ }"
190
+ },
191
+ "limit": "131 B"
192
+ },
193
+ {
194
+ "name": "be_ ns_ctx_",
195
+ "import": {
196
+ "./be": "{ be_, ctx_, ns_ctx_ }"
197
+ },
198
+ "limit": "190 B"
199
+ },
200
+ {
201
+ "name": "be_ ctx_ ns_ctx_",
202
+ "import": {
203
+ "./be": "{ be_, ctx_, ns_ctx_ }"
204
+ },
205
+ "limit": "190 B"
206
+ },
207
+ {
208
+ "name": "memo_",
209
+ "import": {
210
+ "./rmemo": "{ memo_ }"
211
+ },
212
+ "limit": "352 B"
213
+ },
214
+ {
215
+ "name": "memo_ sig_",
216
+ "import": {
217
+ "./rmemo": "{ sig_, memo_ }"
218
+ },
219
+ "limit": "370 B"
220
+ },
221
+ {
222
+ "name": "memo_ sig_ be_ ctx_",
223
+ "import": {
224
+ "./rmemo": "{ sig_, memo_, be_, ctx_ }"
225
+ },
226
+ "limit": "471 B"
227
+ },
228
+ {
229
+ "name": "memo_ sig_ be_ ctx_ be_memo_pair_ be_sig_triple_",
230
+ "import": {
231
+ "./rmemo": "{ sig_, memo_, be_, ctx_, be_memo_pair_, be_sig_triple_ }"
232
+ },
233
+ "limit": "576 B"
234
+ },
235
+ {
236
+ "name": "uuid",
237
+ "import": {
238
+ "./uuid": "{ uuid_ }"
239
+ },
240
+ "limit": "39 B"
241
+ },
242
+ {
243
+ "name": "short uuid",
244
+ "import": {
245
+ "./uuid": "{ short_uuid_ }"
246
+ },
247
+ "limit": "116 B"
248
+ }
249
+ ]
250
+ }
package/rmemo/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { memo__bind, rmemo__off, rmemo__on, rmemo__add } from '../rmemo/index.js'
1
+ import { memo__bind, rmemo__off, rmemo__on, rmemo__add } from './/index.js'
2
2
  export { memo__bind as _, memo__bind as bind, rmemo__off as off, rmemo__on as on, rmemo__add as subscribe }
3
3
  export * from '../all/be/index.js'
4
4
  export * from '../all/be_/index.js'
package/rmemo/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { memo__bind, rmemo__add, rmemo__off, rmemo__on } from '../rmemo/index.js'
1
+ import { memo__bind, rmemo__add, rmemo__off, rmemo__on } from './/index.js'
2
2
  export { memo__bind as _, memo__bind as bind, rmemo__off as off, rmemo__on as on, rmemo__add as subscribe }
3
3
  export * from '../all/be/index.js'
4
4
  export * from '../all/be_/index.js'
package/tsconfig.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "moduleResolution": "nodenext",
6
6
  "target": "ESNext",
7
7
  "strict": true,
8
+ "esModuleInterop": true,
8
9
  "lib": ["ESNext"],
9
10
  "types": [
10
11
  "node"