@jsenv/file-size-impact 12.0.0 → 12.1.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.
- package/{license → LICENSE} +0 -0
- package/{index.js → main.js} +0 -0
- package/package.json +22 -32
- package/src/brotliTransformation.js +8 -3
- package/src/generateFileSizeReport.js +39 -18
- package/src/gzipTransformation.js +5 -2
- package/src/internal/applyTrackingConfig.js +9 -5
- package/src/internal/compareTwoFileSizeReports.js +3 -32
- package/src/internal/formatFileSizeReportForLog.js +6 -3
- package/src/internal/formatSize.js +1 -1
- package/src/internal/manifest.js +32 -0
- package/src/reportFileSizeImpact.js +14 -5
package/{license → LICENSE}
RENAMED
|
File without changes
|
package/{index.js → main.js}
RENAMED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/file-size-impact",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.3",
|
|
4
4
|
"description": "Add files size impact into pull requests",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/jsenv/
|
|
8
|
+
"url": "https://github.com/jsenv/workflow",
|
|
9
|
+
"directory": "packages/jsenv-file-size-impact"
|
|
9
10
|
},
|
|
10
11
|
"engines": {
|
|
11
12
|
"node": ">=14.17.0"
|
|
@@ -17,50 +18,39 @@
|
|
|
17
18
|
"type": "module",
|
|
18
19
|
"exports": {
|
|
19
20
|
".": {
|
|
20
|
-
"import": "./
|
|
21
|
+
"import": "./main.js"
|
|
21
22
|
},
|
|
22
23
|
"./*": "./*"
|
|
23
24
|
},
|
|
25
|
+
"main": "./main.js",
|
|
24
26
|
"files": [
|
|
25
27
|
"/src/",
|
|
26
|
-
"/
|
|
28
|
+
"/main.js"
|
|
27
29
|
],
|
|
28
30
|
"scripts": {
|
|
29
|
-
"eslint
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"generate-comment-snapshot-file": "node ./test/comment/generate_comment_snapshot_file.mjs",
|
|
31
|
+
"eslint": "npx eslint . --ext=.js,.mjs",
|
|
32
|
+
"importmap": "node ./script/importmap/importmap.mjs",
|
|
33
|
+
"snapshot": "node ./test/comment/generate_comment_snapshot_file.mjs",
|
|
33
34
|
"test": "node ./script/test/test.mjs",
|
|
34
35
|
"test-with-coverage": "npm run test -- --coverage",
|
|
35
|
-
"
|
|
36
|
-
"prettier
|
|
37
|
-
"prettier-check": "npm run prettier-format -- --dry-run",
|
|
38
|
-
"prepublishOnly": "node ./script/publish/remove_postinstall.mjs",
|
|
39
|
-
"postpublish": "node ./script/publish/restore_postinstall.mjs"
|
|
36
|
+
"file-size": "node ./script/file_size/file_size.mjs --log",
|
|
37
|
+
"prettier": "prettier --write ."
|
|
40
38
|
},
|
|
41
39
|
"dependencies": {
|
|
42
|
-
"@jsenv/dynamic-import-worker": "1.0.
|
|
43
|
-
"@jsenv/filesystem": "2.
|
|
44
|
-
"@jsenv/github-pull-request-impact": "1.6.
|
|
40
|
+
"@jsenv/dynamic-import-worker": "1.0.1",
|
|
41
|
+
"@jsenv/filesystem": "2.7.1",
|
|
42
|
+
"@jsenv/github-pull-request-impact": "1.6.6",
|
|
45
43
|
"@jsenv/logger": "4.0.1",
|
|
46
44
|
"pretty-bytes": "5.6.0"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@jsenv/
|
|
52
|
-
"@jsenv/
|
|
53
|
-
"@jsenv/
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"@jsenv/github-release-package": "1.2.3",
|
|
58
|
-
"@jsenv/importmap-eslint-resolver": "5.1.2",
|
|
59
|
-
"@jsenv/importmap-node-module": "2.4.1",
|
|
60
|
-
"@jsenv/package-publish": "1.6.2",
|
|
61
|
-
"@jsenv/prettier-check-project": "5.6.1",
|
|
62
|
-
"eslint": "7.32.0",
|
|
63
|
-
"eslint-plugin-import": "2.25.2",
|
|
64
|
-
"prettier": "2.4.1"
|
|
47
|
+
"@jsenv/assert": "2.4.1",
|
|
48
|
+
"@jsenv/core": "25.3.0",
|
|
49
|
+
"@jsenv/eslint-config": "16.0.9",
|
|
50
|
+
"@jsenv/importmap-eslint-resolver": "5.2.5",
|
|
51
|
+
"@jsenv/importmap-node-module": "5.1.3",
|
|
52
|
+
"eslint": "8.7.0",
|
|
53
|
+
"eslint-plugin-import": "2.25.4",
|
|
54
|
+
"prettier": "2.5.1"
|
|
65
55
|
}
|
|
66
56
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { brotliCompress, constants } from "zlib"
|
|
1
|
+
import { brotliCompress, constants } from "node:zlib"
|
|
2
2
|
|
|
3
3
|
export const name = "brotli"
|
|
4
4
|
|
|
5
5
|
export const transform = (
|
|
6
6
|
value,
|
|
7
|
-
{
|
|
7
|
+
{
|
|
8
|
+
quality = constants.BROTLI_MAX_QUALITY,
|
|
9
|
+
size = Buffer.from(value).length,
|
|
10
|
+
...rest
|
|
11
|
+
} = {},
|
|
8
12
|
) => {
|
|
9
13
|
return new Promise((resolve, reject) => {
|
|
10
14
|
brotliCompress(
|
|
@@ -12,7 +16,8 @@ export const transform = (
|
|
|
12
16
|
{
|
|
13
17
|
params: {
|
|
14
18
|
[constants.BROTLI_PARAM_QUALITY]: quality,
|
|
15
|
-
[constants.BROTLI_PARAM_SIZE_HINT]:
|
|
19
|
+
[constants.BROTLI_PARAM_SIZE_HINT]:
|
|
20
|
+
typeof size === "number" ? size : 0,
|
|
16
21
|
...rest,
|
|
17
22
|
},
|
|
18
23
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createDetailedMessage, createLogger } from "@jsenv/logger"
|
|
2
1
|
import {
|
|
3
2
|
assertAndNormalizeDirectoryUrl,
|
|
4
3
|
bufferToEtag,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
readFile,
|
|
7
6
|
urlToFileSystemPath,
|
|
8
7
|
} from "@jsenv/filesystem"
|
|
8
|
+
import { createDetailedMessage, createLogger } from "@jsenv/logger"
|
|
9
9
|
|
|
10
10
|
import { transform as rawTransform } from "./rawTransformation.js"
|
|
11
11
|
import { jsenvTrackingConfig } from "./jsenvTrackingConfig.js"
|
|
@@ -47,12 +47,15 @@ export const generateFileSizeReport = async ({
|
|
|
47
47
|
await Promise.all(
|
|
48
48
|
groupNames.map(async (groupName) => {
|
|
49
49
|
const groupTrackingResult = groupTrackingResults[groupName]
|
|
50
|
-
const groupReport = await groupTrackingResultToGroupReport(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
const groupReport = await groupTrackingResultToGroupReport(
|
|
51
|
+
groupTrackingResult,
|
|
52
|
+
{
|
|
53
|
+
logger,
|
|
54
|
+
projectDirectoryUrl,
|
|
55
|
+
tracking: trackingConfig[groupName],
|
|
56
|
+
transformations,
|
|
57
|
+
},
|
|
58
|
+
)
|
|
56
59
|
groups[groupName] = groupReport
|
|
57
60
|
}),
|
|
58
61
|
)
|
|
@@ -78,18 +81,26 @@ const groupTrackingResultToGroupReport = async (
|
|
|
78
81
|
const manifestRelativeUrls = Object.keys(manifestMetaMap)
|
|
79
82
|
await Promise.all(
|
|
80
83
|
manifestRelativeUrls.map(async (manifestRelativeUrl) => {
|
|
81
|
-
const manifestFileUrl = resolveUrl(
|
|
82
|
-
|
|
84
|
+
const manifestFileUrl = resolveUrl(
|
|
85
|
+
manifestRelativeUrl,
|
|
86
|
+
projectDirectoryUrl,
|
|
87
|
+
)
|
|
88
|
+
const manifestFileContent = await readFile(manifestFileUrl, {
|
|
89
|
+
as: "string",
|
|
90
|
+
})
|
|
83
91
|
let manifest
|
|
84
92
|
try {
|
|
85
93
|
manifest = JSON.parse(manifestFileContent)
|
|
86
94
|
} catch (e) {
|
|
87
95
|
if (e.name === "SyntaxError") {
|
|
88
96
|
logger.error(
|
|
89
|
-
createDetailedMessage(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
createDetailedMessage(
|
|
98
|
+
`JSON.parse error while trying to parse a manifest file`,
|
|
99
|
+
{
|
|
100
|
+
"error stack": e.stack,
|
|
101
|
+
"manifest file": urlToFileSystemPath(manifestFileUrl),
|
|
102
|
+
},
|
|
103
|
+
),
|
|
93
104
|
)
|
|
94
105
|
return
|
|
95
106
|
}
|
|
@@ -109,7 +120,11 @@ const groupTrackingResultToGroupReport = async (
|
|
|
109
120
|
const fileUrl = resolveUrl(fileRelativeUrl, projectDirectoryUrl)
|
|
110
121
|
const fileContent = await readFile(fileUrl)
|
|
111
122
|
const fileBuffer = Buffer.from(fileContent)
|
|
112
|
-
const sizeMap = await getFileSizeMap(fileBuffer, {
|
|
123
|
+
const sizeMap = await getFileSizeMap(fileBuffer, {
|
|
124
|
+
transformations,
|
|
125
|
+
logger,
|
|
126
|
+
fileUrl,
|
|
127
|
+
})
|
|
113
128
|
const hash = bufferToEtag(fileBuffer)
|
|
114
129
|
fileMap[fileRelativeUrl] = {
|
|
115
130
|
sizeMap,
|
|
@@ -125,7 +140,10 @@ const groupTrackingResultToGroupReport = async (
|
|
|
125
140
|
}
|
|
126
141
|
}
|
|
127
142
|
|
|
128
|
-
const getFileSizeMap = async (
|
|
143
|
+
const getFileSizeMap = async (
|
|
144
|
+
fileBuffer,
|
|
145
|
+
{ transformations, logger, fileUrl },
|
|
146
|
+
) => {
|
|
129
147
|
const sizeMap = {}
|
|
130
148
|
await Object.keys(transformations).reduce(async (previous, sizeName) => {
|
|
131
149
|
await previous
|
|
@@ -135,9 +153,12 @@ const getFileSizeMap = async (fileBuffer, { transformations, logger, fileUrl })
|
|
|
135
153
|
sizeMap[sizeName] = Buffer.from(transformResult).length
|
|
136
154
|
} catch (e) {
|
|
137
155
|
logger.error(
|
|
138
|
-
createDetailedMessage(
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
createDetailedMessage(
|
|
157
|
+
`error while transforming ${fileUrl} with ${sizeName}`,
|
|
158
|
+
{
|
|
159
|
+
"error stack": e.stack,
|
|
160
|
+
},
|
|
161
|
+
),
|
|
141
162
|
)
|
|
142
163
|
sizeMap[sizeName] = "error"
|
|
143
164
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { gzip, constants } from "zlib"
|
|
1
|
+
import { gzip, constants } from "node:zlib"
|
|
2
2
|
|
|
3
3
|
export const name = "gzip"
|
|
4
4
|
|
|
5
|
-
export const transform = (
|
|
5
|
+
export const transform = (
|
|
6
|
+
value,
|
|
7
|
+
{ level = constants.Z_MAX_LEVEL, ...rest } = {},
|
|
8
|
+
) => {
|
|
6
9
|
return new Promise((resolve, reject) => {
|
|
7
10
|
gzip(value, { level, ...rest }, (error, buffer) => {
|
|
8
11
|
if (error) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
urlToFileSystemPath,
|
|
3
|
+
collectDirectoryMatchReport,
|
|
4
|
+
} from "@jsenv/filesystem"
|
|
3
5
|
|
|
4
6
|
export const applyTrackingConfig = async (
|
|
5
7
|
trackingConfig,
|
|
6
|
-
{
|
|
8
|
+
{ projectDirectoryUrl, manifestConfig },
|
|
7
9
|
) => {
|
|
8
10
|
const result = {}
|
|
9
11
|
const trackingNames = Object.keys(trackingConfig)
|
|
@@ -19,13 +21,15 @@ export const applyTrackingConfig = async (
|
|
|
19
21
|
manifestConfig,
|
|
20
22
|
})
|
|
21
23
|
result[trackingName] = groupTrackingResult
|
|
22
|
-
cancellationToken.throwIfRequested()
|
|
23
24
|
}),
|
|
24
25
|
)
|
|
25
26
|
return result
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
const applyTracking = async (
|
|
29
|
+
const applyTracking = async (
|
|
30
|
+
tracking,
|
|
31
|
+
{ projectDirectoryUrl, manifestConfig },
|
|
32
|
+
) => {
|
|
29
33
|
const structuredMetaMap = {
|
|
30
34
|
track: tracking,
|
|
31
35
|
...(manifestConfig ? { manifest: manifestConfig } : {}),
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { comparePathnames } from "@jsenv/filesystem"
|
|
2
|
+
|
|
3
|
+
import { manifestToMappings, manifestKeyFromRelativeUrl } from "./manifest.js"
|
|
2
4
|
|
|
3
5
|
export const compareTwoFileSizeReports = ({
|
|
4
6
|
afterMergeFileSizeReport,
|
|
@@ -146,37 +148,6 @@ const compareTwoGroups = (beforeMergeGroup, afterMergeGroup) => {
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
const ABSTRACT_DIRECTORY_URL = "file:///directory/"
|
|
150
|
-
|
|
151
|
-
const manifestToMappings = (manifestMap) => {
|
|
152
|
-
const mappings = {}
|
|
153
|
-
Object.keys(manifestMap).forEach((manifestRelativeUrl) => {
|
|
154
|
-
const manifest = manifestMap[manifestRelativeUrl]
|
|
155
|
-
const manifestAbstractUrl = resolveUrl(manifestRelativeUrl, ABSTRACT_DIRECTORY_URL)
|
|
156
|
-
Object.keys(manifest).forEach((manifestKey) => {
|
|
157
|
-
const manifestValue = manifest[manifestKey]
|
|
158
|
-
const manifestKeyAsAbstractUrl = resolveUrl(manifestKey, manifestAbstractUrl)
|
|
159
|
-
const manifestValueAsAbstractUrl = resolveUrl(manifestValue, manifestAbstractUrl)
|
|
160
|
-
const manifestKeyAsRelativeUrl = urlToRelativeUrl(
|
|
161
|
-
manifestKeyAsAbstractUrl,
|
|
162
|
-
ABSTRACT_DIRECTORY_URL,
|
|
163
|
-
)
|
|
164
|
-
const manifestValueAsRelativeUrl = urlToRelativeUrl(
|
|
165
|
-
manifestValueAsAbstractUrl,
|
|
166
|
-
ABSTRACT_DIRECTORY_URL,
|
|
167
|
-
)
|
|
168
|
-
mappings[manifestKeyAsRelativeUrl] = manifestValueAsRelativeUrl
|
|
169
|
-
})
|
|
170
|
-
})
|
|
171
|
-
return mappings
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const manifestKeyFromRelativeUrl = (relativeUrl, mappings) => {
|
|
175
|
-
return Object.keys(mappings).find((keyCandidate) => {
|
|
176
|
-
return mappings[keyCandidate] === relativeUrl
|
|
177
|
-
})
|
|
178
|
-
}
|
|
179
|
-
|
|
180
151
|
const sortFileStructure = (fileStructure) => {
|
|
181
152
|
const relativeUrlSortedArray = Object.keys(fileStructure).sort(comparePathnames)
|
|
182
153
|
const fileStructureSorted = {}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { formatSize } from "./formatSize.js"
|
|
2
|
+
import { manifestToMappings, manifestKeyFromRelativeUrl } from "./manifest.js"
|
|
2
3
|
|
|
3
4
|
export const formatFileSizeReportForLog = (fileSizeReport) => {
|
|
4
5
|
const { groups } = fileSizeReport
|
|
5
6
|
|
|
6
7
|
const groupMessages = Object.keys(groups).map((groupName) => {
|
|
7
|
-
const { fileMap } = groups[groupName]
|
|
8
|
+
const { fileMap, manifestMap } = groups[groupName]
|
|
8
9
|
|
|
10
|
+
const mappings = manifestToMappings(manifestMap)
|
|
9
11
|
const fileMessages = Object.keys(fileMap).map((fileRelativeUrl) => {
|
|
12
|
+
const fileDisplayed = manifestKeyFromRelativeUrl(fileRelativeUrl, mappings) || fileRelativeUrl
|
|
10
13
|
const file = fileMap[fileRelativeUrl]
|
|
11
14
|
const { sizeMap } = file
|
|
12
15
|
const sizeNames = Object.keys(sizeMap)
|
|
13
16
|
if (sizeNames.length === 1) {
|
|
14
|
-
return `${
|
|
17
|
+
return `${fileDisplayed}: ${formatSize(sizeMap[sizeNames[0]])}`
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const sizesFormatted = sizeNames.map((sizeName) => {
|
|
18
21
|
return `${sizeName}: ${formatSize(sizeMap[sizeName])}`
|
|
19
22
|
})
|
|
20
|
-
return `${
|
|
23
|
+
return `${fileDisplayed}: { ${sizesFormatted.join(`, `)} }`
|
|
21
24
|
})
|
|
22
25
|
|
|
23
26
|
return `${groupName}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { resolveUrl, urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
|
+
|
|
3
|
+
export const manifestToMappings = (manifestMap) => {
|
|
4
|
+
const mappings = {}
|
|
5
|
+
Object.keys(manifestMap).forEach((manifestRelativeUrl) => {
|
|
6
|
+
const manifest = manifestMap[manifestRelativeUrl]
|
|
7
|
+
const manifestAbstractUrl = resolveUrl(manifestRelativeUrl, ABSTRACT_DIRECTORY_URL)
|
|
8
|
+
Object.keys(manifest).forEach((manifestKey) => {
|
|
9
|
+
const manifestValue = manifest[manifestKey]
|
|
10
|
+
const manifestKeyAsAbstractUrl = resolveUrl(manifestKey, manifestAbstractUrl)
|
|
11
|
+
const manifestValueAsAbstractUrl = resolveUrl(manifestValue, manifestAbstractUrl)
|
|
12
|
+
const manifestKeyAsRelativeUrl = urlToRelativeUrl(
|
|
13
|
+
manifestKeyAsAbstractUrl,
|
|
14
|
+
ABSTRACT_DIRECTORY_URL,
|
|
15
|
+
)
|
|
16
|
+
const manifestValueAsRelativeUrl = urlToRelativeUrl(
|
|
17
|
+
manifestValueAsAbstractUrl,
|
|
18
|
+
ABSTRACT_DIRECTORY_URL,
|
|
19
|
+
)
|
|
20
|
+
mappings[manifestKeyAsRelativeUrl] = manifestValueAsRelativeUrl
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
return mappings
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const ABSTRACT_DIRECTORY_URL = "file:///directory/"
|
|
27
|
+
|
|
28
|
+
export const manifestKeyFromRelativeUrl = (relativeUrl, mappings) => {
|
|
29
|
+
return Object.keys(mappings).find((keyCandidate) => {
|
|
30
|
+
return mappings[keyCandidate] === relativeUrl
|
|
31
|
+
})
|
|
32
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assertAndNormalizeDirectoryUrl, resolveUrl } from "@jsenv/filesystem"
|
|
2
1
|
import { commentGitHubPullRequestImpact } from "@jsenv/github-pull-request-impact"
|
|
2
|
+
import { assertAndNormalizeDirectoryUrl, resolveUrl } from "@jsenv/filesystem"
|
|
3
3
|
import { importOneExportFromFile } from "@jsenv/dynamic-import-worker"
|
|
4
4
|
|
|
5
5
|
import { formatComment } from "./internal/formatComment.js"
|
|
@@ -39,13 +39,17 @@ export const reportFileSizeImpact = async ({
|
|
|
39
39
|
if (installCommand === null) {
|
|
40
40
|
// a null installCommand means there is no need to install anything
|
|
41
41
|
} else if (typeof installCommand !== "string") {
|
|
42
|
-
throw new TypeError(
|
|
42
|
+
throw new TypeError(
|
|
43
|
+
`installCommand must be a string but received ${installCommand}`,
|
|
44
|
+
)
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
if (buildCommand === null) {
|
|
46
48
|
// a null buildCommand means there is no need to build anything
|
|
47
49
|
} else if (typeof buildCommand !== "string") {
|
|
48
|
-
throw new TypeError(
|
|
50
|
+
throw new TypeError(
|
|
51
|
+
`buildCommand must be a string but received ${buildCommand}`,
|
|
52
|
+
)
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
if (typeof fileSizeReportModulePath !== "string") {
|
|
@@ -54,7 +58,10 @@ export const reportFileSizeImpact = async ({
|
|
|
54
58
|
)
|
|
55
59
|
}
|
|
56
60
|
projectDirectoryUrl = assertAndNormalizeDirectoryUrl(projectDirectoryUrl)
|
|
57
|
-
const fileSizeReportModuleUrl = resolveUrl(
|
|
61
|
+
const fileSizeReportModuleUrl = resolveUrl(
|
|
62
|
+
fileSizeReportModulePath,
|
|
63
|
+
projectDirectoryUrl,
|
|
64
|
+
)
|
|
58
65
|
|
|
59
66
|
return commentGitHubPullRequestImpact({
|
|
60
67
|
logLevel,
|
|
@@ -71,7 +78,9 @@ export const reportFileSizeImpact = async ({
|
|
|
71
78
|
collectInfo: async ({ execCommandInProjectDirectory }) => {
|
|
72
79
|
if (installCommand) await execCommandInProjectDirectory(installCommand)
|
|
73
80
|
if (buildCommand) await execCommandInProjectDirectory(buildCommand)
|
|
74
|
-
const fileSizeReport = await importOneExportFromFile(
|
|
81
|
+
const fileSizeReport = await importOneExportFromFile(
|
|
82
|
+
fileSizeReportModuleUrl,
|
|
83
|
+
)
|
|
75
84
|
return { version: 1, data: fileSizeReport }
|
|
76
85
|
},
|
|
77
86
|
commentIdentifier: `<!-- Generated by @jsenv/file-size-impact -->`,
|