Permalink
Switch branches/tags
Commits on May 1, 2017
  1. Convert string concatenation to template strings

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

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

    slevithan committed Apr 30, 2017
    No longer needed since XRegExp is dropping support for ES3 browsers. #108
  3. Convert CommonJS module definition to ES6 modules

    josephfrazier committed with slevithan Apr 30, 2017
    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
  4. Convert `array.indexOf(foo) !== -1` to `array.includes(foo)`

    josephfrazier committed with slevithan Apr 27, 2017
    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
  5. Convert function expressions to arrow functions

    josephfrazier committed with slevithan Apr 27, 2017
    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.
  6. Remove `"use strict";` directives

    josephfrazier committed with slevithan Apr 27, 2017
    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
  7. Use shorthand property names in object initializers

    josephfrazier committed with slevithan Apr 27, 2017
    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
  8. Convert use of apply() to spread operator

    josephfrazier committed with slevithan Apr 27, 2017
    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
  9. Use `const`/`let` instead of `var`

    josephfrazier committed with slevithan Apr 27, 2017
    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
Commits on Apr 27, 2017
  1. Comments for XRegExp.build/tag

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

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

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

    josephfrazier committed with slevithan Apr 26, 2017
    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
  4. Use ES2015 rest parameters in src/

    josephfrazier committed with slevithan Apr 25, 2017
    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
Commits on Apr 25, 2017
  1. Add eslint to enforce code style

    josephfrazier committed with slevithan Apr 25, 2017
    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)
  2. Update files in lib/

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

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

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

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

    josephfrazier committed with slevithan Apr 25, 2017
    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)