Skip to content

Commit e68dbf4

Browse files
Merge pull request #2 from ambassify/chore/upgrade-core-js-fork
Merge core-js and polyfilling update into ambassify fork
2 parents 6aa18a6 + 441d77c commit e68dbf4

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A JavaScript utility that provides text processing routines for Tweets. This li
88

99
This fork of the original twitter-text library includes:
1010

11-
- ...
11+
- [Updated core-js and polyfill strategy](https://github.com/twitter/twitter-text/pull/363)
1212

1313
It's available on NPM as `npm install @ambassify/twitter-text`
1414

js/babel.config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ module.exports = api => {
1010
'@babel/plugin-proposal-class-properties',
1111
'@babel/plugin-proposal-export-namespace-from',
1212
'@babel/plugin-proposal-export-default-from',
13-
'add-module-exports'
13+
'add-module-exports',
14+
[
15+
'polyfill-corejs3',
16+
{
17+
method: 'usage-pure'
18+
}
19+
]
1420
],
1521
presets: [
1622
[
1723
'@babel/preset-env',
1824
{
19-
useBuiltIns: 'usage',
20-
corejs: 2,
2125
modules: api.env('commonjs') || api.env('test') ? 'commonjs' : false,
2226
forceAllTransforms: api.env('production')
2327
}

js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@babel/preset-env": "^7.4.0",
2727
"babel-eslint": "^10.0.1",
2828
"babel-plugin-add-module-exports": "^1.0.2",
29+
"babel-plugin-polyfill-corejs3": "^0.3.0",
2930
"eslint": "^4.18.1",
3031
"eslint-config-prettier": "^2.9.0",
3132
"eslint-plugin-prettier": "^2.6.0",
@@ -57,7 +58,7 @@
5758
},
5859
"dependencies": {
5960
"@babel/runtime": "^7.3.1",
60-
"core-js": "^2.5.0",
61+
"core-js-pure": "^3.19.0",
6162
"punycode": "1.4.1",
6263
"twemoji-parser": "^11.0.2"
6364
}

js/yarn.lock

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,10 +1381,10 @@
13811381
"browserslist" "^4.17.6"
13821382
"semver" "7.0.0"
13831383

1384-
"core-js@^2.5.0":
1385-
"integrity" "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
1386-
"resolved" "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz"
1387-
"version" "2.6.12"
1384+
"core-js-pure@^3.19.0":
1385+
"integrity" "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ=="
1386+
"resolved" "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz"
1387+
"version" "3.19.1"
13881388

13891389
"core-util-is@~1.0.0":
13901390
"integrity" "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
@@ -1782,11 +1782,6 @@
17821782
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
17831783
"version" "1.0.0"
17841784

1785-
"fsevents@~2.3.2":
1786-
"integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
1787-
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
1788-
"version" "2.3.2"
1789-
17901785
"function-bind@^1.1.1":
17911786
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
17921787
"resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"

0 commit comments

Comments
 (0)