Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rollup/rollup-plugin-babel
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17d007544fe6764840ea11213af422640e415edd
Choose a base ref
...
head repository: rollup/rollup-plugin-babel
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 05fb203f5ec5f7ba5baa2247b92a3f97c060584e
Choose a head ref

Commits on Dec 27, 2016

  1. Simplify repository config

    vinkla authored Dec 27, 2016
    Copy the full SHA
    37e5540 View commit details

Commits on Jan 4, 2017

  1. Merge pull request #117 from vinkla/patch-1

    Simplify repository config
    Rich-Harris authored Jan 4, 2017
    Copy the full SHA
    d7c0b50 View commit details

Commits on Mar 21, 2017

  1. Copy the full SHA
    90579d9 View commit details

Commits on May 26, 2017

  1. make use of object-assign (#118)

    Delete assign from utils.js
    hiroppy authored and hzoo committed May 26, 2017
    Copy the full SHA
    e4720c1 View commit details

Commits on Jun 17, 2017

  1. Breaking: Babel 7 alpha update (#139)

    Breaking: Babel 7 alpha update
    hzoo authored Jun 17, 2017
    Copy the full SHA
    6801a6d View commit details
  2. 3.0.0-alpha.12

    hzoo committed Jun 17, 2017
    Copy the full SHA
    928f746 View commit details

Commits on Jun 20, 2017

  1. clarify README.md showing an example excluding helpers with a variabl…

    …e set to true
    Dimitri Kopriwa committed Jun 20, 2017
    Copy the full SHA
    f6ef049 View commit details

Commits on Jul 12, 2017

  1. Copy the full SHA
    a22b2a8 View commit details

Commits on Jul 19, 2017

  1. update to babel 7 alpha.15

    hzoo committed Jul 19, 2017
    Copy the full SHA
    631ff35 View commit details
  2. 3.0.0-alpha.15

    hzoo committed Jul 19, 2017
    Copy the full SHA
    5ac189d View commit details

Commits on Jul 26, 2017

  1. use alpha.17 (#151)

    hzoo authored Jul 26, 2017
    Copy the full SHA
    b00b71c View commit details
  2. 3.0.0-alpha.17

    hzoo committed Jul 26, 2017
    Copy the full SHA
    80f44d6 View commit details

Commits on Aug 7, 2017

  1. Peer dep (#153)

    * make an inline plugin for the preflight check, make babel-core a peerDep
    
    * turn babel-core dep into a peerDep
    
    * fix reference to old class plugin
    hzoo authored Aug 7, 2017
    Copy the full SHA
    3a21322 View commit details
  2. Copy the full SHA
    0f43a13 View commit details
  3. 3.0.0

    hzoo committed Aug 7, 2017
    Copy the full SHA
    214573f View commit details
  4. 3.0.0 changelog [skip ci]

    hzoo authored Aug 7, 2017
    Copy the full SHA
    cad2773 View commit details
  5. fix transform (#154)

    hzoo authored Aug 7, 2017
    Copy the full SHA
    7d0c331 View commit details
  6. 3.0.1

    hzoo committed Aug 7, 2017
    Copy the full SHA
    3951b04 View commit details
  7. changelog [skip ci]

    hzoo authored Aug 7, 2017
    Copy the full SHA
    3cc04d9 View commit details

Commits on Aug 15, 2017

  1. Fix regression with Babel 6 (#158)

    * Fix regression with Babel 6
    
    Since in Babel 6 it is not supported to replace the argument
    of a default export declaration with an expression, use a
    custom "replaceWith" function which handles also that case.
    
    Fixes #155, fixes #156.
    
    * Run tests using both Babel 7 and Babel 6
    nicolo-ribaudo authored and hzoo committed Aug 15, 2017
    Copy the full SHA
    101d126 View commit details
  2. 3.0.2

    hzoo committed Aug 15, 2017
    Copy the full SHA
    a5f16de View commit details

Commits on Nov 1, 2017

  1. Fixed support for babel 7 (#170)

    * Fixed support for babel 7
    
    * feat(babel): Use scoped babel packages
    
    BREAKING CHANGE: This now requires scoped babel packages to be used.
    
    * Updated to @babel/plugin-proposal-decorators
    Andarist authored and danez committed Nov 1, 2017
    Copy the full SHA
    7796ce9 View commit details
  2. Copy the full SHA
    dbafdb1 View commit details
  3. Merge pull request #150 from wmhilton/patch-1

    Use "module" in addition to "jsnext:main"
    Andarist authored Nov 1, 2017
    Copy the full SHA
    cb5b0aa View commit details
  4. Copy the full SHA
    d90a1b7 View commit details
  5. 4.0.0-beta.0

    danez committed Nov 1, 2017
    Copy the full SHA
    ad3c92e View commit details

Commits on Nov 2, 2017

  1. Merge pull request #175 from rollup/existentialism-patch-1

    Fix small grammar nit in external-helpers warning
    existentialism authored Nov 2, 2017
    Copy the full SHA
    529a011 View commit details

Commits on Dec 18, 2017

  1. Update README.md (#163)

    Added a missing word and fixed few tiny errors
    revelt authored and danez committed Dec 18, 2017
    Copy the full SHA
    e3e6282 View commit details
  2. Copy the full SHA
    8005b6c View commit details
  3. Update changelog

    danez committed Dec 18, 2017
    Copy the full SHA
    cd4c4c2 View commit details

Commits on Dec 20, 2017

  1. Copy the full SHA
    b98cfbd View commit details
  2. Merge pull request #177 from rollup/fix-helpers/es-cjs-mix

    Fixed issue with transpilation of cjs files
    Andarist authored Dec 20, 2017
    Copy the full SHA
    c8bd67d View commit details

Commits on Dec 25, 2017

  1. Update readme, show different dist tags (#184)

    * Update readme, show different dist tags
    
    Fixes #160
    
    * Update order of installation; current goes first
    tswaters authored and Andarist committed Dec 25, 2017
    Copy the full SHA
    e74407e View commit details

Commits on Jan 27, 2018

  1. 4.0.0-beta.1

    Andarist committed Jan 27, 2018
    Copy the full SHA
    55576c9 View commit details

Commits on Feb 14, 2018

  1. Copy the full SHA
    ad91782 View commit details
  2. Merge pull request #147 from kopax/master

    clarify README.md showing an example excluding helpers with a variable set to true
    Rich-Harris authored Feb 14, 2018
    Copy the full SHA
    f4d4fea View commit details

Commits on Feb 16, 2018

  1. Copy the full SHA
    055b23f View commit details

Commits on Feb 17, 2018

  1. Copy the full SHA
    43c7130 View commit details
  2. 4.0.0-beta.2

    Andarist committed Feb 17, 2018
    Copy the full SHA
    65a81cb View commit details

Commits on Mar 19, 2018

  1. Restore NUL convention for helper name (#198)

    The null character `\0` seems to have first been introduced by d169da1.
    
    Fixes #197
    NMinhNguyen authored and Andarist committed Mar 19, 2018
    Copy the full SHA
    2e8fecd View commit details
  2. 4.0.0-beta.3

    Andarist committed Mar 19, 2018
    Copy the full SHA
    75419f7 View commit details

Commits on Apr 8, 2018

  1. bumped babel deps

    Andarist committed Apr 8, 2018
    Copy the full SHA
    69bda46 View commit details

Commits on Apr 9, 2018

  1. 4.0.0-beta.4

    Andarist committed Apr 9, 2018
    Copy the full SHA
    10b3ada View commit details

Commits on Apr 20, 2018

  1. Fix npm beta label in README (#207)

    Previously, the instructions for usage with Babel 7 was to install the plugin with the label "next" which doesn't exist. The correct label is "beta".
    cangoektas authored and Andarist committed Apr 20, 2018
    Copy the full SHA
    b05e0ef View commit details

Commits on Jun 10, 2018

  1. Bumped version of babel deps

    Andarist committed Jun 10, 2018
    Copy the full SHA
    c8b1a13 View commit details
  2. Copy the full SHA
    6630351 View commit details
  3. 4.0.0-beta.5

    Andarist committed Jun 10, 2018
    Copy the full SHA
    eef5bee View commit details
  4. Drop node@4 support

    Andarist committed Jun 10, 2018
    Copy the full SHA
    59b9a7f View commit details

Commits on Jun 14, 2018

  1. Bumped all dependencies. (#219)

    * Update pinned version of babel.
    * Update all development dependencies so this plugin is tested against
      current software.
    * Make changes to test needed by updated rollup.
    * Add node.js 10 to testing.
    coreyfarrell authored and Andarist committed Jun 14, 2018
    Copy the full SHA
    8120928 View commit details

Commits on Jun 23, 2018

  1. Delegate warnings and errors reporting to rollup (#223)

    * Delegate warnings and errors reporting to rollup
    
    * Fixed mocha deprecation warn
    Andarist authored Jun 23, 2018
    Copy the full SHA
    5f1ba9e View commit details
Showing with 5,259 additions and 505 deletions.
  1. +17 −22 .eslintrc
  2. +1 −0 .gitignore
  3. +5 −0 .huskyrc
  4. +3 −0 .lintstagedrc
  5. +6 −0 .prettierrc
  6. +2 −2 .travis.yml
  7. +88 −31 CHANGELOG.md
  8. +119 −39 README.md
  9. +1 −1 appveyor.yml
  10. +4,370 −0 package-lock.json
  11. +63 −57 package.json
  12. +13 −9 rollup.config.js
  13. +4 −2 src/constants.js
  14. +21 −0 src/helperPlugin.js
  15. +122 −84 src/index.js
  16. +54 −25 src/preflightCheck.js
  17. +8 −10 src/utils.js
  18. +1 −1 test/mocha.opts
  19. +1 −1 test/samples/.babelrc
  20. +1 −1 test/samples/basic/main.js
  21. +1 −1 test/samples/checks/foo/.babelrc
  22. +1 −1 test/samples/checks/foo/index.js
  23. +4 −2 test/samples/checks/main.js
  24. +3 −0 test/samples/class-loose/.babelrc
  25. +5 −0 test/samples/class-loose/main.js
  26. +2 −2 test/samples/class/main.js
  27. +0 −3 test/samples/duplicated-helpers-warning/.babelrc
  28. +0 −1 test/samples/duplicated-helpers-warning/bar.js
  29. +0 −5 test/samples/duplicated-helpers-warning/main.js
  30. +1 −1 test/samples/exclusions/main.js
  31. +1 −0 test/samples/extensions-custom/ext.es
  32. +1 −0 test/samples/extensions-custom/ext.es6
  33. +1 −0 test/samples/extensions-custom/ext.js
  34. +1 −0 test/samples/extensions-custom/ext.jsx
  35. +1 −0 test/samples/extensions-custom/ext.mjs
  36. +1 −0 test/samples/extensions-custom/ext.other
  37. +6 −0 test/samples/extensions-custom/main.js
  38. +1 −0 test/samples/extensions-default/ext.es
  39. +1 −0 test/samples/extensions-default/ext.es6
  40. +1 −0 test/samples/extensions-default/ext.js
  41. +1 −0 test/samples/extensions-default/ext.json
  42. +1 −0 test/samples/extensions-default/ext.jsx
  43. +1 −0 test/samples/extensions-default/ext.mjs
  44. +1 −0 test/samples/extensions-default/ext.other
  45. +7 −0 test/samples/extensions-default/main.js
  46. +4 −0 test/samples/external-helpers/.babelrc
  47. 0 test/samples/{duplicated-helpers-no-warning → external-helpers}/bar.js
  48. 0 test/samples/{duplicated-helpers-no-warning → external-helpers}/foo.js
  49. 0 test/samples/{duplicated-helpers-no-warning → external-helpers}/main.js
  50. +4 −0 test/samples/ignored-file/.babelrc
  51. +1 −0 test/samples/ignored-file/ignored.js
  52. +1 −0 test/samples/ignored-file/main.js
  53. +1 −1 test/samples/named-function-helper/_config.js
  54. +3 −3 test/samples/named-function-helper/main.js
  55. +1 −1 test/samples/no-class-transformer/main.js
  56. +6 −0 test/samples/proposal-decorators/.babelrc
  57. 0 test/samples/{transform-decorators-legacy → proposal-decorators}/main.js
  58. +6 −0 test/samples/runtime-helpers-builtins/.babelrc
  59. 0 test/samples/{duplicated-helpers-warning/foo.js → runtime-helpers-builtins/main.js}
  60. +4 −0 test/samples/runtime-helpers-commonjs/.babelrc
  61. +1 −0 test/samples/runtime-helpers-commonjs/main.js
  62. +0 −6 test/samples/runtime-helpers-custom-name/.babelrc
  63. +0 −3 test/samples/runtime-helpers-custom-name/main.js
  64. +0 −4 test/samples/runtime-helpers-duplicated/.babelrc
  65. +0 −1 test/samples/runtime-helpers-duplicated/Bar.js
  66. +0 −5 test/samples/runtime-helpers-duplicated/main.js
  67. +6 −0 test/samples/runtime-helpers-esm/.babelrc
  68. +1 −0 test/samples/runtime-helpers-esm/main.js
  69. +2 −2 test/samples/runtime-helpers/.babelrc
  70. +1 −3 test/samples/runtime-helpers/main.js
  71. +0 −4 test/samples/transform-decorators-legacy/.babelrc
  72. +1 −1 test/samples/typeof/bar.js
  73. +1 −1 test/samples/typeof/foo.js
  74. +1 −1 test/samples/typeof/main.js
  75. +271 −168 test/test.js
39 changes: 17 additions & 22 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
{
"rules": {
"indent": [ 2, "tab", { "SwitchCase": 1 } ],
"quotes": [ 2, "single" ],
"linebreak-style": [ 2, "unix" ],
"semi": [ 2, "always" ],
"keyword-spacing": [ 2, { "before": true, "after": true } ],
"space-before-blocks": [ 2, "always" ],
"space-before-function-paren": [ 2, "always" ],
"no-mixed-spaces-and-tabs": [ 2, "smart-tabs" ],
"no-cond-assign": [ 0 ]
},
"env": {
"es6": true,
"browser": true,
"mocha": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6
}
"extends": ["eslint:recommended", "prettier", "plugin:prettier/recommended"],
"rules": {
"no-cond-assign": [0]
},
"env": {
"es6": true,
"browser": true,
"mocha": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018,
"ecmaFeatures": {
"spread": true
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
node_modules
dist
*.log
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"
}
}
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,md}": ["prettier --write", "git add"]
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all",
"useTabs": true
}
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- 'stable'
- '10'
- '8'
- '6'
- '4'
119 changes: 88 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,151 @@
# rollup-plugin-babel changelog
## 4.3.2

- Fixed usage with `externalHelpers: true` option

## 4.3.1

- Add `.js` extension to the virtual babel helpers file (only matters when using `preserveModules` option in rollup)

## 4.3.0

- Added `.custom` builder.
- Fail build when a plugin tries to add non existent babel helper

## 4.2.0

Allow `rollup@1` as peer dependency.

## 4.1.0

- Fixed "preflight check" for ignored files.
- Return `null` when no transformation has been done (fixing source maps for this case)

## 4.0.3

Fixed fallback class transform in "preflight check".

## 4.0.2

Fixed `rollup` peer dependency.

## 4.0.0

Babel 7 compatible! (dropped Babel 6 compatibility though).

Additionally:

- Internal preflight checks are created now per plugin instance, so using 2 instances of rollup-plugin-babel (i.e. targeting 2 different set of files with include/exclude options) shouldn't conflict with each other
- Transpiling by default only what Babel transpiles - files with those extensions: .js, .jsx, .es6, .es, .mjs. You can customize this with new `extensions` option. This also fixes long standing issue with rollup-plugin-babel trying to transform JSON files.

## 3.0.3

- Drop babel7 support. Use 4.0.0-beta if you use babel 7
- Use "module" in addition to "jsnext:main" ([#150](https://github.com/rollup/rollup-plugin-babel/issues/150))
- Remove unused babel helpers namespace declaration & expression ([#164](https://github.com/rollup/rollup-plugin-babel/issues/164))

## 3.0.2

- Fix regression with Babel 6 ([#158](https://github.com/rollup/rollup-plugin-babel/issues/158))

## 3.0.1

- Wasn't working, fix bug with transform (not using es2015-classes for preflight check)

## 3.0.0

- Drop Node 0.10/0.12 (Use native `Object.assign`)
- Change `babel-core` to be a peerDependency
- Support `babel-core` v7 as well as a peerDep (no changes necessary)

## 2.7.1

* Prevent erroneous warnings about duplicated runtime helpers ([#105](https://github.com/rollup/rollup-plugin-babel/issues/105))
* Ignore `ignore` option in preflight check ([#102](https://github.com/rollup/rollup-plugin-babel/issues/102))
* Allow custom `moduleName` with `runtime-helpers` ([#95](https://github.com/rollup/rollup-plugin-babel/issues/95))
- Prevent erroneous warnings about duplicated runtime helpers ([#105](https://github.com/rollup/rollup-plugin-babel/issues/105))
- Ignore `ignore` option in preflight check ([#102](https://github.com/rollup/rollup-plugin-babel/issues/102))
- Allow custom `moduleName` with `runtime-helpers` ([#95](https://github.com/rollup/rollup-plugin-babel/issues/95))

## 2.7.0

* Add `externalHelpersWhitelist` option ([#92](https://github.com/rollup/rollup-plugin-babel/pull/92))
* Ignore `only` option during preflight checks ([#98](https://github.com/rollup/rollup-plugin-babel/issues/98))
* Use `options.onwarn` if available ([#84](https://github.com/rollup/rollup-plugin-babel/issues/84))
* Update documentation and dependencies
- Add `externalHelpersWhitelist` option ([#92](https://github.com/rollup/rollup-plugin-babel/pull/92))
- Ignore `only` option during preflight checks ([#98](https://github.com/rollup/rollup-plugin-babel/issues/98))
- Use `options.onwarn` if available ([#84](https://github.com/rollup/rollup-plugin-babel/issues/84))
- Update documentation and dependencies

## 2.6.1

* Return a `name`
- Return a `name`

## 2.6.0

* Use `\0` convention for helper module ID ([#64](https://github.com/rollup/rollup-plugin-babel/issues/64))
- Use `\0` convention for helper module ID ([#64](https://github.com/rollup/rollup-plugin-babel/issues/64))

## 2.5.1

* Don't mutate `options.plugins` ([#47](https://github.com/rollup/rollup-plugin-babel/issues/47))
- Don't mutate `options.plugins` ([#47](https://github.com/rollup/rollup-plugin-babel/issues/47))

## 2.5.0

* Import `babelHelpers` rather than injecting them – allows `transform` function to be pure ([#rollup/658](https://github.com/rollup/rollup/pull/658#issuecomment-223876824))
- Import `babelHelpers` rather than injecting them – allows `transform` function to be pure ([#rollup/658](https://github.com/rollup/rollup/pull/658#issuecomment-223876824))

## 2.4.0

* Add `externalHelpers` option ([#41](https://github.com/rollup/rollup-plugin-babel/pull/41))
- Add `externalHelpers` option ([#41](https://github.com/rollup/rollup-plugin-babel/pull/41))

## 2.3.9

* Do not rename Babel helpers ([#34](https://github.com/rollup/rollup-plugin-babel/pull/34))
- Do not rename Babel helpers ([#34](https://github.com/rollup/rollup-plugin-babel/pull/34))

## 2.3.8

* Create new version to (hopefully) solve bizarre CI issue
- Create new version to (hopefully) solve bizarre CI issue

## 2.3.7

* Be less clever about renaming Babel helpers ([#19](https://github.com/rollup/rollup-plugin-babel/issues/19))
- Be less clever about renaming Babel helpers ([#19](https://github.com/rollup/rollup-plugin-babel/issues/19))

## 2.3.6

* Fix cache misses in preflight check ([#29](https://github.com/rollup/rollup-plugin-babel/pull/29))
- Fix cache misses in preflight check ([#29](https://github.com/rollup/rollup-plugin-babel/pull/29))

## 2.3.5

* Use class transformer local to plugin, not project being built
- Use class transformer local to plugin, not project being built

## 2.3.4

* Ensure class transformer is present for preflight check, and only run check once per directory ([#23](https://github.com/rollup/rollup-plugin-babel/issues/23))
- Ensure class transformer is present for preflight check, and only run check once per directory ([#23](https://github.com/rollup/rollup-plugin-babel/issues/23))

## 2.3.3

* Fix helper renaming ([#22](https://github.com/rollup/rollup-plugin-babel/issues/22))
- Fix helper renaming ([#22](https://github.com/rollup/rollup-plugin-babel/issues/22))

## 2.3.1-2

* Include correct files in npm package
- Include correct files in npm package

## 2.3.0

* Allow `transform-runtime` Babel plugin, if combined with `runtimeHelpers: true` option ([#17](https://github.com/rollup/rollup-plugin-babel/issues/17))
* More permissive handling of helpers – only warn if inline helpers are duplicated
* Handle plugins that change export patterns ([#18](https://github.com/rollup/rollup-plugin-babel/issues/18))
- Allow `transform-runtime` Babel plugin, if combined with `runtimeHelpers: true` option ([#17](https://github.com/rollup/rollup-plugin-babel/issues/17))
- More permissive handling of helpers – only warn if inline helpers are duplicated
- Handle plugins that change export patterns ([#18](https://github.com/rollup/rollup-plugin-babel/issues/18))

## 2.2.0

* Preflight checks are run per-file, to avoid configuration snafus ([#16](https://github.com/rollup/rollup-plugin-babel/issues/16))
- Preflight checks are run per-file, to avoid configuration snafus ([#16](https://github.com/rollup/rollup-plugin-babel/issues/16))

## 2.1.0

* Generate sourcemaps by default
- Generate sourcemaps by default

## 2.0.1

* Use object-assign ponyfill
* Add travis support
* Fix test
- Use object-assign ponyfill
- Add travis support
- Fix test

## 2.0.0

* Babel 6 compatible
- Babel 6 compatible

## 1.0.0

* First release
- First release
Loading