Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

astro-icon

Package Overview
Dependencies
Maintainers
1
Versions
31
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.0.0 to 1.0.1

32

dist/loaders/loadIconifyCollections.js
import { readFile } from "node:fs/promises";
import { detectAgent } from "@skarab/detect-package-manager";
import { getIcons } from "@iconify/utils";
import { loadCollectionFromFS } from "@iconify/utils/lib/loader/fs";
import { fileURLToPath } from "node:url";
import { promisify } from "node:util";

@@ -49,27 +47,9 @@ import { exec } from "node:child_process";

try {
const agent = await detectAgent(fileURLToPath(root));
let packages = [];
if (!agent) {
const text = await readFile(new URL("./package.json", root), {
encoding: "utf8",
});
const { dependencies = {}, devDependencies = {} } = JSON.parse(text);
packages.push(...Object.keys(dependencies));
packages.push(...Object.keys(devDependencies));
}
else {
const { stdout: text } = await execa(`${agent.name} list --json`);
const data = JSON.parse(text);
if (Array.isArray(data)) {
for (const { dependencies = {}, devDependencies = {} } of data) {
packages.push(...Object.keys(dependencies));
packages.push(...Object.keys(devDependencies));
}
}
else {
const { dependencies = {}, devDependencies = {} } = data;
packages.push(...Object.keys(dependencies));
packages.push(...Object.keys(devDependencies));
}
}
const text = await readFile(new URL("./package.json", root), {
encoding: "utf8",
});
const { dependencies = {}, devDependencies = {} } = JSON.parse(text);
packages.push(...Object.keys(dependencies));
packages.push(...Object.keys(devDependencies));
const collections = packages

@@ -76,0 +56,0 @@ .filter((name) => name.startsWith("@iconify-json/"))

5

package.json
{
"name": "astro-icon",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",

@@ -47,4 +47,3 @@ "types": "./dist/index.d.ts",

"@iconify/types": "^2.0.0",
"@iconify/utils": "^2.1.5",
"@skarab/detect-package-manager": "^1.0.0"
"@iconify/utils": "^2.1.5"
},

@@ -51,0 +50,0 @@ "devDependencies": {

@@ -233,3 +233,3 @@ # Astro Icon

`astro-icon` v1 contains a number of breaking changes. Please reference the [**Migrate to `astro-icon` v1** guide](https://github.com/natemoo-re/astro-icon/tree/main/docs/migrate-to-v1.md) to update from older versions of `astro-icon`.
`astro-icon` v1 contains a number of breaking changes. Please reference the [**Migrate to `astro-icon` v1** guide](https://www.astroicon.dev/guides/upgrade/v1/) to update from older versions of `astro-icon`.

@@ -236,0 +236,0 @@ ## Contributing

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