twitter / twitter-text

Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.
https://developer.twitter.com/en/docs/counting-characters
Apache License 2.0
3.07k stars 520 forks source link

core-js outdated #342

Open oliverjessner opened 3 years ago

oliverjessner commented 3 years ago

Core-js <3 is no longer supported. Is it possible to update to version 3? I would make audits much easier for everyone.

Actual behavior

As far as I can see you are using version 2.

Steps to reproduce the behavior

NPM install

oliverjessner commented 3 years ago

Friendly bump

erikt9 commented 3 years ago

This also results in a large bundle size increase as core-js is often getting included twice by importing twitter-text (core-js@3 at the top level and core-js@2 within this package).

A workaround, for the bundle size issue at least:

If you are using webpack 5 and are already including core-js polyfills (e.g., via @babel/preset-env), you can configure webpack to simply not include the older version of core-js. This assumes your node_modules is in the same directory as your webpack config file, and you are including a more modern core-js in your package.json:

{
...
  resolve:
    alias: {
    [path.resolve(__dirname, 'node_modules/twitter-text/node_modules/core-js')]: false
  }
}
johannesnagl commented 2 years ago

Yet another friendly bump! This would be really important for us.

deadcoder0904 commented 2 years ago

merge #363 plz :)