pkgbld 1.24.1 → 1.25.0
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.js +8 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -294,9 +294,9 @@ async function externals (provider, config, inputs) {
|
|
|
294
294
|
const allowGenericUmd = config.umdInputs.length === 1 && inputs.length === 1;
|
|
295
295
|
if (config.formats.length > 0) {
|
|
296
296
|
const format = (allowGenericUmd ? undefined : config.formats.filter(format => format !== 'umd'));
|
|
297
|
-
provider.provide(() => pluginExternals(config.includeExternals === false
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
provider.provide(() => pluginExternals(config.includeExternals === false
|
|
298
|
+
? {}
|
|
299
|
+
: (id, external, importer) => includeExternals(importer, external, id, config)), 2000 /* Priority.externals */, { format });
|
|
300
300
|
// for eject config
|
|
301
301
|
provider.globalImport('path', 'path');
|
|
302
302
|
provider.globalSetup(includeExternals);
|
|
@@ -305,9 +305,7 @@ async function externals (provider, config, inputs) {
|
|
|
305
305
|
const curry = (await provider.import('lodash/curry.js'));
|
|
306
306
|
for (const currentInput of config.umdInputs) {
|
|
307
307
|
const isExternal = curry((currentInput, id, external, importer) => includeExternals(importer, external, id, config) || isExternalInput(currentInput, inputs, id, config))(currentInput);
|
|
308
|
-
provider.provide(() => pluginExternals({
|
|
309
|
-
external: isExternal
|
|
310
|
-
}), 2000 /* Priority.externals */, { format: 'umd', inputs: [`./${config.sourceDir}/${currentInput}.ts`] });
|
|
308
|
+
provider.provide(() => pluginExternals(isExternal), 2000 /* Priority.externals */, { format: 'umd', inputs: [`./${config.sourceDir}/${currentInput}.ts`] });
|
|
311
309
|
}
|
|
312
310
|
// for eject config
|
|
313
311
|
if (config.formats.length === 0) {
|
|
@@ -687,7 +685,8 @@ function processPackage(pkg, config, plugins) {
|
|
|
687
685
|
pkg.scripts = {};
|
|
688
686
|
}
|
|
689
687
|
if (!('prepack' in pkg.scripts)) {
|
|
690
|
-
pkg.scripts.
|
|
688
|
+
const binary = typeof pkg.scripts.build === 'string' && pkg.scripts.build?.startsWith('pkgbld-internal') ? 'pkgbld-internal' : 'pkgbld';
|
|
689
|
+
pkg.scripts.prepack = `${binary} prune`;
|
|
691
690
|
}
|
|
692
691
|
if (pkg.exports['.'] == null) {
|
|
693
692
|
pkg.exports['.'] = {};
|
|
@@ -803,7 +802,7 @@ async function writeJson(path, json) {
|
|
|
803
802
|
await fs.writeFile(path, toFormattedJson(json));
|
|
804
803
|
}
|
|
805
804
|
|
|
806
|
-
var version = "1.
|
|
805
|
+
var version = "1.25.0";
|
|
807
806
|
var name = "pkgbld";
|
|
808
807
|
var license = "MIT";
|
|
809
808
|
var author = "Konstantin Shutkin";
|
|
@@ -848,7 +847,7 @@ var dependencies = {
|
|
|
848
847
|
"@rollup/plugin-node-resolve": "^15.2.2",
|
|
849
848
|
"@rollup-extras/plugin-clean": "^1.3.8",
|
|
850
849
|
"@rollup-extras/plugin-binify": "^1.1.9",
|
|
851
|
-
"@rollup-extras/plugin-externals": "^1.
|
|
850
|
+
"@rollup-extras/plugin-externals": "^1.2.0",
|
|
852
851
|
"@slimlib/refine-partition": "^1.0.2",
|
|
853
852
|
"@slimlib/smart-mock": "^0.1.5",
|
|
854
853
|
"is-builtin-module": "^3.2.1",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.25.0",
|
|
3
3
|
"name": "pkgbld",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Konstantin Shutkin",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@rollup/plugin-node-resolve": "^15.2.2",
|
|
40
40
|
"@rollup-extras/plugin-clean": "^1.3.8",
|
|
41
41
|
"@rollup-extras/plugin-binify": "^1.1.9",
|
|
42
|
-
"@rollup-extras/plugin-externals": "^1.
|
|
42
|
+
"@rollup-extras/plugin-externals": "^1.2.0",
|
|
43
43
|
"@slimlib/refine-partition": "^1.0.2",
|
|
44
44
|
"@slimlib/smart-mock": "^0.1.5",
|
|
45
45
|
"is-builtin-module": "^3.2.1",
|