mirror of https://github.com/iconify/api.git
chore: revert mlly change
This commit is contained in:
parent
283142a8d7
commit
c153237943
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@iconify/api",
|
||||
"version": "3.1.0-beta.7",
|
||||
"version": "3.1.0-beta.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@iconify/api",
|
||||
"version": "3.1.0-beta.7",
|
||||
"version": "3.1.0-beta.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fastify/formbody": "^7.4.0",
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
"@iconify/types": "^2.0.0",
|
||||
"@iconify/utils": "^2.1.22",
|
||||
"dotenv": "^16.4.4",
|
||||
"fastify": "^4.26.1",
|
||||
"mlly": "^1.5.0"
|
||||
"fastify": "^4.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"description": "Iconify API",
|
||||
"author": "Vjacheslav Trushkin",
|
||||
"license": "MIT",
|
||||
"version": "3.1.0-beta.7",
|
||||
"version": "3.1.0-beta.8",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"tag": "next"
|
||||
|
|
@ -35,8 +35,7 @@
|
|||
"@iconify/types": "^2.0.0",
|
||||
"@iconify/utils": "^2.1.22",
|
||||
"dotenv": "^16.4.4",
|
||||
"fastify": "^4.26.1",
|
||||
"mlly": "^1.5.0"
|
||||
"fastify": "^4.26.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { createRequire } from 'node:module';
|
||||
import { dirname } from 'node:path';
|
||||
import { resolveSync } from 'mlly';
|
||||
import { Importer } from '../../types/importers.js';
|
||||
import { createIconSetsPackageImporter } from '../../importers/full/json.js';
|
||||
import { ImportedData } from '../../types/importers/common.js';
|
||||
|
|
@ -18,9 +18,8 @@ export function createPackageIconSetImporter(
|
|||
// Try to locate package
|
||||
let dir: string | undefined;
|
||||
try {
|
||||
const filename = resolveSync(`${packageName}/package.json`, {
|
||||
url: import.meta.url,
|
||||
});
|
||||
const req = createRequire(import.meta.url);
|
||||
const filename = req.resolve(`${packageName}/package.json`);
|
||||
dir = filename ? dirname(filename) : undefined;
|
||||
} catch (err) {
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue