@iconify/tools 2.1.0-beta.2 → 2.1.0-beta.3
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.
- package/lib/download/git/index.cjs +0 -1
- package/lib/download/git/index.mjs +0 -1
- package/lib/download/git/reset.cjs +0 -1
- package/lib/download/git/reset.mjs +0 -1
- package/lib/download/index.cjs +0 -1
- package/lib/download/index.mjs +0 -1
- package/lib/export/helpers/types-version.cjs +3 -13
- package/lib/export/helpers/types-version.mjs +3 -13
- package/lib/export/icon-package.cjs +1 -3
- package/lib/export/icon-package.mjs +1 -3
- package/lib/export/json-package.cjs +1 -3
- package/lib/export/json-package.mjs +1 -3
- package/lib/index.cjs +0 -2
- package/lib/index.mjs +0 -2
- package/package.json +1 -1
package/lib/download/index.cjs
CHANGED
|
@@ -42,7 +42,6 @@ require('../icon-set/props.cjs');
|
|
|
42
42
|
require('@iconify/utils/lib/misc/objects');
|
|
43
43
|
require('tar');
|
|
44
44
|
require('@iconify/utils/lib/colors');
|
|
45
|
-
require('local-pkg');
|
|
46
45
|
require('./helpers/untar.cjs');
|
|
47
46
|
require('./npm/version.cjs');
|
|
48
47
|
require('./gitlab/hash.cjs');
|
package/lib/download/index.mjs
CHANGED
|
@@ -2,21 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
require('local-pkg');
|
|
6
|
+
require('fs');
|
|
7
7
|
|
|
8
|
-
let cache;
|
|
9
|
-
async function getVersion() {
|
|
10
|
-
const packageName = "@iconify/types/package.json";
|
|
11
|
-
const filename = localPkg.resolveModule(packageName);
|
|
12
|
-
if (!filename) {
|
|
13
|
-
throw new Error(`Cannot resolve ${packageName}`);
|
|
14
|
-
}
|
|
15
|
-
const content = JSON.parse(await fs.promises.readFile(filename, "utf8"));
|
|
16
|
-
return cache = content.version;
|
|
17
|
-
}
|
|
18
8
|
async function getTypesVersion() {
|
|
19
|
-
|
|
9
|
+
throw new Error(`getTypesVersion() is deprecated, use wildcard to make packages work with all versions`);
|
|
20
10
|
}
|
|
21
11
|
|
|
22
12
|
exports.getTypesVersion = getTypesVersion;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import 'local-pkg';
|
|
2
|
+
import 'fs';
|
|
3
3
|
|
|
4
|
-
let cache;
|
|
5
|
-
async function getVersion() {
|
|
6
|
-
const packageName = "@iconify/types/package.json";
|
|
7
|
-
const filename = resolveModule(packageName);
|
|
8
|
-
if (!filename) {
|
|
9
|
-
throw new Error(`Cannot resolve ${packageName}`);
|
|
10
|
-
}
|
|
11
|
-
const content = JSON.parse(await promises.readFile(filename, "utf8"));
|
|
12
|
-
return cache = content.version;
|
|
13
|
-
}
|
|
14
4
|
async function getTypesVersion() {
|
|
15
|
-
|
|
5
|
+
throw new Error(`getTypesVersion() is deprecated, use wildcard to make packages work with all versions`);
|
|
16
6
|
}
|
|
17
7
|
|
|
18
8
|
export { getTypesVersion };
|
|
@@ -5,10 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const export_helpers_prepare = require('./helpers/prepare.cjs');
|
|
7
7
|
const misc_writeJson = require('../misc/write-json.cjs');
|
|
8
|
-
const export_helpers_typesVersion = require('./helpers/types-version.cjs');
|
|
9
8
|
const export_helpers_customFiles = require('./helpers/custom-files.cjs');
|
|
10
9
|
require('pathe');
|
|
11
|
-
require('local-pkg');
|
|
12
10
|
|
|
13
11
|
const defaultTypesContent = `import type { IconifyIcon } from '@iconify/types';
|
|
14
12
|
declare const data: IconifyIcon;
|
|
@@ -48,7 +46,7 @@ async function exportIconPackage(iconSet, options) {
|
|
|
48
46
|
iconSetInfo: info,
|
|
49
47
|
...customPackageProps,
|
|
50
48
|
dependencies: dependencies || {
|
|
51
|
-
"@iconify/types": "
|
|
49
|
+
"@iconify/types": "*"
|
|
52
50
|
}
|
|
53
51
|
};
|
|
54
52
|
await misc_writeJson.writeJSONFile(dir + "/package.json", packageJSON);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
2
|
import { prepareDirectoryForExport } from './helpers/prepare.mjs';
|
|
3
3
|
import { writeJSONFile } from '../misc/write-json.mjs';
|
|
4
|
-
import { getTypesVersion } from './helpers/types-version.mjs';
|
|
5
4
|
import { exportCustomFiles } from './helpers/custom-files.mjs';
|
|
6
5
|
import 'pathe';
|
|
7
|
-
import 'local-pkg';
|
|
8
6
|
|
|
9
7
|
const defaultTypesContent = `import type { IconifyIcon } from '@iconify/types';
|
|
10
8
|
declare const data: IconifyIcon;
|
|
@@ -44,7 +42,7 @@ async function exportIconPackage(iconSet, options) {
|
|
|
44
42
|
iconSetInfo: info,
|
|
45
43
|
...customPackageProps,
|
|
46
44
|
dependencies: dependencies || {
|
|
47
|
-
"@iconify/types": "
|
|
45
|
+
"@iconify/types": "*"
|
|
48
46
|
}
|
|
49
47
|
};
|
|
50
48
|
await writeJSONFile(dir + "/package.json", packageJSON);
|
|
@@ -6,10 +6,8 @@ const fs = require('fs');
|
|
|
6
6
|
const defaults = require('@iconify/utils/lib/icon/defaults');
|
|
7
7
|
const export_helpers_prepare = require('./helpers/prepare.cjs');
|
|
8
8
|
const misc_writeJson = require('../misc/write-json.cjs');
|
|
9
|
-
const export_helpers_typesVersion = require('./helpers/types-version.cjs');
|
|
10
9
|
const export_helpers_customFiles = require('./helpers/custom-files.cjs');
|
|
11
10
|
require('pathe');
|
|
12
|
-
require('local-pkg');
|
|
13
11
|
|
|
14
12
|
const exportTypes = {
|
|
15
13
|
icons: "IconifyJSON",
|
|
@@ -76,7 +74,7 @@ async function exportJSONPackage(iconSet, options) {
|
|
|
76
74
|
exports: packageJSONExports,
|
|
77
75
|
iconSet: packageJSONIconSet,
|
|
78
76
|
dependencies: dependencies || {
|
|
79
|
-
"@iconify/types": "
|
|
77
|
+
"@iconify/types": "*"
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
80
|
const dtsContent = [];
|
|
@@ -2,10 +2,8 @@ import { promises } from 'fs';
|
|
|
2
2
|
import { defaultIconDimensions } from '@iconify/utils/lib/icon/defaults';
|
|
3
3
|
import { prepareDirectoryForExport } from './helpers/prepare.mjs';
|
|
4
4
|
import { writeJSONFile } from '../misc/write-json.mjs';
|
|
5
|
-
import { getTypesVersion } from './helpers/types-version.mjs';
|
|
6
5
|
import { exportCustomFiles } from './helpers/custom-files.mjs';
|
|
7
6
|
import 'pathe';
|
|
8
|
-
import 'local-pkg';
|
|
9
7
|
|
|
10
8
|
const exportTypes = {
|
|
11
9
|
icons: "IconifyJSON",
|
|
@@ -72,7 +70,7 @@ async function exportJSONPackage(iconSet, options) {
|
|
|
72
70
|
exports: packageJSONExports,
|
|
73
71
|
iconSet: packageJSONIconSet,
|
|
74
72
|
dependencies: dependencies || {
|
|
75
|
-
"@iconify/types": "
|
|
73
|
+
"@iconify/types": "*"
|
|
76
74
|
}
|
|
77
75
|
};
|
|
78
76
|
const dtsContent = [];
|
package/lib/index.cjs
CHANGED
|
@@ -83,10 +83,8 @@ require('stream');
|
|
|
83
83
|
require('extract-zip');
|
|
84
84
|
require('tar');
|
|
85
85
|
require('@iconify/utils/lib/colors');
|
|
86
|
-
require('local-pkg');
|
|
87
86
|
require('./download/gitlab/types.cjs');
|
|
88
87
|
require('./colors/attribs.cjs');
|
|
89
|
-
require('./export/helpers/types-version.cjs');
|
|
90
88
|
require('./export/helpers/custom-files.cjs');
|
|
91
89
|
|
|
92
90
|
|
package/lib/index.mjs
CHANGED
|
@@ -79,8 +79,6 @@ import 'stream';
|
|
|
79
79
|
import 'extract-zip';
|
|
80
80
|
import 'tar';
|
|
81
81
|
import '@iconify/utils/lib/colors';
|
|
82
|
-
import 'local-pkg';
|
|
83
82
|
import './download/gitlab/types.mjs';
|
|
84
83
|
import './colors/attribs.mjs';
|
|
85
|
-
import './export/helpers/types-version.mjs';
|
|
86
84
|
import './export/helpers/custom-files.mjs';
|
package/package.json
CHANGED
|
@@ -3,7 +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": "2.1.0-beta.
|
|
6
|
+
"version": "2.1.0-beta.3",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"bugs": "https://github.com/iconify/tools/issues",
|
|
9
9
|
"homepage": "https://github.com/iconify/tools",
|