@jsenv/core 27.0.0-alpha.86 → 27.0.0-alpha.89
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/dist/js/controllable_file.mjs +1 -1
- package/dist/js/html_supervisor_installer.js +1 -1
- package/dist/js/uneval.js +804 -0
- package/dist/main.js +11582 -730
- package/package.json +14 -20
- package/src/build/build.js +0 -9
- package/src/plugins/file_urls/jsenv_plugin_file_urls.js +8 -0
- package/src/plugins/importmap/jsenv_plugin_importmap.js +2 -2
- package/src/plugins/plugins.js +3 -1
- package/src/plugins/url_analysis/jsenv_plugin_url_analysis.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "27.0.0-alpha.
|
|
3
|
+
"version": "27.0.0-alpha.89",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -65,32 +65,30 @@
|
|
|
65
65
|
"@babel/plugin-transform-modules-umd": "7.18.0",
|
|
66
66
|
"@c88/v8-coverage": "0.1.1",
|
|
67
67
|
"@financial-times/polyfill-useragent-normaliser": "2.0.1",
|
|
68
|
-
"@jsenv/
|
|
69
|
-
"@jsenv/
|
|
70
|
-
"@jsenv/
|
|
71
|
-
"@jsenv/
|
|
72
|
-
"@jsenv/importmap": "1.2.0",
|
|
68
|
+
"@jsenv/ast": "1.1.1",
|
|
69
|
+
"@jsenv/abort": "4.2.3",
|
|
70
|
+
"@jsenv/filesystem": "4.0.10",
|
|
71
|
+
"@jsenv/importmap": "1.2.1",
|
|
73
72
|
"@jsenv/integrity": "0.0.1",
|
|
74
|
-
"@jsenv/log": "2.0.0",
|
|
75
73
|
"@jsenv/node-esm-resolution": "0.1.0",
|
|
76
|
-
"@jsenv/server": "12.7.
|
|
74
|
+
"@jsenv/server": "12.7.2",
|
|
77
75
|
"@jsenv/uneval": "1.6.0",
|
|
78
|
-
"@jsenv/sourcemap": "1.0.0",
|
|
79
|
-
"@jsenv/utils": "2.0.0",
|
|
80
76
|
"@jsenv/url-meta": "7.0.0",
|
|
81
|
-
"@jsenv/urls": "1.2.
|
|
77
|
+
"@jsenv/urls": "1.2.6",
|
|
78
|
+
"@jsenv/utils": "2.0.1",
|
|
79
|
+
"@jsenv/babel-plugins": "1.0.5",
|
|
80
|
+
"@jsenv/log": "2.0.1",
|
|
81
|
+
"@jsenv/sourcemap": "1.0.1",
|
|
82
82
|
"acorn-import-assertions": "1.8.0",
|
|
83
|
-
"construct-style-sheets-polyfill": "3.1.0",
|
|
84
83
|
"cuid": "2.1.8",
|
|
85
|
-
"es-iife": "0.2.2",
|
|
86
84
|
"html-minifier": "4.0.0",
|
|
87
85
|
"istanbul-lib-coverage": "3.2.0",
|
|
88
86
|
"istanbul-lib-instrument": "5.2.0",
|
|
89
87
|
"istanbul-lib-report": "3.0.0",
|
|
90
88
|
"istanbul-reports": "3.1.4",
|
|
91
89
|
"pidtree": "0.6.0",
|
|
92
|
-
"regenerator-runtime": "0.13.9",
|
|
93
90
|
"rollup": "2.75.6",
|
|
91
|
+
"string-width": "5.1.2",
|
|
94
92
|
"strip-ansi": "7.0.1",
|
|
95
93
|
"terser": "5.14.1",
|
|
96
94
|
"v8-to-istanbul": "9.0.0",
|
|
@@ -103,17 +101,13 @@
|
|
|
103
101
|
"@jsenv/eslint-config": "16.0.9",
|
|
104
102
|
"@jsenv/file-size-impact": "12.1.13",
|
|
105
103
|
"@jsenv/https-local": "1.1.0",
|
|
106
|
-
"@jsenv/importmap-node-module": "5.1.3",
|
|
107
104
|
"@jsenv/package-workspace": "0.2.1",
|
|
108
105
|
"@jsenv/performance-impact": "2.2.11",
|
|
109
|
-
"@jsenv/pwa": "5.0.0",
|
|
110
106
|
"eslint": "8.17.0",
|
|
111
107
|
"eslint-plugin-html": "6.2.0",
|
|
112
108
|
"eslint-plugin-import": "2.26.0",
|
|
113
109
|
"eslint-plugin-react": "7.30.0",
|
|
114
110
|
"playwright": "1.22.2",
|
|
115
|
-
"
|
|
116
|
-
"prettier": "2.7.1",
|
|
117
|
-
"redux": "4.1.2"
|
|
111
|
+
"prettier": "2.7.1"
|
|
118
112
|
}
|
|
119
|
-
}
|
|
113
|
+
}
|
package/src/build/build.js
CHANGED
|
@@ -166,7 +166,6 @@ build ${entryPointKeys.length} entry points`)
|
|
|
166
166
|
const prebuildTask = createTaskLog("prebuild", {
|
|
167
167
|
disabled: infoLogsAreDisabled,
|
|
168
168
|
})
|
|
169
|
-
let urlCount = 0
|
|
170
169
|
const prebuildRedirections = new Map()
|
|
171
170
|
const rawGraphKitchen = createKitchen({
|
|
172
171
|
signal,
|
|
@@ -180,14 +179,6 @@ build ${entryPointKeys.length} entry points`)
|
|
|
180
179
|
writeGeneratedFiles,
|
|
181
180
|
plugins: [
|
|
182
181
|
...plugins,
|
|
183
|
-
{
|
|
184
|
-
name: "jsenv:build_log",
|
|
185
|
-
appliesDuring: { build: true },
|
|
186
|
-
cooked: () => {
|
|
187
|
-
urlCount++
|
|
188
|
-
prebuildTask.setRightText(urlCount)
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
182
|
{
|
|
192
183
|
appliesDuring: "build",
|
|
193
184
|
fetchUrlContent: (urlInfo, context) => {
|
|
@@ -58,6 +58,14 @@ export const jsenvPluginFileUrls = ({
|
|
|
58
58
|
urlObject.pathname = pathname.slice(0, -1)
|
|
59
59
|
}
|
|
60
60
|
if (foundADirectory && directoryReferenceAllowed) {
|
|
61
|
+
if (
|
|
62
|
+
// ignore new URL second arg
|
|
63
|
+
reference.subtype === "new_url_second_arg" ||
|
|
64
|
+
// ignore root file url
|
|
65
|
+
reference.url === "file:///"
|
|
66
|
+
) {
|
|
67
|
+
reference.shouldHandle = false
|
|
68
|
+
}
|
|
61
69
|
reference.data.foundADirectory = true
|
|
62
70
|
const directoryFacadeUrl = urlObject.href
|
|
63
71
|
const directoryUrlRaw = preserveSymlinks
|
|
@@ -106,7 +106,7 @@ export const jsenvPluginImportmap = () => {
|
|
|
106
106
|
onHtmlImportmapParsed(null, htmlUrlInfo.url)
|
|
107
107
|
return null
|
|
108
108
|
}
|
|
109
|
-
const handleInlineImportmap = async (importmap,
|
|
109
|
+
const handleInlineImportmap = async (importmap, htmlNodeText) => {
|
|
110
110
|
const { line, column, lineEnd, columnEnd, isOriginal } =
|
|
111
111
|
getHtmlNodePosition(importmap, {
|
|
112
112
|
preferOriginal: true,
|
|
@@ -127,7 +127,7 @@ export const jsenvPluginImportmap = () => {
|
|
|
127
127
|
specifierColumn: column,
|
|
128
128
|
specifier: inlineImportmapUrl,
|
|
129
129
|
contentType: "application/importmap+json",
|
|
130
|
-
content:
|
|
130
|
+
content: htmlNodeText,
|
|
131
131
|
})
|
|
132
132
|
await context.cook(inlineImportmapUrlInfo, {
|
|
133
133
|
reference: inlineImportmapReference,
|
package/src/plugins/plugins.js
CHANGED
|
@@ -49,8 +49,10 @@ export const getCorePlugins = ({
|
|
|
49
49
|
jsenvPluginUrlAnalysis({ rootDirectoryUrl, ...urlAnalysis }),
|
|
50
50
|
jsenvPluginTranspilation(transpilation),
|
|
51
51
|
...(htmlSupervisor ? [jsenvPluginHtmlSupervisor(htmlSupervisor)] : []), // before inline as it turns inline <script> into <script src>
|
|
52
|
+
jsenvPluginImportmap(),
|
|
53
|
+
// before node esm to handle bare specifiers
|
|
54
|
+
// + before node esm to handle importmap before inline content
|
|
52
55
|
jsenvPluginInline(), // before "file urls" to resolve and load inline urls
|
|
53
|
-
jsenvPluginImportmap(), // before node esm to handle bare specifiers before node esm
|
|
54
56
|
jsenvPluginFileUrls({
|
|
55
57
|
directoryReferenceAllowed,
|
|
56
58
|
...fileSystemMagicResolution,
|
|
@@ -27,6 +27,9 @@ export const jsenvPluginUrlAnalysis = ({
|
|
|
27
27
|
name: "jsenv:url_analysis",
|
|
28
28
|
appliesDuring: "*",
|
|
29
29
|
redirectUrl: (reference) => {
|
|
30
|
+
if (reference.shouldHandle !== undefined) {
|
|
31
|
+
return
|
|
32
|
+
}
|
|
30
33
|
if (
|
|
31
34
|
reference.specifier[0] === "#" &&
|
|
32
35
|
// For Html, css and in general "#" refer to a ressource in the page
|