New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

astro-icon

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-icon - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

12

dist/vite-plugin-astro-icon.js

@@ -0,5 +1,6 @@

import { createHash } from "node:crypto";
import { parse, resolve } from "node:path";
import { mkdir, readFile, writeFile } from "node:fs/promises";
import loadLocalCollection from "./loaders/loadLocalCollection.js";
import loadIconifyCollections from "./loaders/loadIconifyCollections.js";
import { createHash } from "node:crypto";
export function createPlugin({ include = {}, iconDir = "src/icons", svgoOptions }, ctx) {

@@ -36,3 +37,10 @@ let collections;

watcher.add(`${iconDir}/**/*.svg`);
watcher.on("change", async () => {
watcher.on("all", async (_, filepath) => {
const parsedPath = parse(filepath);
const resolvedIconDir = resolve(root.pathname, iconDir);
const isSvgFileInIconDir = parsedPath.dir.startsWith(resolvedIconDir) &&
parsedPath.ext === ".svg";
const isAstroConfig = parsedPath.name === "astro.config";
if (!isSvgFileInIconDir && !isAstroConfig)
return;
console.log(`Local icons changed, reloading`);

@@ -39,0 +47,0 @@ try {

2

package.json
{
"name": "astro-icon",
"version": "1.1.4",
"version": "1.1.5",
"type": "module",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc