@depict-ai/utilishared 1.0.28 → 1.0.30
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/ES10/index.cjs +8967 -0
- package/{dist → ES10}/index.d.ts +1208 -1116
- package/ES10/index.js +8708 -0
- package/latest/index.cjs +8336 -0
- package/latest/index.d.ts +2534 -0
- package/latest/index.js +8077 -0
- package/multi_import_deduplicator.cjs +31 -0
- package/multi_import_deduplicator.mjs +31 -0
- package/package.json +50 -14
- package/dist/main.cjs +0 -8930
- package/dist/module.js +0 -8664
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To prevent that people accidentally import multiple flavours of the same type (i.e. @depict-ai/utilishared/latest and @depict-ai/utilishared/ES7) we have this module which needs to not be transformed by babel or bundled by parcel and therefore has to support ES5
|
|
3
|
+
*/
|
|
4
|
+
var versions_imported = [];
|
|
5
|
+
|
|
6
|
+
function register_es_version(package_name, es_version) {
|
|
7
|
+
package_name = "@depict-ai/" + package_name;
|
|
8
|
+
var already_imported = [];
|
|
9
|
+
for (var i = 0; i < versions_imported.length; i++) {
|
|
10
|
+
already_imported.push(package_name + "/" + versions_imported[i]);
|
|
11
|
+
}
|
|
12
|
+
var has_this_version = versions_imported.indexOf(es_version) !== -1;
|
|
13
|
+
if (!has_this_version) {
|
|
14
|
+
versions_imported.push(es_version);
|
|
15
|
+
}
|
|
16
|
+
if (versions_imported.length > 1) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
"You're trying to import multiple transpiled versions of " +
|
|
19
|
+
package_name +
|
|
20
|
+
"! Already imported: " +
|
|
21
|
+
already_imported.join(", ") +
|
|
22
|
+
" and you're trying to import " +
|
|
23
|
+
package_name +
|
|
24
|
+
"/" +
|
|
25
|
+
es_version +
|
|
26
|
+
" or a dependant thereof"
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = { register_es_version };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To prevent that people accidentally import multiple flavours of the same type (i.e. @depict-ai/utilishared/latest and @depict-ai/utilishared/ES7) we have this module which needs to not be transformed by babel or bundled by parcel and therefore has to support ES5
|
|
3
|
+
*/
|
|
4
|
+
var versions_imported = [];
|
|
5
|
+
|
|
6
|
+
function register_es_version(package_name, es_version) {
|
|
7
|
+
package_name = "@depict-ai/" + package_name;
|
|
8
|
+
var already_imported = [];
|
|
9
|
+
for (var i = 0; i < versions_imported.length; i++) {
|
|
10
|
+
already_imported.push(package_name + "/" + versions_imported[i]);
|
|
11
|
+
}
|
|
12
|
+
var has_this_version = versions_imported.indexOf(es_version) !== -1;
|
|
13
|
+
if (!has_this_version) {
|
|
14
|
+
versions_imported.push(es_version);
|
|
15
|
+
}
|
|
16
|
+
if (versions_imported.length > 1) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
"You're trying to import multiple transpiled versions of " +
|
|
19
|
+
package_name +
|
|
20
|
+
"! Already imported: " +
|
|
21
|
+
already_imported.join(", ") +
|
|
22
|
+
" and you're trying to import " +
|
|
23
|
+
package_name +
|
|
24
|
+
"/" +
|
|
25
|
+
es_version +
|
|
26
|
+
" or a dependant thereof"
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { register_es_version };
|
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/utilishared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
|
-
"
|
|
7
|
-
"module": "dist/module.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
6
|
+
"types": "ES10/index.d.ts",
|
|
9
7
|
"license": "MIT",
|
|
10
8
|
"description": "Miscellaneous utilities shared across different Depict packages and projects.",
|
|
11
9
|
"publishConfig": {
|
|
@@ -19,7 +17,8 @@
|
|
|
19
17
|
"test": "jest"
|
|
20
18
|
},
|
|
21
19
|
"targets": {
|
|
22
|
-
"
|
|
20
|
+
"module_latest": {
|
|
21
|
+
"outputFormat": "esmodule",
|
|
23
22
|
"isLibrary": true,
|
|
24
23
|
"context": "node",
|
|
25
24
|
"engines": {
|
|
@@ -27,28 +26,60 @@
|
|
|
27
26
|
},
|
|
28
27
|
"optimize": false
|
|
29
28
|
},
|
|
30
|
-
"
|
|
29
|
+
"main_latest": {
|
|
30
|
+
"outputFormat": "commonjs",
|
|
31
31
|
"isLibrary": true,
|
|
32
32
|
"context": "node",
|
|
33
33
|
"engines": {
|
|
34
34
|
"browsers": "last 1 chrome version"
|
|
35
35
|
},
|
|
36
36
|
"optimize": false
|
|
37
|
+
},
|
|
38
|
+
"module_es10": {
|
|
39
|
+
"outputFormat": "esmodule",
|
|
40
|
+
"isLibrary": true,
|
|
41
|
+
"context": "node",
|
|
42
|
+
"engines": {
|
|
43
|
+
"browsers": "supports array-flat"
|
|
44
|
+
},
|
|
45
|
+
"optimize": false
|
|
46
|
+
},
|
|
47
|
+
"main_es10": {
|
|
48
|
+
"outputFormat": "commonjs",
|
|
49
|
+
"isLibrary": true,
|
|
50
|
+
"context": "node",
|
|
51
|
+
"engines": {
|
|
52
|
+
"browsers": "supports array-flat"
|
|
53
|
+
},
|
|
54
|
+
"optimize": false
|
|
37
55
|
}
|
|
38
56
|
},
|
|
39
57
|
"exports": {
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
".": {
|
|
59
|
+
"types": "./ES10/index.d.ts",
|
|
60
|
+
"import": "./ES10/index.js",
|
|
61
|
+
"require": "./ES10/index.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./latest": {
|
|
64
|
+
"types": "./latest/index.d.ts",
|
|
65
|
+
"import": "./latest/index.js",
|
|
66
|
+
"require": "./latest/index.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./ES10": {
|
|
69
|
+
"types": "./ES10/index.d.ts",
|
|
70
|
+
"import": "./ES10/index.js",
|
|
71
|
+
"require": "./ES10/index.cjs"
|
|
72
|
+
}
|
|
43
73
|
},
|
|
44
74
|
"files": [
|
|
45
|
-
"/
|
|
75
|
+
"/latest",
|
|
76
|
+
"/ES10",
|
|
77
|
+
"./multi_import_deduplicator.mjs",
|
|
78
|
+
"./multi_import_deduplicator.cjs"
|
|
46
79
|
],
|
|
47
80
|
"devDependencies": {
|
|
48
81
|
"@babel/core": "latest",
|
|
49
|
-
"@
|
|
50
|
-
"@babel/runtime-corejs3": "latest",
|
|
51
|
-
"@depict-ai/types": "^1.0.32",
|
|
82
|
+
"@depict-ai/types": "^1.0.34",
|
|
52
83
|
"@parcel/resolver-default": "^2.8.0",
|
|
53
84
|
"@sentry/cli": "latest",
|
|
54
85
|
"@sentry/types": "^7.13.0",
|
|
@@ -59,8 +90,13 @@
|
|
|
59
90
|
"ts-jest": "^29.0.3"
|
|
60
91
|
},
|
|
61
92
|
"dependencies": {
|
|
93
|
+
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
94
|
+
"@babel/runtime": "latest",
|
|
95
|
+
"@babel/runtime-corejs3": "latest",
|
|
62
96
|
"@sentry/browser": "^7.23.0",
|
|
63
97
|
"solid-js": "^1.7.3"
|
|
64
98
|
},
|
|
65
|
-
"type": "module"
|
|
99
|
+
"type": "module",
|
|
100
|
+
"main": "ES10/index.cjs",
|
|
101
|
+
"module": "ES10/index.js"
|
|
66
102
|
}
|