Skip to content

Commit 8ff05e1

Browse files
committed
rename more features
1 parent 78c7fe4 commit 8ff05e1

File tree

4 files changed

+54
-54
lines changed

4 files changed

+54
-54
lines changed

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
* `object-rest-spread`
6060
* `optional-catch-binding`
6161
* `optional-chain`
62-
* `reg-exp-dot-all-flag`
63-
* `reg-exp-lookbehind-assertions`
64-
* `reg-exp-match-indices`
65-
* `reg-exp-named-capture-groups`
66-
* `reg-exp-sticky-and-unicode-flags`
67-
* `reg-exp-unicode-property-escapes`
62+
* `regexp-dot-all-flag`
63+
* `regexp-lookbehind-assertions`
64+
* `regexp-match-indices`
65+
* `regexp-named-capture-groups`
66+
* `regexp-sticky-and-unicode-flags`
67+
* `regexp-unicode-property-escapes`
6868
* `rest-argument`
6969
* `template-literal`
7070
* `top-level-await`

internal/compat/js_table.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ const (
8383
ObjectRestSpread
8484
OptionalCatchBinding
8585
OptionalChain
86-
RegExpDotAllFlag
87-
RegExpLookbehindAssertions
88-
RegExpMatchIndices
89-
RegExpNamedCaptureGroups
90-
RegExpStickyAndUnicodeFlags
91-
RegExpUnicodePropertyEscapes
86+
RegexpDotAllFlag
87+
RegexpLookbehindAssertions
88+
RegexpMatchIndices
89+
RegexpNamedCaptureGroups
90+
RegexpStickyAndUnicodeFlags
91+
RegexpUnicodePropertyEscapes
9292
RestArgument
9393
TemplateLiteral
9494
TopLevelAwait
@@ -137,12 +137,12 @@ var StringToJSFeature = map[string]JSFeature{
137137
"object-rest-spread": ObjectRestSpread,
138138
"optional-catch-binding": OptionalCatchBinding,
139139
"optional-chain": OptionalChain,
140-
"reg-exp-dot-all-flag": RegExpDotAllFlag,
141-
"reg-exp-lookbehind-assertions": RegExpLookbehindAssertions,
142-
"reg-exp-match-indices": RegExpMatchIndices,
143-
"reg-exp-named-capture-groups": RegExpNamedCaptureGroups,
144-
"reg-exp-sticky-and-unicode-flags": RegExpStickyAndUnicodeFlags,
145-
"reg-exp-unicode-property-escapes": RegExpUnicodePropertyEscapes,
140+
"regexp-dot-all-flag": RegexpDotAllFlag,
141+
"regexp-lookbehind-assertions": RegexpLookbehindAssertions,
142+
"regexp-match-indices": RegexpMatchIndices,
143+
"regexp-named-capture-groups": RegexpNamedCaptureGroups,
144+
"regexp-sticky-and-unicode-flags": RegexpStickyAndUnicodeFlags,
145+
"regexp-unicode-property-escapes": RegexpUnicodePropertyEscapes,
146146
"rest-argument": RestArgument,
147147
"template-literal": TemplateLiteral,
148148
"top-level-await": TopLevelAwait,
@@ -191,12 +191,12 @@ var JSFeatureToString = map[JSFeature]string{
191191
ObjectRestSpread: "object-rest-spread",
192192
OptionalCatchBinding: "optional-catch-binding",
193193
OptionalChain: "optional-chain",
194-
RegExpDotAllFlag: "reg-exp-dot-all-flag",
195-
RegExpLookbehindAssertions: "reg-exp-lookbehind-assertions",
196-
RegExpMatchIndices: "reg-exp-match-indices",
197-
RegExpNamedCaptureGroups: "reg-exp-named-capture-groups",
198-
RegExpStickyAndUnicodeFlags: "reg-exp-sticky-and-unicode-flags",
199-
RegExpUnicodePropertyEscapes: "reg-exp-unicode-property-escapes",
194+
RegexpDotAllFlag: "regexp-dot-all-flag",
195+
RegexpLookbehindAssertions: "regexp-lookbehind-assertions",
196+
RegexpMatchIndices: "regexp-match-indices",
197+
RegexpNamedCaptureGroups: "regexp-named-capture-groups",
198+
RegexpStickyAndUnicodeFlags: "regexp-sticky-and-unicode-flags",
199+
RegexpUnicodePropertyEscapes: "regexp-unicode-property-escapes",
200200
RestArgument: "rest-argument",
201201
TemplateLiteral: "template-literal",
202202
TopLevelAwait: "top-level-await",
@@ -583,7 +583,7 @@ var jsTable = map[JSFeature]map[Engine][]versionRange{
583583
Opera: {{start: v{77, 0, 0}}},
584584
Safari: {{start: v{13, 1, 0}}},
585585
},
586-
RegExpDotAllFlag: {
586+
RegexpDotAllFlag: {
587587
Chrome: {{start: v{62, 0, 0}}},
588588
Edge: {{start: v{79, 0, 0}}},
589589
ES: {{start: v{2018, 0, 0}}},
@@ -593,15 +593,15 @@ var jsTable = map[JSFeature]map[Engine][]versionRange{
593593
Opera: {{start: v{49, 0, 0}}},
594594
Safari: {{start: v{11, 1, 0}}},
595595
},
596-
RegExpLookbehindAssertions: {
596+
RegexpLookbehindAssertions: {
597597
Chrome: {{start: v{62, 0, 0}}},
598598
Edge: {{start: v{79, 0, 0}}},
599599
ES: {{start: v{2018, 0, 0}}},
600600
Firefox: {{start: v{78, 0, 0}}},
601601
Node: {{start: v{8, 10, 0}}},
602602
Opera: {{start: v{49, 0, 0}}},
603603
},
604-
RegExpMatchIndices: {
604+
RegexpMatchIndices: {
605605
Chrome: {{start: v{90, 0, 0}}},
606606
Edge: {{start: v{90, 0, 0}}},
607607
ES: {{start: v{2022, 0, 0}}},
@@ -610,7 +610,7 @@ var jsTable = map[JSFeature]map[Engine][]versionRange{
610610
Opera: {{start: v{76, 0, 0}}},
611611
Safari: {{start: v{15, 0, 0}}},
612612
},
613-
RegExpNamedCaptureGroups: {
613+
RegexpNamedCaptureGroups: {
614614
Chrome: {{start: v{64, 0, 0}}},
615615
Edge: {{start: v{79, 0, 0}}},
616616
ES: {{start: v{2018, 0, 0}}},
@@ -620,7 +620,7 @@ var jsTable = map[JSFeature]map[Engine][]versionRange{
620620
Opera: {{start: v{51, 0, 0}}},
621621
Safari: {{start: v{11, 1, 0}}},
622622
},
623-
RegExpStickyAndUnicodeFlags: {
623+
RegexpStickyAndUnicodeFlags: {
624624
Chrome: {{start: v{50, 0, 0}}},
625625
Edge: {{start: v{13, 0, 0}}},
626626
ES: {{start: v{2015, 0, 0}}},
@@ -630,7 +630,7 @@ var jsTable = map[JSFeature]map[Engine][]versionRange{
630630
Opera: {{start: v{37, 0, 0}}},
631631
Safari: {{start: v{12, 0, 0}}},
632632
},
633-
RegExpUnicodePropertyEscapes: {
633+
RegexpUnicodePropertyEscapes: {
634634
Chrome: {{start: v{64, 0, 0}}},
635635
Edge: {{start: v{79, 0, 0}}},
636636
ES: {{start: v{2018, 0, 0}}},

internal/js_parser/js_parser.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11633,17 +11633,17 @@ pattern:
1163311633
tail := pattern[i:]
1163411634

1163511635
if strings.HasPrefix(tail, "?<=") || strings.HasPrefix(tail, "?<!") {
11636-
if p.options.unsupportedJSFeatures.Has(compat.RegExpLookbehindAssertions) {
11637-
feature = compat.RegExpLookbehindAssertions
11636+
if p.options.unsupportedJSFeatures.Has(compat.RegexpLookbehindAssertions) {
11637+
feature = compat.RegexpLookbehindAssertions
1163811638
what = "Lookbehind assertions in regular expressions are not available"
1163911639
r = logger.Range{Loc: logger.Loc{Start: loc.Start + int32(i) + 1}, Len: 3}
1164011640
isUnsupported = true
1164111641
break pattern
1164211642
}
1164311643
} else if strings.HasPrefix(tail, "?<") {
11644-
if p.options.unsupportedJSFeatures.Has(compat.RegExpNamedCaptureGroups) {
11644+
if p.options.unsupportedJSFeatures.Has(compat.RegexpNamedCaptureGroups) {
1164511645
if end := strings.IndexByte(tail, '>'); end >= 0 {
11646-
feature = compat.RegExpNamedCaptureGroups
11646+
feature = compat.RegexpNamedCaptureGroups
1164711647
what = "Named capture groups in regular expressions are not available"
1164811648
r = logger.Range{Loc: logger.Loc{Start: loc.Start + int32(i) + 1}, Len: int32(end) + 1}
1164911649
isUnsupported = true
@@ -11667,9 +11667,9 @@ pattern:
1166711667
tail := pattern[i:]
1166811668

1166911669
if isUnicode && (strings.HasPrefix(tail, "p{") || strings.HasPrefix(tail, "P{")) {
11670-
if p.options.unsupportedJSFeatures.Has(compat.RegExpUnicodePropertyEscapes) {
11670+
if p.options.unsupportedJSFeatures.Has(compat.RegexpUnicodePropertyEscapes) {
1167111671
if end := strings.IndexByte(tail, '}'); end >= 0 {
11672-
feature = compat.RegExpUnicodePropertyEscapes
11672+
feature = compat.RegexpUnicodePropertyEscapes
1167311673
what = "Unicode property escapes in regular expressions are not available"
1167411674
r = logger.Range{Loc: logger.Loc{Start: loc.Start + int32(i)}, Len: int32(end) + 2}
1167511675
isUnsupported = true
@@ -11689,22 +11689,22 @@ pattern:
1168911689
continue // These are part of ES5 and are always supported
1169011690

1169111691
case 's':
11692-
if !p.options.unsupportedJSFeatures.Has(compat.RegExpDotAllFlag) {
11692+
if !p.options.unsupportedJSFeatures.Has(compat.RegexpDotAllFlag) {
1169311693
continue // This is part of ES2018
1169411694
}
11695-
feature = compat.RegExpDotAllFlag
11695+
feature = compat.RegexpDotAllFlag
1169611696

1169711697
case 'y', 'u':
11698-
if !p.options.unsupportedJSFeatures.Has(compat.RegExpStickyAndUnicodeFlags) {
11698+
if !p.options.unsupportedJSFeatures.Has(compat.RegexpStickyAndUnicodeFlags) {
1169911699
continue // These are part of ES2018
1170011700
}
11701-
feature = compat.RegExpStickyAndUnicodeFlags
11701+
feature = compat.RegexpStickyAndUnicodeFlags
1170211702

1170311703
case 'd':
11704-
if !p.options.unsupportedJSFeatures.Has(compat.RegExpMatchIndices) {
11704+
if !p.options.unsupportedJSFeatures.Has(compat.RegexpMatchIndices) {
1170511705
continue // This is part of ES2022
1170611706
}
11707-
feature = compat.RegExpMatchIndices
11707+
feature = compat.RegexpMatchIndices
1170811708

1170911709
default:
1171011710
// Unknown flags are never supported

scripts/compat-table.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ const features = {
3737
'class': { target: 'Class' },
3838
'generators': { target: 'Generator' },
3939
'Unicode code point escapes': { target: 'UnicodeEscapes' },
40-
'RegExp "y" and "u" flags': { target: 'RegExpStickyAndUnicodeFlags' },
40+
'RegExp "y" and "u" flags': { target: 'RegexpStickyAndUnicodeFlags' },
4141

4242
// >ES6 features
4343
'exponentiation (**) operator': { target: 'ExponentOperator' },
4444
'nested rest destructuring, declarations': { target: 'NestedRestBinding' },
4545
'nested rest destructuring, parameters': { target: 'NestedRestBinding' },
4646
'async functions': { target: 'AsyncAwait' },
4747
'object rest/spread properties': { target: 'ObjectRestSpread' },
48-
'RegExp Lookbehind Assertions': { target: 'RegExpLookbehindAssertions' },
49-
'RegExp named capture groups': { target: 'RegExpNamedCaptureGroups' },
50-
'RegExp Unicode Property Escapes': { target: 'RegExpUnicodePropertyEscapes' },
51-
's (dotAll) flag for regular expressions': { target: 'RegExpDotAllFlag' },
48+
'RegExp Lookbehind Assertions': { target: 'RegexpLookbehindAssertions' },
49+
'RegExp named capture groups': { target: 'RegexpNamedCaptureGroups' },
50+
'RegExp Unicode Property Escapes': { target: 'RegexpUnicodePropertyEscapes' },
51+
's (dotAll) flag for regular expressions': { target: 'RegexpDotAllFlag' },
5252
'Asynchronous Iterators: async generators': { target: 'AsyncGenerator' },
5353
'Asynchronous Iterators: for-await-of loops': { target: 'ForAwait' },
5454
'optional catch binding': { target: 'OptionalCatchBinding' },
@@ -143,7 +143,7 @@ mergeVersions('ForOf', { es2015: true })
143143
mergeVersions('Generator', { es2015: true })
144144
mergeVersions('NewTarget', { es2015: true })
145145
mergeVersions('ObjectExtensions', { es2015: true })
146-
mergeVersions('RegExpStickyAndUnicodeFlags', { es2015: true })
146+
mergeVersions('RegexpStickyAndUnicodeFlags', { es2015: true })
147147
mergeVersions('RestArgument', { es2015: true })
148148
mergeVersions('TemplateLiteral', { es2015: true })
149149
mergeVersions('UnicodeEscapes', { es2015: true })
@@ -155,10 +155,10 @@ mergeVersions('AsyncAwait', { es2017: true })
155155
mergeVersions('AsyncGenerator', { es2018: true })
156156
mergeVersions('ForAwait', { es2018: true })
157157
mergeVersions('ObjectRestSpread', { es2018: true })
158-
mergeVersions('RegExpDotAllFlag', { es2018: true })
159-
mergeVersions('RegExpLookbehindAssertions', { es2018: true })
160-
mergeVersions('RegExpNamedCaptureGroups', { es2018: true })
161-
mergeVersions('RegExpUnicodePropertyEscapes', { es2018: true })
158+
mergeVersions('RegexpDotAllFlag', { es2018: true })
159+
mergeVersions('RegexpLookbehindAssertions', { es2018: true })
160+
mergeVersions('RegexpNamedCaptureGroups', { es2018: true })
161+
mergeVersions('RegexpUnicodePropertyEscapes', { es2018: true })
162162
mergeVersions('OptionalCatchBinding', { es2019: true })
163163
mergeVersions('Bigint', { es2020: true })
164164
mergeVersions('ImportMeta', { es2020: true })
@@ -178,7 +178,7 @@ mergeVersions('ClassStaticBlocks', { es2022: true })
178178
mergeVersions('ClassStaticField', { es2022: true })
179179
mergeVersions('TopLevelAwait', { es2022: true })
180180
mergeVersions('ArbitraryModuleNamespaceNames', { es2022: true })
181-
mergeVersions('RegExpMatchIndices', { es2022: true })
181+
mergeVersions('RegexpMatchIndices', { es2022: true })
182182
mergeVersions('ImportAssertions', {})
183183

184184
// Manually copied from https://caniuse.com/?search=export%20*%20as
@@ -295,7 +295,7 @@ mergeVersions('ClassStaticBlocks', {
295295
})
296296

297297
// Manually copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices
298-
mergeVersions('RegExpMatchIndices', {
298+
mergeVersions('RegexpMatchIndices', {
299299
chrome90: true,
300300
edge90: true,
301301
firefox88: true,

0 commit comments

Comments
 (0)