sendscript 0.0.2 → 0.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/.tap/processinfo/65b0791e-b6b7-4bc9-a201-d723527e67b3.json +784 -0
- package/.tap/processinfo/a23bd004-c2c3-4cb8-865d-19f9a4dfee9e.json +782 -0
- package/.tap/processinfo/b6cdc8e9-f8ff-45e7-93e6-7293b75a0567.json +780 -0
- package/.tap/test-results/api.test.mjs.tap +15 -0
- package/.tap/test-results/curry.test.mjs.tap +26 -0
- package/.tap/test-results/exec.test.mjs.tap +58 -0
- package/CHANGELOG.md +6 -0
- package/README.md +25 -20
- package/README.mz +10 -1
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
TAP version 14
|
|
2
|
+
# Subtest: return a constant value
|
|
3
|
+
1..1
|
|
4
|
+
ok 1 - should be equal
|
|
5
|
+
ok 1 - return a constant value # time=5.997ms
|
|
6
|
+
|
|
7
|
+
# Subtest: use function calls as arguments
|
|
8
|
+
1..4
|
|
9
|
+
ok 1 - should be equal
|
|
10
|
+
ok 2 - should be equal
|
|
11
|
+
ok 3 - should be equal
|
|
12
|
+
ok 4 - should be equal
|
|
13
|
+
ok 2 - use function calls as arguments # time=1.417ms
|
|
14
|
+
|
|
15
|
+
1..2
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
TAP version 14
|
|
2
|
+
# Subtest: curry function
|
|
3
|
+
# Subtest: curry function returns a function
|
|
4
|
+
ok 1 - returns a function
|
|
5
|
+
1..1
|
|
6
|
+
ok 1 - curry function returns a function # time=4.318ms
|
|
7
|
+
|
|
8
|
+
# Subtest: curried function returns correct result
|
|
9
|
+
ok 1 - returns correct result
|
|
10
|
+
1..1
|
|
11
|
+
ok 2 - curried function returns correct result # time=0.913ms
|
|
12
|
+
|
|
13
|
+
# Subtest: curried function handles partial application
|
|
14
|
+
ok 1 - handles partial application
|
|
15
|
+
1..1
|
|
16
|
+
ok 3 - curried function handles partial application # time=0.785ms
|
|
17
|
+
|
|
18
|
+
# Subtest: curried function handles multiple arguments
|
|
19
|
+
ok 1 - handles multiple arguments
|
|
20
|
+
1..1
|
|
21
|
+
ok 4 - curried function handles multiple arguments # time=0.71ms
|
|
22
|
+
|
|
23
|
+
1..4
|
|
24
|
+
ok 1 - curry function # time=15.786ms
|
|
25
|
+
|
|
26
|
+
1..1
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
TAP version 14
|
|
2
|
+
# Subtest: should evaluate basic expressions correctly
|
|
3
|
+
1..4
|
|
4
|
+
ok 1 - 1 + 2 = 3
|
|
5
|
+
ok 2 - 5 - 3 = 2
|
|
6
|
+
ok 3 - 4 * 3 = 12
|
|
7
|
+
ok 4 - 10 / 2 = 5
|
|
8
|
+
ok 1 - should evaluate basic expressions correctly # time=8.016ms
|
|
9
|
+
|
|
10
|
+
# Subtest: should be able to call a partially applied function
|
|
11
|
+
ok 1 - should be equal
|
|
12
|
+
ok 2 - should be equal
|
|
13
|
+
1..2
|
|
14
|
+
ok 2 - should be able to call a partially applied function # time=1.168ms
|
|
15
|
+
|
|
16
|
+
# Subtest: should handle let expressions
|
|
17
|
+
1..1
|
|
18
|
+
ok 1 - x + y = 5
|
|
19
|
+
ok 3 - should handle let expressions # time=1.027ms
|
|
20
|
+
|
|
21
|
+
# Subtest: should handle fn expressions
|
|
22
|
+
1..2
|
|
23
|
+
ok 1 - should return a function
|
|
24
|
+
ok 2 - 1 + 2 = 3
|
|
25
|
+
ok 4 - should handle fn expressions # time=1.4ms
|
|
26
|
+
|
|
27
|
+
# Subtest: should throw an error for unknown expressions
|
|
28
|
+
1..1
|
|
29
|
+
ok 1 - should throw an error for unknown expressions
|
|
30
|
+
ok 5 - should throw an error for unknown expressions # time=0.932ms
|
|
31
|
+
|
|
32
|
+
# Subtest: should evaluate nested expressions correctly
|
|
33
|
+
1..1
|
|
34
|
+
ok 1 - 2 * (1 + 2) = 6
|
|
35
|
+
ok 6 - should evaluate nested expressions correctly # time=0.746ms
|
|
36
|
+
|
|
37
|
+
# Subtest: should concatenate two arrays
|
|
38
|
+
1..1
|
|
39
|
+
ok 1 - should be equivalent
|
|
40
|
+
ok 7 - should concatenate two arrays # time=2.254ms
|
|
41
|
+
|
|
42
|
+
# Subtest: should fetch the reference to the item on the env
|
|
43
|
+
ok 1 - should be equivalent
|
|
44
|
+
ok 2 - should be equivalent
|
|
45
|
+
1..2
|
|
46
|
+
ok 8 - should fetch the reference to the item on the env # time=0.536ms
|
|
47
|
+
|
|
48
|
+
# Subtest: should reject with the error of the called function
|
|
49
|
+
ok 1 - expected to reject
|
|
50
|
+
1..1
|
|
51
|
+
ok 9 - should reject with the error of the called function # time=1.386ms
|
|
52
|
+
|
|
53
|
+
# Subtest: should not exec expressions in an object
|
|
54
|
+
ok 1 - should be equivalent
|
|
55
|
+
1..1
|
|
56
|
+
ok 10 - should not exec expressions in an object # time=1.079ms
|
|
57
|
+
|
|
58
|
+
1..10
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v0.0.3](https://github.com/bas080/sendscript/compare/v0.0.2...v0.0.3)
|
|
8
|
+
|
|
9
|
+
- Update tap from version 16 to 18 [`465c933`](https://github.com/bas080/sendscript/commit/465c93391097018ee010b51a64ca51d6872b49f1)
|
|
10
|
+
|
|
7
11
|
#### [v0.0.2](https://github.com/bas080/sendscript/compare/v0.0.1...v0.0.2)
|
|
8
12
|
|
|
13
|
+
> 6 October 2023
|
|
14
|
+
|
|
9
15
|
- Add table of content to readme [`a14f2d8`](https://github.com/bas080/sendscript/commit/a14f2d86f602a01721812d1c5be94b299e515397)
|
|
10
16
|
|
|
11
17
|
#### [v0.0.1](https://github.com/bas080/sendscript/compare/v0.0.0...v0.0.1)
|
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Write JS code that you can run on servers, browsers or other clients.
|
|
|
23
23
|
- [Tests](#tests)
|
|
24
24
|
- [Formatting](#formatting)
|
|
25
25
|
- [Changelog](#changelog)
|
|
26
|
+
- [Dependencies](#dependencies)
|
|
26
27
|
- [License](#license)
|
|
27
28
|
|
|
28
29
|
<!-- tocstop -->
|
|
@@ -188,32 +189,25 @@ is an implementation detail and might change over time.
|
|
|
188
189
|
Tests with 100% code coverage.
|
|
189
190
|
|
|
190
191
|
```bash
|
|
191
|
-
|
|
192
|
+
npm t -- -R silent
|
|
193
|
+
npm t -- report text-summary
|
|
192
194
|
```
|
|
193
195
|
```
|
|
194
196
|
|
|
195
|
-
> sendscript@0.0.
|
|
196
|
-
> tap
|
|
197
|
+
> sendscript@0.0.3 test
|
|
198
|
+
> tap -R silent
|
|
197
199
|
|
|
198
|
-
api.test.mjs .......................................... 5/5
|
|
199
|
-
curry.test.mjs ........................................ 4/4
|
|
200
|
-
exec.test.mjs ....................................... 16/16
|
|
201
|
-
total ............................................... 25/25
|
|
202
200
|
|
|
203
|
-
|
|
201
|
+
> sendscript@0.0.3 test
|
|
202
|
+
> tap report text-summary
|
|
204
203
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
debug.mjs | 100 | 100 | 100 | 100 |
|
|
213
|
-
error.mjs | 100 | 100 | 100 | 100 |
|
|
214
|
-
exec.mjs | 100 | 100 | 100 | 100 |
|
|
215
|
-
promise-only.mjs | 100 | 100 | 100 | 100 |
|
|
216
|
-
------------------|---------|----------|---------|---------|-------------------
|
|
204
|
+
|
|
205
|
+
=============================== Coverage summary ===============================
|
|
206
|
+
Statements : 100% ( 139/139 )
|
|
207
|
+
Branches : 100% ( 47/47 )
|
|
208
|
+
Functions : 100% ( 12/12 )
|
|
209
|
+
Lines : 100% ( 139/139 )
|
|
210
|
+
================================================================================
|
|
217
211
|
```
|
|
218
212
|
|
|
219
213
|
## Formatting
|
|
@@ -233,6 +227,17 @@ The [changelog][changelog] is generated using the useful
|
|
|
233
227
|
npx auto-changelog -p
|
|
234
228
|
```
|
|
235
229
|
|
|
230
|
+
## Dependencies
|
|
231
|
+
|
|
232
|
+
Check if packages are up to date on release.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
npm outdated && echo 'No outdated packages found'
|
|
236
|
+
```
|
|
237
|
+
```
|
|
238
|
+
No outdated packages found
|
|
239
|
+
```
|
|
240
|
+
|
|
236
241
|
## License
|
|
237
242
|
|
|
238
243
|
See the [LICENSE.txt][license] file for details.
|
package/README.mz
CHANGED
|
@@ -171,7 +171,8 @@ is an implementation detail and might change over time.
|
|
|
171
171
|
Tests with 100% code coverage.
|
|
172
172
|
|
|
173
173
|
```bash bash
|
|
174
|
-
|
|
174
|
+
npm t -- -R silent
|
|
175
|
+
npm t -- report text-summary
|
|
175
176
|
```
|
|
176
177
|
|
|
177
178
|
## Formatting
|
|
@@ -191,6 +192,14 @@ The [changelog][changelog] is generated using the useful
|
|
|
191
192
|
npx auto-changelog -p
|
|
192
193
|
```
|
|
193
194
|
|
|
195
|
+
## Dependencies
|
|
196
|
+
|
|
197
|
+
Check if packages are up to date on release.
|
|
198
|
+
|
|
199
|
+
```bash bash
|
|
200
|
+
npm outdated && echo 'No outdated packages found'
|
|
201
|
+
```
|
|
202
|
+
|
|
194
203
|
## License
|
|
195
204
|
|
|
196
205
|
See the [LICENSE.txt][license] file for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sendscript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Blur the line between server and client code.",
|
|
5
5
|
"module": true,
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"url": "git@github.com:bas080/sendscript.git"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"test": "tap
|
|
12
|
+
"test": "tap",
|
|
13
13
|
"version": "npm run docs && git add *.md",
|
|
14
14
|
"docs": "markatzea README.mz | tee README.md && npx markdown-toc -i README.md"
|
|
15
15
|
},
|
|
16
16
|
"author": "Bas Huis",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"tap": "^
|
|
19
|
+
"tap": "^18.4.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"debug": "^4.3.4"
|