Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A JavaScript utility that provides text processing routines for Tweets. This li

This fork of the original twitter-text library includes:

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

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

Expand Down
10 changes: 7 additions & 3 deletions js/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ module.exports = api => {
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-export-default-from',
'add-module-exports'
'add-module-exports',
[
'polyfill-corejs3',
{
method: 'usage-pure'
}
]
],
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: 2,
modules: api.env('commonjs') || api.env('test') ? 'commonjs' : false,
forceAllTransforms: api.env('production')
}
Expand Down
3 changes: 2 additions & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@babel/preset-env": "^7.4.0",
"babel-eslint": "^10.0.1",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-polyfill-corejs3": "^0.3.0",
"eslint": "^4.18.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.6.0",
Expand Down Expand Up @@ -57,7 +58,7 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"core-js": "^2.5.0",
"core-js-pure": "^3.19.0",
"punycode": "1.4.1",
"twemoji-parser": "^11.0.2"
}
Expand Down
13 changes: 4 additions & 9 deletions js/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1381,10 +1381,10 @@
"browserslist" "^4.17.6"
"semver" "7.0.0"

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

"core-util-is@~1.0.0":
"integrity" "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
Expand Down Expand Up @@ -1782,11 +1782,6 @@
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
"version" "1.0.0"

"fsevents@~2.3.2":
"integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
"version" "2.3.2"

"function-bind@^1.1.1":
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down