unexpectedly 3.0.3 → 3.0.4

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/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "unexpectedly",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Keep a bunch of test cases in a file, with their expected results",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
+ "files": [
8
+ "index.js",
9
+ "runner.js",
10
+ "testFile.peg.js",
11
+ "utils.js",
12
+ "version.js",
13
+ "vendor/",
14
+ "bin/"
15
+ ],
7
16
  "bin": {
8
17
  "unexpectedly": "bin/unexpectedly.js"
9
18
  },
@@ -23,9 +32,15 @@
23
32
  },
24
33
  "license": "MPL-2.0",
25
34
  "dependencies": {
26
- "@peggyjs/from-mem": "3.1.1",
27
- "commander": "14.0.0",
28
- "mocha": "^11.7.1"
35
+ "@peggyjs/from-mem": "3.1.3",
36
+ "commander": "14.0.3",
37
+ "mocha": "^11.7.5"
38
+ },
39
+ "pnpm": {
40
+ "overrides": {
41
+ "mocha@11.7.5>diff": "8.0.3",
42
+ "mocha@11.7.5>serialize-javascript": "7.0.4"
43
+ }
29
44
  },
30
45
  "engines": {
31
46
  "node": ">=20"
package/testFile.peg.js CHANGED
@@ -1,4 +1,4 @@
1
- // @generated by Peggy 5.0.6.
1
+ // @generated by Peggy 5.1.0.
2
2
  //
3
3
  // https://peggyjs.org/
4
4
 
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
- // Generated by package-extract v3.1.3
1
+ // Generated by package-extract v3.1.5
2
2
  // Do not modify by hand.
3
3
 
4
- export const version = '3.0.3';
4
+ export const version = '3.0.4';
package/eslint.config.js DELETED
@@ -1,26 +0,0 @@
1
- import base from '@cto.af/eslint-config';
2
- import mocha from '@cto.af/eslint-config/mocha.js';
3
- import mod from '@cto.af/eslint-config/module.js';
4
-
5
- export default [
6
- {
7
- ignores: [
8
- 'docs/**',
9
- 'coverage/**',
10
- '**/*.peg.js',
11
- '**/*.d.ts',
12
- 'test/pkg_bad/package.json',
13
- ],
14
- },
15
- ...base,
16
- ...mod,
17
- ...mocha,
18
- {
19
- files: [
20
- 'test/**/*.js',
21
- ],
22
- rules: {
23
- 'n/no-top-level-await': 'off',
24
- },
25
- },
26
- ];
package/testFile.peggy DELETED
@@ -1,111 +0,0 @@
1
- {{
2
- import { mapObj } from './utils.js'
3
- }}
4
-
5
- {
6
- let vars = {};
7
- }
8
- start
9
- = all:(WS @line? _)|.., EOL| {
10
- return all.filter(t => t && t.hasOwnProperty('expected'));
11
- }
12
-
13
- line
14
- = var
15
- / comment
16
- / test
17
- / '' // hack
18
-
19
- var
20
- = '#!' env:"!"? _ name:chunk _ ':' _ value:(@val _)? {
21
- if (!value) {
22
- const start = location().start;
23
- value = {
24
- value: undefined,
25
- line: start.line,
26
- column: start.column,
27
- }
28
- }
29
- value.env = Boolean(env);
30
- vars = {
31
- ...vars,
32
- [name]: value
33
- }
34
- }
35
-
36
- val
37
- = value:chunk {
38
- const start = location().start;
39
- return { value, line: start.line, column: start.column}
40
- }
41
-
42
- test
43
- = expected:results inputs:(LWS @chunk)* comment? {
44
- const start = location().start;
45
- return { expected, inputs, vars, line: start.line, column: start.column }
46
- }
47
-
48
- results
49
- = "!" { return options.EXCEPTION || "!" }
50
- / chunk
51
-
52
- chunk
53
- = quoted
54
- / hex
55
- / word
56
-
57
- quoted
58
- = '"' info:dqchar* '"' { return info.join('') }
59
- / "'" info:sqchar* "'" { return info.join('') }
60
- / "`" info:bqchar* "`" { return info.join('') }
61
-
62
- dqchar "characters that go inside double quotes, including escaped dquotes"
63
- = '\\"' { return '"' }
64
- / qchar
65
- / $[^\\"]+
66
-
67
- sqchar "characters that go inside single quotes, including escaped squotes"
68
- = "\\'" { return "'" }
69
- / qchar
70
- / $[^\\']+
71
-
72
- bqchar "characters that go inside back quotes, including escaped bquotes"
73
- = "\\`" { return "`" }
74
- / qchar
75
- / $[^\\`]+
76
-
77
- hex
78
- = '0x' hx:$[a-fA-F0-9]+ { return '0x' + hx.toLowerCase(hx) }
79
-
80
- word
81
- = chars:wchar+ { return chars.join('') }
82
-
83
- wchar "words can contain quoted bits"
84
- = qchar+
85
- / $[^ #:'"\t\r\n]+
86
-
87
- qchar "other quoted characters, as needed"
88
- = '\\\\' { return '\\' }
89
- / '\\r' { return '\r' }
90
- / '\\n' { return '\n' }
91
- / '\\t' { return '\t' }
92
- / '\\#' { return '#' }
93
- / '\\:' { return ':' }
94
- / '\\ ' { return ' ' }
95
-
96
- comment
97
- = WS "#" !"!" [^\r\n]* { return undefined }
98
-
99
- _ "optional whitespace"
100
- = [ \t]* { return undefined }
101
-
102
- WS "optional whitespace, including newlines"
103
- = [ \t\r\n]* { return undefined}
104
-
105
- LWS "required whitespace"
106
- = [ \t]+ { return undefined }
107
-
108
- EOL "End of line"
109
- = '\n'
110
- / '\r\n'
111
- / '\r'