@shgysk8zer0/importmap 1.4.1 → 1.4.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/CHANGELOG.md +13 -0
- package/firebase.js +24 -0
- package/importmap.json +20 -9
- package/index.cjs +25 -9
- package/index.mjs +25 -9
- package/package.json +3 -3
- package/unpkg.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [v1.4.3] - 2024-08-11
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Yet more updates
|
|
13
|
+
|
|
14
|
+
## [v1.4.2] - 2024-08-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Add specifiers for `firebase/*`
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- More version updates
|
|
21
|
+
|
|
9
22
|
## [v1.4.1] - 2024-07-14
|
|
10
23
|
|
|
11
24
|
### Changed
|
package/firebase.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const VERSION_PATTERN = /^[0-9]+\.[0-9]+\.[0-9]+$/;
|
|
2
|
+
const FIREBASE = /^https:\/www\.gstatic.com\/firebasejs\/\d+\.\d+\.\d+\//;
|
|
3
|
+
|
|
4
|
+
export async function getLatestVersion() {
|
|
5
|
+
const { versions } = await fetch('https://registry.npmjs.org/firebase').then(resp => resp.json());
|
|
6
|
+
|
|
7
|
+
return Object.keys(versions)
|
|
8
|
+
.filter(v => VERSION_PATTERN.test(v))
|
|
9
|
+
.sort((a, b) => parseFloat(a) > parseFloat(b)).at(-1);
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export async function updateFirebase(importmap) {
|
|
14
|
+
const version = await getLatestVersion();
|
|
15
|
+
const { imports = {}, scope = {}, ...rest } = importmap;
|
|
16
|
+
|
|
17
|
+
const firebase = Object.fromEntries(
|
|
18
|
+
Object.entries(importmap.imports)
|
|
19
|
+
.filter(([key]) => key.startsWith('firebase/'))
|
|
20
|
+
.map(([key, value]) => [key, value.replace(FIREBASE, `https://www.gstatic.com/firebasejs/${version}/`)])
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return { imports: { ...imports, ...firebase }, scope, ...rest };
|
|
24
|
+
}
|
package/importmap.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"imports": {
|
|
3
|
-
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.
|
|
3
|
+
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.7/",
|
|
4
4
|
"@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.1/konami.js",
|
|
5
|
-
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
6
|
-
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
5
|
+
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/all.min.js",
|
|
6
|
+
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/",
|
|
7
7
|
"@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",
|
|
8
8
|
"@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",
|
|
9
9
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.2/",
|
|
27
27
|
"@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/aegis-md.js",
|
|
28
28
|
"@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/",
|
|
29
|
-
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.
|
|
29
|
+
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.11/",
|
|
30
30
|
"@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.5/",
|
|
31
31
|
"@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",
|
|
32
32
|
"leaflet": "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",
|
|
@@ -35,11 +35,22 @@
|
|
|
35
35
|
"highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
36
36
|
"@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/core.min.js",
|
|
37
37
|
"@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
38
|
-
"marked": "https://unpkg.com/marked@
|
|
39
|
-
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.
|
|
40
|
-
"yaml": "https://unpkg.com/yaml@2.
|
|
41
|
-
"yaml/": "https://unpkg.com/yaml@2.
|
|
42
|
-
"firebase/": "https://www.gstatic.com/firebasejs/
|
|
38
|
+
"marked": "https://unpkg.com/marked@14.0.0/lib/marked.esm.js",
|
|
39
|
+
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.4/src/index.js",
|
|
40
|
+
"yaml": "https://unpkg.com/yaml@2.5.0/browser/dist/index.js",
|
|
41
|
+
"yaml/": "https://unpkg.com/yaml@2.5.0/browser/dist/",
|
|
42
|
+
"firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",
|
|
43
|
+
"firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",
|
|
44
|
+
"firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",
|
|
45
|
+
"firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",
|
|
46
|
+
"firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",
|
|
47
|
+
"firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",
|
|
48
|
+
"firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",
|
|
49
|
+
"firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",
|
|
50
|
+
"firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",
|
|
51
|
+
"firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",
|
|
52
|
+
"firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",
|
|
53
|
+
"firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js"
|
|
43
54
|
},
|
|
44
55
|
"scope": {}
|
|
45
56
|
}
|
package/index.cjs
CHANGED
|
@@ -6,10 +6,10 @@ var json_js = require('@shgysk8zer0/npm-utils/json.js');
|
|
|
6
6
|
var path_js = require('@shgysk8zer0/npm-utils/path.js');
|
|
7
7
|
|
|
8
8
|
const imports$1 = {
|
|
9
|
-
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.
|
|
9
|
+
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.7/",
|
|
10
10
|
"@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.1/konami.js",
|
|
11
|
-
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
12
|
-
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
11
|
+
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/all.min.js",
|
|
12
|
+
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/",
|
|
13
13
|
"@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",
|
|
14
14
|
"@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",
|
|
15
15
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
@@ -32,7 +32,7 @@ const imports$1 = {
|
|
|
32
32
|
"@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.2/",
|
|
33
33
|
"@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/aegis-md.js",
|
|
34
34
|
"@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/",
|
|
35
|
-
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.
|
|
35
|
+
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.11/",
|
|
36
36
|
"@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.5/",
|
|
37
37
|
"@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",
|
|
38
38
|
leaflet: "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",
|
|
@@ -41,11 +41,22 @@ const imports$1 = {
|
|
|
41
41
|
"highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
42
42
|
"@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/core.min.js",
|
|
43
43
|
"@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
44
|
-
marked: "https://unpkg.com/marked@
|
|
45
|
-
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.
|
|
46
|
-
yaml: "https://unpkg.com/yaml@2.
|
|
47
|
-
"yaml/": "https://unpkg.com/yaml@2.
|
|
48
|
-
"firebase/": "https://www.gstatic.com/firebasejs/
|
|
44
|
+
marked: "https://unpkg.com/marked@14.0.0/lib/marked.esm.js",
|
|
45
|
+
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.4/src/index.js",
|
|
46
|
+
yaml: "https://unpkg.com/yaml@2.5.0/browser/dist/index.js",
|
|
47
|
+
"yaml/": "https://unpkg.com/yaml@2.5.0/browser/dist/",
|
|
48
|
+
"firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",
|
|
49
|
+
"firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",
|
|
50
|
+
"firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",
|
|
51
|
+
"firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",
|
|
52
|
+
"firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",
|
|
53
|
+
"firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",
|
|
54
|
+
"firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",
|
|
55
|
+
"firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",
|
|
56
|
+
"firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",
|
|
57
|
+
"firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",
|
|
58
|
+
"firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",
|
|
59
|
+
"firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js"
|
|
49
60
|
};
|
|
50
61
|
const scope$1 = {
|
|
51
62
|
};
|
|
@@ -169,6 +180,10 @@ async function update(imports) {
|
|
|
169
180
|
return { imports: Object.fromEntries(entries), updated };
|
|
170
181
|
}
|
|
171
182
|
|
|
183
|
+
async function updateUnpkg(imports) {
|
|
184
|
+
return update(imports);
|
|
185
|
+
}
|
|
186
|
+
|
|
172
187
|
async function updateYAML(file) {
|
|
173
188
|
if (typeof file === 'string') {
|
|
174
189
|
return await updateJSON(path_js.getFileURL(file));
|
|
@@ -210,6 +225,7 @@ var unpkg = /*#__PURE__*/Object.freeze({
|
|
|
210
225
|
__proto__: null,
|
|
211
226
|
update: update,
|
|
212
227
|
updateJSON: updateJSON,
|
|
228
|
+
updateUnpkg: updateUnpkg,
|
|
213
229
|
updateYAML: updateYAML
|
|
214
230
|
});
|
|
215
231
|
|
package/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import { readJSONFile, writeJSONFile } from '@shgysk8zer0/npm-utils/json.js';
|
|
|
4
4
|
import { getFileURL } from '@shgysk8zer0/npm-utils/path.js';
|
|
5
5
|
|
|
6
6
|
const imports$1 = {
|
|
7
|
-
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.
|
|
7
|
+
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.7/",
|
|
8
8
|
"@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.1/konami.js",
|
|
9
|
-
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
10
|
-
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.
|
|
9
|
+
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/all.min.js",
|
|
10
|
+
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.3.14/",
|
|
11
11
|
"@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",
|
|
12
12
|
"@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",
|
|
13
13
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
@@ -30,7 +30,7 @@ const imports$1 = {
|
|
|
30
30
|
"@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.2/",
|
|
31
31
|
"@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/aegis-md.js",
|
|
32
32
|
"@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.2/",
|
|
33
|
-
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.
|
|
33
|
+
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.11/",
|
|
34
34
|
"@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.5/",
|
|
35
35
|
"@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",
|
|
36
36
|
leaflet: "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",
|
|
@@ -39,11 +39,22 @@ const imports$1 = {
|
|
|
39
39
|
"highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
40
40
|
"@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/core.min.js",
|
|
41
41
|
"@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
42
|
-
marked: "https://unpkg.com/marked@
|
|
43
|
-
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.
|
|
44
|
-
yaml: "https://unpkg.com/yaml@2.
|
|
45
|
-
"yaml/": "https://unpkg.com/yaml@2.
|
|
46
|
-
"firebase/": "https://www.gstatic.com/firebasejs/
|
|
42
|
+
marked: "https://unpkg.com/marked@14.0.0/lib/marked.esm.js",
|
|
43
|
+
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.4/src/index.js",
|
|
44
|
+
yaml: "https://unpkg.com/yaml@2.5.0/browser/dist/index.js",
|
|
45
|
+
"yaml/": "https://unpkg.com/yaml@2.5.0/browser/dist/",
|
|
46
|
+
"firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",
|
|
47
|
+
"firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",
|
|
48
|
+
"firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",
|
|
49
|
+
"firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",
|
|
50
|
+
"firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",
|
|
51
|
+
"firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",
|
|
52
|
+
"firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",
|
|
53
|
+
"firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",
|
|
54
|
+
"firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",
|
|
55
|
+
"firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",
|
|
56
|
+
"firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",
|
|
57
|
+
"firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js"
|
|
47
58
|
};
|
|
48
59
|
const scope$1 = {
|
|
49
60
|
};
|
|
@@ -167,6 +178,10 @@ async function update(imports) {
|
|
|
167
178
|
return { imports: Object.fromEntries(entries), updated };
|
|
168
179
|
}
|
|
169
180
|
|
|
181
|
+
async function updateUnpkg(imports) {
|
|
182
|
+
return update(imports);
|
|
183
|
+
}
|
|
184
|
+
|
|
170
185
|
async function updateYAML(file) {
|
|
171
186
|
if (typeof file === 'string') {
|
|
172
187
|
return await updateJSON(getFileURL(file));
|
|
@@ -208,6 +223,7 @@ var unpkg = /*#__PURE__*/Object.freeze({
|
|
|
208
223
|
__proto__: null,
|
|
209
224
|
update: update,
|
|
210
225
|
updateJSON: updateJSON,
|
|
226
|
+
updateUnpkg: updateUnpkg,
|
|
211
227
|
updateYAML: updateYAML
|
|
212
228
|
});
|
|
213
229
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgysk8zer0/importmap",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0"
|
|
6
6
|
},
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"homepage": "https://github.com/shgysk8zer0/importmap#readme",
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@babel/eslint-parser": "^7.
|
|
63
|
-
"@babel/eslint-plugin": "^7.
|
|
62
|
+
"@babel/eslint-parser": "^7.25.1",
|
|
63
|
+
"@babel/eslint-plugin": "^7.25.1",
|
|
64
64
|
"@babel/plugin-syntax-import-assertions": "^7.24.7",
|
|
65
65
|
"@rollup/plugin-json": "^6.1.0",
|
|
66
66
|
"@shgysk8zer0/js-utils": "^1.0.1",
|
package/unpkg.js
CHANGED
|
@@ -23,6 +23,10 @@ export async function update(imports) {
|
|
|
23
23
|
return { imports: Object.fromEntries(entries), updated };
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export async function updateUnpkg(imports) {
|
|
27
|
+
return update(imports);
|
|
28
|
+
}
|
|
29
|
+
|
|
26
30
|
export async function updateYAML(file) {
|
|
27
31
|
if (typeof file === 'string') {
|
|
28
32
|
return await updateJSON(getFileURL(file));
|