@iconify/tools 5.0.0-beta.5 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,7 +44,7 @@ async function getAPICache(dir, key) {
|
|
|
44
44
|
try {
|
|
45
45
|
const content = JSON.parse(await promises.readFile(item.filename, "utf8"));
|
|
46
46
|
return content.version === cacheVersion && content.expires > time ? content.data : null;
|
|
47
|
-
} catch
|
|
47
|
+
} catch {
|
|
48
48
|
return null;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -63,7 +63,7 @@ async function getStoredFiles(dir, clear = false) {
|
|
|
63
63
|
storedFiles[dir] = storage;
|
|
64
64
|
try {
|
|
65
65
|
await promises.mkdir(dir, { recursive: true });
|
|
66
|
-
} catch
|
|
66
|
+
} catch {}
|
|
67
67
|
await scanDirectory(dir, async (ext, file, subdir, path) => {
|
|
68
68
|
if (ext !== ".json") return false;
|
|
69
69
|
const filename = path + subdir + file + ext;
|
|
@@ -16,7 +16,7 @@ async function downloadNPMPackage(options) {
|
|
|
16
16
|
else expectedVersion = null;
|
|
17
17
|
else expectedVersion = ifModifiedSince === true ? await getPackageVersion(contentsDir) : ifModifiedSince;
|
|
18
18
|
if (version === expectedVersion) return "not_modified";
|
|
19
|
-
} catch
|
|
19
|
+
} catch {
|
|
20
20
|
options.cleanup = true;
|
|
21
21
|
}
|
|
22
22
|
const archiveURL = versionInfo.file;
|
|
@@ -26,7 +26,7 @@ async function downloadNPMPackage(options) {
|
|
|
26
26
|
let archiveExists = false;
|
|
27
27
|
try {
|
|
28
28
|
archiveExists = (await promises.stat(archiveTarget)).isFile();
|
|
29
|
-
} catch
|
|
29
|
+
} catch {}
|
|
30
30
|
if (!archiveExists) {
|
|
31
31
|
if (options.log) console.log(`Downloading ${archiveURL}`);
|
|
32
32
|
await downloadFile({
|
|
@@ -11,7 +11,7 @@ async function exportCustomFiles(dir, options, result) {
|
|
|
11
11
|
if (content === null) {
|
|
12
12
|
try {
|
|
13
13
|
await promises.unlink(dir + "/" + filename);
|
|
14
|
-
} catch
|
|
14
|
+
} catch {}
|
|
15
15
|
continue;
|
|
16
16
|
}
|
|
17
17
|
if (typeof content === "string") await promises.writeFile(dir + "/" + filename, content, "utf8");
|
package/package.json
CHANGED
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Collection of functions for cleaning up and parsing SVG for Iconify project",
|
|
5
5
|
"author": "Vjacheslav Trushkin",
|
|
6
|
-
"version": "5.0.0
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"tag": "next"
|
|
9
|
-
},
|
|
6
|
+
"version": "5.0.0",
|
|
10
7
|
"license": "MIT",
|
|
11
8
|
"bugs": "https://github.com/iconify/tools/issues",
|
|
12
9
|
"homepage": "https://github.com/iconify/tools",
|