Add a language to snapshot code blocks
RENAME
packages/@romejs/codec-js-manifest/__rtests__/__rsnapshots__/dependencies.md
packages/@romejs/codec-js-manifest/__rtests__/__rsnapshots__/dependencies.snap.md
## `can parse npm dependency patterns`
-```
+```javascript
npm {
name: 'foo'
range: undefined
@@ -11,7 +11,7 @@ npm {
## `can parse npm dependency patterns: 1`
-```
+```javascript
npm {
name: '@foo/bar'
range: undefined
@@ -20,7 +20,7 @@ npm {
## `can parse npm dependency patterns: 2`
-```
+```javascript
npm {
name: 'foo'
range: AbsoluteVersion {
@@ -48,7 +48,7 @@ npm {
## `can parse npm dependency patterns: 3`
-```
+```javascript
npm {
name: '@foo/bar'
range: AbsoluteVersion {

RENAME
packages/@romejs/codec-semver/__rtests__/__rsnapshots__/parse.md
packages/@romejs/codec-semver/__rtests__/__rsnapshots__/parse.snap.md
## `parse`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -27,7 +27,7 @@ AbsoluteVersion {
## `parse: 1`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -52,7 +52,7 @@ AbsoluteVersion {
## `parse: 10`
-```
+```javascript
VersionRange {
loc: Object {
filename: undefined
@@ -107,7 +107,7 @@ VersionRange {
## `parse: 11`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -132,7 +132,7 @@ AbsoluteVersion {
## `parse: 12`
-```
+```javascript
Wildcard {
loc: Object {
filename: undefined
@@ -152,7 +152,7 @@ Wildcard {
## `parse: 13`
-```
+```javascript
Wildcard {
loc: Object {
filename: undefined
@@ -172,7 +172,7 @@ Wildcard {
## `parse: 14`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -197,7 +197,7 @@ AbsoluteVersion {
## `parse: 15`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -222,7 +222,7 @@ WildcardVersion {
## `parse: 16`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -247,7 +247,7 @@ WildcardVersion {
## `parse: 17`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -272,7 +272,7 @@ WildcardVersion {
## `parse: 18`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -297,7 +297,7 @@ WildcardVersion {
## `parse: 19`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -322,7 +322,7 @@ WildcardVersion {
## `parse: 2`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -350,7 +350,7 @@ AbsoluteVersion {
## `parse: 20`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -375,7 +375,7 @@ WildcardVersion {
## `parse: 21`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -400,7 +400,7 @@ WildcardVersion {
## `parse: 22`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -425,7 +425,7 @@ WildcardVersion {
## `parse: 23`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -450,7 +450,7 @@ WildcardVersion {
## `parse: 24`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -475,7 +475,7 @@ WildcardVersion {
## `parse: 25`
-```
+```javascript
WildcardVersion {
build: Array []
major: 1
@@ -500,7 +500,7 @@ WildcardVersion {
## `parse: 26`
-```
+```javascript
VersionRange {
loc: Object {
filename: undefined
@@ -560,7 +560,7 @@ VersionRange {
## `parse: 27`
-```
+```javascript
LogicalOr {
loc: Object {
filename: undefined
@@ -620,7 +620,7 @@ LogicalOr {
## `parse: 28`
-```
+```javascript
LogicalOr {
loc: Object {
filename: undefined
@@ -715,7 +715,7 @@ LogicalOr {
## `parse: 29`
-```
+```javascript
Comparator {
operator: '>='
loc: Object {
@@ -756,7 +756,7 @@ Comparator {
## `parse: 3`
-```
+```javascript
AbsoluteVersion {
build: Array []
major: 1
@@ -788,7 +788,7 @@ AbsoluteVersion {
## `parse: 30`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -880,7 +880,7 @@ LogicalAnd {
## `parse: 31`
-```
+```javascript
Comparator {
operator: '<='
loc: Object {
@@ -921,7 +921,7 @@ Comparator {
## `parse: 32`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1013,7 +1013,7 @@ LogicalAnd {
## `parse: 33`
-```
+```javascript
Comparator {
operator: '>'
loc: Object {
@@ -1054,7 +1054,7 @@ Comparator {
## `parse: 34`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1146,7 +1146,7 @@ LogicalAnd {
## `parse: 35`
-```
+```javascript
Comparator {
operator: '<'
loc: Object {
@@ -1187,7 +1187,7 @@ Comparator {
## `parse: 36`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1279,7 +1279,7 @@ LogicalAnd {
## `parse: 37`
-```
+```javascript
Comparator {
operator: '^'
loc: Object {
@@ -1320,7 +1320,7 @@ Comparator {
## `parse: 38`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1412,7 +1412,7 @@ LogicalAnd {
## `parse: 39`
-```
+```javascript
Comparator {
operator: '~'
loc: Object {
@@ -1453,7 +1453,7 @@ Comparator {
## `parse: 4`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2
@@ -1478,7 +1478,7 @@ AbsoluteVersion {
## `parse: 40`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1570,7 +1570,7 @@ LogicalAnd {
## `parse: 41`
-```
+```javascript
Comparator {
operator: '>='
loc: Object {
@@ -1611,7 +1611,7 @@ Comparator {
## `parse: 42`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1703,7 +1703,7 @@ LogicalAnd {
## `parse: 43`
-```
+```javascript
Comparator {
operator: '<='
loc: Object {
@@ -1744,7 +1744,7 @@ Comparator {
## `parse: 44`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1836,7 +1836,7 @@ LogicalAnd {
## `parse: 45`
-```
+```javascript
Comparator {
operator: '>'
loc: Object {
@@ -1877,7 +1877,7 @@ Comparator {
## `parse: 46`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -1969,7 +1969,7 @@ LogicalAnd {
## `parse: 47`
-```
+```javascript
Comparator {
operator: '<'
loc: Object {
@@ -2010,7 +2010,7 @@ Comparator {
## `parse: 48`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2102,7 +2102,7 @@ LogicalAnd {
## `parse: 49`
-```
+```javascript
Comparator {
operator: '^'
loc: Object {
@@ -2143,7 +2143,7 @@ Comparator {
## `parse: 5`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2
@@ -2168,7 +2168,7 @@ AbsoluteVersion {
## `parse: 50`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2260,7 +2260,7 @@ LogicalAnd {
## `parse: 51`
-```
+```javascript
Comparator {
operator: '~'
loc: Object {
@@ -2301,7 +2301,7 @@ Comparator {
## `parse: 52`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2393,7 +2393,7 @@ LogicalAnd {
## `parse: 53`
-```
+```javascript
Comparator {
operator: '>='
loc: Object {
@@ -2434,7 +2434,7 @@ Comparator {
## `parse: 54`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2526,7 +2526,7 @@ LogicalAnd {
## `parse: 55`
-```
+```javascript
Comparator {
operator: '<='
loc: Object {
@@ -2567,7 +2567,7 @@ Comparator {
## `parse: 56`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2659,7 +2659,7 @@ LogicalAnd {
## `parse: 57`
-```
+```javascript
Comparator {
operator: '>'
loc: Object {
@@ -2700,7 +2700,7 @@ Comparator {
## `parse: 58`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2792,7 +2792,7 @@ LogicalAnd {
## `parse: 59`
-```
+```javascript
Comparator {
operator: '<'
loc: Object {
@@ -2833,7 +2833,7 @@ Comparator {
## `parse: 6`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2
@@ -2861,7 +2861,7 @@ AbsoluteVersion {
## `parse: 60`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -2953,7 +2953,7 @@ LogicalAnd {
## `parse: 61`
-```
+```javascript
Comparator {
operator: '^'
loc: Object {
@@ -2994,7 +2994,7 @@ Comparator {
## `parse: 62`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -3086,7 +3086,7 @@ LogicalAnd {
## `parse: 63`
-```
+```javascript
Comparator {
operator: '~'
loc: Object {
@@ -3127,7 +3127,7 @@ Comparator {
## `parse: 64`
-```
+```javascript
LogicalAnd {
loc: Object {
filename: undefined
@@ -3219,7 +3219,7 @@ LogicalAnd {
## `parse: 7`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2
@@ -3251,7 +3251,7 @@ AbsoluteVersion {
## `parse: 8`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2
@@ -3289,7 +3289,7 @@ AbsoluteVersion {
## `parse: 9`
-```
+```javascript
AbsoluteVersion {
major: 1
minor: 2

MODIFY
packages/@romejs/core/test-worker/SnapshotManager.ts
packages/@romejs/core/test-worker/SnapshotManager.ts
@@ -37,7 +37,7 @@ export default class SnapshotManager {
const folder = testPath.getParent().append(SNAPSHOTS_DIR);
this.folder = folder;
- this.path = folder.append(testPath.getExtensionlessBasename() + '.md');
+ this.path = folder.append(testPath.getExtensionlessBasename() + '.snap.md');
this.testPath = testPath;
this.runner = runner;
@@ -52,7 +52,13 @@ export default class SnapshotManager {
testPath: AbsoluteFilePath;
folder: AbsoluteFilePath;
path: AbsoluteFilePath;
- entries: Map<string, string>;
+ entries: Map<
+ string,
+ {
+ language: undefined | string;
+ value: string;
+ }
+ >;
runner: TestWorkerRunner;
options: TestRunnerOptions;
@@ -112,7 +118,10 @@ export default class SnapshotManager {
});
}
- this.entries.set(cleanHeading(node.text), codeBlock.value);
+ this.entries.set(cleanHeading(node.text), {
+ language: codeBlock.language,
+ value: codeBlock.text,
+ });
continue;
}
@@ -150,14 +159,17 @@ export default class SnapshotManager {
const keys = Array.from(this.entries.keys()).sort();
for (const key of keys) {
- const value = this.entries.get(key);
- if (value === undefined) {
+ const entry = this.entries.get(key);
+ if (entry === undefined) {
throw new Error('Impossible');
}
+ const {value} = entry;
+ const language = entry.language === undefined ? '' : entry.language;
+
lines.push(`## \`${key}\``);
lines.push('');
- lines.push('```');
+ lines.push('```' + language);
// TODO escape triple backquotes
lines.push(value);
lines.push('```');
@@ -192,10 +204,13 @@ export default class SnapshotManager {
}
get(key: string): undefined | string {
- return this.entries.get(key);
+ const entry = this.entries.get(key);
+ if (entry !== undefined) {
+ return entry.value;
+ }
}
- set(key: string, value: string) {
- this.entries.set(key, value);
+ set(key: string, value: string, language: undefined | string) {
+ this.entries.set(key, {value, language});
}
}

MODIFY
packages/@romejs/core/test-worker/SnapshotParser.ts
packages/@romejs/core/test-worker/SnapshotParser.ts
@@ -17,7 +17,10 @@ import {add, get0, Number0, inc} from '@romejs/ob1';
type Tokens = BaseTokens & {
Hashes: ValueToken<'Hashes', number>;
- CodeBlock: ValueToken<'CodeBlock', string>;
+ CodeBlock: ValueToken<
+ 'CodeBlock',
+ {text: string; language: undefined | string}
+ >;
TextLine: ValueToken<'TextLine', string>;
};
@@ -29,7 +32,8 @@ type HeadingNode = NodeBase & {
type CodeBlockNode = NodeBase & {
type: 'CodeBlock';
- value: string;
+ language: undefined | string;
+ text: string;
};
type Node = HeadingNode | CodeBlockNode;
@@ -88,6 +92,14 @@ export default createParser(
if (nextChar === '`' && nextNextChar === '`') {
let codeOffset = add(index, 3);
+ let language: undefined | string;
+ if (input[get0(codeOffset)] !== '\n') {
+ [language, codeOffset] = this.readInputFrom(
+ codeOffset,
+ isntNewline,
+ );
+ }
+
// Expect the first offset character to be a newline
if (input[get0(codeOffset)] === '\n') {
// Skip leading newline
@@ -114,7 +126,10 @@ export default createParser(
return this.finishValueToken(
'CodeBlock',
- unescapeTicks(code),
+ {
+ language,
+ text: unescapeTicks(code),
+ },
end,
);
} else {
@@ -159,7 +174,7 @@ export default createParser(
case 'CodeBlock':
nodes.push({
type: 'CodeBlock',
- value: token.value,
+ ...token.value,
loc: this.finishLoc(start),
});
this.nextToken();

MODIFY
packages/@romejs/core/test-worker/TestAPI.ts
packages/@romejs/core/test-worker/TestAPI.ts
@@ -529,14 +529,21 @@ export default class TestAPI {
) {
const key = this.snapshotManager.toSnapshotKey(this.testName, name);
- const formatted =
- typeof expected === 'string' ? expected : prettyFormat(expected);
+ let language: undefined | string;
+
+ let formatted = '';
+ if (typeof expected === 'string') {
+ formatted = expected;
+ } else {
+ language = 'javascript';
+ formatted = prettyFormat(expected);
+ }
// Get the current snapshot
const existingSnapshot = this.snapshotManager.get(key);
if (existingSnapshot === undefined) {
// No snapshot exists, let's save this one!
- this.snapshotManager.set(key, formatted);
+ this.snapshotManager.set(key, formatted, language);
return undefined;
}

RENAME
packages/@romejs/js-ast-utils/__rtests__/__rsnapshots__/getCompletionRecords.md
packages/@romejs/js-ast-utils/__rtests__/__rsnapshots__/getCompletionRecords.snap.md
## `completions`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -42,7 +42,7 @@ Array [
## `completions: 1`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -67,7 +67,7 @@ Array [
## `completions: 2`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -191,7 +191,7 @@ Array [
## `completions: 3`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -264,7 +264,7 @@ Array [
## `completions: 4`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -304,7 +304,7 @@ Array [
## `completions: 5`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {
@@ -344,7 +344,7 @@ Array [
## `invalid`
-```
+```javascript
Array [
INVALID {
description: 'empty block'
@@ -371,7 +371,7 @@ Array [
## `invalid: 1`
-```
+```javascript
Array [
INVALID {
description: 'empty block'
@@ -415,7 +415,7 @@ Array [
## `invalid: 2`
-```
+```javascript
Array [
INVALID {
description: 'empty block'
@@ -558,7 +558,7 @@ Array [
## `invalid: 3`
-```
+```javascript
Array [
INVALID {
description: 'empty block'
@@ -637,7 +637,7 @@ Array [
## `invalid: 4`
-```
+```javascript
Array [
INVALID {
description: 'switch with no default clause'
@@ -679,7 +679,7 @@ Array [
## `invalid: 5`
-```
+```javascript
Array [
INVALID {
description: 'switch with no default clause'
@@ -772,7 +772,7 @@ Array [
## `invalid: 6`
-```
+```javascript
Array [
INVALID {
description: 'empty block'
@@ -799,7 +799,7 @@ Array [
## `mix`
-```
+```javascript
Array [
COMPLETION {
node: ReturnStatement {

RENAME
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/analyzeDependencies.md
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/analyzeDependencies.snap.md
# `analyzeDependencies.ts`
-## ```
-
-```
-
-
-```
-
## `correctly identifies a file with cjs exports as cjs`
-```
+```javascript
Object {
dependencies: Array []
firstTopAwaitLocation: undefined
@@ -62,7 +55,7 @@ Object {
## `correctly identifies a file with es exports as es`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -95,7 +88,7 @@ Object {
## `correctly identifies a file with es imports as es`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -131,7 +124,7 @@ Object {
## `correctly identifies a file with no imports or exports as unknown`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -145,7 +138,7 @@ Object {
## `disallow mix of es and cjs exports`
-```
+```javascript
Object {
dependencies: Array []
firstTopAwaitLocation: undefined
@@ -231,7 +224,7 @@ Object {
## `discovers async import('foo')`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -288,7 +281,7 @@ Object {
## `discovers commonjs exports`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -327,7 +320,7 @@ Object {
## `discovers commonjs module.exports`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -366,7 +359,7 @@ Object {
## `discovers export declarations`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -435,7 +428,7 @@ Object {
## `discovers export default`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -468,7 +461,7 @@ Object {
## `discovers export from`
-```
+```javascript
Object {
diagnostics: Array []
firstTopAwaitLocation: undefined
@@ -646,7 +639,7 @@ Object {
## `discovers export star`
-```
+```javascript
Object {
diagnostics: Array []
firstTopAwaitLocation: undefined
@@ -700,7 +693,7 @@ Object {
## `discovers import default`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -753,7 +746,7 @@ Object {
## `discovers import specifiers`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -854,7 +847,7 @@ Object {
## `discovers import star`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -890,7 +883,7 @@ Object {
## `discovers local export specifiers`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -959,7 +952,7 @@ Object {
## `discovers require('module') call`
-```
+```javascript
Object {
diagnostics: Array []
exports: Array []
@@ -1016,7 +1009,7 @@ Object {
## `discovers top level await`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -1042,7 +1035,7 @@ Object {
## `ignores require() call if shadowed`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []
@@ -1063,7 +1056,7 @@ Object {
## `ignores require(dynamic) call`
-```
+```javascript
Object {
dependencies: Array []
diagnostics: Array []

RENAME
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/lint.md
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/lint.snap.md
# `lint.ts`
-## ```
-
-```
-
-
-```
-
## `disallow var`
-```
+```javascript
Object {
src: 'var foobar;\nfoobar'
suppressions: Array []
@@ -39,7 +32,7 @@ Object {
## `empty file`
-```
+```javascript
Object {
diagnostics: Array []
src: ''
@@ -49,7 +42,7 @@ Object {
## `getter return`
-```
+```javascript
Object {
src: 'class p {\n get name() {\n console.log(\'hello\');\n }\n}\nconsole.log(new p());\n'
suppressions: Array []
@@ -79,7 +72,7 @@ Object {
## `getter return: 1`
-```
+```javascript
Object {
src: 'let p;\np = {\n get name() {\n console.log(\'hello\');\n }};\nconsole.log(p);\n'
suppressions: Array []
@@ -109,7 +102,7 @@ Object {
## `getter return: 2`
-```
+```javascript
Object {
diagnostics: Array []
src: 'let p = {};\nObject.defineProperty(p, {\n get: function() {\n console.log(\'hello\');\n }});\nconsole.log(p);\n'
@@ -119,7 +112,7 @@ Object {
## `no async promise executor`
-```
+```javascript
Object {
src: 'new Promise(async function foo() {})'
suppressions: Array []
@@ -149,7 +142,7 @@ Object {
## `no async promise executor: 1`
-```
+```javascript
Object {
src: 'new Promise(async () => {})'
suppressions: Array []
@@ -179,7 +172,7 @@ Object {
## `no async promise executor: 2`
-```
+```javascript
Object {
src: 'new Promise(((((async () => {})))))'
suppressions: Array []
@@ -209,7 +202,7 @@ Object {
## `no cond assign`
-```
+```javascript
Object {
src: 'for (let i = 1; i = 10; i++) {\n console.log(\'foo\')\n }'
suppressions: Array []
@@ -239,7 +232,7 @@ Object {
## `no cond assign: 1`
-```
+```javascript
Object {
src: 'if(foo = \'bar\') {\n console.log(\'foo\')\n }'
suppressions: Array []
@@ -269,7 +262,7 @@ Object {
## `no cond assign: 2`
-```
+```javascript
Object {
src: 'while (foo = \'bar\' {\n console.log(\'foo\')\n }'
suppressions: Array []
@@ -336,7 +329,7 @@ Object {
## `no cond assign: 3`
-```
+```javascript
Object {
src: 'do {\n console.log(\'foo)\n } while (foo = \'bar\')'
suppressions: Array []
@@ -404,7 +397,7 @@ Object {
## `no debugger`
-```
+```javascript
Array [
Object {
category: 'lint/noDebugger'
@@ -431,7 +424,7 @@ Array [
## `no empty character class in regular expression`
-```
+```javascript
Object {
src: 'let foo = /^abc[]/;foo;'
suppressions: Array []
@@ -461,7 +454,7 @@ Object {
## `no empty character class in regular expression: 1`
-```
+```javascript
Object {
src: 'let foo = /foo[]bar/;foo;'
suppressions: Array []
@@ -491,7 +484,7 @@ Object {
## `no empty character class in regular expression: 2`
-```
+```javascript
Object {
src: 'let foo = "";if (foo.match(/^abc[]/)) { foo; }'
suppressions: Array []
@@ -521,7 +514,7 @@ Object {
## `no empty character class in regular expression: 3`
-```
+```javascript
Object {
src: 'let foo = /[]]/;foo;'
suppressions: Array []
@@ -551,7 +544,7 @@ Object {
## `no empty character class in regular expression: 4`
-```
+```javascript
Object {
src: 'let foo = /\\[[]/;foo;'
suppressions: Array []
@@ -581,7 +574,7 @@ Object {
## `no empty character class in regular expression: 5`
-```
+```javascript
Object {
src: 'let foo = /\\[\\[\\]a-z[]/;foo;'
suppressions: Array []
@@ -611,7 +604,7 @@ Object {
## `prefer function declarations`
-```
+```javascript
Object {
src: 'function foo() {}\n'
suppressions: Array []
@@ -661,7 +654,7 @@ Object {
## `prefer function declarations: 1`
-```
+```javascript
Object {
src: 'function foo() {}\n'
suppressions: Array []
@@ -711,7 +704,7 @@ Object {
## `prefer function declarations: 2`
-```
+```javascript
Object {
src: 'const foo = () => {\n this;\n};\n'
suppressions: Array []
@@ -741,7 +734,7 @@ Object {
## `prefer function declarations: 3`
-```
+```javascript
Object {
src: 'function foo() {\n function bar() {\n this;\n }\n}\n'
suppressions: Array []
@@ -810,7 +803,7 @@ Object {
## `prefer function declarations: 4`
-```
+```javascript
Object {
src: 'const foo any = function() {};\n'
suppressions: Array []
@@ -868,7 +861,7 @@ Object {
## `sparse array`
-```
+```javascript
Object {
src: '[1,,2]'
suppressions: Array []
@@ -898,7 +891,7 @@ Object {
## `undeclared variable`
-```
+```javascript
Object {
src: 'foobar;'
suppressions: Array []
@@ -928,7 +921,7 @@ Object {
## `unsafe negation`
-```
+```javascript
Object {
src: '!1 in [1,2]'
suppressions: Array []

RENAME
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/suppressions.md
packages/@romejs/js-compiler/__rtests__/__rsnapshots__/suppressions.snap.md
# `suppressions.ts`
-## ```
-
-```
-
-
-```
-
## `multiple categories`
-```
+```javascript
Object {
diagnostics: Array []
suppressions: Array [
@@ -179,7 +172,7 @@ Object {
## `single category`
-```
+```javascript
Object {
diagnostics: Array []
suppressions: Array [
@@ -253,7 +246,7 @@ Object {
## `typos`
-```
+```javascript
Object {
suppressions: Array []
diagnostics: Array [

RENAME
packages/@romejs/path-match/__rtests__/__rsnapshots__/parse.md
packages/@romejs/path-match/__rtests__/__rsnapshots__/parse.snap.md
## `pattern`
-```
+```javascript
Pattern {
comment: ''
negate: true
@@ -61,7 +61,7 @@ Pattern {
## `pattern: 1`
-```
+```javascript
Pattern {
comment: ''
names: Array []
@@ -86,7 +86,7 @@ Pattern {
## `pattern: 10`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -213,7 +213,7 @@ Pattern {
## `pattern: 11`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -323,7 +323,7 @@ Pattern {
## `pattern: 12`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -430,7 +430,7 @@ Pattern {
## `pattern: 13`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -537,7 +537,7 @@ Pattern {
## `pattern: 14`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -659,7 +659,7 @@ Pattern {
## `pattern: 15`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -797,7 +797,7 @@ Pattern {
## `pattern: 16`
-```
+```javascript
Pattern {
comment: ' foobar'
names: Array []
@@ -822,7 +822,7 @@ Pattern {
## `pattern: 17`
-```
+```javascript
Pattern {
comment: ' foobar'
negate: false
@@ -917,7 +917,7 @@ Pattern {
## `pattern: 18`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1012,7 +1012,7 @@ Pattern {
## `pattern: 19`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1107,7 +1107,7 @@ Pattern {
## `pattern: 2`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1202,7 +1202,7 @@ Pattern {
## `pattern: 20`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1297,7 +1297,7 @@ Pattern {
## `pattern: 21`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1392,7 +1392,7 @@ Pattern {
## `pattern: 22`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1487,7 +1487,7 @@ Pattern {
## `pattern: 23`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1594,7 +1594,7 @@ Pattern {
## `pattern: 24`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1689,7 +1689,7 @@ Pattern {
## `pattern: 3`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1784,7 +1784,7 @@ Pattern {
## `pattern: 4`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1879,7 +1879,7 @@ Pattern {
## `pattern: 5`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -1986,7 +1986,7 @@ Pattern {
## `pattern: 6`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -2045,7 +2045,7 @@ Pattern {
## `pattern: 7`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -2104,7 +2104,7 @@ Pattern {
## `pattern: 8`
-```
+```javascript
Pattern {
comment: ''
negate: false
@@ -2199,7 +2199,7 @@ Pattern {
## `pattern: 9`
-```
+```javascript
Pattern {
comment: ''
negate: false

RENAME
packages/@romejs/string-markup/__rtests__/__rsnapshots__/parse.md
packages/@romejs/string-markup/__rtests__/__rsnapshots__/parse.snap.md
## `should not parse string escapes`
-```
+```javascript
Array [
Tag {
name: 'filelink'

Add a language to snapshot code blocks