Skip to content

Commit 32e4d6a

Browse files
committed
fix(run): prepare for Rollup 3
BREAKING CHANGES: Requires Node 14
1 parent 32aa6d2 commit 32e4d6a

File tree

7 files changed

+102
-66
lines changed

7 files changed

+102
-66
lines changed

packages/run/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
Using this plugin gives much faster results compared to what you would do with [nodemon](https://nodemon.io/).
1515

16+
## Requirements
17+
18+
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v2.0.0+.
19+
1620
## Install
1721

1822
Using npm:

packages/run/package.json

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@
1313
"author": "Rich Harris",
1414
"homepage": "https://github.com/rollup/plugins/tree/master/packages/run/#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+
},
1823
"engines": {
19-
"node": ">=8.0.0"
24+
"node": ">=14.0.0"
2025
},
2126
"scripts": {
2227
"build": "rollup -c",
@@ -33,6 +38,7 @@
3338
},
3439
"files": [
3540
"dist",
41+
"!dist/**/*.map",
3642
"types",
3743
"README.md",
3844
"LICENSE"
@@ -43,23 +49,26 @@
4349
"run"
4450
],
4551
"peerDependencies": {
46-
"rollup": "^2.0.0"
52+
"rollup": "^2.0.0||^3.0.0"
53+
},
54+
"peerDependenciesMeta": {
55+
"rollup": {
56+
"optional": true
57+
}
4758
},
4859
"dependencies": {
49-
"@types/node": "14.0.26"
60+
"@types/node": "14.18.30"
5061
},
5162
"devDependencies": {
52-
"@rollup/plugin-typescript": "^5.0.2",
53-
"del": "^5.1.0",
54-
"rollup": "^2.67.3",
55-
"sinon": "9.0.2",
56-
"typescript": "^4.1.2"
63+
"@rollup/plugin-typescript": "^8.5.0",
64+
"del": "^6.1.1",
65+
"rollup": "^3.0.0-7",
66+
"sinon": "^14.0.0",
67+
"typescript": "^4.8.3"
5768
},
58-
"types": "types/index.d.ts",
69+
"types": "./types/index.d.ts",
5970
"ava": {
60-
"babel": {
61-
"compileEnhancements": false
62-
},
71+
"workerThreads": false,
6372
"files": [
6473
"!**/fixtures/**",
6574
"!**/output/**",

packages/run/rollup.config.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/run/rollup.config.mjs

Lines changed: 7 additions & 0 deletions
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/run/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { resolve, join, dirname } from 'path';
33

44
import { Plugin, RenderedChunk } from 'rollup';
55

6-
import { RollupRunOptions } from '../types';
6+
import type { RollupRunOptions } from '../types';
77

88
export default function run(opts: RollupRunOptions = {}): Plugin {
99
let input: string;

pnpm-lock.yaml

Lines changed: 66 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"pretty": true,
1313
"sourceMap": true,
1414
"strict": true,
15-
"target": "es2017"
15+
"target": "es2019"
1616
},
1717
"exclude": ["dist", "node_modules", "test/types"]
1818
}

0 commit comments

Comments
 (0)