New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop supporting pre-ES5 browsers #108

Closed
slevithan opened this Issue Sep 27, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@slevithan
Owner

slevithan commented Sep 27, 2015

Pre-ES5 browsers include e.g. IE 8 and earlier. Right now XRegExp still supports ancient browsers like IE 5.5, Firefox 1.5, Chrome 1, and Safari 3, which is totally unnecessary. But there's not much benefit to dropping support for these browsers until XRegExp can rely on ES5.

Some things to do after dropping pre-ES5 support:

  • Generally take advantage of any ES5 features.
    • Use character indexing on strings instead of charAt, use Array.prototype.indexOf, etc.
  • Possibly kill the entire custom split implementation and make XRegExp.split just defer to String.prototype.split, if there are few enough edge cases that ES5 browsers get wrong.
  • Possibly kill handling for inconsistencies related to nonparticipating capturing groups (search for nonparticipating in code), if ES5 browsers generally get this right.
  • Possibly kill the [^] and [] transforms if all ES5 browsers get this right.
@josephfrazier

This comment has been minimized.

Show comment
Hide comment
@josephfrazier

josephfrazier Feb 15, 2017

Collaborator

On a related note, would you be interested in using babelify to compile ES2015+ code down to ES5? This would allow a variety of syntax upgrades to the files in src/, while preserving correct behavior of xregexp-all.js in all ES5+ browsers.

One way of doing this is to install babelify and babel-preset-es2015 as devDependencies, then change the build script to

browserify src/index.js --standalone XRegExp --transform [ babelify --presets [ es2015 ] ] > xregexp-all.js
Collaborator

josephfrazier commented Feb 15, 2017

On a related note, would you be interested in using babelify to compile ES2015+ code down to ES5? This would allow a variety of syntax upgrades to the files in src/, while preserving correct behavior of xregexp-all.js in all ES5+ browsers.

One way of doing this is to install babelify and babel-preset-es2015 as devDependencies, then change the build script to

browserify src/index.js --standalone XRegExp --transform [ babelify --presets [ es2015 ] ] > xregexp-all.js
@slevithan

This comment has been minimized.

Show comment
Hide comment
@slevithan

slevithan Apr 10, 2017

Owner

@josephfrazier Yes I'd be happy to move to ES2015+ code and compile down to ES5, if you're willing to set it up. :D

It would be nice to also have ES5 versions of all the individual modules, for people who don't want to use xregexp-all.js. I guess those could go in a new dist directory or similar, and xregexp-all.js should probably move in there as well.

Owner

slevithan commented Apr 10, 2017

@josephfrazier Yes I'd be happy to move to ES2015+ code and compile down to ES5, if you're willing to set it up. :D

It would be nice to also have ES5 versions of all the individual modules, for people who don't want to use xregexp-all.js. I guess those could go in a new dist directory or similar, and xregexp-all.js should probably move in there as well.

@josephfrazier

This comment has been minimized.

Show comment
Hide comment
@josephfrazier

josephfrazier Apr 10, 2017

Collaborator

Great to hear, thanks! Given the current arrangement of milestones, I assume these changes will have to wait until #45 is resolved and v3.2.0 is released? Since the compiled xregexp-all.js is currently stored in the repo, making a pull request for Babel now means that it would cause a merge conflict with any other changes that need to happen first.

Collaborator

josephfrazier commented Apr 10, 2017

Great to hear, thanks! Given the current arrangement of milestones, I assume these changes will have to wait until #45 is resolved and v3.2.0 is released? Since the compiled xregexp-all.js is currently stored in the repo, making a pull request for Babel now means that it would cause a merge conflict with any other changes that need to happen first.

@slevithan

This comment has been minimized.

Show comment
Hide comment
@slevithan

slevithan Apr 11, 2017

Owner

No, #45 can move to v4 or a post-v4 release. That also gives more time to see where the https://github.com/tc39/proposal-regexp-named-groups proposal goes.

However, I would still like to release a v3.2.0 with all the changes that have landed to date. No changes are blocking this, although I might make some tweaks and or accept PRs before then. I'll try to publish v3.2.0 (and update xregexp.com) this weekend, in order to unblock progress.

Owner

slevithan commented Apr 11, 2017

No, #45 can move to v4 or a post-v4 release. That also gives more time to see where the https://github.com/tc39/proposal-regexp-named-groups proposal goes.

However, I would still like to release a v3.2.0 with all the changes that have landed to date. No changes are blocking this, although I might make some tweaks and or accept PRs before then. I'll try to publish v3.2.0 (and update xregexp.com) this weekend, in order to unblock progress.

@josephfrazier

This comment has been minimized.

Show comment
Hide comment
@josephfrazier

josephfrazier Apr 11, 2017

Collaborator

Oh, that makes sense to wait on the TC39 proposal before moving forward on #45. I realized that I can open a PR that simply adds Babel to the build pipeline, but doesn't change xregexp-all.js or any of the src/ files, just to get the ball rolling and show how it might look, so I might go ahead and do that. It may even be possible to get some backwards-compatible changes in v3.2.0, but we'll see.

Collaborator

josephfrazier commented Apr 11, 2017

Oh, that makes sense to wait on the TC39 proposal before moving forward on #45. I realized that I can open a PR that simply adds Babel to the build pipeline, but doesn't change xregexp-all.js or any of the src/ files, just to get the ball rolling and show how it might look, so I might go ahead and do that. It may even be possible to get some backwards-compatible changes in v3.2.0, but we'll see.

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 15, 2017

Use babel with babel-preset-env to compile src/ files to lib/
Following up on slevithan#108 (comment),
this change adds [Babel] to the build process, with [babel-preset-env] to
ensure browser compatibility. It defaults to supporting all ES5
browsers, but can be tweaked in the future.

To reduce potential merge conflicts, this commit intentionally omits the
resulting changes to `xregexp-all.js`, but they are only formatting
changes anyway (you can use a tool like [prettier-diff] to see this). In
particular, unicode strings have some of their escaped characters
replaced with the corresponding literal character. Additionally, `'use
strict';` is prepended to every module in the bundle. Of course, neither
of these changes should affect the API or browser compatibility.

After this commit, a separate "build" commit should be made that updates
`xregexp-all.js`.

[Babel]: https://babeljs.io/
[babel-preset-env]: https://github.com/babel/babel-preset-env
[prettier-diff]: https://github.com/josephfrazier/prettier-diff

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 17, 2017

Use babel with babel-preset-env to compile src/ files to lib/
Following up on slevithan#108 (comment),
this change adds [Babel] to the build process, with [babel-preset-env] to
ensure browser compatibility. It defaults to supporting all ES5
browsers, but can be tweaked in the future.

To reduce potential merge conflicts, this commit intentionally omits the
resulting changes to `xregexp-all.js`, but they are only formatting
changes anyway (you can use a tool like [prettier-diff] to see this). In
particular, `'use strict';` is prepended to every module in the bundle.
Of course, this shouldn't affect the API or browser compatibility.

The [transform-es2015-literals] plugin is [excluded] to avoid changing
unicode strings. See slevithan#174 (comment)

After this commit, a separate "build" commit should be made that updates
`xregexp-all.js`.

[Babel]: https://babeljs.io/
[babel-preset-env]: https://github.com/babel/babel-preset-env
[prettier-diff]: https://github.com/josephfrazier/prettier-diff
[transform-es2015-literals]: https://www.npmjs.com/package/babel-plugin-transform-es2015-literals
[excluded]: babel/babel-preset-env#30 (comment)

slevithan added a commit that referenced this issue Apr 19, 2017

Use babel with babel-preset-env to compile src/ files to lib/
Following up on #108 (comment),
this change adds [Babel] to the build process, with [babel-preset-env] to
ensure browser compatibility. It defaults to supporting all ES5
browsers, but can be tweaked in the future.

To reduce potential merge conflicts, this commit intentionally omits the
resulting changes to `xregexp-all.js`, but they are only formatting
changes anyway (you can use a tool like [prettier-diff] to see this). In
particular, `'use strict';` is prepended to every module in the bundle.
Of course, this shouldn't affect the API or browser compatibility.

The [transform-es2015-literals] plugin is [excluded] to avoid changing
unicode strings. See #174 (comment)

After this commit, a separate "build" commit should be made that updates
`xregexp-all.js`.

[Babel]: https://babeljs.io/
[babel-preset-env]: https://github.com/babel/babel-preset-env
[prettier-diff]: https://github.com/josephfrazier/prettier-diff
[transform-es2015-literals]: https://www.npmjs.com/package/babel-plugin-transform-es2015-literals
[excluded]: babel/babel-preset-env#30 (comment)

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 25, 2017

Use ES2015 rest parameters in src/
As mentioned in slevithan#180 (comment)
and slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-rest`.

[lebab]: https://github.com/lebab/lebab

slevithan added a commit that referenced this issue Apr 26, 2017

Use ES2015 rest parameters in src/
As mentioned in #180 (comment)
and #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-rest`.

[lebab]: https://github.com/lebab/lebab

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Use `const`/`let` instead of `var`
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform let`.

[lebab]: https://github.com/lebab/lebab

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Convert use of apply() to spread operator
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-spread`.

[lebab]: https://github.com/lebab/lebab

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Use shorthand property names in object initializers
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform obj-shorthand`.

[lebab]: https://github.com/lebab/lebab

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Remove `"use strict";` directives
Babel inserts these during the compilation process, so we don't need
them in the source code.

As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform no-strict`.

[lebab]: https://github.com/lebab/lebab

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Convert function expressions to arrow functions
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arrow`.

[lebab]: https://github.com/lebab/lebab

I did have to add an `/* eslint disable no-confusing-arrow */` comment
to suppress an error. Once eslint/eslint#8439 is
merged and released, we can upgrade eslint and remove the comment.

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Convert `array.indexOf(foo) !== -1` to `array.includes(foo)`
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform includes`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to `.indexOf()`:
https://www.npmjs.com/package/babel-plugin-array-includes

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Convert CommonJS module definition to ES6 modules
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab], using `lebab --replace src --transform commonjs`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to CommonJS
https://github.com/59naga/babel-plugin-add-module-exports

slevithan added a commit that referenced this issue Apr 30, 2017

Use `const`/`let` instead of `var`
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform let`.

[lebab]: https://github.com/lebab/lebab

slevithan added a commit that referenced this issue Apr 30, 2017

Convert use of apply() to spread operator
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-spread`.

[lebab]: https://github.com/lebab/lebab

slevithan added a commit that referenced this issue Apr 30, 2017

Use shorthand property names in object initializers
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform obj-shorthand`.

[lebab]: https://github.com/lebab/lebab

slevithan added a commit that referenced this issue Apr 30, 2017

Remove `"use strict";` directives
Babel inserts these during the compilation process, so we don't need
them in the source code.

As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform no-strict`.

[lebab]: https://github.com/lebab/lebab

slevithan added a commit that referenced this issue Apr 30, 2017

Convert function expressions to arrow functions
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arrow`.

[lebab]: https://github.com/lebab/lebab

I did have to add an `/* eslint disable no-confusing-arrow */` comment
to suppress an error. Once eslint/eslint#8439 is
merged and released, we can upgrade eslint and remove the comment.

slevithan added a commit that referenced this issue Apr 30, 2017

Convert `array.indexOf(foo) !== -1` to `array.includes(foo)`
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform includes`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to `.indexOf()`:
https://www.npmjs.com/package/babel-plugin-array-includes

slevithan added a commit that referenced this issue Apr 30, 2017

Convert CommonJS module definition to ES6 modules
As mentioned in #108 (comment)

This was done with the help of [lebab], using `lebab --replace src --transform commonjs`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to CommonJS
https://github.com/59naga/babel-plugin-add-module-exports

slevithan added a commit that referenced this issue Apr 30, 2017

Remove custom indexOf
No longer needed since XRegExp is dropping support for ES3 browsers. #108

slevithan added a commit that referenced this issue Apr 30, 2017

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Apr 30, 2017

Convert string concatenation to template strings
As mentioned in slevithan#108 (comment)

This was done with the help of [lebab](https://github.com/lebab/lebab)
(with the patch at lebab/lebab#243),
using `lebab --replace src --transform template`.

slevithan added a commit that referenced this issue May 1, 2017

Convert string concatenation to template strings
As mentioned in #108 (comment)

This was done with the help of [lebab](https://github.com/lebab/lebab)
(with the patch at lebab/lebab#243),
using `lebab --replace src --transform template`.
@firatsarlar

This comment has been minimized.

Show comment
Hide comment
@firatsarlar

firatsarlar Oct 30, 2017

It would be nice to convert old code, which supports old browsers, to a migration script ( As what Jquery did with Jquery Migrate ) .. Old efforts may have some use cases .

firatsarlar commented Oct 30, 2017

It would be nice to convert old code, which supports old browsers, to a migration script ( As what Jquery did with Jquery Migrate ) .. Old efforts may have some use cases .

@josephfrazier

This comment has been minimized.

Show comment
Hide comment
@josephfrazier

josephfrazier Jan 1, 2018

Collaborator

I think this one is technically complete, now that the following have been merged:

Of course, some of the follow-up items have yet to be done:

Some things to do after dropping pre-ES5 support:

  • Generally take advantage of any ES5 features.
    • Use character indexing on strings instead of charAt, use Array.prototype.indexOf, etc.
  • Possibly kill the entire custom split implementation and make XRegExp.split just defer to String.prototype.split, if there are few enough edge cases that ES5 browsers get wrong.
  • Possibly kill handling for inconsistencies related to nonparticipating capturing groups (search for nonparticipating in code), if ES5 browsers generally get this right.
  • Possibly kill the [^] and [] transforms if all ES5 browsers get this right.
Collaborator

josephfrazier commented Jan 1, 2018

I think this one is technically complete, now that the following have been merged:

Of course, some of the follow-up items have yet to be done:

Some things to do after dropping pre-ES5 support:

  • Generally take advantage of any ES5 features.
    • Use character indexing on strings instead of charAt, use Array.prototype.indexOf, etc.
  • Possibly kill the entire custom split implementation and make XRegExp.split just defer to String.prototype.split, if there are few enough edge cases that ES5 browsers get wrong.
  • Possibly kill handling for inconsistencies related to nonparticipating capturing groups (search for nonparticipating in code), if ES5 browsers generally get this right.
  • Possibly kill the [^] and [] transforms if all ES5 browsers get this right.

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Use babel with babel-preset-env to compile src/ files to lib/
Following up on slevithan/xregexp#108 (comment),
this change adds [Babel] to the build process, with [babel-preset-env] to
ensure browser compatibility. It defaults to supporting all ES5
browsers, but can be tweaked in the future.

To reduce potential merge conflicts, this commit intentionally omits the
resulting changes to `xregexp-all.js`, but they are only formatting
changes anyway (you can use a tool like [prettier-diff] to see this). In
particular, `'use strict';` is prepended to every module in the bundle.
Of course, this shouldn't affect the API or browser compatibility.

The [transform-es2015-literals] plugin is [excluded] to avoid changing
unicode strings. See slevithan/xregexp#174 (comment)

After this commit, a separate "build" commit should be made that updates
`xregexp-all.js`.

[Babel]: https://babeljs.io/
[babel-preset-env]: https://github.com/babel/babel-preset-env
[prettier-diff]: https://github.com/josephfrazier/prettier-diff
[transform-es2015-literals]: https://www.npmjs.com/package/babel-plugin-transform-es2015-literals
[excluded]: babel/babel-preset-env#30 (comment)

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Use ES2015 rest parameters in src/
As mentioned in slevithan/xregexp#180 (comment)
and slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-rest`.

[lebab]: https://github.com/lebab/lebab

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Use `const`/`let` instead of `var`
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform let`.

[lebab]: https://github.com/lebab/lebab

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Convert use of apply() to spread operator
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-spread`.

[lebab]: https://github.com/lebab/lebab

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Use shorthand property names in object initializers
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform obj-shorthand`.

[lebab]: https://github.com/lebab/lebab

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Remove `"use strict";` directives
Babel inserts these during the compilation process, so we don't need
them in the source code.

As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform no-strict`.

[lebab]: https://github.com/lebab/lebab

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Convert function expressions to arrow functions
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arrow`.

[lebab]: https://github.com/lebab/lebab

I did have to add an `/* eslint disable no-confusing-arrow */` comment
to suppress an error. Once eslint/eslint#8439 is
merged and released, we can upgrade eslint and remove the comment.

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Convert `array.indexOf(foo) !== -1` to `array.includes(foo)`
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform includes`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to `.indexOf()`:
https://www.npmjs.com/package/babel-plugin-array-includes

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Convert CommonJS module definition to ES6 modules
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebab --replace src --transform commonjs`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to CommonJS
https://github.com/59naga/babel-plugin-add-module-exports

speecyy added a commit to speecyy/xregexp that referenced this issue Jan 6, 2018

Convert string concatenation to template strings
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab](https://github.com/lebab/lebab)
(with the patch at lebab/lebab#243),
using `lebab --replace src --transform template`.

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Use babel with babel-preset-env to compile src/ files to lib/
Following up on slevithan/xregexp#108 (comment),
this change adds [Babel] to the build process, with [babel-preset-env] to
ensure browser compatibility. It defaults to supporting all ES5
browsers, but can be tweaked in the future.

To reduce potential merge conflicts, this commit intentionally omits the
resulting changes to `xregexp-all.js`, but they are only formatting
changes anyway (you can use a tool like [prettier-diff] to see this). In
particular, `'use strict';` is prepended to every module in the bundle.
Of course, this shouldn't affect the API or browser compatibility.

The [transform-es2015-literals] plugin is [excluded] to avoid changing
unicode strings. See slevithan/xregexp#174 (comment)

After this commit, a separate "build" commit should be made that updates
`xregexp-all.js`.

[Babel]: https://babeljs.io/
[babel-preset-env]: https://github.com/babel/babel-preset-env
[prettier-diff]: https://github.com/josephfrazier/prettier-diff
[transform-es2015-literals]: https://www.npmjs.com/package/babel-plugin-transform-es2015-literals
[excluded]: babel/babel-preset-env#30 (comment)

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Use ES2015 rest parameters in src/
As mentioned in slevithan/xregexp#180 (comment)
and slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-rest`.

[lebab]: https://github.com/lebab/lebab

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Use `const`/`let` instead of `var`
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform let`.

[lebab]: https://github.com/lebab/lebab

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Convert use of apply() to spread operator
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arg-spread`.

[lebab]: https://github.com/lebab/lebab

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Use shorthand property names in object initializers
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform obj-shorthand`.

[lebab]: https://github.com/lebab/lebab

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Remove `"use strict";` directives
Babel inserts these during the compilation process, so we don't need
them in the source code.

As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform no-strict`.

[lebab]: https://github.com/lebab/lebab

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Convert function expressions to arrow functions
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform arrow`.

[lebab]: https://github.com/lebab/lebab

I did have to add an `/* eslint disable no-confusing-arrow */` comment
to suppress an error. Once eslint/eslint#8439 is
merged and released, we can upgrade eslint and remove the comment.

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Convert `array.indexOf(foo) !== -1` to `array.includes(foo)`
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebeb --replace src --transform includes`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to `.indexOf()`:
https://www.npmjs.com/package/babel-plugin-array-includes

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Convert CommonJS module definition to ES6 modules
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab], using `lebab --replace src --transform commonjs`.

[lebab]: https://github.com/lebab/lebab

It also required an additional babel plugin to compile back to CommonJS
https://github.com/59naga/babel-plugin-add-module-exports

3590212051 added a commit to 3590212051/POPmotion that referenced this issue Jan 8, 2018

Convert string concatenation to template strings
As mentioned in slevithan/xregexp#108 (comment)

This was done with the help of [lebab](https://github.com/lebab/lebab)
(with the patch at lebab/lebab#243),
using `lebab --replace src --transform template`.

josephfrazier added a commit to josephfrazier/xregexp that referenced this issue Jan 20, 2018

Remove Array.prototype.forEach shim
Now that we only support ES5 and up, we can get rid of this.
See slevithan#108
Related to slevithan#208

josephfrazier added a commit that referenced this issue Jan 20, 2018

Remove Array.prototype.forEach shim (#212)
Now that we only support ES5 and up, we can get rid of this.
See #108
Related to #208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment