Skip to content

Commit 4f06a65

Browse files
committed
fix(data-uri): prepare for Rollup 3
BREAKING CHANGES: Requires Node 14
1 parent 6632d54 commit 4f06a65

File tree

6 files changed

+39
-31
lines changed

6 files changed

+39
-31
lines changed

β€Žpackages/data-uri/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## Requirements
1515

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

1818
## Install
1919

β€Žpackages/data-uri/package.jsonβ€Ž

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@
1313
"author": "shellscape",
1414
"homepage": "https://github.com/rollup/plugins/tree/master/packages/data-uri",
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+
"import": "./dist/es/index.js",
20+
"types": "./types/index.d.ts",
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"
@@ -47,15 +53,22 @@
4753
"url"
4854
],
4955
"peerDependencies": {
50-
"rollup": "^1.20.0||^2.0.0"
56+
"rollup": "^1.20.0||^2.0.0||^3.0.0"
57+
},
58+
"peerDependenciesMeta": {
59+
"rollup": {
60+
"optional": true
61+
}
62+
},
63+
"dependencies": {
64+
"@rollup/pluginutils": "^4.2.1"
5165
},
5266
"devDependencies": {
53-
"@rollup/plugin-typescript": "^5.0.2",
54-
"@rollup/pluginutils": "^3.0.1",
55-
"rollup": "^2.67.3",
56-
"typescript": "^4.1.2"
67+
"@rollup/plugin-typescript": "^8.5.0",
68+
"rollup": "^3.0.0-7",
69+
"typescript": "^4.8.3"
5770
},
58-
"types": "types/index.d.ts",
71+
"types": "./types/index.d.ts",
5972
"ava": {
6073
"workerThreads": false,
6174
"files": [

β€Žpackages/data-uri/rollup.config.jsβ€Ž

Lines changed: 0 additions & 13 deletions
This file was deleted.
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/data-uri/src/index.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function dataUri(): Plugin {
6666
} catch (e: any) {
6767
const error: RollupError = {
6868
message: e.toString(),
69-
parserError: e,
69+
cause: e,
7070
plugin: '@rollup/plugin-data-uri',
7171
pluginCode: 'DU$JSON'
7272
};

β€Žpnpm-lock.yamlβ€Ž

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

0 commit comments

Comments
Β (0)