Skip to content

Commit

Permalink
fix(url): 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 bffcfb2 commit 9573b9f
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 49 deletions.
2 changes: 1 addition & 1 deletion packages/url/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: 20 additions & 11 deletions packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
"author": "Arpad Borsos <arpad.borsos@googlemail.com>",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/url/#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": ">=10.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 @@
"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",
"make-dir": "^3.1.0",
"mime": "^2.4.6"
"mime": "^3.0.0"
},
"devDependencies": {
"del": "^5.1.0",
"globby": "^11.0.1",
"rollup": "^2.67.3"
"del": "^6.1.1",
"globby": "^11.1.0",
"rollup": "^3.0.0-7"
},
"types": "./types/index.d.ts",
"ava": {
"babel": {
"compileEnhancements": false
},
"workerThreads": false,
"files": [
"!**/fixtures/**",
"!**/output/**",
Expand Down
12 changes: 0 additions & 12 deletions packages/url/rollup.config.js

This file was deleted.

11 changes: 11 additions & 0 deletions packages/url/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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'))
}),
input: 'src/index.js',
plugins: []
};
30 changes: 15 additions & 15 deletions packages/url/test/snapshots/test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ Generated by [AVA](https://avajs.dev).

## copy "large" binary files, limit: 10

> Snapshot 1
`var svg = "98ea1a8cc8cd9baf.svg";␊
export { svg as default };␊
`

> Snapshot 2
[
'output/98ea1a8cc8cd9baf.svg',
]

## copy files with include by absolute path, limit: 0

> Snapshot 1
`var svg = "98ea1a8cc8cd9baf.svg";␊
Expand Down Expand Up @@ -255,18 +270,3 @@ Generated by [AVA](https://avajs.dev).
[
'output/dest/fixtures/6b71fbe07b498a82.png',
]

## copy files with include by absolute path, limit: 0

> Snapshot 1
`var svg = "98ea1a8cc8cd9baf.svg";␊
export { svg as default };␊
`

> Snapshot 2
[
'output/98ea1a8cc8cd9baf.svg',
]
Binary file modified packages/url/test/snapshots/test.js.snap
Binary file not shown.
28 changes: 18 additions & 10 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 9573b9f

Please sign in to comment.