@jsenv/core 39.5.15 → 39.5.17
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/jsenv_core.js +14 -5
- package/package.json +17 -17
- package/src/build/build.js +2 -1
- package/src/dev/start_dev_server.js +4 -1
- package/src/plugins/directory_reference_effect/jsenv_plugin_directory_reference_effect.js +1 -0
- package/src/plugins/plugins.js +2 -0
- package/src/plugins/protocol_file/jsenv_plugin_protocol_file.js +7 -1
package/dist/jsenv_core.js
CHANGED
|
@@ -11114,7 +11114,7 @@ const watchSourceFiles = (
|
|
|
11114
11114
|
return stopWatchingSourceFiles;
|
|
11115
11115
|
};
|
|
11116
11116
|
|
|
11117
|
-
const jsenvCoreDirectoryUrl = new URL("
|
|
11117
|
+
const jsenvCoreDirectoryUrl = new URL("../", import.meta.url);
|
|
11118
11118
|
|
|
11119
11119
|
const jsenvPluginHtmlSyntaxErrorFallback = () => {
|
|
11120
11120
|
const htmlSyntaxErrorFileUrl = new URL(
|
|
@@ -15087,7 +15087,7 @@ const jsenvPluginDirectoryReferenceEffect = (
|
|
|
15087
15087
|
reference.filenameHint = `${
|
|
15088
15088
|
reference.ownerUrlInfo.filenameHint
|
|
15089
15089
|
}${urlToFilename$1(reference.url)}/`;
|
|
15090
|
-
} else {
|
|
15090
|
+
} else if (reference.specifier.endsWith("./")) ; else {
|
|
15091
15091
|
reference.filenameHint = `${urlToFilename$1(reference.url)}/`;
|
|
15092
15092
|
}
|
|
15093
15093
|
let actionForDirectory;
|
|
@@ -18742,6 +18742,7 @@ const jsenvPluginProtocolFile = ({
|
|
|
18742
18742
|
magicExtensions,
|
|
18743
18743
|
magicDirectoryIndex,
|
|
18744
18744
|
preserveSymlinks,
|
|
18745
|
+
directoryListingUrlMocks,
|
|
18745
18746
|
}) => {
|
|
18746
18747
|
return [
|
|
18747
18748
|
jsenvPluginFsRedirection({
|
|
@@ -18857,6 +18858,7 @@ const jsenvPluginProtocolFile = ({
|
|
|
18857
18858
|
parentDirectoryContentArray,
|
|
18858
18859
|
parentDirectoryUrl,
|
|
18859
18860
|
urlInfo.context.rootDirectoryUrl,
|
|
18861
|
+
directoryListingUrlMocks,
|
|
18860
18862
|
);
|
|
18861
18863
|
return {
|
|
18862
18864
|
contentType: "text/html",
|
|
@@ -18909,6 +18911,7 @@ const generateHtmlForENOENTOnHtmlFile = (
|
|
|
18909
18911
|
parentDirectoryContentArray,
|
|
18910
18912
|
parentDirectoryUrl,
|
|
18911
18913
|
rootDirectoryUrl,
|
|
18914
|
+
directoryListingUrlMocks,
|
|
18912
18915
|
) => {
|
|
18913
18916
|
const htmlFor404AndParentDir = String(
|
|
18914
18917
|
readFileSync(html404AndParentDirFileUrl),
|
|
@@ -18919,7 +18922,9 @@ const generateHtmlForENOENTOnHtmlFile = (
|
|
|
18919
18922
|
rootDirectoryUrl,
|
|
18920
18923
|
);
|
|
18921
18924
|
const replacers = {
|
|
18922
|
-
fileUrl:
|
|
18925
|
+
fileUrl: directoryListingUrlMocks
|
|
18926
|
+
? `@jsenv/core/${urlToRelativeUrl(url, jsenvCoreDirectoryUrl)}`
|
|
18927
|
+
: url,
|
|
18923
18928
|
fileRelativeUrl,
|
|
18924
18929
|
parentDirectoryUrl,
|
|
18925
18930
|
parentDirectoryRelativeUrl,
|
|
@@ -20488,6 +20493,7 @@ const getCorePlugins = ({
|
|
|
20488
20493
|
nodeEsmResolution = {},
|
|
20489
20494
|
magicExtensions,
|
|
20490
20495
|
magicDirectoryIndex,
|
|
20496
|
+
directoryListingUrlMocks,
|
|
20491
20497
|
directoryReferenceEffect,
|
|
20492
20498
|
supervisor,
|
|
20493
20499
|
injections,
|
|
@@ -20533,6 +20539,7 @@ const getCorePlugins = ({
|
|
|
20533
20539
|
jsenvPluginProtocolFile({
|
|
20534
20540
|
magicExtensions,
|
|
20535
20541
|
magicDirectoryIndex,
|
|
20542
|
+
directoryListingUrlMocks,
|
|
20536
20543
|
}),
|
|
20537
20544
|
|
|
20538
20545
|
...(nodeEsmResolution
|
|
@@ -22278,7 +22285,7 @@ const build = async ({
|
|
|
22278
22285
|
if (outDirectoryUrl === undefined) {
|
|
22279
22286
|
if (
|
|
22280
22287
|
process.env.CAPTURING_SIDE_EFFECTS ||
|
|
22281
|
-
|
|
22288
|
+
(!true)
|
|
22282
22289
|
) {
|
|
22283
22290
|
outDirectoryUrl = new URL("../.jsenv_b/", sourceDirectoryUrl);
|
|
22284
22291
|
} else {
|
|
@@ -23115,6 +23122,7 @@ const startDevServer = async ({
|
|
|
23115
23122
|
supervisor = true,
|
|
23116
23123
|
magicExtensions,
|
|
23117
23124
|
magicDirectoryIndex,
|
|
23125
|
+
directoryListingUrlMocks,
|
|
23118
23126
|
injections,
|
|
23119
23127
|
transpilation,
|
|
23120
23128
|
cacheControl = true,
|
|
@@ -23154,7 +23162,7 @@ const startDevServer = async ({
|
|
|
23154
23162
|
if (outDirectoryUrl === undefined) {
|
|
23155
23163
|
if (
|
|
23156
23164
|
process.env.CAPTURING_SIDE_EFFECTS ||
|
|
23157
|
-
|
|
23165
|
+
(!true)
|
|
23158
23166
|
) {
|
|
23159
23167
|
outDirectoryUrl = new URL("../.jsenv/", sourceDirectoryUrl);
|
|
23160
23168
|
} else {
|
|
@@ -23307,6 +23315,7 @@ const startDevServer = async ({
|
|
|
23307
23315
|
nodeEsmResolution,
|
|
23308
23316
|
magicExtensions,
|
|
23309
23317
|
magicDirectoryIndex,
|
|
23318
|
+
directoryListingUrlMocks,
|
|
23310
23319
|
supervisor,
|
|
23311
23320
|
injections,
|
|
23312
23321
|
transpilation,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "39.5.
|
|
3
|
+
"version": "39.5.17",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -69,29 +69,29 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
71
71
|
"@jsenv/abort": "4.3.0",
|
|
72
|
-
"@jsenv/ast": "6.3.
|
|
72
|
+
"@jsenv/ast": "6.3.4",
|
|
73
73
|
"@jsenv/filesystem": "4.10.11",
|
|
74
74
|
"@jsenv/humanize": "1.2.8",
|
|
75
75
|
"@jsenv/importmap": "1.2.1",
|
|
76
76
|
"@jsenv/integrity": "0.0.2",
|
|
77
|
-
"@jsenv/js-module-fallback": "1.3.
|
|
77
|
+
"@jsenv/js-module-fallback": "1.3.48",
|
|
78
78
|
"@jsenv/node-esm-resolution": "1.0.6",
|
|
79
|
-
"@jsenv/plugin-bundling": "2.7.
|
|
80
|
-
"@jsenv/plugin-minification": "1.5.
|
|
81
|
-
"@jsenv/plugin-supervisor": "1.5.
|
|
82
|
-
"@jsenv/plugin-transpilation": "1.4.
|
|
79
|
+
"@jsenv/plugin-bundling": "2.7.16",
|
|
80
|
+
"@jsenv/plugin-minification": "1.5.10",
|
|
81
|
+
"@jsenv/plugin-supervisor": "1.5.23",
|
|
82
|
+
"@jsenv/plugin-transpilation": "1.4.83",
|
|
83
83
|
"@jsenv/runtime-compat": "1.3.1",
|
|
84
84
|
"@jsenv/server": "15.3.1",
|
|
85
|
-
"@jsenv/sourcemap": "1.2.
|
|
85
|
+
"@jsenv/sourcemap": "1.2.25",
|
|
86
86
|
"@jsenv/url-meta": "8.5.2",
|
|
87
87
|
"@jsenv/urls": "2.5.2",
|
|
88
88
|
"@jsenv/utils": "2.1.2",
|
|
89
89
|
"string-width": "7.2.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@babel/plugin-syntax-import-attributes": "7.
|
|
93
|
-
"@babel/plugin-syntax-optional-chaining-assign": "7.25.
|
|
94
|
-
"@eslint/compat": "1.
|
|
92
|
+
"@babel/plugin-syntax-import-attributes": "7.26.0",
|
|
93
|
+
"@babel/plugin-syntax-optional-chaining-assign": "7.25.9",
|
|
94
|
+
"@eslint/compat": "1.2.2",
|
|
95
95
|
"@jsenv/assert": "workspace:*",
|
|
96
96
|
"@jsenv/cli": "workspace:*",
|
|
97
97
|
"@jsenv/core": "./",
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
"@jsenv/plugin-as-js-classic": "workspace:*",
|
|
104
104
|
"@jsenv/snapshot": "workspace:*",
|
|
105
105
|
"@jsenv/test": "workspace:*",
|
|
106
|
-
"@playwright/browser-chromium": "1.
|
|
107
|
-
"@playwright/browser-firefox": "1.
|
|
108
|
-
"@playwright/browser-webkit": "1.
|
|
106
|
+
"@playwright/browser-chromium": "1.48.2",
|
|
107
|
+
"@playwright/browser-firefox": "1.48.2",
|
|
108
|
+
"@playwright/browser-webkit": "1.48.2",
|
|
109
109
|
"anchor-markdown-header": "0.7.0",
|
|
110
110
|
"babel-plugin-transform-async-to-promises": "0.8.18",
|
|
111
|
-
"eslint": "9.
|
|
112
|
-
"marked": "14.1.
|
|
111
|
+
"eslint": "9.14.0",
|
|
112
|
+
"marked": "14.1.3",
|
|
113
113
|
"open": "10.1.0",
|
|
114
|
-
"playwright": "1.
|
|
114
|
+
"playwright": "1.48.2",
|
|
115
115
|
"prettier": "3.3.3",
|
|
116
116
|
"prettier-plugin-organize-imports": "4.1.0",
|
|
117
117
|
"strip-ansi": "7.1.0"
|
package/src/build/build.js
CHANGED
|
@@ -173,7 +173,8 @@ export const build = async ({
|
|
|
173
173
|
if (outDirectoryUrl === undefined) {
|
|
174
174
|
if (
|
|
175
175
|
process.env.CAPTURING_SIDE_EFFECTS ||
|
|
176
|
-
|
|
176
|
+
(!import.meta.build &&
|
|
177
|
+
urlIsInsideOf(sourceDirectoryUrl, jsenvCoreDirectoryUrl))
|
|
177
178
|
) {
|
|
178
179
|
outDirectoryUrl = new URL("../.jsenv_b/", sourceDirectoryUrl);
|
|
179
180
|
} else {
|
|
@@ -71,6 +71,7 @@ export const startDevServer = async ({
|
|
|
71
71
|
supervisor = true,
|
|
72
72
|
magicExtensions,
|
|
73
73
|
magicDirectoryIndex,
|
|
74
|
+
directoryListingUrlMocks,
|
|
74
75
|
injections,
|
|
75
76
|
transpilation,
|
|
76
77
|
cacheControl = true,
|
|
@@ -110,7 +111,8 @@ export const startDevServer = async ({
|
|
|
110
111
|
if (outDirectoryUrl === undefined) {
|
|
111
112
|
if (
|
|
112
113
|
process.env.CAPTURING_SIDE_EFFECTS ||
|
|
113
|
-
|
|
114
|
+
(!import.meta.build &&
|
|
115
|
+
urlIsInsideOf(sourceDirectoryUrl, jsenvCoreDirectoryUrl))
|
|
114
116
|
) {
|
|
115
117
|
outDirectoryUrl = new URL("../.jsenv/", sourceDirectoryUrl);
|
|
116
118
|
} else {
|
|
@@ -263,6 +265,7 @@ export const startDevServer = async ({
|
|
|
263
265
|
nodeEsmResolution,
|
|
264
266
|
magicExtensions,
|
|
265
267
|
magicDirectoryIndex,
|
|
268
|
+
directoryListingUrlMocks,
|
|
266
269
|
supervisor,
|
|
267
270
|
injections,
|
|
268
271
|
transpilation,
|
|
@@ -31,6 +31,7 @@ export const jsenvPluginDirectoryReferenceEffect = (
|
|
|
31
31
|
reference.filenameHint = `${
|
|
32
32
|
reference.ownerUrlInfo.filenameHint
|
|
33
33
|
}${urlToFilename(reference.url)}/`;
|
|
34
|
+
} else if (reference.specifier.endsWith("./")) {
|
|
34
35
|
} else {
|
|
35
36
|
reference.filenameHint = `${urlToFilename(reference.url)}/`;
|
|
36
37
|
}
|
package/src/plugins/plugins.js
CHANGED
|
@@ -32,6 +32,7 @@ export const getCorePlugins = ({
|
|
|
32
32
|
nodeEsmResolution = {},
|
|
33
33
|
magicExtensions,
|
|
34
34
|
magicDirectoryIndex,
|
|
35
|
+
directoryListingUrlMocks,
|
|
35
36
|
directoryReferenceEffect,
|
|
36
37
|
supervisor,
|
|
37
38
|
injections,
|
|
@@ -77,6 +78,7 @@ export const getCorePlugins = ({
|
|
|
77
78
|
jsenvPluginProtocolFile({
|
|
78
79
|
magicExtensions,
|
|
79
80
|
magicDirectoryIndex,
|
|
81
|
+
directoryListingUrlMocks,
|
|
80
82
|
}),
|
|
81
83
|
|
|
82
84
|
...(nodeEsmResolution
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "@jsenv/urls";
|
|
12
12
|
import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
|
|
13
13
|
import { existsSync, lstatSync, readdirSync, readFileSync } from "node:fs";
|
|
14
|
+
import { jsenvCoreDirectoryUrl } from "../../jsenv_core_directory_url.js";
|
|
14
15
|
import { jsenvPluginFsRedirection } from "./jsenv_plugin_fs_redirection.js";
|
|
15
16
|
|
|
16
17
|
const html404AndParentDirFileUrl = new URL(
|
|
@@ -26,6 +27,7 @@ export const jsenvPluginProtocolFile = ({
|
|
|
26
27
|
magicExtensions,
|
|
27
28
|
magicDirectoryIndex,
|
|
28
29
|
preserveSymlinks,
|
|
30
|
+
directoryListingUrlMocks,
|
|
29
31
|
}) => {
|
|
30
32
|
return [
|
|
31
33
|
jsenvPluginFsRedirection({
|
|
@@ -141,6 +143,7 @@ export const jsenvPluginProtocolFile = ({
|
|
|
141
143
|
parentDirectoryContentArray,
|
|
142
144
|
parentDirectoryUrl,
|
|
143
145
|
urlInfo.context.rootDirectoryUrl,
|
|
146
|
+
directoryListingUrlMocks,
|
|
144
147
|
);
|
|
145
148
|
return {
|
|
146
149
|
contentType: "text/html",
|
|
@@ -193,6 +196,7 @@ const generateHtmlForENOENTOnHtmlFile = (
|
|
|
193
196
|
parentDirectoryContentArray,
|
|
194
197
|
parentDirectoryUrl,
|
|
195
198
|
rootDirectoryUrl,
|
|
199
|
+
directoryListingUrlMocks,
|
|
196
200
|
) => {
|
|
197
201
|
const htmlFor404AndParentDir = String(
|
|
198
202
|
readFileSync(html404AndParentDirFileUrl),
|
|
@@ -203,7 +207,9 @@ const generateHtmlForENOENTOnHtmlFile = (
|
|
|
203
207
|
rootDirectoryUrl,
|
|
204
208
|
);
|
|
205
209
|
const replacers = {
|
|
206
|
-
fileUrl:
|
|
210
|
+
fileUrl: directoryListingUrlMocks
|
|
211
|
+
? `@jsenv/core/${urlToRelativeUrl(url, jsenvCoreDirectoryUrl)}`
|
|
212
|
+
: url,
|
|
207
213
|
fileRelativeUrl,
|
|
208
214
|
parentDirectoryUrl,
|
|
209
215
|
parentDirectoryRelativeUrl,
|