@jsenv/core 38.4.3 → 38.4.4
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/README.md +1 -1
- package/dist/jsenv_core.js +3283 -3283
- package/package.json +4 -5
- package/src/build/build.js +1 -1
- package/src/build/build_specifier_manager.js +1 -1
- package/src/build/build_urls_generator.js +1 -1
- package/src/build/start_build_server.js +1 -1
- package/src/dev/start_dev_server.js +1 -1
- package/src/helpers/command/command.js +1 -1
- package/src/kitchen/errors.js +3 -4
- package/src/kitchen/kitchen.js +1 -1
- package/src/kitchen/url_graph/references.js +2 -2
- package/src/kitchen/url_graph/url_graph_report.js +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "38.4.
|
|
3
|
+
"version": "38.4.4",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -65,17 +65,16 @@
|
|
|
65
65
|
"@jsenv/ast": "6.0.2",
|
|
66
66
|
"@jsenv/filesystem": "4.6.3",
|
|
67
67
|
"@jsenv/importmap": "1.2.1",
|
|
68
|
-
"@jsenv/inspect": "2.0.0",
|
|
69
68
|
"@jsenv/integrity": "0.0.1",
|
|
70
69
|
"@jsenv/js-module-fallback": "1.3.11",
|
|
71
|
-
"@jsenv/
|
|
70
|
+
"@jsenv/humanize": "1.0.0",
|
|
72
71
|
"@jsenv/node-esm-resolution": "1.0.2",
|
|
73
|
-
"@jsenv/plugin-bundling": "2.6.
|
|
72
|
+
"@jsenv/plugin-bundling": "2.6.5",
|
|
74
73
|
"@jsenv/plugin-minification": "1.5.4",
|
|
75
74
|
"@jsenv/plugin-supervisor": "1.4.2",
|
|
76
75
|
"@jsenv/plugin-transpilation": "1.3.11",
|
|
77
76
|
"@jsenv/runtime-compat": "1.2.2",
|
|
78
|
-
"@jsenv/server": "15.2.
|
|
77
|
+
"@jsenv/server": "15.2.2",
|
|
79
78
|
"@jsenv/sourcemap": "1.2.5",
|
|
80
79
|
"@jsenv/url-meta": "8.4.0",
|
|
81
80
|
"@jsenv/urls": "2.2.2",
|
package/src/build/build.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
writeFileSync,
|
|
23
23
|
} from "@jsenv/filesystem";
|
|
24
24
|
import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
|
|
25
|
-
import { createLogger, createTaskLog } from "@jsenv/
|
|
25
|
+
import { createLogger, createTaskLog } from "@jsenv/humanize";
|
|
26
26
|
import { parseHtml, stringifyHtmlAst } from "@jsenv/ast";
|
|
27
27
|
import { jsenvPluginBundling } from "@jsenv/plugin-bundling";
|
|
28
28
|
import { jsenvPluginMinification } from "@jsenv/plugin-minification";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import { createDetailedMessage, UNICODE } from "@jsenv/
|
|
2
|
+
import { createDetailedMessage, UNICODE } from "@jsenv/humanize";
|
|
3
3
|
import { comparePathnames } from "@jsenv/filesystem";
|
|
4
4
|
import { createMagicSource, generateSourcemapFileUrl } from "@jsenv/sourcemap";
|
|
5
5
|
import {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "@jsenv/server";
|
|
24
24
|
import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem";
|
|
25
25
|
import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
|
|
26
|
-
import { createLogger, createTaskLog } from "@jsenv/
|
|
26
|
+
import { createLogger, createTaskLog } from "@jsenv/humanize";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Start a server for build files.
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
assertAndNormalizeDirectoryUrl,
|
|
5
5
|
bufferToEtag,
|
|
6
6
|
} from "@jsenv/filesystem";
|
|
7
|
-
import { createLogger, createTaskLog } from "@jsenv/
|
|
7
|
+
import { createLogger, createTaskLog } from "@jsenv/humanize";
|
|
8
8
|
import {
|
|
9
9
|
jsenvAccessControlAllowedHeaders,
|
|
10
10
|
startServer,
|
package/src/kitchen/errors.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { pathToFileURL } from "node:url";
|
|
2
|
-
import { createDetailedMessage } from "@jsenv/
|
|
2
|
+
import { createDetailedMessage, generateContentFrame } from "@jsenv/humanize";
|
|
3
3
|
import { stringifyUrlSite } from "@jsenv/urls";
|
|
4
|
-
import { inspectFileContent } from "@jsenv/inspect";
|
|
5
4
|
|
|
6
5
|
export const createResolveUrlError = ({
|
|
7
6
|
pluginController,
|
|
@@ -154,7 +153,7 @@ export const createTransformUrlContentError = ({
|
|
|
154
153
|
urlInfo.firstReference.trace.line + error.line - 1;
|
|
155
154
|
transformError.trace.column =
|
|
156
155
|
urlInfo.firstReference.trace.column + error.column;
|
|
157
|
-
transformError.trace.codeFrame =
|
|
156
|
+
transformError.trace.codeFrame = generateContentFrame({
|
|
158
157
|
line: transformError.trace.line,
|
|
159
158
|
column: transformError.trace.column,
|
|
160
159
|
content: urlInfo.inlineUrlSite.content,
|
|
@@ -170,7 +169,7 @@ export const createTransformUrlContentError = ({
|
|
|
170
169
|
url: urlInfo.url,
|
|
171
170
|
line: error.line,
|
|
172
171
|
column: error.column,
|
|
173
|
-
codeFrame:
|
|
172
|
+
codeFrame: generateContentFrame({
|
|
174
173
|
line: error.line - 1,
|
|
175
174
|
column: error.column,
|
|
176
175
|
content: urlInfo.content,
|
package/src/kitchen/kitchen.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "@jsenv/urls";
|
|
7
7
|
import { URL_META } from "@jsenv/url-meta";
|
|
8
8
|
import { ensureWindowsDriveLetter } from "@jsenv/filesystem";
|
|
9
|
-
import { createLogger, createDetailedMessage, ANSI } from "@jsenv/
|
|
9
|
+
import { createLogger, createDetailedMessage, ANSI } from "@jsenv/humanize";
|
|
10
10
|
import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
|
|
11
11
|
import { RUNTIME_COMPAT } from "@jsenv/runtime-compat";
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
urlToExtension,
|
|
6
6
|
} from "@jsenv/urls";
|
|
7
7
|
import { generateUrlForInlineContent } from "@jsenv/ast";
|
|
8
|
-
import {
|
|
8
|
+
import { generateContentFrame } from "@jsenv/humanize";
|
|
9
9
|
|
|
10
10
|
import { isWebWorkerEntryPointReference } from "../web_workers.js";
|
|
11
11
|
import { prependContent } from "../prepend_content.js";
|
|
@@ -621,7 +621,7 @@ const applyDependencyRemovalEffects = (reference) => {
|
|
|
621
621
|
const traceFromUrlSite = (urlSite) => {
|
|
622
622
|
return {
|
|
623
623
|
codeFrame: urlSite.content
|
|
624
|
-
?
|
|
624
|
+
? generateContentFrame({
|
|
625
625
|
content: urlSite.content,
|
|
626
626
|
line: urlSite.line,
|
|
627
627
|
column: urlSite.column,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ANSI } from "@jsenv/log";
|
|
1
|
+
import { humanizeFileSize, distributePercentages, ANSI } from "@jsenv/humanize";
|
|
3
2
|
|
|
4
3
|
import { GRAPH_VISITOR } from "./url_graph_visitor.js";
|
|
5
4
|
|
|
@@ -168,7 +167,7 @@ const determineCategory = (urlInfo) => {
|
|
|
168
167
|
const createRepartitionMessage = ({ html, css, js, json, other, total }) => {
|
|
169
168
|
const addPart = (name, { count, size, percentage }) => {
|
|
170
169
|
parts.push(
|
|
171
|
-
`${ANSI.color(`${name}:`, ANSI.GREY)} ${count} (${
|
|
170
|
+
`${ANSI.color(`${name}:`, ANSI.GREY)} ${count} (${humanizeFileSize(
|
|
172
171
|
size,
|
|
173
172
|
)} / ${percentage} %)`,
|
|
174
173
|
);
|
|
@@ -179,7 +178,7 @@ const createRepartitionMessage = ({ html, css, js, json, other, total }) => {
|
|
|
179
178
|
// parts.push(
|
|
180
179
|
// `${ANSI.color(`sourcemaps:`, ANSI.GREY)} ${
|
|
181
180
|
// sourcemaps.count
|
|
182
|
-
// } (${
|
|
181
|
+
// } (${humanizeFileSize(sourcemaps.size)})`,
|
|
183
182
|
// )
|
|
184
183
|
// }
|
|
185
184
|
if (html.count) {
|