Skip to content

Commit

Permalink
Add support for unicode-escapes in preset-env
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism committed May 17, 2020
1 parent b5646bf commit 588ba30
Show file tree
Hide file tree
Showing 66 changed files with 79 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/babel-compat-data/data/plugins.json
Expand Up @@ -265,6 +265,17 @@
"opera": "36",
"electron": "1"
},
"transform-unicode-escapes": {
"chrome": "44",
"edge": "12",
"firefox": "53",
"safari": "9",
"node": "4",
"ios": "9",
"samsung": "4",
"opera": "31",
"electron": "0.31"
},
"transform-unicode-regex": {
"chrome": "50",
"edge": "13",
Expand Down
1 change: 1 addition & 0 deletions packages/babel-compat-data/scripts/data/plugin-features.js
Expand Up @@ -62,6 +62,7 @@ const es2015 = {
'RegExp "y" and "u" flags / "y" flag',
],
},
"transform-unicode-escapes": "Unicode code point escapes",
"transform-unicode-regex": {
features: [
'RegExp "y" and "u" flags / "u" flag, case folding',
Expand Down
1 change: 1 addition & 0 deletions packages/babel-preset-env/package.json
Expand Up @@ -63,6 +63,7 @@
"@babel/plugin-transform-sticky-regex": "^7.8.3",
"@babel/plugin-transform-template-literals": "^7.8.3",
"@babel/plugin-transform-typeof-symbol": "^7.8.4",
"@babel/plugin-transform-unicode-escapes": "^7.8.3",
"@babel/plugin-transform-unicode-regex": "^7.8.3",
"@babel/preset-modules": "^0.1.3",
"@babel/types": "^7.9.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-preset-env/src/available-plugins.js
Expand Up @@ -49,6 +49,7 @@ import transformSpread from "@babel/plugin-transform-spread";
import transformStickyRegex from "@babel/plugin-transform-sticky-regex";
import transformTemplateLiterals from "@babel/plugin-transform-template-literals";
import transformTypeofSymbol from "@babel/plugin-transform-typeof-symbol";
import transformUnicodeEscapes from "@babel/plugin-transform-unicode-escapes";
import transformUnicodeRegex from "@babel/plugin-transform-unicode-regex";

import bugfixAsyncArrowsInClass from "@babel/preset-modules/lib/plugins/transform-async-arrows-in-class";
Expand Down Expand Up @@ -113,5 +114,6 @@ export default {
"transform-sticky-regex": transformStickyRegex,
"transform-template-literals": transformTemplateLiterals,
"transform-typeof-symbol": transformTypeofSymbol,
"transform-unicode-escapes": transformUnicodeEscapes,
"transform-unicode-regex": transformUnicodeRegex,
};
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties { "chrome":"40" }
transform-for-of { "chrome":"40" }
transform-sticky-regex { "chrome":"40" }
transform-unicode-escapes { "chrome":"40" }
transform-unicode-regex { "chrome":"40" }
transform-spread { "chrome":"40" }
transform-block-scoping { "chrome":"40" }
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties { "android":"3" }
transform-for-of { "android":"3" }
transform-sticky-regex { "android":"3" }
transform-unicode-escapes { "android":"3" }
transform-unicode-regex { "android":"3" }
transform-spread { "android":"3" }
transform-destructuring { "android":"3" }
Expand Down
Expand Up @@ -39,6 +39,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "ie":"11" }
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties { "android":"4" }
transform-for-of { "android":"4" }
transform-sticky-regex { "android":"4" }
transform-unicode-escapes { "android":"4" }
transform-unicode-regex { "android":"4" }
transform-spread { "android":"4" }
transform-destructuring { "android":"4" }
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -30,6 +30,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -37,6 +37,7 @@ Using plugins:
transform-computed-properties { "ie":"10", "safari":"7" }
transform-for-of { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-sticky-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-unicode-escapes { "firefox":"49", "ie":"10", "safari":"7" }
transform-unicode-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-spread { "ie":"10", "ios":"9", "safari":"7" }
transform-destructuring { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
Expand Down
Expand Up @@ -43,6 +43,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "electron":"0.36", "ie":"10", "node":"6.1" }
transform-sticky-regex { "electron":"0.36", "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "electron":"0.36", "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "electron":"0.36", "ie":"10", "node":"6.1" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10", "node":"6" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10", "node":"6" }
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties { "android":"4" }
transform-for-of { "android":"4" }
transform-sticky-regex { "android":"4" }
transform-unicode-escapes { "android":"4" }
transform-unicode-regex { "android":"4" }
transform-spread { "android":"4" }
transform-destructuring { "android":"4" }
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -32,6 +32,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -30,6 +30,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -37,6 +37,7 @@ Using plugins:
transform-computed-properties { "ie":"10", "safari":"7" }
transform-for-of { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-sticky-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-unicode-escapes { "firefox":"49", "ie":"10", "safari":"7" }
transform-unicode-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-spread { "ie":"10", "ios":"9", "safari":"7" }
transform-destructuring { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -43,6 +43,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "electron":"0.36", "ie":"10", "node":"6.1" }
transform-sticky-regex { "electron":"0.36", "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "electron":"0.36", "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "electron":"0.36", "ie":"10", "node":"6.1" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10" }
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10", "node":"6" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10", "node":"6" }
Expand Down
Expand Up @@ -31,6 +31,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -35,6 +35,7 @@ Using plugins:
transform-computed-properties {}
transform-for-of {}
transform-sticky-regex {}
transform-unicode-escapes {}
transform-unicode-regex {}
transform-spread {}
transform-destructuring {}
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"10" }
transform-for-of { "ie":"10", "node":"6" }
transform-sticky-regex { "ie":"10" }
transform-unicode-escapes { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-destructuring { "ie":"10", "node":"6" }
Expand Down
Expand Up @@ -28,6 +28,7 @@ Using plugins:
transform-literals { "firefox":"52" }
transform-function-name { "firefox":"52" }
transform-for-of { "firefox":"52" }
transform-unicode-escapes { "firefox":"52" }
transform-destructuring { "firefox":"52" }
transform-modules-commonjs { "firefox":"52", "node":"7.4" }
proposal-dynamic-import { "firefox":"52", "node":"7.4" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -34,6 +34,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down
Expand Up @@ -33,6 +33,7 @@ Using plugins:
transform-computed-properties { "ie":"11" }
transform-for-of { "firefox":"50", "ie":"11" }
transform-sticky-regex { "ie":"11" }
transform-unicode-escapes { "firefox":"50", "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-destructuring { "firefox":"50", "ie":"11" }
Expand Down

0 comments on commit 588ba30

Please sign in to comment.