pkgbld 1.34.0 → 1.34.1
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/index.mjs +19 -77
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -227,7 +227,7 @@ function processPackageJson(pkg, needTreatment, treatKey) {
|
|
|
227
227
|
return newPkg;
|
|
228
228
|
}
|
|
229
229
|
function toFormattedJson(json) {
|
|
230
|
-
return JSON.stringify(json, null, 2)
|
|
230
|
+
return `${JSON.stringify(json, null, 2)}\n`;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
function FlattenParam(value) {
|
|
@@ -568,7 +568,9 @@ async function getRollupConfigs([provider, plugins$1], inputs, inputsExt, config
|
|
|
568
568
|
factoryInProgress.push(factory(provider, config, inputs, inputsExt));
|
|
569
569
|
}
|
|
570
570
|
for (const ePlugin of externalPlugins) {
|
|
571
|
-
|
|
571
|
+
if (ePlugin.providePlugins) {
|
|
572
|
+
factoryInProgress.push(ePlugin.providePlugins(provider, config, inputs, inputsExt));
|
|
573
|
+
}
|
|
572
574
|
}
|
|
573
575
|
await Promise.all(factoryInProgress);
|
|
574
576
|
const expandInputs = new Set;
|
|
@@ -619,7 +621,7 @@ async function getRollupConfigs([provider, plugins$1], inputs, inputsExt, config
|
|
|
619
621
|
for (const { format, input } of result) {
|
|
620
622
|
if (input) {
|
|
621
623
|
if (mapFormatInputs.has(format)) {
|
|
622
|
-
//
|
|
624
|
+
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
623
625
|
mapFormatInputs.get(format).add(input);
|
|
624
626
|
}
|
|
625
627
|
else {
|
|
@@ -685,7 +687,9 @@ async function getRollupConfigs([provider, plugins$1], inputs, inputsExt, config
|
|
|
685
687
|
break;
|
|
686
688
|
}
|
|
687
689
|
for (const ePlugin of externalPlugins) {
|
|
688
|
-
|
|
690
|
+
if (ePlugin.getExtraOutputSettings) {
|
|
691
|
+
Object.assign(result, ePlugin.getExtraOutputSettings(format, inputs));
|
|
692
|
+
}
|
|
689
693
|
}
|
|
690
694
|
return result;
|
|
691
695
|
}
|
|
@@ -941,45 +945,11 @@ async function writeJson(path, json) {
|
|
|
941
945
|
await fs.writeFile(path, toFormattedJson(json));
|
|
942
946
|
}
|
|
943
947
|
|
|
944
|
-
var version = "1.34.0";
|
|
945
|
-
var name = "pkgbld";
|
|
946
|
-
var license = "MIT";
|
|
947
|
-
var author = "Konstantin Shutkin";
|
|
948
|
-
var bin = "./index.js";
|
|
949
|
-
var type = "module";
|
|
950
|
-
var main = "./dist/index.mjs";
|
|
951
|
-
var types = "./dist/index.d.ts";
|
|
952
|
-
var files = [
|
|
953
|
-
"dist"
|
|
954
|
-
];
|
|
955
|
-
var engines = {
|
|
956
|
-
node: ">=20"
|
|
957
|
-
};
|
|
958
|
-
var repository = {
|
|
959
|
-
type: "git",
|
|
960
|
-
url: "git+https://github.com/kshutkin/package-build.git",
|
|
961
|
-
directory: "pkgbld"
|
|
962
|
-
};
|
|
963
|
-
var bugs = "https://github.com/kshutkin/package-build/issues";
|
|
964
|
-
var homepage = "https://github.com/kshutkin/package-build/blob/main/pkgbld/README.md";
|
|
965
|
-
var readme = "README.md";
|
|
966
|
-
var keywords = [
|
|
967
|
-
"pkgbld",
|
|
968
|
-
"build",
|
|
969
|
-
"exports",
|
|
970
|
-
"rollup"
|
|
971
|
-
];
|
|
972
|
-
var scripts = {
|
|
973
|
-
build: "rollup -c && dts-bundle-generator -o dist/index.d.ts src/index.ts",
|
|
974
|
-
lint: "eslint ./src",
|
|
975
|
-
prepack: "node ./index.js prune --removeSourcemaps",
|
|
976
|
-
test: "c8 --src=. --all -r=html node --env-file=ci.env tests/test.js"
|
|
977
|
-
};
|
|
978
948
|
var dependencies = {
|
|
979
|
-
"@niceties/logger": "^1.1.
|
|
980
|
-
"@niceties/draftlog-appender": "^1.3.
|
|
949
|
+
"@niceties/logger": "^1.1.13",
|
|
950
|
+
"@niceties/draftlog-appender": "^1.3.3",
|
|
981
951
|
lodash: "^4.17.21",
|
|
982
|
-
rollup: "^4.
|
|
952
|
+
rollup: "^4.34.7",
|
|
983
953
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
984
954
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
985
955
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
@@ -992,44 +962,13 @@ var dependencies = {
|
|
|
992
962
|
"@slimlib/refine-partition": "^1.0.3",
|
|
993
963
|
"@slimlib/smart-mock": "^0.1.6",
|
|
994
964
|
"is-builtin-module": "^3.2.1",
|
|
995
|
-
terser: "^5.
|
|
965
|
+
terser: "^5.39.0",
|
|
996
966
|
kleur: "^4.1.5",
|
|
997
|
-
cleye: "^1.3.
|
|
998
|
-
jsonata: "^2.0.
|
|
999
|
-
};
|
|
1000
|
-
var devDependencies = {
|
|
1001
|
-
"@types/lodash": "^4.14.202",
|
|
1002
|
-
"@total-typescript/ts-reset": "^0.5.1",
|
|
1003
|
-
"type-fest": "^4.20.1",
|
|
1004
|
-
"dts-bundle-generator": "^9.5.1",
|
|
1005
|
-
options: "workspace:*",
|
|
1006
|
-
c8: "^10.0.0",
|
|
1007
|
-
"cli-test-helper": "workspace:*"
|
|
1008
|
-
};
|
|
1009
|
-
var peerDependencies = {
|
|
1010
|
-
typescript: ">=5.3.3"
|
|
967
|
+
cleye: "^1.3.4",
|
|
968
|
+
jsonata: "^2.0.6"
|
|
1011
969
|
};
|
|
1012
970
|
var pkgbldPkg = {
|
|
1013
|
-
|
|
1014
|
-
name: name,
|
|
1015
|
-
license: license,
|
|
1016
|
-
author: author,
|
|
1017
|
-
bin: bin,
|
|
1018
|
-
type: type,
|
|
1019
|
-
main: main,
|
|
1020
|
-
types: types,
|
|
1021
|
-
files: files,
|
|
1022
|
-
engines: engines,
|
|
1023
|
-
repository: repository,
|
|
1024
|
-
bugs: bugs,
|
|
1025
|
-
homepage: homepage,
|
|
1026
|
-
readme: readme,
|
|
1027
|
-
keywords: keywords,
|
|
1028
|
-
scripts: scripts,
|
|
1029
|
-
dependencies: dependencies,
|
|
1030
|
-
devDependencies: devDependencies,
|
|
1031
|
-
peerDependencies: peerDependencies
|
|
1032
|
-
};
|
|
971
|
+
dependencies: dependencies};
|
|
1033
972
|
|
|
1034
973
|
const imports = new Map;
|
|
1035
974
|
const setup = new Set;
|
|
@@ -1055,7 +994,7 @@ async function createEjectProvider(preimportMap) {
|
|
|
1055
994
|
globalImport: (module, exportName) => {
|
|
1056
995
|
imports.set(module, exportName ?? 'default');
|
|
1057
996
|
},
|
|
1058
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
997
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
1059
998
|
globalSetup: (code) => {
|
|
1060
999
|
if (typeof code === 'function') {
|
|
1061
1000
|
setup.add(code.toString());
|
|
@@ -1150,9 +1089,11 @@ async function checkTsConfig(options, mainLogger, plugins) {
|
|
|
1150
1089
|
if (options.noTsConfig) {
|
|
1151
1090
|
return;
|
|
1152
1091
|
}
|
|
1092
|
+
// biome-ignore lint/style/useSingleVarDeclarator: <explanation>
|
|
1153
1093
|
let config, needWrite = false;
|
|
1154
1094
|
try {
|
|
1155
1095
|
[, config] = await getJson('tsconfig.json');
|
|
1096
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1156
1097
|
}
|
|
1157
1098
|
catch (_) { /*ignore*/ }
|
|
1158
1099
|
try {
|
|
@@ -1160,6 +1101,7 @@ async function checkTsConfig(options, mainLogger, plugins) {
|
|
|
1160
1101
|
if (config && typeof config === 'object' && !Array.isArray(config)) {
|
|
1161
1102
|
config.allowJs = true;
|
|
1162
1103
|
}
|
|
1104
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1163
1105
|
}
|
|
1164
1106
|
catch (_) { /*ignore*/ }
|
|
1165
1107
|
if (!config) {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.34.
|
|
2
|
+
"version": "1.34.1",
|
|
3
3
|
"name": "pkgbld",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Konstantin Shutkin",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"rollup"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@niceties/logger": "^1.1.
|
|
32
|
-
"@niceties/draftlog-appender": "^1.3.
|
|
31
|
+
"@niceties/logger": "^1.1.13",
|
|
32
|
+
"@niceties/draftlog-appender": "^1.3.3",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"rollup": "^4.
|
|
34
|
+
"rollup": "^4.34.7",
|
|
35
35
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
36
36
|
"rollup-plugin-preprocess": "^0.0.4",
|
|
37
37
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@slimlib/refine-partition": "^1.0.3",
|
|
45
45
|
"@slimlib/smart-mock": "^0.1.6",
|
|
46
46
|
"is-builtin-module": "^3.2.1",
|
|
47
|
-
"terser": "^5.
|
|
47
|
+
"terser": "^5.39.0",
|
|
48
48
|
"kleur": "^4.1.5",
|
|
49
|
-
"cleye": "^1.3.
|
|
50
|
-
"jsonata": "^2.0.
|
|
49
|
+
"cleye": "^1.3.4",
|
|
50
|
+
"jsonata": "^2.0.6"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"typescript": ">=5.3.3"
|