Skip to content

Commit 2903f7b

Browse files
authored
fix(auto-install): prepare for Rollup 3 (#1271)
BREAKING CHANGES: Requires Node 14
1 parent 1ff46b2 commit 2903f7b

File tree

8 files changed

+42
-40
lines changed

8 files changed

+42
-40
lines changed

packages/auto-install/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/auto-install/package.json

+24-16
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/auto-install/#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+
"import": "./dist/es/index.js",
20+
"types": "./types/index.d.ts",
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",
@@ -31,6 +39,7 @@
3139
},
3240
"files": [
3341
"dist",
42+
"!dist/**/*.map",
3443
"types",
3544
"README.md",
3645
"LICENSE"
@@ -44,25 +53,24 @@
4453
"modules"
4554
],
4655
"peerDependencies": {
47-
"rollup": "^1.20.0||^2.0.0"
56+
"rollup": "^1.20.0||^2.0.0||^3.0.0"
57+
},
58+
"peerDependenciesMeta": {
59+
"rollup": {
60+
"optional": true
61+
}
4862
},
4963
"devDependencies": {
50-
"@rollup/plugin-node-resolve": "^8.4.0",
51-
"@rollup/plugin-typescript": "^5.0.2",
52-
"del": "^5.1.0",
64+
"@rollup/plugin-node-resolve": "^14.1.0",
65+
"@rollup/plugin-typescript": "^8.5.0",
66+
"del": "^6.1.1",
5367
"node-noop": "^1.0.0",
54-
"rollup": "^2.67.3",
55-
"typescript": "^4.1.2"
68+
"rollup": "^3.0.0-7",
69+
"typescript": "^4.8.3"
5670
},
57-
"types": "types/index.d.ts",
71+
"types": "./types/index.d.ts",
5872
"ava": {
59-
"babel": true,
60-
"extensions": [
61-
"ts"
62-
],
63-
"require": [
64-
"ts-node/register"
65-
],
73+
"workerThreads": false,
6674
"files": [
6775
"!**/fixtures/**",
6876
"!**/output/**",

packages/auto-install/rollup.config.js

-13
This file was deleted.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { readFileSync } from 'fs';
2+
3+
import { createConfig } from '../../shared/rollup.config.mjs';
4+
5+
export default createConfig({
6+
pkg: JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'))
7+
});

packages/auto-install/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { promisify } from 'util';
66

77
import { Plugin } from 'rollup';
88

9-
import { RollupAutoInstallOptions } from '../types';
9+
import type { RollupAutoInstallOptions } from '../types';
1010

1111
const execAsync = promisify(exec);
1212

Binary file not shown.
7 Bytes
Binary file not shown.

pnpm-lock.yaml

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)