Skip to content

Commit

Permalink
fix(data-uri): 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 Sep 30, 2022
1 parent 32aa6d2 commit 1b7f748
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/data-uri/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
31 changes: 22 additions & 9 deletions packages/data-uri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
"author": "shellscape",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/data-uri",
"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 @@ -47,15 +53,22 @@
"url"
],
"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": "^4.2.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^5.0.2",
"@rollup/pluginutils": "^3.0.1",
"rollup": "^2.67.3",
"typescript": "^4.1.2"
"@rollup/plugin-typescript": "^8.5.0",
"rollup": "^3.0.0-7",
"typescript": "^4.8.3"
},
"types": "types/index.d.ts",
"types": "./types/index.d.ts",
"ava": {
"workerThreads": false,
"files": [
Expand Down
13 changes: 0 additions & 13 deletions packages/data-uri/rollup.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/data-uri/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/data-uri/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function dataUri(): Plugin {
} catch (e: any) {
const error: RollupError = {
message: e.toString(),
parserError: e,
cause: e,
plugin: '@rollup/plugin-data-uri',
pluginCode: 'DU$JSON'
};
Expand Down
52 changes: 45 additions & 7 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"pretty": true,
"sourceMap": true,
"strict": true,
"target": "es2017"
"target": "es2019"
},
"exclude": ["dist", "node_modules", "test/types"]
}

0 comments on commit 1b7f748

Please sign in to comment.