@curly-message/conformance 1.0.0-next.0
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/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/conformance.js +37 -0
- package/bin/manifest.js +24 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +4 -0
- package/fixtures/comparisons.json +916 -0
- package/fixtures/conversion.json +231 -0
- package/fixtures/escaping-extensions.json +84 -0
- package/fixtures/escaping.json +546 -0
- package/fixtures/extensions.json +826 -0
- package/fixtures/fallback-intl.json +51 -0
- package/fixtures/fallback.json +774 -0
- package/fixtures/grammar.json +875 -0
- package/fixtures/intl.json +3057 -0
- package/fixtures/limits.json +63 -0
- package/fixtures/nesting.json +251 -0
- package/fixtures/reports.json +512 -0
- package/fixtures/resolution.json +742 -0
- package/fixtures/security-extensions.json +52 -0
- package/fixtures/security.json +246 -0
- package/fixtures/whitespace.json +1000 -0
- package/index.json +102 -0
- package/package.json +76 -0
- package/schema/fixture.schema.json +264 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "curly-message-1",
|
|
3
|
+
"level": "extensions",
|
|
4
|
+
"section": "14.1",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "security-extensions/registry-own-tostring",
|
|
8
|
+
"description": "A modifier registered under toString is an own entry of the registry, so a placeholder naming it asks that modifier.",
|
|
9
|
+
"section": "14.1",
|
|
10
|
+
"message": "{{v:toString; default:D}}",
|
|
11
|
+
"payload": {
|
|
12
|
+
"v": "x"
|
|
13
|
+
},
|
|
14
|
+
"modifiers": {
|
|
15
|
+
"toString": "upper"
|
|
16
|
+
},
|
|
17
|
+
"expected": {
|
|
18
|
+
"output": "X"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "security-extensions/registry-own-proto",
|
|
23
|
+
"description": "A modifier registered under __proto__ is an own entry of the registry, so a placeholder naming it asks that modifier.",
|
|
24
|
+
"section": "14.1",
|
|
25
|
+
"message": "{{v:__proto__; default:D}}",
|
|
26
|
+
"payload": {
|
|
27
|
+
"v": "x"
|
|
28
|
+
},
|
|
29
|
+
"modifiers": {
|
|
30
|
+
"__proto__": "upper"
|
|
31
|
+
},
|
|
32
|
+
"expected": {
|
|
33
|
+
"output": "X"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "security-extensions/registry-own-constructor",
|
|
38
|
+
"description": "A modifier registered under constructor is an own entry of the registry, so a placeholder naming it asks that modifier.",
|
|
39
|
+
"section": "14.1",
|
|
40
|
+
"message": "{{v:constructor; default:D}}",
|
|
41
|
+
"payload": {
|
|
42
|
+
"v": "x"
|
|
43
|
+
},
|
|
44
|
+
"modifiers": {
|
|
45
|
+
"constructor": "upper"
|
|
46
|
+
},
|
|
47
|
+
"expected": {
|
|
48
|
+
"output": "X"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "curly-message-1",
|
|
3
|
+
"level": "core",
|
|
4
|
+
"section": "14.1",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "security/constructor-absent",
|
|
8
|
+
"description": "constructor is absent where the payload does not carry it as an own entry, so the placeholder takes the fallback chain and renders the inline default.",
|
|
9
|
+
"section": "9.2",
|
|
10
|
+
"message": "{{constructor; default:D}}",
|
|
11
|
+
"payload": {},
|
|
12
|
+
"expected": {
|
|
13
|
+
"output": "D"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "security/tostring-absent",
|
|
18
|
+
"description": "toString is absent where the payload does not carry it as an own entry, so the placeholder takes the fallback chain and renders the inline default.",
|
|
19
|
+
"section": "9.2",
|
|
20
|
+
"message": "{{toString; default:D}}",
|
|
21
|
+
"payload": {},
|
|
22
|
+
"expected": {
|
|
23
|
+
"output": "D"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "security/proto-absent",
|
|
28
|
+
"description": "__proto__ is absent where the payload does not carry it as an own entry, so the placeholder takes the fallback chain and renders the inline default.",
|
|
29
|
+
"section": "9.2",
|
|
30
|
+
"message": "{{__proto__; default:D}}",
|
|
31
|
+
"payload": {},
|
|
32
|
+
"expected": {
|
|
33
|
+
"output": "D"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "security/valueof-absent",
|
|
38
|
+
"description": "valueOf is absent where the payload does not carry it as an own entry, so the placeholder takes the fallback chain and renders the inline default.",
|
|
39
|
+
"section": "9.2",
|
|
40
|
+
"message": "{{valueOf; default:D}}",
|
|
41
|
+
"payload": {},
|
|
42
|
+
"expected": {
|
|
43
|
+
"output": "D"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "security/hasownproperty-absent",
|
|
48
|
+
"description": "hasOwnProperty is absent where the payload does not carry it as an own entry, so the placeholder takes the fallback chain and renders the inline default.",
|
|
49
|
+
"section": "9.2",
|
|
50
|
+
"message": "{{hasOwnProperty; default:D}}",
|
|
51
|
+
"payload": {},
|
|
52
|
+
"expected": {
|
|
53
|
+
"output": "D"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "security/inherited-members-take-payload-default",
|
|
58
|
+
"description": "An inherited member is absent for every placeholder naming one, so each takes the fallback chain and renders the payload's own default.",
|
|
59
|
+
"section": "9.2",
|
|
60
|
+
"message": "{{constructor}} {{toString}} {{__proto__}} {{valueOf}} {{hasOwnProperty}}",
|
|
61
|
+
"payload": {
|
|
62
|
+
"default": "P"
|
|
63
|
+
},
|
|
64
|
+
"expected": {
|
|
65
|
+
"output": "P P P P P"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "security/inherited-members-disclose-nothing",
|
|
70
|
+
"description": "A message containing {{constructor}} or {{__proto__}} discloses nothing: resolution does not reach inherited members, and with no default anywhere each placeholder is the empty string.",
|
|
71
|
+
"section": "14.1",
|
|
72
|
+
"message": "[{{constructor}}][{{toString}}][{{__proto__}}][{{valueOf}}][{{hasOwnProperty}}]",
|
|
73
|
+
"payload": {},
|
|
74
|
+
"expected": {
|
|
75
|
+
"output": "[][][][][]"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "security/constructor-own",
|
|
80
|
+
"description": "constructor resolves where the payload carries it as an own entry, because the lookup reads own entries and not the name.",
|
|
81
|
+
"section": "9.2",
|
|
82
|
+
"message": "{{constructor}}",
|
|
83
|
+
"payload": {
|
|
84
|
+
"constructor": "OWN"
|
|
85
|
+
},
|
|
86
|
+
"expected": {
|
|
87
|
+
"output": "OWN"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "security/tostring-own",
|
|
92
|
+
"description": "toString resolves where the payload carries it as an own entry, because the lookup reads own entries and not the name.",
|
|
93
|
+
"section": "9.2",
|
|
94
|
+
"message": "{{toString}}",
|
|
95
|
+
"payload": {
|
|
96
|
+
"toString": "OWN"
|
|
97
|
+
},
|
|
98
|
+
"expected": {
|
|
99
|
+
"output": "OWN"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "security/proto-own",
|
|
104
|
+
"description": "__proto__ resolves where the payload carries it as an own entry, because the lookup reads own entries and not the name.",
|
|
105
|
+
"section": "9.2",
|
|
106
|
+
"message": "{{__proto__}}",
|
|
107
|
+
"payload": {
|
|
108
|
+
"__proto__": "OWN"
|
|
109
|
+
},
|
|
110
|
+
"expected": {
|
|
111
|
+
"output": "OWN"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "security/valueof-own",
|
|
116
|
+
"description": "valueOf resolves where the payload carries it as an own entry, because the lookup reads own entries and not the name.",
|
|
117
|
+
"section": "9.2",
|
|
118
|
+
"message": "{{valueOf}}",
|
|
119
|
+
"payload": {
|
|
120
|
+
"valueOf": "OWN"
|
|
121
|
+
},
|
|
122
|
+
"expected": {
|
|
123
|
+
"output": "OWN"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "security/hasownproperty-own",
|
|
128
|
+
"description": "hasOwnProperty resolves where the payload carries it as an own entry, because the lookup reads own entries and not the name.",
|
|
129
|
+
"section": "9.2",
|
|
130
|
+
"message": "{{hasOwnProperty}}",
|
|
131
|
+
"payload": {
|
|
132
|
+
"hasOwnProperty": "OWN"
|
|
133
|
+
},
|
|
134
|
+
"expected": {
|
|
135
|
+
"output": "OWN"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "security/wrapper-own-value",
|
|
140
|
+
"description": "A wrapper under an own entry named like an inherited member resolves through the value the wrapper owns.",
|
|
141
|
+
"section": "9.2",
|
|
142
|
+
"message": "{{constructor}}",
|
|
143
|
+
"payload": {
|
|
144
|
+
"constructor": {
|
|
145
|
+
"value": "OWN"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"expected": {
|
|
149
|
+
"output": "OWN"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "security/wrapper-own-default",
|
|
154
|
+
"description": "A wrapper under an own entry named like an inherited member has no value, and the default it owns is the first link of the chain, over the payload's and the inline one.",
|
|
155
|
+
"section": "9.2",
|
|
156
|
+
"message": "{{toString; default:I}}",
|
|
157
|
+
"payload": {
|
|
158
|
+
"toString": {
|
|
159
|
+
"default": "W"
|
|
160
|
+
},
|
|
161
|
+
"default": "P"
|
|
162
|
+
},
|
|
163
|
+
"expected": {
|
|
164
|
+
"output": "W"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "security/wrapper-own-props",
|
|
169
|
+
"description": "An own entry named like an inherited member whose only own key is props is recognized as a wrapper: it has no value and takes the chain instead of serializing.",
|
|
170
|
+
"section": "9.2",
|
|
171
|
+
"message": "[{{__proto__; default:I}}]",
|
|
172
|
+
"payload": {
|
|
173
|
+
"__proto__": {
|
|
174
|
+
"props": {
|
|
175
|
+
"number": {
|
|
176
|
+
"useGrouping": false
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"expected": {
|
|
182
|
+
"output": "[I]"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "security/registry-constructor",
|
|
187
|
+
"description": "The modifier registry is read from its own entries: constructor names a modifier nobody registered, so the placeholder takes the chain and is reported as an unknown modifier.",
|
|
188
|
+
"section": "14.1",
|
|
189
|
+
"message": "{{v:constructor; default:D}}",
|
|
190
|
+
"payload": {
|
|
191
|
+
"v": "x"
|
|
192
|
+
},
|
|
193
|
+
"key": "security.registry-constructor",
|
|
194
|
+
"expected": {
|
|
195
|
+
"output": "D",
|
|
196
|
+
"reports": [
|
|
197
|
+
{
|
|
198
|
+
"code": "unknown-modifier",
|
|
199
|
+
"origin": "message",
|
|
200
|
+
"key": "security.registry-constructor"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "security/registry-tostring",
|
|
207
|
+
"description": "The modifier registry is read from its own entries: toString names a modifier nobody registered, so the placeholder takes the chain and is reported as an unknown modifier.",
|
|
208
|
+
"section": "14.1",
|
|
209
|
+
"message": "{{v:toString; default:D}}",
|
|
210
|
+
"payload": {
|
|
211
|
+
"v": "x"
|
|
212
|
+
},
|
|
213
|
+
"key": "security.registry-tostring",
|
|
214
|
+
"expected": {
|
|
215
|
+
"output": "D",
|
|
216
|
+
"reports": [
|
|
217
|
+
{
|
|
218
|
+
"code": "unknown-modifier",
|
|
219
|
+
"origin": "message",
|
|
220
|
+
"key": "security.registry-tostring"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "security/registry-proto",
|
|
227
|
+
"description": "The modifier registry is read from its own entries: __proto__ names a modifier nobody registered, so the placeholder takes the chain and is reported as an unknown modifier.",
|
|
228
|
+
"section": "14.1",
|
|
229
|
+
"message": "{{v:__proto__; default:D}}",
|
|
230
|
+
"payload": {
|
|
231
|
+
"v": "x"
|
|
232
|
+
},
|
|
233
|
+
"key": "security.registry-proto",
|
|
234
|
+
"expected": {
|
|
235
|
+
"output": "D",
|
|
236
|
+
"reports": [
|
|
237
|
+
{
|
|
238
|
+
"code": "unknown-modifier",
|
|
239
|
+
"origin": "message",
|
|
240
|
+
"key": "security.registry-proto"
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
}
|