Browse Source

Merge pull request #914 from rollup/acorn-4

update to acorn 4
gh-953
Rich Harris 8 years ago
committed by GitHub
parent
commit
5ea3393e06
  1. 2
      package.json
  2. 6
      rollup.config.js
  3. 3
      test/function/double-default-export/_config.js
  4. 3
      test/function/double-named-export/_config.js
  5. 3
      test/function/double-named-reexport/_config.js

2
package.json

@ -47,7 +47,7 @@
}, },
"homepage": "https://github.com/rollup/rollup", "homepage": "https://github.com/rollup/rollup",
"devDependencies": { "devDependencies": {
"acorn": "^3.2.0", "acorn": "^4.0.1",
"buble": "^0.12.5", "buble": "^0.12.5",
"chalk": "^1.1.3", "chalk": "^1.1.3",
"codecov.io": "^0.1.6", "codecov.io": "^0.1.6",

6
rollup.config.js

@ -22,11 +22,7 @@ export default {
entry: 'src/rollup.js', entry: 'src/rollup.js',
plugins: [ plugins: [
buble({ buble({
include: [ 'node_modules/acorn/**' ] include: [ 'src/**', 'node_modules/acorn/**' ],
}),
buble({
include: [ 'src/**' ],
target: { target: {
node: 4 node: 4
} }

3
test/function/double-default-export/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' ); const assert = require( 'assert' );
module.exports = { module.exports = {
description: 'throws on double default exports', description: 'throws on double default exports',
error: err => { error: err => {
assert.equal( err.message, 'A module can only have one default export' ); assert.equal( err.message, `Duplicate export 'default' (2:7) in ${path.resolve(__dirname, 'foo.js')}` );
} }
}; };

3
test/function/double-named-export/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' ); const assert = require( 'assert' );
module.exports = { module.exports = {
description: 'throws on duplicate named exports', description: 'throws on duplicate named exports',
error: err => { error: err => {
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` ); assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` );
} }
}; };

3
test/function/double-named-reexport/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' ); const assert = require( 'assert' );
module.exports = { module.exports = {
description: 'throws on duplicate named exports', description: 'throws on duplicate named exports',
error: err => { error: err => {
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` ); assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` );
} }
}; };

Loading…
Cancel
Save