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

Commit

Permalink
Merge branch 'master' into custom-builder
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
  • Loading branch information
Andarist committed Dec 29, 2018
2 parents 7fc31d9 + 0752385 commit 54d3cee
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
25 changes: 17 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-babel",
"version": "4.1.0",
"version": "4.2.0",
"description": "Seamless integration between Rollup and Babel.",
"main": "dist/rollup-plugin-babel.cjs.js",
"module": "dist/rollup-plugin-babel.esm.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"peerDependencies": {
"@babel/core": "7 || ^7.0.0-rc.2",
"rollup": ">=0.60.0 <1"
"rollup": ">=0.60.0 <2"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Expand All @@ -52,7 +52,7 @@
"lint-staged": "^7.2.2",
"mocha": "^5.2.0",
"prettier": "^1.15.3",
"rollup": "^0.64.1",
"rollup": "^1.0.0",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-json": "^3.0.0",
"source-map": "^0.6.1",
Expand Down
9 changes: 5 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ describe('rollup-plugin-babel', function() {
)
.then(bundle => {
return bundle.generate(Object.assign({ format: 'cjs' }, generateOptions));
});
})
.then(({ output: [generated] }) => generated);
}

it('runs code through babel', () => {
Expand Down Expand Up @@ -134,7 +135,7 @@ describe('rollup-plugin-babel', function() {
plugins: [babelPlugin()],
})
.then(bundle => bundle.generate({ output: { format: 'esm' } }))
.then(({ code }) => {
.then(({ output: [{ code }] }) => {
assert.ok(/class Foo/.test(code));
assert.ok(/var Bar/.test(code));
assert.ok(!/class Bar/.test(code));
Expand Down Expand Up @@ -281,7 +282,7 @@ describe('rollup-plugin-babel', function() {
.then(bundle => {
return bundle.generate({ format: 'cjs' });
})
.then(({ code }) => {
.then(({ output: [{ code }] }) => {
assert.ok(code.includes('// Generated by some custom loader'), 'adds the custom comment');
assert.ok(code.includes('console.foobaz'), 'runs the plugin');
});
Expand Down Expand Up @@ -316,7 +317,7 @@ describe('rollup-plugin-babel', function() {
.then(bundle => {
return bundle.generate({ format: 'cjs' });
})
.then(({ code }) => {
.then(({ output: [{ code }] }) => {
assert.ok(!code.includes('// Generated by some custom loader'), 'does not add the comment to ignored file');
assert.ok(!code.includes('console.foobaz'), 'does not run the plugin on ignored file');
});
Expand Down

0 comments on commit 54d3cee

Please sign in to comment.