Skip to content

Commit bc251bd

Browse files
committed
chore: explicit peerDependencies on rollup ^1.0.0
1 parent 5f21686 commit bc251bd

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.babelrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
22
"presets": [
3-
"@babel/preset-env"
3+
[
4+
"@babel/preset-env", {
5+
"modules": "cjs",
6+
"targets": {
7+
"node": "6"
8+
}
9+
}
10+
]
11+
412
],
513

614
"plugins": [

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"rollup",
3131
"rollup-plugin"
3232
],
33+
"peerDependencies": {
34+
"rollup": "^1.0.0"
35+
},
3336
"devDependencies": {
3437
"@babel/core": "7.9.0",
3538
"@babel/preset-env": "7.9.0",
@@ -52,5 +55,8 @@
5255
"rimraf": "3.0.2",
5356
"rollup": "1.32.0",
5457
"tmp": "0.1.0"
58+
},
59+
"engines": {
60+
"node": ">=6.0.0"
5561
}
5662
}

test/index.spec.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import plugin from '../src/index.js';
2828
import {joinLines} from './utils/join-lines';
2929

3030
describe('rollup-plugin-strip-banner', () => {
31-
it('should strip banner and generate sourceMap by default', () => {
31+
it('should strip banner and generate sourcemap', () => {
3232
const instance = plugin();
3333
const id = 'test-file.js';
3434
const code = fs.readFileSync(path.join(__dirname, 'fixtures', id), 'utf-8');
@@ -47,44 +47,33 @@ describe('rollup-plugin-strip-banner', () => {
4747

4848
it('should ignore source if it is does not have banner', () => {
4949
const id = 'test-file-without-banner.js';
50-
51-
const instance = plugin({
52-
sourceMap: false,
53-
});
54-
50+
const instance = plugin();
5551
const code = fs.readFileSync(path.join(__dirname, 'fixtures', id), 'utf-8');
56-
5752
const result = instance.transform(code, id);
5853

5954
expect(result).not.toBeDefined();
6055
});
6156

6257
it('should ignore source if it is not included', () => {
6358
const id = 'test-file.js';
64-
6559
const instance = plugin({
66-
sourceMap: false,
6760
include: '**/*.spec.js',
6861
});
6962

7063
const code = fs.readFileSync(path.join(__dirname, 'fixtures', id), 'utf-8');
71-
7264
const result = instance.transform(code, id);
7365

7466
expect(result).not.toBeDefined();
7567
});
7668

7769
it('should ignore source if it is excluded', () => {
7870
const id = 'test-file.js';
79-
8071
const instance = plugin({
81-
sourceMap: false,
8272
include: '**/*test*.js',
8373
exclude: id,
8474
});
8575

8676
const code = fs.readFileSync(path.join(__dirname, 'fixtures', id), 'utf-8');
87-
8877
const result = instance.transform(code, id);
8978

9079
expect(result).not.toBeDefined();

0 commit comments

Comments
 (0)