269
269
"output" : " dist\n index.mjs\n |const o=0;export{o as test};\n |\n package.json\n |{}\n |\n src\n index.js\n |export const test = 0;" ,
270
270
"stdout" : " preparing..\n\n preparing...\n src → dist 0 / 1\n ✓ index [es]\n src → dist 1 / 1\n ✓ src → dist 1 / 1 in XXX\n " ,
271
271
"stderr" : " "
272
+ },
273
+ {
274
+ "id" : 29 ,
275
+ "name" : " remove legal comments" ,
276
+ "args" : " --remove-legal-comments --compress=es,cjs" ,
277
+ "input" : " package.json\n |{\n | \" exports\" : {\n | \" .\" : {\n | \" import\" : \" ./dist/index.mjs\"\n | }\n | }\n |}\n src\n index.ts\n |//! Copyright (c) 2024 Konstantin Shutkin MIT License\n |export const test = 0;" ,
278
+ "output": "dist\n index.cjs\n|\"use strict\";exports.test=0;\n|\n index.d.ts\n|export declare const test = 0;\n|\n index.mjs\n|const o=0;export{o as test};\n|\npackage.json\n|{\n| \"exports\": {\n| \".\": {\n| \"types\": \"./dist/index.d.ts\",\n| \"import\": \"./dist/index.mjs\",\n| \"require\": \"./dist/index.cjs\",\n| \"default\": \"./dist/index.cjs\"\n| },\n| \"./package.json\": \"./package.json\"\n| },\n| \"files\": [\n| \"dist\"\n| ],\n| \"scripts\": {\n| \"prepack\": \"pkgbld prune\"\n| },\n| \"types\": \"./dist/index.d.ts\",\n| \"main\": \"./dist/index.cjs\",\n| \"module\": \"./dist/index.mjs\",\n| \"typesVersions\": {\n| \"*\": {\n| \".\": [\n| \"dist/index.d.ts\"\n| ],\n| \"*\": [\n| \"dist/index.d.ts\",\n| \"dist/*\"\n| ]\n| }\n| }\n|}\n|\nsrc\n index.ts\n|//! Copyright (c) 2024 Konstantin Shutkin MIT License\n|export const test = 0;\ntsconfig.json\n|{\n| \"include\": [\n| \"src\",\n| \"types\"\n| ],\n| \"compilerOptions\": {\n| \"lib\": [\n| \"dom\",\n| \"esnext\"\n| ],\n| \"target\": \"esnext\",\n| \"module\": \"esnext\",\n| \"esModuleInterop\": true,\n| \"allowJs\": true,\n| \"skipLibCheck\": true,\n| \"strict\": true,\n| \"sourceMap\": true,\n| \"noUncheckedIndexedAccess\": true,\n| \"declaration\": true,\n| \"moduleResolution\": \"node\"\n| }\n|}\n|",
279
+ "stdout" : " preparing..\n\n preparing...\n no tsconfig.json or jsconfig.json and --no-ts-config not specified, writing tsconfig...\n done\n src → dist 0 / 1\n ✓ index [es, cjs]\n src → dist 1 / 1\n ✓ src → dist 1 / 1 in XXX\n " ,
280
+ "stderr" : " "
281
+ },
282
+ {
283
+ "id" : 30 ,
284
+ "name" : " legal comments" ,
285
+ "args" : " --compress=es,cjs" ,
286
+ "input" : " package.json\n |{\n | \" exports\" : {\n | \" .\" : {\n | \" import\" : \" ./dist/index.mjs\"\n | }\n | }\n |}\n src\n index.ts\n |//! Copyright (c) 2024 Konstantin Shutkin MIT License\n |export const test = 0;" ,
287
+ "output": "dist\n index.cjs\n|\"use strict\";\n|//! Copyright (c) 2024 Konstantin Shutkin MIT License\n|exports.test=0;\n|\n index.d.ts\n|export declare const test = 0;\n|\n index.mjs\n|//! Copyright (c) 2024 Konstantin Shutkin MIT License\n|const o=0;export{o as test};\n|\npackage.json\n|{\n| \"exports\": {\n| \".\": {\n| \"types\": \"./dist/index.d.ts\",\n| \"import\": \"./dist/index.mjs\",\n| \"require\": \"./dist/index.cjs\",\n| \"default\": \"./dist/index.cjs\"\n| },\n| \"./package.json\": \"./package.json\"\n| },\n| \"files\": [\n| \"dist\"\n| ],\n| \"scripts\": {\n| \"prepack\": \"pkgbld prune\"\n| },\n| \"types\": \"./dist/index.d.ts\",\n| \"main\": \"./dist/index.cjs\",\n| \"module\": \"./dist/index.mjs\",\n| \"typesVersions\": {\n| \"*\": {\n| \".\": [\n| \"dist/index.d.ts\"\n| ],\n| \"*\": [\n| \"dist/index.d.ts\",\n| \"dist/*\"\n| ]\n| }\n| }\n|}\n|\nsrc\n index.ts\n|//! Copyright (c) 2024 Konstantin Shutkin MIT License\n|export const test = 0;\ntsconfig.json\n|{\n| \"include\": [\n| \"src\",\n| \"types\"\n| ],\n| \"compilerOptions\": {\n| \"lib\": [\n| \"dom\",\n| \"esnext\"\n| ],\n| \"target\": \"esnext\",\n| \"module\": \"esnext\",\n| \"esModuleInterop\": true,\n| \"allowJs\": true,\n| \"skipLibCheck\": true,\n| \"strict\": true,\n| \"sourceMap\": true,\n| \"noUncheckedIndexedAccess\": true,\n| \"declaration\": true,\n| \"moduleResolution\": \"node\"\n| }\n|}\n|",
288
+ "stdout" : " preparing..\n\n preparing...\n no tsconfig.json or jsconfig.json and --no-ts-config not specified, writing tsconfig...\n done\n src → dist 0 / 1\n ✓ index [es, cjs]\n src → dist 1 / 1\n ✓ src → dist 1 / 1 in XXX\n " ,
289
+ "stderr" : " "
290
+ }
291
+ ],
292
+ "capture" : [
293
+ {
294
+ "id" : 31 ,
295
+ "name" : " " ,
296
+ "input" : " package.json\n |{\n | \" exports\" : {\n | \" .\" : {\n | \" import\" : \" ./dist/index.mjs\"\n | },\n | \" ./folder/second\" : { \n | \" import\" : \" ./dist/folder/second.mjs\"\n | }\n | }\n |}\n src\n folder\n second.ts\n |export const t = 0;\n index.ts\n |export const test = 0;" ,
297
+ "output": "dist\n folder\n second.d.ts\n|export declare const t = 0;\n|\n index.cjs\n|'use strict';\n|\n|const test = 0;\n|\n|exports.test = test;\n|\n index.d.ts\n|export declare const test = 0;\n|\n index.mjs\n|const test = 0;\n|\n|export { test };\n|\n second.cjs\n|'use strict';\n|\n|const t = 0;\n|\n|exports.t = t;\n|\n second.mjs\n|const t = 0;\n|\n|export { t };\n|\npackage.json\n|{\n| \"exports\": {\n| \".\": {\n| \"types\": \"./dist/index.d.ts\",\n| \"import\": \"./dist/index.mjs\",\n| \"require\": \"./dist/index.cjs\",\n| \"default\": \"./dist/index.cjs\"\n| },\n| \"./folder/second\": {\n| \"types\": \"./dist/folder/second.d.ts\",\n| \"import\": \"./dist/folder/second.mjs\",\n| \"default\": \"./dist/folder/second.cjs\"\n| },\n| \"./package.json\": \"./package.json\"\n| },\n| \"files\": [\n| \"dist\",\n| \"folder/second\"\n| ],\n| \"scripts\": {\n| \"prepack\": \"pkgbld prune\"\n| },\n| \"types\": \"./dist/index.d.ts\",\n| \"main\": \"./dist/index.cjs\",\n| \"module\": \"./dist/index.mjs\",\n| \"typesVersions\": {\n| \"*\": {\n| \".\": [\n| \"dist/index.d.ts\"\n| ],\n| \"./folder/second\": [\n| \"dist/folder/second.d.ts\"\n| ],\n| \"*\": [\n| \"dist/index.d.ts\",\n| \"dist/*\"\n| ]\n| }\n| }\n|}\n|\nsecond\n package.json\n|{\n| \"type\": \"module\",\n| \"types\": \"../dist/second.d.ts\",\n| \"main\": \"../dist/second.mjs\"\n|}\nsrc\n folder\n second.ts\n|export const t = 0;\n index.ts\n|export const test = 0;\ntsconfig.json\n|{\n| \"include\": [\n| \"src\",\n| \"types\"\n| ],\n| \"compilerOptions\": {\n| \"lib\": [\n| \"dom\",\n| \"esnext\"\n| ],\n| \"target\": \"esnext\",\n| \"module\": \"esnext\",\n| \"esModuleInterop\": true,\n| \"allowJs\": true,\n| \"skipLibCheck\": true,\n| \"strict\": true,\n| \"sourceMap\": true,\n| \"noUncheckedIndexedAccess\": true,\n| \"declaration\": true,\n| \"moduleResolution\": \"node\"\n| }\n|}\n|",
298
+ "stdout" : " preparing..\n\n preparing...\n no tsconfig.json or jsconfig.json and --no-ts-config not specified, writing tsconfig...\n done\n src → dist 0 / 1\n ✓ index, second [es, cjs]\n src → dist 1 / 1\n ✓ src → dist 1 / 1 in XXX\n " ,
299
+ "stderr" : " "
272
300
}
273
301
]
274
302
}
0 commit comments