Skip to content

Commit

Permalink
chore(url): BREAKING CHANGES: update pluginutils deps, extend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
r0b1n committed Apr 14, 2022
1 parent d28d19a commit 70220f0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"rollup": "^1.20.0||^2.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
"@rollup/pluginutils": "^4.2.1",
"make-dir": "^3.1.0",
"mime": "^2.4.6"
},
Expand Down
15 changes: 15 additions & 0 deletions packages/url/test/snapshots/test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,18 @@ 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.
10 changes: 9 additions & 1 deletion packages/url/test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { readFileSync } = require('fs');
const { join, posix, sep } = require('path');
const { join, posix, sep, resolve } = require('path');

const test = require('ava');
const del = require('del');
Expand Down Expand Up @@ -73,6 +73,14 @@ test.serial('copy "large" binary files, limit: 10', async (t) => {
await run(t, 'svg', { limit: 10, emitFiles: true });
});

test.serial('copy files with include by absolute path, limit: 0', async (t) => {
await run(t, 'svg', {
limit: 0,
emitFiles: true,
include: [resolve('.', 'fixtures', '*.svg')]
});
});

test.serial('use publicPath', async (t) => {
await run(t, 'png', { limit: 10, publicPath: '/batman/' });
});
Expand Down
12 changes: 10 additions & 2 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 70220f0

Please sign in to comment.