Skip to content

Commit

Permalink
refactor: audit for [email protected] (#244)
Browse files Browse the repository at this point in the history
* chore: prepare for Rollup 2

* chore(commonjs): fix separator in test

* chore: Use actual Rollup 2

* chore: fix peerDependencies version ranges
  • Loading branch information
lukastaegert authored Mar 18, 2020
1 parent bf94a85 commit 371f424
Show file tree
Hide file tree
Showing 29 changed files with 186 additions and 186 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"pnpm": "^4.6.0",
"prettier": "^1.19.1",
"prettier-plugin-package": "^0.3.1",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"ts-node": "^8.5.4",
"tsconfig-paths": "^3.9.0",
"tslib": "^1.10.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/alias/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"alias"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"slash": "^3.0.0"
Expand All @@ -52,7 +52,7 @@
"@rollup/plugin-node-resolve": "^7.0.0",
"@rollup/plugin-typescript": "^3.0.0",
"del-cli": "^3.0.0",
"rollup": "^1.27.14"
"rollup": "^2.0.0"
},
"ava": {
"compileEnhancements": false,
Expand Down
3 changes: 1 addition & 2 deletions packages/alias/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,11 @@ test('Alias + rollup-plugin-node-resolve', (t) =>
.then(getModuleIdsFromBundle)
.then((moduleIds) => {
const normalizedIds = moduleIds.map((id) => path.resolve(id)).sort();
t.is(normalizedIds.length, 7);
t.is(normalizedIds.length, 6);
[
'/fixtures/aliasMe.js',
'/fixtures/folder/anotherNumber.js',
'/fixtures/folder/deep/deep2/index.js',
'/fixtures/folder/index.js',
'/fixtures/index.js',
'/fixtures/localAliasMe.js',
'/fixtures/nonAliased.js'
Expand Down
4 changes: 2 additions & 2 deletions packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^7.0.0",
"@rollup/plugin-typescript": "^3.0.0",
"del": "^5.1.0",
"node-noop": "^1.0.0",
"rollup": "^1.27.14"
"rollup": "^2.0.0"
},
"ava": {
"compileEnhancements": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/beep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"rollup"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"rollup": "^1.20.0",
"rollup": "^2.0.0",
"strip-ansi": "^5.2.0"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions packages/buble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.8",
Expand All @@ -56,7 +56,7 @@
"devDependencies": {
"@rollup/plugin-typescript": "^3.0.0",
"del-cli": "^3.0.0",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"source-map": "^0.7.3",
"typescript": "^3.7.4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"require"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.8",
Expand All @@ -65,7 +65,7 @@
"locate-character": "^2.0.5",
"prettier": "^1.19.1",
"require-relative": "^0.8.7",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"rollup-plugin-babel": "^4.3.3",
"shx": "^0.3.2",
"source-map": "^0.6.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/commonjs/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ test('does not reexport named contents', async (t) => {
} catch (error) {
t.is(
error.message,
`'named' is not exported by fixtures${path.sep}samples${path.sep}reexport${path.sep}reexport.js`
`'named' is not exported by fixtures${path.sep}samples${path.sep}reexport${path.sep}reexport.js, ` +
`imported by fixtures${path.sep}samples${path.sep}reexport${path.sep}main.js`
);
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/data-uri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"url"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^3.0.0",
"@rollup/pluginutils": "^3.0.1",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"typescript": "^3.7.4"
},
"ava": {
Expand Down
2 changes: 1 addition & 1 deletion packages/dsv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"del-cli": "^3.0.0",
"rollup": "^1.27.14"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/html/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { extname } = require('path');

const getFiles = (bundle) => {
const files = Object.values(bundle).filter(
(file) => file.isEntry || file.type === 'asset' || file.isAsset
(file) => file.isEntry || (typeof file.type === 'string' ? file.type === 'asset' : file.isAsset)
);
const result = {};
for (const file of files) {
Expand Down
4 changes: 2 additions & 2 deletions packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"template"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"rollup": "^1.27.5",
"rollup": "^2.0.0",
"rollup-plugin-postcss": "^2.0.3"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions packages/image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.4",
"mini-svg-data-uri": "^1.1.3"
},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.0",
"rollup": "^1.29.0"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/inject/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.4",
Expand All @@ -54,7 +54,7 @@
"@rollup/plugin-buble": "^0.21.0",
"del-cli": "^3.0.0",
"locate-character": "^2.0.5",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"source-map": "^0.7.3",
"typescript": "^3.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.8"
Expand Down
4 changes: 2 additions & 2 deletions packages/legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"plugin"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"@rollup/plugin-buble": "^0.20.0",
"del-cli": "^3.0.0",
"rollup": "^1.27.2"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/multi-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
"entries"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"matched": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"rollup": "^1.20.1",
"rollup": "^2.0.0",
"rollup-plugin-babel": "^4.0.3"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions packages/node-resolve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.8",
Expand All @@ -59,7 +59,7 @@
"@babel/preset-env": "^7.8.3",
"@rollup/plugin-json": "^4.0.1",
"es5-ext": "^0.10.53",
"rollup": "^1.29.0",
"rollup": "^2.0.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"source-map": "^0.7.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/pluginutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"utils"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@types/estree": "0.0.39",
Expand Down
4 changes: 2 additions & 2 deletions packages/replace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.8",
Expand All @@ -53,7 +53,7 @@
"@rollup/plugin-buble": "^0.21.0",
"del-cli": "^3.0.0",
"locate-character": "^2.0.5",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"source-map": "^0.7.3",
"typescript": "^3.7.4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"run"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"@types/node": "13.1.6",
"del": "^5.1.0",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"sinon": "8.0.4"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions packages/strip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"javascript"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.4",
Expand All @@ -43,7 +43,7 @@
},
"devDependencies": {
"acorn": "7.1.0",
"rollup": "^1.27.14"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/sucrase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"jsx"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.1",
"sucrase": "^3.10.1"
},
"devDependencies": {
"rollup": "^1.27.13"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"es2015"
],
"peerDependencies": {
"rollup": "^1.20.0",
"rollup": "^1.20.0||^2.0.0",
"tslib": "*",
"typescript": ">=2.1.0"
},
Expand All @@ -57,7 +57,7 @@
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-typescript": "^3.0.0",
"buble": "^0.19.8",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"tslib": "^1.10.0",
"typescript": "^3.7.4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"url"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.0.4",
Expand All @@ -54,7 +54,7 @@
"@babel/register": "^7.7.7",
"del": "^5.1.0",
"globby": "^10.0.1",
"rollup": "^1.27.14",
"rollup": "^2.0.0",
"rollup-plugin-babel": "^4.3.3"
},
"ava": {
Expand Down
4 changes: 2 additions & 2 deletions packages/virtual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"virtual"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^7.0.0",
"rollup": "^1.27.14"
"rollup": "^2.0.0"
},
"ava": {
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"emscripten"
],
"peerDependencies": {
"rollup": "^1.20.0"
"rollup": "^1.20.0||^2.0.0"
},
"devDependencies": {
"del-cli": "^3.0.0",
"rollup": "^1.20.0",
"rollup": "^2.0.0",
"source-map": "^0.7.3"
},
"ava": {
Expand Down
Loading

0 comments on commit 371f424

Please sign in to comment.