File tree Expand file tree Collapse file tree 5 files changed +46
-17
lines changed Expand file tree Collapse file tree 5 files changed +46
-17
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ module.exports = {
5656 "@eslint-community/mysticatea/ts/ban-ts-comment" : "off" ,
5757 "@eslint-community/mysticatea/ts/no-unsafe-assignment" : "off" ,
5858 "@eslint-community/mysticatea/ts/no-unsafe-call" : "off" ,
59+ "@eslint-community/mysticatea/ts/naming-convention" : "off" ,
60+ "@eslint-community/mysticatea/ts/no-require-imports" : "off" ,
61+ "@eslint-community/mysticatea/ts/no-var-requires" : "off" ,
5962 } ,
6063 } ,
6164
Original file line number Diff line number Diff line change 11name : cron
22on :
3+ workflow_dispatch : null
34 schedule :
45 - cron : 0 0 * * 0
56
7+ permissions :
8+ contents : write
9+ pull-requests : write
10+
611jobs :
7- check-resource-update :
8- name : check-resource-update
12+ update-unicode-resource :
13+ name : update-unicode-resource
914 runs-on : ubuntu-latest
1015 steps :
1116 - name : Checkout
@@ -18,12 +23,15 @@ jobs:
1823 run : npm install
1924 - name : Update
2025 run : npm run update:unicode
21- - name : Check changes
22- run : |
23- git add --all && \
24- git diff-index --cached HEAD --stat --exit-code
25- check-extract-test262 :
26- name : check-extract-test262
26+ - uses : peter-evans/create-pull-request@v6
27+ with :
28+ commit-message : " fix: updates unicode resource with latest"
29+ branch : update-unicode-resource
30+ branch-suffix : timestamp
31+ title : " fix: updates unicode resource with latest"
32+
33+ update-test262 :
34+ name : update-test262
2735 runs-on : ubuntu-latest
2836 steps :
2937 - name : Checkout
3644 run : npm install
3745 - name : Update
3846 run : npm run update:test262:extract
39- - name : Check changes
40- run : |
41- git add --all && \
42- git diff-index --cached HEAD --stat --exit-code
47+ - uses : peter-evans/create-pull-request@v6
48+ with :
49+ commit-message : " test: updates test cases extracted from test262"
50+ branch : update-test262
51+ branch-suffix : timestamp
52+ title : " test: updates test cases extracted from test262"
Original file line number Diff line number Diff line change 8282 "rimraf" : " ^3.0.2" ,
8383 "rollup" : " ^2.79.1" ,
8484 "rollup-plugin-sourcemaps" : " ^0.6.3" ,
85- "test262" : " git+https://github.com/tc39/test262.git" ,
86- "test262-stream" : " ^1.4.0" ,
8785 "ts-node" : " ^10.9.1" ,
8886 "typescript" : " ~5.0.2"
8987 },
Original file line number Diff line number Diff line change 1- // @ts -ignore -- ignore
2- import TestStream from "test262-stream"
31import path from "path"
42import { promises as fs } from "fs"
53import { parseRegExpLiteral } from "../src/index"
@@ -8,6 +6,16 @@ import { cloneWithoutCircular } from "./clone-without-circular"
86import type { RegExpSyntaxError } from "../src/regexp-syntax-error"
97import { fixturesData } from "../test/fixtures/parser/literal"
108import type { Readable } from "stream"
9+ import { execSync } from "child_process"
10+
11+ console . log ( "Installing test262 and test262-stream..." )
12+
13+ execSync (
14+ "npm install --no-save git+https://github.com/tc39/test262.git test262-stream" ,
15+ { stdio : "inherit" } ,
16+ )
17+
18+ console . log ( "Extracting test262 fixtures..." )
1119
1220const fixturesRoot = path . join (
1321 __dirname ,
@@ -16,6 +24,8 @@ const fixturesRoot = path.join(
1624
1725const test262Root = path . dirname ( require . resolve ( "test262/package.json" ) )
1826
27+ const TestStream = require ( "test262-stream" )
28+
1929const stream : Readable = new TestStream ( test262Root , { omitRuntime : true } )
2030
2131type Test = {
Original file line number Diff line number Diff line change @@ -49,13 +49,21 @@ const DATA_SOURCES = [
4949 scValues : getLatestUnicodeScriptValues ,
5050 } ,
5151 {
52- url : "https://tc39.es/ecma262/multipage/text-processing.html" ,
52+ url : "https://tc39.es/ecma262/2024/ multipage/text-processing.html" ,
5353 version : 2024 ,
5454 binProperties : "#table-binary-unicode-properties" ,
5555 gcValues : getLatestUnicodeGeneralCategoryValues ,
5656 scValues : getLatestUnicodeScriptValues ,
5757 binPropertiesOfStrings : "#table-binary-unicode-properties-of-strings" ,
5858 } ,
59+ {
60+ url : "https://tc39.es/ecma262/multipage/text-processing.html" ,
61+ version : 2025 ,
62+ binProperties : "#table-binary-unicode-properties" ,
63+ gcValues : getLatestUnicodeGeneralCategoryValues ,
64+ scValues : getLatestUnicodeScriptValues ,
65+ binPropertiesOfStrings : "#table-binary-unicode-properties-of-strings" ,
66+ } ,
5967]
6068const FILE_PATH = "src/unicode/properties.ts"
6169const logger = console
You can’t perform that action at this time.
0 commit comments