Skip to content

Commit

Permalink
fix(image): 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 9, 2022
1 parent 6bca9da commit 31a3f72
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 35 deletions.
2 changes: 1 addition & 1 deletion packages/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Images are encoded using base64, which means they will be 33% larger than the si

## 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
29 changes: 19 additions & 10 deletions packages/image/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/image/#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": ">= 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 @@ -44,21 +50,24 @@
"modules"
],
"peerDependencies": {
"rollup": "^1.20.0 || ^2.0.0"
"rollup": "^1.20.0||^2.0.0||^3.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
},
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
"mini-svg-data-uri": "^1.2.3"
"@rollup/pluginutils": "^4.2.1",
"mini-svg-data-uri": "^1.4.4"
},
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"rollup": "^2.67.3"
"rollup": "^3.0.0-7"
},
"types": "./types/index.d.ts",
"ava": {
"babel": {
"compileEnhancements": false
},
"workerThreads": false,
"files": [
"!**/fixtures/**",
"!**/helpers/**",
Expand Down
13 changes: 0 additions & 13 deletions packages/image/rollup.config.js

This file was deleted.

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

import buble from '@rollup/plugin-buble';

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

export default {
...createConfig({
pkg: JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'))
}),
input: 'src/index.js',
plugins: [buble()]
};
10 changes: 5 additions & 5 deletions packages/image/test/snapshots/test.js.md

Large diffs are not rendered by default.

Binary file modified packages/image/test/snapshots/test.js.snap
Binary file not shown.
12 changes: 6 additions & 6 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 31a3f72

Please sign in to comment.