@iconify/api
Advanced tools
Comparing version 3.1.0-beta.4 to 3.1.0-beta.5
@@ -0,1 +1,2 @@ | ||
import { createRequire } from 'node:module'; | ||
import { dirname } from 'node:path'; | ||
@@ -8,4 +9,7 @@ import { createIconSetsPackageImporter } from '../../importers/full/json.js'; | ||
export function createPackageIconSetImporter(packageName = '@iconify/json') { | ||
const dir = dirname(import.meta.resolve(`${packageName}/package.json`)); | ||
// const dir = dirname(import.meta.resolve(`${packageName}/package.json`)); | ||
const req = createRequire(import.meta.url); | ||
const filename = req.resolve(`${packageName}/package.json`); | ||
const dir = dirname(filename); | ||
return createIconSetsPackageImporter(new DirectoryDownloader(dir), {}); | ||
} |
@@ -17,6 +17,6 @@ import { getImporters } from './config/icon-sets.js'; | ||
importers = await getImporters(); | ||
for (let i = 0; i < importers.length; i++) { | ||
await importers[i].init(); | ||
} | ||
} | ||
for (let i = 0; i < importers.length; i++) { | ||
await importers[i].init(); | ||
} | ||
// Update | ||
@@ -23,0 +23,0 @@ setImporters(importers); |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "3.1.0-beta.4", | ||
"version": "3.1.0-beta.5", | ||
"publishConfig": { | ||
@@ -9,0 +9,0 @@ "access": "public", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
209737
6087