pkgbld 1.29.4 → 1.30.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/README.md CHANGED
@@ -186,13 +186,31 @@ Do not setup pack script in package.json
186
186
  pkgbld --no-pack
187
187
  ```
188
188
 
189
+ ### no-exports
190
+
191
+ ```
192
+ pkgbld --no-exports
193
+ ```
194
+
195
+ Do not add exports field in package.json.
196
+
189
197
  ### prune (command)
190
198
 
191
199
  ```
192
200
  pkgbld prune
193
201
  ```
194
202
 
195
- prune devDependencies and redundunt scripts from package.json
203
+ prune devDependencies and redundant scripts from package.json
204
+
205
+ ### prune --profile=<profile>
206
+
207
+ There are two profiles: `library` and `app`. `library` is default.
208
+
209
+ Right now it only affects how `prune` command removes entries in the `scripts` field.
210
+
211
+ For `library` profile it retains: 'preinstall', 'install', 'postinstall', 'prepublish', 'preprepare', 'prepare', 'postprepare'.
212
+
213
+ For `app` profile it retains in addition: 'prestart', 'start', 'poststart', 'prerestart', 'restart', 'postrestart', 'prestop', 'stop', 'poststop', 'pretest', 'test', 'posttest'.
196
214
 
197
215
  ### flatten
198
216
 
@@ -206,13 +224,23 @@ If the directory is not specified it is guessed from package.json.
206
224
 
207
225
  If files cannot be copied because of name conflicts the command will fail.
208
226
 
209
- ### no-exports
227
+ ### removeSourcemaps
210
228
 
211
229
  ```
212
- pkgbld --no-exports
230
+ pkgbld prune --removeSourcemaps
213
231
  ```
214
232
 
215
- Do not add exports field in package.json.
233
+ Removes all sourcemaps from the package. The logic is very simple and removes all files with `.map` extension and references in format `//# sourceMappingURL=<mapFile>`.
234
+
235
+ ### optimizeFiles (default)
236
+
237
+ ```
238
+ pkgbld prune --optimizeFiles=false
239
+ ```
240
+
241
+ Optimizes files by removing all files that are not required for pack at the given moment.
242
+
243
+ You might want to disable this option in some edge cases.
216
244
 
217
245
  ## Plugin API
218
246
 
package/dist/index.d.ts CHANGED
@@ -40,6 +40,8 @@ declare module 'pkgbld' {
40
40
  private?: boolean;
41
41
  version?: string;
42
42
  name?: string;
43
+ bin?: string | Record<string, string>;
44
+ main?: string;
43
45
  license?: string;
44
46
  readme?: string;
45
47
  author?: string | {
@@ -84,11 +86,14 @@ declare module 'pkgbld' {
84
86
  formatPackageJson: boolean;
85
87
  noPack: boolean;
86
88
  noExports: boolean;
89
+ noClean: boolean;
90
+ noBundle: boolean;
87
91
  } | {
88
92
  readonly kind: "prune";
89
93
  readonly profile: string;
90
94
  readonly flatten: string | boolean;
95
+ readonly removeSourcemaps: boolean;
96
+ readonly optimizeFiles: boolean;
91
97
  };
92
98
  }
93
99
 
94
- //# sourceMappingURL=index.d.ts.map
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import '@niceties/draftlog-appender';
2
2
  import { createLogger } from '@niceties/logger';
3
3
  import { rollup } from 'rollup';
4
- import fs, { access, rename, rm, readdir, stat } from 'fs/promises';
4
+ import fs, { access, readFile, writeFile, rm, readdir, mkdir, rename, stat } from 'fs/promises';
5
5
  import path from 'path';
6
6
  import { cli, command } from 'cleye';
7
7
  import refiner from '@slimlib/refine-partition';
@@ -148,6 +148,16 @@ const cliFlags = {
148
148
  description: 'Do not add exports field in package.json',
149
149
  default: false
150
150
  },
151
+ noClean: {
152
+ type: Boolean,
153
+ description: 'Do not clean output directory',
154
+ default: false
155
+ },
156
+ noBundle: {
157
+ type: Boolean,
158
+ description: 'Do not bundle',
159
+ default: false
160
+ },
151
161
  };
152
162
  const packageJsonFieldsOrder = new Set([
153
163
  'private',
@@ -232,7 +242,7 @@ function getCliOptions(plugins, pkg) {
232
242
  commands: [
233
243
  command({
234
244
  name: 'prune',
235
- description: 'prune devDependencies and redundunt scripts from package.json',
245
+ description: 'prune devDependencies and redundant scripts from package.json',
236
246
  flags: {
237
247
  profile: {
238
248
  type: String,
@@ -243,6 +253,16 @@ function getCliOptions(plugins, pkg) {
243
253
  type: FlattenParam,
244
254
  description: 'flatten package files',
245
255
  default: false
256
+ },
257
+ removeSourcemaps: {
258
+ type: Boolean,
259
+ description: 'remove sourcemaps',
260
+ default: false
261
+ },
262
+ optimizeFiles: {
263
+ type: Boolean,
264
+ description: 'optimize files array',
265
+ default: true
246
266
  }
247
267
  }
248
268
  })
@@ -252,7 +272,9 @@ function getCliOptions(plugins, pkg) {
252
272
  return {
253
273
  kind: 'prune',
254
274
  profile: cliOptions.flags.profile,
255
- flatten: cliOptions.flags.flatten
275
+ flatten: cliOptions.flags.flatten,
276
+ removeSourcemaps: cliOptions.flags.removeSourcemaps,
277
+ optimizeFiles: cliOptions.flags.optimizeFiles
256
278
  };
257
279
  }
258
280
  else {
@@ -277,7 +299,9 @@ function getCliOptions(plugins, pkg) {
277
299
  umdPattern: flags.umdPattern,
278
300
  formatPackageJson: flags.formatPackageJson,
279
301
  noPack: flags.noPack,
280
- noExports: flags.noExports
302
+ noExports: flags.noExports,
303
+ noClean: flags.noClean,
304
+ noBundle: flags.noBundle
281
305
  };
282
306
  for (const plugin of plugins) {
283
307
  plugin.options?.(flags, options);
@@ -303,7 +327,10 @@ const Priority = {
303
327
  finalize: 20000
304
328
  };
305
329
 
306
- async function clean (provider) {
330
+ async function clean (provider, config) {
331
+ if (config.noClean) {
332
+ return;
333
+ }
307
334
  const pluginClean = await provider.import('@rollup-extras/plugin-clean');
308
335
  const pluginInstance = pluginClean();
309
336
  provider.provide(pluginFactory, Priority.cleanup, { outputPlugin: true });
@@ -508,11 +535,8 @@ function formatOutput(output, field) {
508
535
  return (Array.isArray(output) ? output : [output ?? '']).map(item => kleur.cyan(item[field])).join(', ');
509
536
  }
510
537
  function getTimeDiff(starting) {
511
- const now = Date.now();
512
- if (now - starting > 1000) {
513
- return `${((now - starting) / 1000).toFixed(1)}s`;
514
- }
515
- return `${now - starting}ms`;
538
+ const diff = Date.now() - starting;
539
+ return diff >= 1000 ? `${(diff / 1000).toFixed(1)}s` : `${diff}ms`;
516
540
  }
517
541
  const areSetsEqual = (a, b) => a.size === b.size ? [...a].every(value => b.has(value)) : false;
518
542
  function formatPackageJson(pkg) {
@@ -647,7 +671,7 @@ async function getRollupConfigs([provider, plugins$1], inputs, inputsExt, config
647
671
  break;
648
672
  }
649
673
  if (inputs.length > 1) {
650
- throw new Error(`Cannot produce global name for mutliple umd inputs in one output: ${inputs}`);
674
+ throw new Error(`Cannot produce global name for multiple umd inputs in one output: ${inputs}`);
651
675
  }
652
676
  result = {
653
677
  name: helpers.getGlobalName(inputs.join('_')),
@@ -721,15 +745,15 @@ async function processPackage(pkg, config, plugins, tsConfig) {
721
745
  const allowEsm = (config.formatsOverridden && config.formats.includes('es') || !config.formatsOverridden);
722
746
  const allowCjs = (config.formatsOverridden && config.formats.includes('cjs') || !config.formatsOverridden);
723
747
  const allowUmd = (config.formatsOverridden && config.formats.includes('umd') || !config.formatsOverridden || config.umdInputs);
724
- if (typeof pkg !== 'object' || Array.isArray(pkg)) {
748
+ if (typeof pkg !== 'object' || Array.isArray(pkg) || pkg == null) {
725
749
  logger.finish('expecting object on top level of package.json', 3 /* LogLevel.error */);
726
750
  process.exit(-1);
727
751
  }
728
- if (typeof pkg?.name !== 'string') {
752
+ if (typeof pkg.name !== 'string' && config.umdInputs.length > 0) {
729
753
  logger.finish('expecting name to be a string in package.json', 3 /* LogLevel.error */);
730
754
  process.exit(-1);
731
755
  }
732
- if (!Array.isArray(pkg?.files)) {
756
+ if (!Array.isArray(pkg.files)) {
733
757
  pkg.files = [];
734
758
  }
735
759
  if (!pkg.files.includes(config.dir)) {
@@ -912,11 +936,12 @@ async function writeJson(path, json) {
912
936
  await fs.writeFile(path, toFormattedJson(json));
913
937
  }
914
938
 
915
- var version = "1.29.4";
939
+ var version = "1.30.0";
916
940
  var name = "pkgbld";
917
941
  var license = "MIT";
918
942
  var author = "Konstantin Shutkin";
919
943
  var bin = "./index.js";
944
+ var type = "module";
920
945
  var main = "./dist/index.mjs";
921
946
  var types = "./dist/index.d.ts";
922
947
  var files = [
@@ -942,7 +967,8 @@ var keywords = [
942
967
  var scripts = {
943
968
  build: "xc6 rm src/options-types.ts && xc6 ln ../options/src/types.ts src/options-types.ts && rollup -c && dts-buddy dist/index.d.ts -m pkgbld:dist/src/index.d.ts && xc6 rm dist/src",
944
969
  lint: "eslint ./src",
945
- prepack: "node ./index.js prune"
970
+ prepack: "node ./index.js prune --removeSourcemaps",
971
+ test: "c8 --src=. --all -r=html node --env-file=ci.env tests/test.js"
946
972
  };
947
973
  var dependencies = {
948
974
  "@niceties/logger": "^1.1.12",
@@ -968,11 +994,12 @@ var dependencies = {
968
994
  };
969
995
  var devDependencies = {
970
996
  "@types/lodash": "^4.14.202",
971
- "rollup-plugin-dts": "^6.1.0",
972
997
  "@total-typescript/ts-reset": "^0.5.1",
973
- "dts-buddy": "^0.4.4",
998
+ "dts-buddy": "^0.4.5",
974
999
  options: "workspace:*",
975
- xc6: "workspace:*"
1000
+ xc6: "workspace:*",
1001
+ c8: "^9.1.0",
1002
+ "cli-test-helper": "workspace:*"
976
1003
  };
977
1004
  var peerDependencies = {
978
1005
  typescript: ">=5.3.3"
@@ -983,6 +1010,7 @@ var pkgbldPkg = {
983
1010
  license: license,
984
1011
  author: author,
985
1012
  bin: bin,
1013
+ type: type,
986
1014
  main: main,
987
1015
  types: types,
988
1016
  files: files,
@@ -1107,6 +1135,7 @@ const defaultTsConfig = {
1107
1135
  allowJs: true,
1108
1136
  skipLibCheck: true,
1109
1137
  strict: true,
1138
+ sourceMap: true,
1110
1139
  noUncheckedIndexedAccess: true,
1111
1140
  declaration: true,
1112
1141
  moduleResolution: 'node'
@@ -1160,9 +1189,6 @@ async function loadPlugins(pkg) {
1160
1189
  }
1161
1190
 
1162
1191
  async function prunePkg(pkg, options, logger) {
1163
- if (options.kind !== 'prune') {
1164
- throw new Error('prunePkg should only be called in prune mode');
1165
- }
1166
1192
  const scriptsToKeep = getScriptsData();
1167
1193
  const keys = scriptsToKeep[options.profile];
1168
1194
  if (!keys) {
@@ -1170,22 +1196,122 @@ async function prunePkg(pkg, options, logger) {
1170
1196
  }
1171
1197
  delete pkg.devDependencies;
1172
1198
  delete pkg['packageManager'];
1173
- for (const key of Object.keys(pkg.scripts)) {
1174
- if (!keys.has(key)) {
1175
- delete pkg.scripts[key];
1199
+ if (pkg.scripts) {
1200
+ for (const key of Object.keys(pkg.scripts)) {
1201
+ if (!keys.has(key)) {
1202
+ delete pkg.scripts[key];
1203
+ }
1204
+ }
1205
+ if (Object.keys(pkg.scripts).length === 0) {
1206
+ delete pkg.scripts;
1176
1207
  }
1177
- }
1178
- if (Object.keys(pkg.scripts).length === 0) {
1179
- delete pkg.scripts;
1180
1208
  }
1181
1209
  if (options.flatten) {
1182
1210
  await flatten(pkg, options.flatten, logger);
1183
1211
  }
1212
+ if (options.removeSourcemaps) {
1213
+ const sourceMaps = await walkDir('.').then(files => files.filter(file => file.endsWith('.map')));
1214
+ for (const sourceMap of sourceMaps) {
1215
+ // find corresponding file
1216
+ const sourceFile = sourceMap.slice(0, -4);
1217
+ // load file
1218
+ const sourceFileContent = await readFile(sourceFile, 'utf8');
1219
+ // find sourceMappingURL
1220
+ const sourceMappingUrl = `//# sourceMappingURL=${path.basename(sourceMap)}`;
1221
+ // remove sourceMappingURL
1222
+ const newContent = sourceFileContent.replace(sourceMappingUrl, '');
1223
+ // write file
1224
+ await writeFile(sourceFile, newContent, 'utf8');
1225
+ // remove sourceMap
1226
+ await rm(sourceMap);
1227
+ }
1228
+ }
1229
+ if (pkg.files && Array.isArray(pkg.files) && options.optimizeFiles) {
1230
+ const filterFiles = ['package.json'];
1231
+ const specialFiles = ['README', 'LICENSE', 'LICENCE'];
1232
+ if (pkg.main && typeof pkg.main === 'string') {
1233
+ filterFiles.push(normalizePath(pkg.main));
1234
+ }
1235
+ if (pkg.bin) {
1236
+ if (typeof pkg.bin === 'string') {
1237
+ filterFiles.push(normalizePath(pkg.bin));
1238
+ }
1239
+ if (typeof pkg.bin === 'object' && pkg.bin !== null) {
1240
+ filterFiles.push(...Object.values(pkg.bin).map(normalizePath));
1241
+ }
1242
+ }
1243
+ const depthToFiles = new Map();
1244
+ for (const file of pkg.files.concat(filterFiles)) {
1245
+ const dirname = path.dirname(file);
1246
+ const depth = dirname.split('/').length;
1247
+ if (!depthToFiles.has(depth)) {
1248
+ depthToFiles.set(depth, [file]);
1249
+ }
1250
+ else {
1251
+ depthToFiles.get(depth)?.push(file);
1252
+ }
1253
+ }
1254
+ // walk depth keys from the highest to the lowest
1255
+ const maxDepth = Math.max(...depthToFiles.keys());
1256
+ for (let depth = maxDepth; depth > 0; --depth) {
1257
+ const files = depthToFiles.get(depth);
1258
+ const mapDirToFiles = new Map();
1259
+ for (const file of files) {
1260
+ const dirname = path.dirname(file);
1261
+ const basename = normalizePath(path.basename(file));
1262
+ if (!mapDirToFiles.has(dirname)) {
1263
+ mapDirToFiles.set(dirname, [basename]);
1264
+ }
1265
+ else {
1266
+ mapDirToFiles.get(dirname)?.push(basename);
1267
+ }
1268
+ }
1269
+ for (const [dirname, filesInDir] of mapDirToFiles) {
1270
+ // find out real content of the directory
1271
+ const realFiles = await readdir(dirname);
1272
+ // check if all files in the directory are in the filesInDir
1273
+ const allFilesInDir = realFiles.every(file => filesInDir.includes(file)) || realFiles.length === 0;
1274
+ if (allFilesInDir && dirname !== '.') {
1275
+ if (!depthToFiles.has(depth - 1)) {
1276
+ depthToFiles.set(depth - 1, [dirname]);
1277
+ }
1278
+ else {
1279
+ depthToFiles.get(depth - 1).push(dirname);
1280
+ }
1281
+ const thisDepth = depthToFiles.get(depth);
1282
+ depthToFiles.set(depth, thisDepth.filter(file => filesInDir.every(fileInDir => path.join(dirname, fileInDir) !== file)));
1283
+ }
1284
+ }
1285
+ }
1286
+ pkg.files = [...new Set(Array.from(depthToFiles.values()).flat())];
1287
+ pkg.files = pkg.files.filter(file => {
1288
+ const fileNormalized = normalizePath(file);
1289
+ const dirname = path.dirname(fileNormalized);
1290
+ const basenameWithoutExtension = path.basename(fileNormalized, path.extname(fileNormalized)).toUpperCase();
1291
+ return !filterFiles.includes(fileNormalized) && (dirname !== '' && dirname !== '.' || !specialFiles.includes(basenameWithoutExtension));
1292
+ });
1293
+ const ignoreDirs = [];
1294
+ for (const fileOrDir of pkg.files) {
1295
+ if (await isDirectory(fileOrDir)) {
1296
+ const allFiles = await walkDir(fileOrDir);
1297
+ if (allFiles.every(file => {
1298
+ const fileNormalized = normalizePath(file);
1299
+ return filterFiles.includes(fileNormalized);
1300
+ })) {
1301
+ ignoreDirs.push(fileOrDir);
1302
+ }
1303
+ }
1304
+ }
1305
+ pkg.files = pkg.files.filter(dir => !ignoreDirs.includes(dir));
1306
+ if (pkg.files.length === 0) {
1307
+ delete pkg.files;
1308
+ }
1309
+ }
1184
1310
  }
1185
1311
  async function flatten(pkg, flatten, logger) {
1186
1312
  const { default: jsonata } = await import('jsonata');
1187
1313
  // find out where is the dist folder
1188
- const expression = jsonata('[bin, main, module, unpkg, umd, types, typings, exports[].*.*, typesVersions.*.*]');
1314
+ const expression = jsonata('[bin, bin.*, main, module, unpkg, umd, types, typings, exports[].*.*, typesVersions.*.*, directories.bin]');
1189
1315
  const allReferences = (await expression.evaluate(pkg));
1190
1316
  let distDir;
1191
1317
  if (flatten === true) {
@@ -1231,6 +1357,14 @@ async function flatten(pkg, flatten, logger) {
1231
1357
  if (filesAlreadyExist.length) {
1232
1358
  throw new Error(`dist folder cannot be flattened because files already exist: ${filesAlreadyExist.join(', ')}`);
1233
1359
  }
1360
+ // create new directory structure
1361
+ const mkdirPromises = [];
1362
+ for (const file of filesInDist) {
1363
+ // check file is not in root dir
1364
+ const relativePath = path.relative(relativeDistDir, file);
1365
+ mkdirPromises.push(mkdir(path.dirname(relativePath), { recursive: true }));
1366
+ }
1367
+ await Promise.all(mkdirPromises);
1234
1368
  // move files to root dir (rename)
1235
1369
  const renamePromises = [];
1236
1370
  const newFiles = [];
@@ -1241,30 +1375,31 @@ async function flatten(pkg, flatten, logger) {
1241
1375
  renamePromises.push(rename(file, relativePath));
1242
1376
  }
1243
1377
  await Promise.all(renamePromises);
1244
- // remove dist folder
1245
- try {
1246
- await rm(relativeDistDir, { recursive: true, force: true });
1247
- }
1248
- catch (e) {
1249
- // ignore
1378
+ let cleanedDir = relativeDistDir;
1379
+ while (isEmptyDir(cleanedDir)) {
1380
+ await rm(cleanedDir, { recursive: true, force: true });
1381
+ const parentDir = path.dirname(cleanedDir);
1382
+ if (parentDir === '.') {
1383
+ break;
1384
+ }
1385
+ cleanedDir = parentDir;
1250
1386
  }
1387
+ const normalizedCleanDir = normalizePath(cleanedDir);
1251
1388
  const allReferencesSet = new Set(allReferences);
1252
1389
  // update package.json
1253
- const stringToReplace = distDir + '/';
1390
+ const stringToReplace = distDir + '/'; // we append / to remove in from the middle of the string
1254
1391
  const pkgClone = cloneAndUpdate(pkg, value => allReferencesSet.has(value) ? value.replace(stringToReplace, '') : value);
1255
1392
  Object.assign(pkg, pkgClone);
1256
1393
  // update files
1257
- let files = pkg.files ?? [];
1258
- files = files.filter(file => {
1259
- let fileNormilized = path.normalize(file);
1260
- if (fileNormilized.endsWith('/')) {
1261
- // remove trailing slash
1262
- fileNormilized = fileNormilized.slice(0, -1);
1263
- }
1264
- return fileNormilized !== distDir;
1265
- });
1266
- files.push(...newFiles);
1267
- pkg.files = [...files];
1394
+ let files = pkg.files;
1395
+ if (files) {
1396
+ files = files.filter(file => {
1397
+ const fileNormalized = normalizePath(file);
1398
+ return !isSubDirectory(cleanedDir, fileNormalized) && fileNormalized !== normalizedCleanDir;
1399
+ });
1400
+ files.push(...newFiles);
1401
+ pkg.files = [...files];
1402
+ }
1268
1403
  // remove extra directories with package.json
1269
1404
  const exports = pkg.exports ? Object.keys(pkg.exports) : [];
1270
1405
  for (const key of exports) {
@@ -1283,6 +1418,14 @@ async function flatten(pkg, flatten, logger) {
1283
1418
  }
1284
1419
  }
1285
1420
  }
1421
+ function normalizePath(file) {
1422
+ let fileNormalized = path.normalize(file);
1423
+ if (fileNormalized.endsWith('/') || fileNormalized.endsWith('\\')) {
1424
+ // remove trailing slash
1425
+ fileNormalized = fileNormalized.slice(0, -1);
1426
+ }
1427
+ return fileNormalized;
1428
+ }
1286
1429
  function cloneAndUpdate(pkg, updater) {
1287
1430
  if (typeof pkg === 'string') {
1288
1431
  return updater(pkg);
@@ -1299,12 +1442,16 @@ function cloneAndUpdate(pkg, updater) {
1299
1442
  }
1300
1443
  return pkg;
1301
1444
  }
1445
+ function isSubDirectory(parent, child) {
1446
+ return path.relative(child, parent).startsWith('..');
1447
+ }
1448
+ async function isEmptyDir(dir) {
1449
+ const entries = await readdir(dir);
1450
+ return entries.length === 0;
1451
+ }
1302
1452
  async function isDirectory(file) {
1303
- try {
1304
- const fileStat = await stat(file);
1305
- return fileStat.isDirectory();
1306
- }
1307
- catch (e) { /**/ }
1453
+ const fileStat = await stat(file);
1454
+ return fileStat.isDirectory();
1308
1455
  }
1309
1456
  async function walkDir(dir) {
1310
1457
  const entries = await readdir(dir, { withFileTypes: true });
@@ -1384,6 +1531,9 @@ async function execute() {
1384
1531
  const preimportMap = preimport();
1385
1532
  const provider = options.eject ? await createEjectProvider(preimportMap) : createProvider(preimportMap);
1386
1533
  const rollupConfigs = await getRollupConfigs(provider, inputs, inputsExt, options, helpers, plugins);
1534
+ if (options.noBundle) {
1535
+ rollupConfigs.length = 0;
1536
+ }
1387
1537
  if (options.eject) {
1388
1538
  await ejectConfig(rollupConfigs, pkgPath, options, inputs, inputsExt, helpers, pkg);
1389
1539
  mainLogger.finish(`ejected config in ${getTimeDiff(time)}`);
@@ -1406,7 +1556,7 @@ async function execute() {
1406
1556
  }
1407
1557
  }
1408
1558
  catch (e) {
1409
- mainLogger.finish(JSON.stringify(e), 3 /* LogLevel.error */);
1559
+ mainLogger.finish(String(e), 3 /* LogLevel.error */);
1410
1560
  process.exit(-1);
1411
1561
  }
1412
1562
  async function buildConfig(config, updater) {
@@ -1424,3 +1574,4 @@ function preimport() {
1424
1574
  ['@rollup-extras/plugin-externals', import('@rollup-extras/plugin-externals')]
1425
1575
  ]) : new Map);
1426
1576
  }
1577
+
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
- "version": "1.29.4",
2
+ "version": "1.30.0",
3
3
  "name": "pkgbld",
4
4
  "license": "MIT",
5
5
  "author": "Konstantin Shutkin",
6
6
  "bin": "./index.js",
7
+ "type": "module",
7
8
  "main": "./dist/index.mjs",
8
9
  "types": "./dist/index.d.ts",
9
10
  "files": [
@@ -1,26 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "index.d.ts",
4
- "names": [
5
- "Json",
6
- "ProvideFunction",
7
- "Provider",
8
- "PkgbldRollupPlugin",
9
- "CliOptions",
10
- "ParsedOptions",
11
- "PkgbldPlugin",
12
- "PackageJson",
13
- "getCliOptions"
14
- ],
15
- "sources": [
16
- "src/types.d.ts",
17
- "src/options-types.d.ts",
18
- "src/get-cli-options.d.ts"
19
- ],
20
- "sourcesContent": [
21
- null,
22
- null,
23
- null
24
- ],
25
- "mappings": ";;;;;aAIYA,IAAIA;;;aAGJC,eAAeA;;;;;aAKfC,QAAQA;;;;;;aAMRC,kBAAkBA;;;;;;;aAOlBC,UAAUA;;;aAGVC,aAAaA;kBACRC,YAAYA;;;;;;;;aC7BjBC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;UCECC,aAAaA"
26
- }