Skip to content

Commit

Permalink
fix(auto-install): prepare for Rollup 3 (#1271)
Browse files Browse the repository at this point in the history
BREAKING CHANGES: Requires Node 14
  • Loading branch information
lukastaegert committed Oct 8, 2022
1 parent 1ff46b2 commit 2903f7b
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 40 deletions.
2 changes: 1 addition & 1 deletion packages/auto-install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Requirements

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

## Install

Expand Down
40 changes: 24 additions & 16 deletions packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@
"author": "Rich Harris",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/auto-install/#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": {
"import": "./dist/es/index.js",
"types": "./types/index.d.ts",
"default": "./dist/cjs/index.js"
},
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"build": "rollup -c",
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
Expand All @@ -31,6 +39,7 @@
},
"files": [
"dist",
"!dist/**/*.map",
"types",
"README.md",
"LICENSE"
Expand All @@ -44,25 +53,24 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0||^2.0.0"
"rollup": "^1.20.0||^2.0.0||^3.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-typescript": "^5.0.2",
"del": "^5.1.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@rollup/plugin-typescript": "^8.5.0",
"del": "^6.1.1",
"node-noop": "^1.0.0",
"rollup": "^2.67.3",
"typescript": "^4.1.2"
"rollup": "^3.0.0-7",
"typescript": "^4.8.3"
},
"types": "types/index.d.ts",
"types": "./types/index.d.ts",
"ava": {
"babel": true,
"extensions": [
"ts"
],
"require": [
"ts-node/register"
],
"workerThreads": false,
"files": [
"!**/fixtures/**",
"!**/output/**",
Expand Down
13 changes: 0 additions & 13 deletions packages/auto-install/rollup.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/auto-install/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/auto-install/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { promisify } from 'util';

import { Plugin } from 'rollup';

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

const execAsync = promisify(exec);

Expand Down
Binary file modified packages/auto-install/test/snapshots/npm-bare.js.snap
Binary file not shown.
Binary file modified packages/auto-install/test/snapshots/npm.js.snap
Binary file not shown.
18 changes: 9 additions & 9 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 2903f7b

Please sign in to comment.