feat: Use Oniguruma-To-ES in the JS engine (#828) #544
ci.yml
on: pull_request
lint
35s
typecheck
56s
Matrix: test
Annotations
16 errors and 3 warnings
packages/engine-javascript/test/compare.test.ts > cases > json-basic:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > html-basic:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > ts-basic:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > jsonc:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > vue:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > toml:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/compare.test.ts > cases > sql:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/general.test.ts > should > works:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/general.test.ts > should > dynamic load theme and lang:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ Object.createScanner packages/engine-javascript/src/index.ts:187:14
❯ Object.createOnigScanner packages/core/src/textmate/resolver.ts:13:45
❯ Grammar.createOnigScanner node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:2269:26
❯ new CompiledRule node_modules/.pnpm/@shikijs[email protected]/node_modules/@shikijs/vscode-textmate/dist/index.mjs:1609:28
|
packages/engine-javascript/test/verify.test.ts:
packages/engine-javascript/src/index.ts#L43
SyntaxError: Invalid flags supplied to RegExp constructor 'dgv'
❯ Module.toRegExp node_modules/.pnpm/[email protected]/node_modules/oniguruma-to-es/src/index.js:109:10
❯ defaultJavaScriptRegexConstructor packages/engine-javascript/src/index.ts:43:10
❯ packages/engine-javascript/src/index.ts:90:23
❯ new JavaScriptScanner packages/engine-javascript/src/index.ts:68:29
❯ packages/engine-javascript/test/verify.test.ts:31:25
|
packages/engine-javascript/test/compare.test.ts > cases > sql:
packages/engine-javascript/test/compare.test.ts#L192
AssertionError: expected [ [ …(6) ] ] to deeply equal [ [ …(5) ] ]
- Expected
+ Received
Array [
Array [
Object {
"color": "#81A1C1",
"content": "SELECT",
"fontStyle": 0,
"offset": 0,
},
Object {
"color": "#D8DEE9FF",
"content": " ",
"fontStyle": 0,
"offset": 6,
},
Object {
"color": "#81A1C1",
"content": "*",
"fontStyle": 0,
"offset": 7,
},
Object {
"color": "#D8DEE9FF",
"content": " ",
"fontStyle": 0,
"offset": 8,
},
Object {
"color": "#81A1C1",
- "content": "FROM foo",
+ "content": "FROM",
"fontStyle": 0,
"offset": 9,
+ },
+ Object {
+ "color": "#D8DEE9FF",
+ "content": " foo",
+ "fontStyle": 0,
+ "offset": 13,
},
],
]
❯ packages/engine-javascript/test/compare.test.ts:192:24
❯ packages/engine-javascript/test/compare.test.ts:191:15
|
packages/shiki/test/core-sync.test.ts > should > works:
packages/shiki/test/core-sync.test.ts#L18
Error: Snapshot `should > works 1` mismatched
Expected: ""<pre class="shiki nord" style="background-color:#2e3440ff;color:#d8dee9ff" tabindex="0"><code><span class="line"><span style="color:#D8DEE9">console</span><span style="color:#ECEFF4">.</span><span style="color:#88C0D0">log</span><span style="color:#D8DEE9FF">(</span><span style="color:#ECEFF4">"</span><span style="color:#A3BE8C">Hi</span><span style="color:#ECEFF4">"</span><span style="color:#D8DEE9FF">)</span></span></code></pre>""
Received: ""<pre class="shiki nord" style="background-color:#2e3440ff;color:#d8dee9ff" tabindex="0"><code><span class="line"><span style="color:#D8DEE9">console</span><span style="color:#ECEFF4">.log("Hi")</span></span></code></pre>""
❯ packages/shiki/test/core-sync.test.ts:18:8
|
test (lts/*, ubuntu-latest)
Process completed with exit code 1.
|
packages/engine-javascript/test/compare.test.ts > cases > html-basic:
packages/engine-javascript/test/compare.test.ts#L192
AssertionError: expected [ [ { content: '<div', …(3) }, …(9) ] ] to deeply equal [ [ { …(4) } ] ]
- Expected
+ Received
Array [
Array [
Object {
+ "color": "#81A1C1",
+ "content": "<div",
+ "fontStyle": 0,
+ "offset": 0,
+ },
+ Object {
"color": "#D8DEE9FF",
- "content": "<div class=\"foo\">bar</div>",
+ "content": " ",
+ "fontStyle": 0,
+ "offset": 4,
+ },
+ Object {
+ "color": "#8FBCBB",
+ "content": "class",
+ "fontStyle": 0,
+ "offset": 5,
+ },
+ Object {
+ "color": "#81A1C1",
+ "content": "=",
"fontStyle": 0,
- "offset": 0,
+ "offset": 10,
+ },
+ Object {
+ "color": "#ECEFF4",
+ "content": "\"",
+ "fontStyle": 0,
+ "offset": 11,
+ },
+ Object {
+ "color": "#A3BE8C",
+ "content": "foo",
+ "fontStyle": 0,
+ "offset": 12,
+ },
+ Object {
+ "color": "#ECEFF4",
+ "content": "\"",
+ "fontStyle": 0,
+ "offset": 15,
+ },
+ Object {
+ "color": "#81A1C1",
+ "content": ">",
+ "fontStyle": 0,
+ "offset": 16,
+ },
+ Object {
+ "color": "#D8DEE9FF",
+ "content": "bar",
+ "fontStyle": 0,
+ "offset": 17,
+ },
+ Object {
+ "color": "#81A1C1",
+ "content": "</div>",
+ "fontStyle": 0,
+ "offset": 20,
},
],
]
❯ packages/engine-javascript/test/compare.test.ts:192:24
❯ packages/engine-javascript/test/compare.test.ts:191:15
|
packages/engine-javascript/test/compare.test.ts > cases > sql:
packages/engine-javascript/test/compare.test.ts#L192
AssertionError: expected [ [ …(6) ] ] to deeply equal [ [ …(3) ] ]
- Expected
+ Received
Array [
Array [
Object {
"color": "#81A1C1",
"content": "SELECT",
"fontStyle": 0,
"offset": 0,
},
Object {
"color": "#D8DEE9FF",
"content": " ",
"fontStyle": 0,
"offset": 6,
},
Object {
"color": "#81A1C1",
- "content": "* FROM foo",
+ "content": "*",
"fontStyle": 0,
"offset": 7,
+ },
+ Object {
+ "color": "#D8DEE9FF",
+ "content": " ",
+ "fontStyle": 0,
+ "offset": 8,
+ },
+ Object {
+ "color": "#81A1C1",
+ "content": "FROM",
+ "fontStyle": 0,
+ "offset": 9,
+ },
+ Object {
+ "color": "#D8DEE9FF",
+ "content": " foo",
+ "fontStyle": 0,
+ "offset": 13,
},
],
]
❯ packages/engine-javascript/test/compare.test.ts:192:24
❯ packages/engine-javascript/test/compare.test.ts:191:15
|
test (lts/*, windows-latest)
Process completed with exit code 1.
|
lint
The following actions use a deprecated Node.js version and will be forced to run on node20: pnpm/action-setup@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
typecheck
The following actions use a deprecated Node.js version and will be forced to run on node20: pnpm/action-setup@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test (lts/*, macos-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|