Skip to content

Commit

Permalink
fix(run): prepare for Rollup 3
Browse files Browse the repository at this point in the history
BREAKING CHANGES: Requires Node 14
  • Loading branch information
lukastaegert committed Oct 10, 2022
1 parent bdc099e commit 6a23eb1
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 65 deletions.
4 changes: 4 additions & 0 deletions packages/run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

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

## Requirements

This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v2.0.0+.

## Install

Using npm:
Expand Down
37 changes: 23 additions & 14 deletions packages/run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
"author": "Rich Harris",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/run/#readme",
"bugs": "https://github.com/rollup/plugins/issues",
"main": "dist/index.js",
"module": "dist/index.es.js",
"main": "./dist/cjs/index.js",
"module": "./dist/es/index.js",
"exports": {
"types": "./types/index.d.ts",
"import": "./dist/es/index.js",
"default": "./dist/cjs/index.js"
},
"engines": {
"node": ">=8.0.0"
"node": ">=14.0.0"
},
"scripts": {
"build": "rollup -c",
Expand All @@ -33,6 +38,7 @@
},
"files": [
"dist",
"!dist/**/*.map",
"types",
"README.md",
"LICENSE"
Expand All @@ -43,23 +49,26 @@
"run"
],
"peerDependencies": {
"rollup": "^2.0.0"
"rollup": "^2.0.0||^3.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
},
"dependencies": {
"@types/node": "14.0.26"
"@types/node": "14.18.30"
},
"devDependencies": {
"@rollup/plugin-typescript": "^5.0.2",
"del": "^5.1.0",
"rollup": "^2.67.3",
"sinon": "9.0.2",
"typescript": "^4.1.2"
"@rollup/plugin-typescript": "^8.5.0",
"del": "^6.1.1",
"rollup": "^3.0.0-7",
"sinon": "^14.0.0",
"typescript": "^4.8.3"
},
"types": "types/index.d.ts",
"types": "./types/index.d.ts",
"ava": {
"babel": {
"compileEnhancements": false
},
"workerThreads": false,
"files": [
"!**/fixtures/**",
"!**/output/**",
Expand Down
13 changes: 0 additions & 13 deletions packages/run/rollup.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/run/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { readFileSync } from 'fs';

import { createConfig } from '../../shared/rollup.config.mjs';

export default createConfig({
pkg: JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'))
});
2 changes: 1 addition & 1 deletion packages/run/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolve, join, dirname } from 'path';

import { Plugin, RenderedChunk } from 'rollup';

import { RollupRunOptions } from '../types';
import type { RollupRunOptions } from '../types';

export default function run(opts: RollupRunOptions = {}): Plugin {
let input: string;
Expand Down
66 changes: 29 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a23eb1

Please sign in to comment.