@eik/rollup-plugin 4.0.60 → 4.0.62
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 +14 -0
- package/dist/plugin.cjs +16 -5
- package/package.json +5 -5
- package/src/plugin.js +16 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [4.0.62](https://github.com/eik-lib/rollup-plugin/compare/v4.0.61...v4.0.62) (2024-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency undici to v5.28.3 ([5c4c8f1](https://github.com/eik-lib/rollup-plugin/commit/5c4c8f14426450ee2ffcb35b1855f3091228077c))
|
|
7
|
+
|
|
8
|
+
## [4.0.61](https://github.com/eik-lib/rollup-plugin/compare/v4.0.60...v4.0.61) (2024-01-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add some debug level logging ([#183](https://github.com/eik-lib/rollup-plugin/issues/183)) ([2853452](https://github.com/eik-lib/rollup-plugin/commit/2853452951559f04d8e5386cb07873f998a979cf))
|
|
14
|
+
|
|
1
15
|
## [4.0.60](https://github.com/eik-lib/rollup-plugin/compare/v4.0.59...v4.0.60) (2023-12-04)
|
|
2
16
|
|
|
3
17
|
|
package/dist/plugin.cjs
CHANGED
|
@@ -47,16 +47,27 @@ function esmImportToUrl({
|
|
|
47
47
|
async buildStart(options) {
|
|
48
48
|
// Load eik config from eik.json or package.json
|
|
49
49
|
const config = await common.helpers.getDefaults(path);
|
|
50
|
+
this.debug(`Loaded eik config ${JSON.stringify(config, null, 2)}`);
|
|
50
51
|
|
|
51
52
|
// Fetch import maps from the server
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
try {
|
|
54
|
+
const fetched = await fetchImportMaps([...config.map, ...pUrls]);
|
|
55
|
+
for (const map of fetched) {
|
|
56
|
+
this.debug(`Fetched import map ${JSON.stringify(map, null, 2)}`);
|
|
57
|
+
}
|
|
58
|
+
plugin = rollupPluginImportMap.rollupImportMapPlugin([...fetched, ...pMaps]);
|
|
59
|
+
await plugin.buildStart(options);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
this.error(err.message);
|
|
62
|
+
}
|
|
56
63
|
},
|
|
57
64
|
|
|
58
65
|
resolveId(importee) {
|
|
59
|
-
|
|
66
|
+
const resolved = plugin.resolveId(importee);
|
|
67
|
+
if (resolved) {
|
|
68
|
+
this.debug(`Resolved ${importee} to ${resolved.id}`);
|
|
69
|
+
}
|
|
70
|
+
return resolved;
|
|
60
71
|
},
|
|
61
72
|
};
|
|
62
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eik/rollup-plugin",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.62",
|
|
4
4
|
"description": "Rollup plugin for loading import maps from a Eik server and applying the mapping to ECMAScript modules in preparation for upload to the same server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.cjs",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@semantic-release/changelog": "6.0.3",
|
|
49
49
|
"@semantic-release/git": "10.0.1",
|
|
50
|
-
"eslint": "8.
|
|
50
|
+
"eslint": "8.56.0",
|
|
51
51
|
"eslint-config-airbnb-base": "15.0.0",
|
|
52
|
-
"eslint-plugin-import": "2.29.
|
|
52
|
+
"eslint-plugin-import": "2.29.1",
|
|
53
53
|
"fastify": "3.29.5",
|
|
54
54
|
"rollup": "3.29.4",
|
|
55
55
|
"semantic-release": "19.0.5",
|
|
56
|
-
"tap": "16.3.
|
|
56
|
+
"tap": "16.3.10"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@eik/common": "3.0.1",
|
|
60
|
-
"undici": "5.28.
|
|
60
|
+
"undici": "5.28.3",
|
|
61
61
|
"rollup-plugin-import-map": "3.0.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
package/src/plugin.js
CHANGED
|
@@ -44,16 +44,27 @@ export default function esmImportToUrl({
|
|
|
44
44
|
async buildStart(options) {
|
|
45
45
|
// Load eik config from eik.json or package.json
|
|
46
46
|
const config = await helpers.getDefaults(path);
|
|
47
|
+
this.debug(`Loaded eik config ${JSON.stringify(config, null, 2)}`);
|
|
47
48
|
|
|
48
49
|
// Fetch import maps from the server
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
try {
|
|
51
|
+
const fetched = await fetchImportMaps([...config.map, ...pUrls]);
|
|
52
|
+
for (const map of fetched) {
|
|
53
|
+
this.debug(`Fetched import map ${JSON.stringify(map, null, 2)}`);
|
|
54
|
+
}
|
|
55
|
+
plugin = importMapPlugin([...fetched, ...pMaps]);
|
|
56
|
+
await plugin.buildStart(options);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
this.error(err.message);
|
|
59
|
+
}
|
|
53
60
|
},
|
|
54
61
|
|
|
55
62
|
resolveId(importee) {
|
|
56
|
-
|
|
63
|
+
const resolved = plugin.resolveId(importee);
|
|
64
|
+
if (resolved) {
|
|
65
|
+
this.debug(`Resolved ${importee} to ${resolved.id}`);
|
|
66
|
+
}
|
|
67
|
+
return resolved;
|
|
57
68
|
},
|
|
58
69
|
};
|
|
59
70
|
}
|