Socket
Socket
Sign inDemoInstall

astro-icon

Package Overview
Dependencies
80
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

3

dist/loaders/loadLocalCollection.js

@@ -7,2 +7,5 @@ import { cleanupSVG, importDirectory, isEmptyColor, parseColors, runSVGO, } from "@iconify/tools";

keepTitles: true,
includeSubDirs: true,
ignoreImportErrors: "warn",
keyword: (file) => file.subdir + file.file,
});

@@ -9,0 +12,0 @@ // Validate, clean up, fix palette and optimize

9

dist/vite-plugin-astro-icon.js

@@ -21,3 +21,2 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";

collections = await loadIconifyCollections({ root, include });
logCollections(collections, ctx);
}

@@ -32,2 +31,3 @@ try {

}
logCollections(collections, { ...ctx, iconDir });
await generateIconTypeDefinitions(Object.values(collections), root);

@@ -39,3 +39,3 @@ return `export default ${JSON.stringify(collections)};\nexport const config = ${JSON.stringify({ include })}`;

}
function logCollections(collections, { logger }) {
function logCollections(collections, { logger, iconDir }) {
if (Object.keys(collections).length === 0) {

@@ -45,3 +45,6 @@ logger.warn("No icons detected!");

}
const names = Object.keys(collections);
const names = Object.keys(collections).filter((v) => v !== "local");
if (collections["local"]) {
names.unshift(iconDir);
}
logger.info(`Loaded icons from ${names.join(", ")}`);

@@ -48,0 +51,0 @@ }

{
"name": "astro-icon",
"version": "1.0.1",
"version": "1.0.2",
"type": "module",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc