@@ -342,9 +342,8 @@ const configs = {
342342 }
343343 } ,
344344 'benchmarks-backend' : {
345- input : `tests/benchmarks/${ packageName } .benchs .js` ,
345+ input : `tests/benchmarks/${ packageName } .benchmarks .js` ,
346346 external : [
347- 'benchmark' ,
348347 'fs'
349348 ] ,
350349 plugins : [
@@ -368,16 +367,23 @@ const configs = {
368367 output : {
369368 indent : '\t' ,
370369 format : 'cjs' ,
371- file : `tests/benchmarks/builds/${ packageName } .benchs.cjs.js`
370+ intro : ( ) => "var Benchmark = require('benchmark')" ,
371+ file : `tests/benchmarks/builds/${ packageName } .benchmarks.cjs.js`
372372 }
373373 } ,
374374 'benchmarks-frontend' : {
375- input : `tests/benchmarks/${ packageName } .benchs .js` ,
375+ input : `tests/benchmarks/${ packageName } .benchmarks .js` ,
376376 external : [
377- 'benchmark'
377+ 'benchmark' ,
378+ // 'lodash'
378379 ] ,
379380 plugins : [
380- nodeResolve ( ) ,
381+ nodeResolve ( {
382+ preferBuiltins : true
383+ } ) ,
384+ commonjs ( {
385+ include : 'node_modules/**'
386+ } ) ,
381387 replace ( {
382388 // Even this variable are not used in this package, we need it because
383389 // they are used in dependency package itee-utils that use them to focus some build stuff
@@ -424,30 +430,22 @@ const configs = {
424430 '\tisValidPathSuite,' : '\t//isValidPathSuite,' ,
425431 '\tisValidSocketPathSuite,' : '\t//isValidSocketPathSuite,' ,
426432 '\tisValidSymbolicLinkPathSuite,' : '\t//isValidSymbolicLinkPathSuite,' ,
427-
428- 'suite.run()' : '//suite.run()'
429433 }
430434 } ) ,
431435 cleanup ( {
432436 comments : 'none'
433437 } )
434438 ] ,
435- treeshake : {
436- moduleSideEffects : false ,
437- annotations : true ,
438- correctVarValueBeforeDeclaration : true ,
439- propertyReadSideEffects : false ,
440- tryCatchDeoptimization : true ,
441- unknownGlobalSideEffects : false
442- } ,
439+ treeshake : false ,
443440 output : {
444441 indent : '\t' ,
445442 format : 'iife' ,
446443 name : 'Itee.Benchmarks' ,
447444 globals : {
448- 'benchmark' : 'Benchmark'
445+ 'benchmark' : 'Benchmark' ,
446+ // 'lodash': '_'
449447 } ,
450- file : `tests/benchmarks/builds/${ packageName } .benchs .iife.js`
448+ file : `tests/benchmarks/builds/${ packageName } .benchmarks .iife.js`
451449 }
452450 } ,
453451 'units-backend' : {
@@ -481,23 +479,23 @@ const configs = {
481479 nodeResolve ( ) , // required to bundle itee-utils that cannot be integrated as standalone file (why???)=> because circular ref with itee validator package -_-'
482480 replace ( {
483481 replaces : {
484- 'import { isValidSymbolicLinkPathUnits }' : '//' ,
485- 'import { isSymbolicLinkPathUnits }' : '//' ,
486- 'import { isValidSocketPathUnits }' : '//' ,
487- 'import { isSocketPathUnits }' : '//' ,
488- 'import { isValidPathUnits }' : '//' ,
489- 'import { isValidFilePathUnits }' : '//' ,
490- 'import { isFilePathUnits }' : '//' ,
491- 'import { isEmptyFileUnits }' : '//' ,
492- 'import { isValidFIFOPathUnits }' : '//' ,
493- 'import { isFIFOPathUnits }' : '//' ,
494- 'import { isValidDirectoryPathUnits }' : '//' ,
495- 'import { isEmptyDirectoryUnits }' : '//' ,
496- 'import { isDirectoryPathUnits }' : '//' ,
482+ 'import { isValidSymbolicLinkPathUnits }' : '//' ,
483+ 'import { isSymbolicLinkPathUnits }' : '//' ,
484+ 'import { isValidSocketPathUnits }' : '//' ,
485+ 'import { isSocketPathUnits }' : '//' ,
486+ 'import { isValidPathUnits }' : '//' ,
487+ 'import { isValidFilePathUnits }' : '//' ,
488+ 'import { isFilePathUnits }' : '//' ,
489+ 'import { isEmptyFileUnits }' : '//' ,
490+ 'import { isValidFIFOPathUnits }' : '//' ,
491+ 'import { isFIFOPathUnits }' : '//' ,
492+ 'import { isValidDirectoryPathUnits }' : '//' ,
493+ 'import { isEmptyDirectoryUnits }' : '//' ,
494+ 'import { isDirectoryPathUnits }' : '//' ,
497495 'import { isValidCharacterDevicePathUnits }' : '//' ,
498- 'import { isCharacterDevicePathUnits }' : '//' ,
499- 'import { isValidBlockDevicePathUnits }' : '//' ,
500- 'import { isBlockDevicePathUnits }' : '//' ,
496+ 'import { isCharacterDevicePathUnits }' : '//' ,
497+ 'import { isValidBlockDevicePathUnits }' : '//' ,
498+ 'import { isBlockDevicePathUnits }' : '//' ,
501499
502500 'isBlockDevicePathUnits.call' : '//isBlockDevicePathUnits.call' ,
503501 'isValidBlockDevicePathUnits.call' : '//isValidBlockDevicePathUnits.call' ,
@@ -529,7 +527,7 @@ const configs = {
529527 name : 'Itee.Units' ,
530528 globals : {
531529 // 'mocha': 'Mocha',
532- 'chai' : 'chai'
530+ 'chai' : 'chai'
533531 } ,
534532 file : `tests/units/builds/${ packageName } .units.esm.js`
535533 }
0 commit comments