@vitest/snapshot 1.1.3 → 1.2.1
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/dist/index.js +58 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -164,6 +164,64 @@ function offsetToLineNumber(source, offset) {
|
|
|
164
164
|
return line + 1;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
// Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell
|
|
168
|
+
// License: MIT.
|
|
169
|
+
var LineTerminatorSequence;
|
|
170
|
+
LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
|
|
171
|
+
RegExp(LineTerminatorSequence.source);
|
|
172
|
+
|
|
173
|
+
// src/index.ts
|
|
174
|
+
var reservedWords = {
|
|
175
|
+
keyword: [
|
|
176
|
+
"break",
|
|
177
|
+
"case",
|
|
178
|
+
"catch",
|
|
179
|
+
"continue",
|
|
180
|
+
"debugger",
|
|
181
|
+
"default",
|
|
182
|
+
"do",
|
|
183
|
+
"else",
|
|
184
|
+
"finally",
|
|
185
|
+
"for",
|
|
186
|
+
"function",
|
|
187
|
+
"if",
|
|
188
|
+
"return",
|
|
189
|
+
"switch",
|
|
190
|
+
"throw",
|
|
191
|
+
"try",
|
|
192
|
+
"var",
|
|
193
|
+
"const",
|
|
194
|
+
"while",
|
|
195
|
+
"with",
|
|
196
|
+
"new",
|
|
197
|
+
"this",
|
|
198
|
+
"super",
|
|
199
|
+
"class",
|
|
200
|
+
"extends",
|
|
201
|
+
"export",
|
|
202
|
+
"import",
|
|
203
|
+
"null",
|
|
204
|
+
"true",
|
|
205
|
+
"false",
|
|
206
|
+
"in",
|
|
207
|
+
"instanceof",
|
|
208
|
+
"typeof",
|
|
209
|
+
"void",
|
|
210
|
+
"delete"
|
|
211
|
+
],
|
|
212
|
+
strict: [
|
|
213
|
+
"implements",
|
|
214
|
+
"interface",
|
|
215
|
+
"let",
|
|
216
|
+
"package",
|
|
217
|
+
"private",
|
|
218
|
+
"protected",
|
|
219
|
+
"public",
|
|
220
|
+
"static",
|
|
221
|
+
"yield"
|
|
222
|
+
]
|
|
223
|
+
}; new Set(reservedWords.keyword); new Set(reservedWords.strict);
|
|
224
|
+
|
|
167
225
|
const serialize$1 = (val, config, indentation, depth, refs, printer) => {
|
|
168
226
|
const name = val.getMockName();
|
|
169
227
|
const nameString = name === "vi.fn()" ? "" : ` ${name}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/snapshot",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Vitest snapshot manager",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/natural-compare": "^1.4.3",
|
|
47
47
|
"natural-compare": "^1.4.0",
|
|
48
|
-
"@vitest/utils": "1.1
|
|
48
|
+
"@vitest/utils": "1.2.1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "rimraf dist && rollup -c",
|