Skip to content

Commit

Permalink
deps: upgrade to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco committed Jun 11, 2024
1 parent 4828679 commit ebc5779
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 156 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"ofetch": "^1.3.3",
"pathe": "^1.1.1",
"sharp": "^0.32.6",
"svgo": "^3.0.2",
"svgo": "^4.0.0-rc.0",
"ufo": "^1.3.1",
"unstorage": "^1.9.0",
"xss": "^1.0.14"
Expand All @@ -69,4 +69,4 @@
"vitest": "^0.34.6"
},
"packageManager": "[email protected]"
}
}
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

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

7 changes: 3 additions & 4 deletions src/ipx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ export function createIPX(userOptions: IPXOptions): IPX {

const getSVGO = cachedPromise(async () => {
const { optimize } = await import("svgo");
const { xss } = await import("./lib/svgo-xss");
return { optimize, xss };
return { optimize };
});

return function ipx(id, modifiers = {}, opts = {}) {
Expand Down Expand Up @@ -176,10 +175,10 @@ export function createIPX(userOptions: IPXOptions): IPX {
};
} else {
// https://github.com/svg/svgo
const { optimize, xss } = await getSVGO();
const { optimize } = await getSVGO();
const svg = optimize(sourceData.toString("utf8"), {
...options.svgo,
plugins: [xss, ...(options.svgo?.plugins || [])],
plugins: ["removeScripts", ...(options.svgo?.plugins || [])],
}).data;
return {
data: svg,
Expand Down
133 changes: 0 additions & 133 deletions src/lib/svgo-xss.ts

This file was deleted.

0 comments on commit ebc5779

Please sign in to comment.