Permalink
Switch branches/tags
Commits on May 1, 2017
  1. 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`.
    josephfrazier committed with Apr 30, 2017
Commits on Apr 30, 2017
  1. Merge pull request #170 from josephfrazier/zuul-jasmine

    Add automated browser testing
    committed on GitHub Apr 30, 2017
  2. Remove custom indexOf

    No longer needed since XRegExp is dropping support for ES3 browsers. #108
    committed Apr 30, 2017
  3. 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
    josephfrazier committed with Apr 30, 2017
  4. 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
    josephfrazier committed with Apr 27, 2017
  5. 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.
    josephfrazier committed with Apr 27, 2017
  6. 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
    josephfrazier committed with Apr 27, 2017
  7. 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
    josephfrazier committed with Apr 27, 2017
  8. 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
    josephfrazier committed with Apr 27, 2017
  9. 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
    josephfrazier committed with Apr 27, 2017
Commits on Apr 27, 2017
  1. Comments for XRegExp.build/tag

    Adds params/notes for . Also removes the 'inspired by' line since this diverged from the basic idea years ago.
    committed Apr 27, 2017
Commits on Apr 26, 2017
  1. README: Add unpkg.com references for xregexp-all.js

    This clarifies where xregexp-all.js can be found, now that it is no
    longer in the repository (#187)
    josephfrazier committed with Apr 26, 2017
  2. Code style tweaks

    committed Apr 26, 2017
  3. .gitignore compiled files, build them on prepublish

    Following up on #182 (comment),
    this change removes `lib/`, `xregexp-all.js`, and `bower.json` from the
    repository.
    
    It also adds a `prepublish` [script] that builds/tests the files before
    publishing to npm, to ensure they are included. You can run [npm pack]
    to see the `prepublish` script in action, then you can take a look at
    the generated tarball with `tar tvf xregexp-3.2.0.tgz` and verify that
    `lib/` and `xregexp-all.js` are still there.
    
    [script]: https://docs.npmjs.com/misc/scripts
    [npm pack]: https://docs.npmjs.com/cli/pack
    josephfrazier committed with Apr 26, 2017
  4. 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 committed with Apr 25, 2017
Commits on Apr 25, 2017
  1. Add eslint to enforce code style

    This will make it easier to automatically enforce the pre-existing code
    style of the project, using [eslint]. It was done by running:
    
        npm install --save-dev eslint
        ./node_modules/.bin/eslint --init
    
    [eslint]: https://github.com/eslint/eslint/
    
    This script interactively generates an eslint configuration (see [here]).
    Here's how I answered its questions:
    
    * Choosing `Inspect your JavaScript file(s)`
    * Entering `src` as the files to inspect
    * Choosing a JavaScript config file format
    * Answering yes to ES6 features/classes
    * Choosing both Node/Browser as environment
    * Answering yes to CommonJS
    * Answering no to JSX/React
    
    [here]: http://devnull.guru/adding-eslint-to-your-project-is-easier-than-ever/
    
    After that, I added the `lint` script to package.json, and manually
    changed the `space-before-function-paren` to:
    
        "space-before-function-paren": [
            "error",
            "never"
        ],
    
    to enforce the rule mentioned here:
    
    * #180 (comment)
    * #180 (comment)
    josephfrazier committed with Apr 25, 2017
  2. Update files in lib/

    Just keeping it in sync after #182 was merged.
    josephfrazier committed with Apr 25, 2017
  3. Fix linting issues

    josephfrazier committed with Apr 25, 2017
  4. Implement $<n> and $<name> as alternative backreference syntax in rep…

    …lacement text
    
    I had some trouble using a single regex for the replacement, so I
    replaced the $<name> syntax first in a separate pass.
    josephfrazier committed with Apr 17, 2017
  5. build

    josephfrazier committed with Apr 25, 2017
  6. Don't append empty substitution in XRegExp.tag

    embedSubpatternAfter has access to the index of the element it's
    operating on, so we can just check it to see whether the subpattern is
    present.
    
    See #180 (comment)
    josephfrazier committed with Apr 25, 2017