Skip to content

Commit b2d0988

Browse files
authored
fix(strip): prepare for Rollup 3 (#1284)
BREAKING CHANGES: Requires Node 14
1 parent bb4a21a commit b2d0988

File tree

8 files changed

+148
-143
lines changed

8 files changed

+148
-143
lines changed

packages/strip/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## Requirements
1515

16-
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
16+
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.
1717

1818
## Install
1919

packages/strip/package.json

+22-11
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@
1313
"author": "Rich Harris",
1414
"homepage": "https://github.com/rollup/plugins/tree/master/packages/strip#readme",
1515
"bugs": "https://github.com/rollup/plugins/issues",
16-
"main": "dist/index.js",
17-
"module": "dist/index.es.js",
16+
"main": "./dist/cjs/index.js",
17+
"module": "./dist/es/index.js",
18+
"exports": {
19+
"types": "./types/index.d.ts",
20+
"import": "./dist/es/index.js",
21+
"default": "./dist/cjs/index.js"
22+
},
23+
"engines": {
24+
"node": ">=14.0.0"
25+
},
1826
"scripts": {
1927
"build": "rollup -c",
2028
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
@@ -28,6 +36,7 @@
2836
},
2937
"files": [
3038
"dist",
39+
"!dist/**/*.map",
3140
"types"
3241
],
3342
"keywords": [
@@ -37,22 +46,24 @@
3746
"javascript"
3847
],
3948
"peerDependencies": {
40-
"rollup": "^1.20.0 || ^2.0.0"
49+
"rollup": "^1.20.0||^2.0.0||^3.0.0"
50+
},
51+
"peerDependenciesMeta": {
52+
"rollup": {
53+
"optional": true
54+
}
4155
},
4256
"dependencies": {
43-
"@rollup/pluginutils": "^3.1.0",
44-
"estree-walker": "^2.0.1",
45-
"magic-string": "^0.25.7"
57+
"@rollup/pluginutils": "^4.2.1",
58+
"estree-walker": "^2.0.2",
59+
"magic-string": "^0.26.4"
4660
},
4761
"devDependencies": {
48-
"acorn": "^7.3.1",
49-
"rollup": "^2.67.3"
62+
"acorn": "^8.8.0",
63+
"rollup": "^3.0.0-7"
5064
},
5165
"types": "./types/index.d.ts",
5266
"ava": {
53-
"babel": {
54-
"compileEnhancements": false
55-
},
5667
"files": [
5768
"!**/fixtures/**",
5869
"!**/helpers/**",

packages/strip/rollup.config.js

-10
This file was deleted.

packages/strip/rollup.config.mjs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { readFileSync } from 'fs';
2+
3+
import { createConfig } from '../../shared/rollup.config.mjs';
4+
5+
export default {
6+
...createConfig({
7+
pkg: JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'))
8+
}),
9+
input: 'src/index.js',
10+
plugins: []
11+
};

0 commit comments

Comments
 (0)