@jsenv/core 40.12.1 → 40.12.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.
@@ -2942,9 +2942,8 @@ const shouldHandleSourcemap = (urlInfo) => {
2942
2942
  return true;
2943
2943
  };
2944
2944
 
2945
- const inlineContentClientFileUrl = import.meta.resolve(
2946
- "../client/inline_content/inline_content.js",
2947
- );
2945
+ const inlineContentClientFileUrl = import.meta
2946
+ .resolve("../client/inline_content/inline_content.js");
2948
2947
 
2949
2948
  const createKitchen = ({
2950
2949
  name,
@@ -3806,9 +3805,8 @@ const inferUrlInfoType = (urlInfo) => {
3806
3805
  };
3807
3806
 
3808
3807
  const jsenvPluginHtmlSyntaxErrorFallback = () => {
3809
- const htmlSyntaxErrorFileUrl = import.meta.resolve(
3810
- "../client/html_syntax_error/html_syntax_error.html",
3811
- );
3808
+ const htmlSyntaxErrorFileUrl = import.meta
3809
+ .resolve("../client/html_syntax_error/html_syntax_error.html");
3812
3810
 
3813
3811
  return {
3814
3812
  mustStayFirst: true,
@@ -6255,9 +6253,8 @@ const jsenvPluginVersionSearchParam = () => {
6255
6253
  */
6256
6254
 
6257
6255
 
6258
- const htmlFileUrlForDirectory = import.meta.resolve(
6259
- "../client/directory_listing/directory_listing.html",
6260
- );
6256
+ const htmlFileUrlForDirectory = import.meta
6257
+ .resolve("../client/directory_listing/directory_listing.html");
6261
6258
 
6262
6259
  const jsenvPluginDirectoryListing = ({
6263
6260
  spa,
@@ -6744,13 +6741,7 @@ const jsenvPluginFsRedirection = ({
6744
6741
  // 2. The url pathname does not have an extension
6745
6742
  // This point assume client is requesting a file when there is an extension
6746
6743
  // and it assumes all routes will not use extension
6747
- // 3. The url pathname does not ends with "/"
6748
- // In that case we assume client explicitely asks to load a directory
6749
- if (
6750
- spa &&
6751
- !urlToExtension(urlObject) &&
6752
- !urlToPathname(urlObject).endsWith("/")
6753
- ) {
6744
+ if (spa && !urlToExtension(urlObject)) {
6754
6745
  const { requestedUrl, rootDirectoryUrl, mainFilePath } =
6755
6746
  reference.ownerUrlInfo.context;
6756
6747
  const closestHtmlRootFile = getClosestHtmlRootFile(
@@ -7857,12 +7848,10 @@ const jsenvPluginNodeRuntime = ({ runtimeCompat }) => {
7857
7848
 
7858
7849
 
7859
7850
  const jsenvPluginImportMetaCss = () => {
7860
- const importMetaCssClientFileUrl = import.meta.resolve(
7861
- "../client/import_meta_css/import_meta_css.js",
7862
- );
7863
- const importMetaCssBuildFileUrl = import.meta.resolve(
7864
- "../client/import_meta_css/import_meta_css_build.js",
7865
- );
7851
+ const importMetaCssClientFileUrl = import.meta
7852
+ .resolve("../client/import_meta_css/import_meta_css.js");
7853
+ const importMetaCssBuildFileUrl = import.meta
7854
+ .resolve("../client/import_meta_css/import_meta_css_build.js");
7866
7855
 
7867
7856
  return {
7868
7857
  name: "jsenv:import_meta_css",
@@ -8194,9 +8183,8 @@ const htmlNodeCanHotReload = (node) => {
8194
8183
  };
8195
8184
 
8196
8185
  const jsenvPluginImportMetaHot = () => {
8197
- const importMetaHotClientFileUrl = import.meta.resolve(
8198
- "../client/import_meta_hot/import_meta_hot.js",
8199
- );
8186
+ const importMetaHotClientFileUrl = import.meta
8187
+ .resolve("../client/import_meta_hot/import_meta_hot.js");
8200
8188
 
8201
8189
  return {
8202
8190
  name: "jsenv:import_meta_hot",
@@ -8988,9 +8976,8 @@ const jsenvPluginChromeDevtoolsJson = () => {
8988
8976
  };
8989
8977
 
8990
8978
  const jsenvPluginAutoreloadOnServerRestart = () => {
8991
- const autoreloadOnRestartClientFileUrl = import.meta.resolve(
8992
- "@jsenv/server/src/services/autoreload_on_server_restart/client/autoreload_on_server_restart.js",
8993
- );
8979
+ const autoreloadOnRestartClientFileUrl = import.meta
8980
+ .resolve("@jsenv/server/src/services/autoreload_on_server_restart/client/autoreload_on_server_restart.js");
8994
8981
 
8995
8982
  return {
8996
8983
  name: "jsenv:autoreload_on_server_restart",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "40.12.1",
3
+ "version": "40.12.3",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,14 +75,14 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@financial-times/polyfill-useragent-normaliser": "1.10.2",
78
- "@jsenv/ast": "6.7.16",
79
- "@jsenv/js-module-fallback": "1.4.24",
80
- "@jsenv/plugin-bundling": "2.10.3",
78
+ "@jsenv/ast": "6.7.17",
79
+ "@jsenv/js-module-fallback": "1.4.25",
80
+ "@jsenv/plugin-bundling": "2.10.4",
81
81
  "@jsenv/plugin-minification": "1.7.3",
82
- "@jsenv/plugin-supervisor": "1.7.10",
83
- "@jsenv/plugin-transpilation": "1.5.64",
84
- "@jsenv/server": "16.3.4",
85
- "@jsenv/sourcemap": "1.3.12",
82
+ "@jsenv/plugin-supervisor": "1.7.11",
83
+ "@jsenv/plugin-transpilation": "1.5.66",
84
+ "@jsenv/server": "16.3.5",
85
+ "@jsenv/sourcemap": "1.3.13",
86
86
  "react-table": "7.8.0"
87
87
  },
88
88
  "devDependencies": {
@@ -116,24 +116,24 @@
116
116
  "@jsenv/url-meta": "workspace:*",
117
117
  "@jsenv/urls": "workspace:*",
118
118
  "@jsenv/utils": "workspace:*",
119
- "@playwright/browser-chromium": "1.56.1",
120
- "@playwright/browser-firefox": "1.56.1",
121
- "@playwright/browser-webkit": "1.56.1",
119
+ "@playwright/browser-chromium": "1.57.0",
120
+ "@playwright/browser-firefox": "1.57.0",
121
+ "@playwright/browser-webkit": "1.57.0",
122
122
  "babel-plugin-transform-async-to-promises": "0.8.18",
123
- "eslint": "9.39.1",
123
+ "eslint": "9.39.2",
124
124
  "eslint-plugin-html": "8.1.3",
125
125
  "eslint-plugin-import-x": "4.16.1",
126
126
  "eslint-plugin-react": "7.37.5",
127
127
  "eslint-plugin-regexp": "2.10.0",
128
128
  "globals": "16.5.0",
129
- "open": "10.2.0",
130
- "playwright": "1.56.1",
129
+ "open": "11.0.0",
130
+ "playwright": "1.57.0",
131
131
  "preact": "11.0.0-beta.0",
132
- "prettier": "3.6.2",
132
+ "prettier": "3.7.4",
133
133
  "prettier-plugin-css-order": "git+https://github.com/dmail-fork/prettier-plugin-css-order.git",
134
134
  "prettier-plugin-embed": "0.5.0",
135
135
  "prettier-plugin-organize-imports": "4.3.0",
136
- "prettier-plugin-packagejson": "2.5.19",
136
+ "prettier-plugin-packagejson": "2.5.20",
137
137
  "prettier-plugin-sql": "0.19.2",
138
138
  "strip-ansi": "7.1.2"
139
139
  },
@@ -1,5 +1,3 @@
1
- /* eslint-env browser,node */
2
-
3
1
  /*
4
2
  * This file does not use export const InlineContent = function() {} on purpose:
5
3
  * - An export would be renamed by rollup,
@@ -25,9 +25,8 @@ import {
25
25
  import { createUrlInfoTransformer } from "./url_graph/url_info_transformations.js";
26
26
  import { urlSpecifierEncoding } from "./url_graph/url_specifier_encoding.js";
27
27
 
28
- const inlineContentClientFileUrl = import.meta.resolve(
29
- "./client/inline_content.js",
30
- );
28
+ const inlineContentClientFileUrl = import.meta
29
+ .resolve("./client/inline_content.js");
31
30
 
32
31
  export const createKitchen = ({
33
32
  name,
@@ -1,9 +1,8 @@
1
1
  import { injectJsenvScript, parseHtml, stringifyHtmlAst } from "@jsenv/ast";
2
2
 
3
3
  export const jsenvPluginAutoreloadOnServerRestart = () => {
4
- const autoreloadOnRestartClientFileUrl = import.meta.resolve(
5
- "@jsenv/server/src/services/autoreload_on_server_restart/client/autoreload_on_server_restart.js",
6
- );
4
+ const autoreloadOnRestartClientFileUrl = import.meta
5
+ .resolve("@jsenv/server/src/services/autoreload_on_server_restart/client/autoreload_on_server_restart.js");
7
6
 
8
7
  return {
9
8
  name: "jsenv:autoreload_on_server_restart",
@@ -5,9 +5,8 @@ import { readFileSync } from "node:fs";
5
5
  import { jsenvCoreDirectoryUrl } from "../../jsenv_core_directory_url.js";
6
6
 
7
7
  export const jsenvPluginHtmlSyntaxErrorFallback = () => {
8
- const htmlSyntaxErrorFileUrl = import.meta.resolve(
9
- "./client/html_syntax_error.html",
10
- );
8
+ const htmlSyntaxErrorFileUrl = import.meta
9
+ .resolve("./client/html_syntax_error.html");
11
10
 
12
11
  return {
13
12
  mustStayFirst: true,
@@ -26,12 +26,10 @@
26
26
  import { applyBabelPlugins } from "@jsenv/ast";
27
27
 
28
28
  export const jsenvPluginImportMetaCss = () => {
29
- const importMetaCssClientFileUrl = import.meta.resolve(
30
- "./client/import_meta_css.js",
31
- );
32
- const importMetaCssBuildFileUrl = import.meta.resolve(
33
- "./client/import_meta_css_build.js",
34
- );
29
+ const importMetaCssClientFileUrl = import.meta
30
+ .resolve("./client/import_meta_css.js");
31
+ const importMetaCssBuildFileUrl = import.meta
32
+ .resolve("./client/import_meta_css_build.js");
35
33
 
36
34
  return {
37
35
  name: "jsenv:import_meta_css",
@@ -5,9 +5,8 @@ import { babelPluginMetadataImportMetaHot } from "./babel_plugin_metadata_import
5
5
  import { collectHotDataFromHtmlAst } from "./html_hot_dependencies.js";
6
6
 
7
7
  export const jsenvPluginImportMetaHot = () => {
8
- const importMetaHotClientFileUrl = import.meta.resolve(
9
- "./client/import_meta_hot.js",
10
- );
8
+ const importMetaHotClientFileUrl = import.meta
9
+ .resolve("./client/import_meta_hot.js");
11
10
 
12
11
  return {
13
12
  name: "jsenv:import_meta_hot",
@@ -10,19 +10,19 @@ p,
10
10
  button {
11
11
  margin: 0;
12
12
  padding: 0;
13
- border: 0;
14
13
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
14
+ border: 0;
15
15
  -webkit-font-smoothing: antialiased;
16
16
  -moz-osx-font-smoothing: grayscale;
17
17
  }
18
18
 
19
19
  /* ERROR MESSAGE */
20
20
  .error_message {
21
+ display: block;
22
+ margin: 1em;
23
+ padding: 1.5em 1.2em;
21
24
  background-color: #fce4e4;
22
25
  border: 1px solid #fcc2c3;
23
- padding: 1.5em 1.2em;
24
- margin: 1em;
25
- display: block;
26
26
  }
27
27
  .error_text {
28
28
  color: #853611;
@@ -30,26 +30,26 @@ button {
30
30
  text-shadow: 1px 1px rgba(250, 250, 250, 0.3);
31
31
  }
32
32
  .hint_message {
33
+ display: block;
34
+ margin: 1em;
35
+ padding: 1.5em 1.2em;
33
36
  background-color: lightblue;
34
37
  border: 1px solid #fcc2c3;
35
- padding: 1.5em 1.2em;
36
- margin: 1em;
37
- display: block;
38
38
  }
39
39
  .hint_text {
40
40
  color: black;
41
41
  font-weight: bold;
42
- line-height: 2em;
43
42
  text-shadow: 1px 1px rgba(250, 250, 250, 0.3);
43
+ line-height: 2em;
44
44
  }
45
45
 
46
46
  /* NAV */
47
47
  .nav {
48
- font-size: 16px;
49
- font-weight: bold;
50
- margin: 20px 25px 15px 25px;
51
48
  display: flex;
49
+ margin: 20px 25px 15px 25px;
52
50
  gap: 0.3em;
51
+ font-weight: bold;
52
+ font-size: 16px;
53
53
  }
54
54
  .nav_item {
55
55
  display: flex;
@@ -73,8 +73,8 @@ a.nav_item_text {
73
73
  text-decoration: none;
74
74
  }
75
75
  .nav_item[data-404] .nav_item_text {
76
- background-color: yellow;
77
76
  color: #853611;
77
+ background-color: yellow;
78
78
  }
79
79
  .file_path_bad {
80
80
  text-decoration-line: underline;
@@ -82,13 +82,13 @@ a.nav_item_text {
82
82
  text-decoration-style: wavy;
83
83
  }
84
84
  .nav_item_badge_404 {
85
+ margin-right: 0.3em;
86
+ padding: 0.2em 0.1em;
85
87
  color: #853611;
88
+ font-size: 0.8em;
86
89
  text-align: center;
87
90
  background-color: yellow;
88
91
  border-radius: 5px;
89
- padding: 0.2em 0.1em;
90
- font-size: 0.8em;
91
- margin-right: 0.3em;
92
92
  }
93
93
 
94
94
  /* CONTENT */
@@ -98,36 +98,36 @@ a.nav_item_text {
98
98
  color: #bbbbbb;
99
99
  }
100
100
  .directory_content {
101
+ display: flex;
101
102
  margin: 10px 15px 10px 15px;
103
+ flex-direction: column;
102
104
  list-style-type: none;
103
105
  border-radius: 3px;
104
- display: flex;
105
- flex-direction: column;
106
106
  }
107
107
  .directory_content_item {
108
- display: inline-flex;
109
108
  position: relative;
110
- padding: 10px 15px 10px 15px;
111
- font-size: 15px;
112
- min-height: 19px;
109
+ display: inline-flex;
113
110
  box-sizing: border-box;
111
+ min-height: 19px;
112
+ padding: 10px 15px 10px 15px;
114
113
  align-items: center;
114
+ font-size: 15px;
115
115
  }
116
116
  .directory_content_item_link {
117
117
  display: inline-flex;
118
118
  min-width: 0;
119
119
  max-width: 100%;
120
120
  flex: 1;
121
- gap: 10px;
122
121
  align-items: center;
122
+ gap: 10px;
123
123
  text-decoration: none;
124
124
  }
125
125
  .directory_content_item_icon {
126
- width: 15px;
127
- aspect-ratio: 1/1;
128
126
  display: flex;
129
- color: #f1f1f1;
127
+ aspect-ratio: 1/1;
128
+ width: 15px;
130
129
  flex-shrink: 0;
130
+ color: #f1f1f1;
131
131
  }
132
132
  .directory_content_item_icon img {
133
133
  width: 100%;
@@ -138,13 +138,13 @@ a.nav_item_text {
138
138
  align-items: center;
139
139
  }
140
140
  .directory_content_item:last-child {
141
- border-bottom: none;
142
141
  padding-bottom: 10px;
142
+ border-bottom: none;
143
143
  }
144
144
  .directory_content_item_arrow {
145
145
  display: flex;
146
- color: #666666;
147
146
  height: 10px;
147
+ color: #666666;
148
148
  stroke-width: 15%;
149
149
  }
150
150
 
@@ -39,9 +39,8 @@ import { existsSync, lstatSync, readdirSync } from "node:fs";
39
39
  import { getDirectoryWatchPatterns } from "../../helpers/watch_source_files.js";
40
40
  import { FILE_AND_SERVER_URLS_CONVERTER } from "../../kitchen/file_and_server_urls_converter.js";
41
41
 
42
- const htmlFileUrlForDirectory = import.meta.resolve(
43
- "./client/directory_listing.html",
44
- );
42
+ const htmlFileUrlForDirectory = import.meta
43
+ .resolve("./client/directory_listing.html");
45
44
 
46
45
  export const jsenvPluginDirectoryListing = ({
47
46
  spa,
@@ -3,12 +3,7 @@ import {
3
3
  applyFileSystemMagicResolution,
4
4
  getExtensionsToTry,
5
5
  } from "@jsenv/node-esm-resolution";
6
- import {
7
- urlIsOrIsInsideOf,
8
- urlToExtension,
9
- urlToFilename,
10
- urlToPathname,
11
- } from "@jsenv/urls";
6
+ import { urlIsOrIsInsideOf, urlToExtension, urlToFilename } from "@jsenv/urls";
12
7
  import { existsSync, realpathSync } from "node:fs";
13
8
  import { pathToFileURL } from "node:url";
14
9
 
@@ -100,13 +95,7 @@ export const jsenvPluginFsRedirection = ({
100
95
  // 2. The url pathname does not have an extension
101
96
  // This point assume client is requesting a file when there is an extension
102
97
  // and it assumes all routes will not use extension
103
- // 3. The url pathname does not ends with "/"
104
- // In that case we assume client explicitely asks to load a directory
105
- if (
106
- spa &&
107
- !urlToExtension(urlObject) &&
108
- !urlToPathname(urlObject).endsWith("/")
109
- ) {
98
+ if (spa && !urlToExtension(urlObject)) {
110
99
  const { requestedUrl, rootDirectoryUrl, mainFilePath } =
111
100
  reference.ownerUrlInfo.context;
112
101
  const closestHtmlRootFile = getClosestHtmlRootFile(
@@ -2,14 +2,14 @@ export const injectRibbon = ({ text }) => {
2
2
  const css = /* css */ `
3
3
  #jsenv_ribbon_container {
4
4
  position: fixed;
5
- z-index: 1001;
6
5
  top: 0;
7
6
  right: 0;
7
+ z-index: 1001;
8
8
  width: 100px;
9
9
  height: 100px;
10
- overflow: hidden;
11
10
  opacity: 0.5;
12
11
  pointer-events: none;
12
+ overflow: hidden;
13
13
  }
14
14
  #jsenv_ribbon {
15
15
  position: absolute;
@@ -20,20 +20,20 @@ export const injectRibbon = ({ text }) => {
20
20
  }
21
21
  #jsenv_ribbon_text {
22
22
  position: absolute;
23
- left: 0px;
24
23
  top: 20px;
25
- transform: rotate(45deg);
24
+ left: 0px;
26
25
  display: block;
27
26
  width: 125px;
28
- line-height: 36px;
29
- background-color: orange;
30
27
  color: rgb(55, 7, 7);
31
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
32
28
  font-weight: 700;
33
29
  font-size: 16px;
34
30
  font-family: "Lato", sans-serif;
35
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
36
31
  text-align: center;
32
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
33
+ line-height: 36px;
34
+ background-color: orange;
35
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
36
+ transform: rotate(45deg);
37
37
  user-select: none;
38
38
  }
39
39
  `;