- Removed the HTML utilities, as they are now extracted out
- Updated base files
- Updated base files using boundation
- Compiled with CoffeeScript v2
- Rewrote
balUtilPaths.readPath
and added comprehensive tests for it - Updated dependencies
- Changed engines to be node >= 0.12
- Updated dependencies
- Abstracted out
balUtilPaths.scandir
to scandirectory - Removed
balUtilPaths.rmdirDeep
in favour of rimraf
- Fixed flow (regression since v2.4.2)
- Updated dependencies
- Updated dependencies
- Repackaged
balUtilPaths
changes:- Added
resolveCaseSensitivePath(path, next)
- Added
- Extracted out:
- binaryextensions <
balUtilPaths.binaryExtensions
- ignorefs <
balUtilPaths.isIgnoredPath
- ignorepatterns <
balUtilPaths.ignoreCommonPatterns
- istextorbinary <
balUtilPaths.(isTextSync|isText|getEncodingSync|getEncoding)
- textextensions <
balUtilPaths.textExtensions
- binaryextensions <
- Can now pass
binary
as thereadFiles
option value to return buffers instead of strings for file contents - Updated dependencies
- Updated dependencies
- Split out
balUtilEvents.EventEmitterEnhanced
into event-emitter-grouped
- Split out
balUtilModules
into safeps - Split out
balUtilFlow.extractOptsAndCallback
into extract-opts
balUtilEvent
changes:- Event listeners can now have priorities. Highest priorities run first. Set them by
listener.priority = 500
- Added
off
alias forremoveListener
- Event listeners can now have priorities. Highest priorities run first. Set them by
balUtilFlow
changes:extractOptsAndCallback
now accepts config argument
balUtilPaths
changes:readPath
now usesWget/1.14 (linux-gnu)
as the default user agent
balUtilPaths
changes:- Fixed redirect handling on
readPath
- Fixed redirect handling on
balUtilModules
changes:- Fixed
spawnCommands
initGitRepo
andinitNodeModules
now take alog
function rather than alogger
object (regards opts)
- Fixed
balUtilModules
changes:- Fixed
spawnCommand
andspawnCommands
closeProcess
now deprecated in favor of completion callback onopenProcess
- Fixed
balUtilPaths
changes:- Removed safefs aliases
- We no longer alias split off projects, you should use them directly now
balUtilModules
changes:- Killed
(git|node|npm)(Command|Commands)
functions, usespawnCommand
andspawnCommands
instead
- Killed
balUtilHTML
changes:replaceElementAsync
now executes tasks in parallel rather than in serial
- We now use the projects we split away from bal-util
- Killed explicit browser support, use Browserify instead
- Removed the
out
directory from git - Now compiled with the coffee-script bare option
balUtilEvents
changes:EventEmitterEnhanced
changes:- Now works with
once
calls in node 0.10.0- Closes bevry/docpad#462
- Changed
emitSync
to be an alias toemitSerial
andemitAsync
to be an alias toemitParallel
- Added new
getListenerGroup
function
- Now works with
balUtilFlow
changes:fireWithOptionalCallback
can now take the method as an array of[fireMethod,introspectMethod]
useful for pesly binds
balUtilFlow
changes:Groups::run
signature changed from no arguments to a singlemode
argument
balUtilModules
changes:- Fixed
getCountryCode
andgetLanguageCode
failing when there is no locale code
- Fixed
balUtilModules
changes:- Fixed
requireFresh
regression, added test
- Fixed
balUtilModules
changes:- Added
getLocaleCode
- Added
getCountryCode
- Added
getLanguageCode
- Added
balUtilModules
changes:spawnMultiple
,execMultiple
: now accept atasksMode
option that can beserial
(default) orparallel
balUtilPaths
changes:readPath
: do not prefer gzip, but still support it for decoding, as the zlib library is buggy
balUtilPaths
changes:readPath
: add support for gzip decoding for node 0.6 and higher
- More browserify support
- Browserify support
- Node v0.4 support
balUtilPaths
changes:- Removed deprecated
console.log
s when errors occur (they are now sent to the callback) - Fixed
determineExecPath
when executable requires the environment configuration
- Removed deprecated
balUtilTypes
changes:isEmptyObject
now works for empty values (e.g.null
)
balUtilFlow
changes:- Added
clone
- Added
deepClone
setDeep
andgetDeep
now handleundefined
values correctly
- Added
balUtilPaths
changes:- Added timeout support to
readPath
- Added timeout support to
balUtilFlow
changes:- Added
setDeep
- Added
getDeep
- Added
balUtilFlow
changes:- Added
safeShallowExtendPlainObjects
- Added
safeDeepExtendPlainObjects
- Added
- Node v0.9 compatability
balUtilModules
changes:- Added
getEnvironmentPaths
- Added
getStandardExecPaths(execName)
exec
now supports theoutput
optiondetermineExecPath
now resolves the possible paths and checks for their existance- This avoids Node v0.9's ENOENT crash when executing a path that doesn't exit
getExecPath
will now try for.exe
paths as well when running on windows if an extension hasn't already been definedgetGitPath
,getNodePath
,getNpmPath
will now also check the environment paths
- Added
balUtilFlow
changes:- Added
createSnore
- Added
suffixArray
flow
now accepts the signatures({object,actions,action,args,tasks,next})
,(object, action, args, next)
and(actions,args,next)
Group
changes:mode
can now be eitherparallel
orserial
, rather thanasync
andsync
async()
is nowparallel()
(aliased for b/c)sync()
is nowserial()
(aliased for b/c)
- Added
balUtilTypes
changes:- Added
isEmptyObject
- Added
balUtilPaths
changes:- Renamed
testIgnorePatterns
toisIgnoredPath
- Added aliases for b/c compatibility
- Added new
ignorePaths
option
- Renamed
balUtilModules
changes:- Added
requireFresh
- Added
balUtilPaths
changes:- Fixed
scandir
not inheriting ignore patterns when recursing
- Fixed
balUtilPaths
changes:- Fixed
testIgnorePatterns
whenignoreCommonPatterns
is set totrue
- Fixed
balUtilPaths
changes:- Added
testIgnorePatterns
- Renamed
ignorePatterns
toignoreCommonPatterns
, and added newignoreCustomPatterns
- Affects
scandir
options
- Affects
- Added emac cache files to
ignoreCommonPatterns
- Added
balUtilModules
changes:- Added
getExecPath
that will fetch an executable path based on the paths within the environmentPATH
variable
- Added
- Rebuilt with CoffeeScript 1.4.x
balUtilPaths
changes:readPath
will now follow url redirects
balUtilPaths
changes:- Files that start with
~
are now correctly ignored incommonIgnorePatterns
- Files that start with
balUtilFlow
changes:extend
is now an alias ofshallowExtendPlainObjects
as they were exactly the same
balUtilHTML
changes:replaceElement
andreplaceElementAsync
changes:- now accept arguments in object form as well
- accept a
removeIndentation
argument that defaults totrue
balUtilPaths
changes:ensurePath
now returnserr
andexists
instead of justerr
balUtilModules
changes:initGitRepo
will now defaultremote
toorigin
andbranch
tomaster
- Added
initOrPullGitRepo
balUtilPaths
changes:- Added
shallowExtendPlainObjects
- Added
balUtilPaths
changes:- VIM swap files now added to
commonIgnorePatterns
- Thanks to Sean Fridman for pull request #4
- VIM swap files now added to
balUtilModules
changes:- Added
openProcess
andcloseProcess
, and using them inspawn
andexec
, used to preventEMFILE
errors when there are too many open processes - Max number of open processes is configurable via the
NODE_MAX_OPEN_PROCESSES
environment variablebalUtilPaths
changes: - Max number of open files is now configurable via the
NODE_MAX_OPEN_FILES
environment variable
- Added
balUtilPaths
changes:- Added
textExtensions
andbinaryExtensions
- The environment variables
TEXT_EXTENSIONS
andBINARY_EXTENSIONS
will append to these arrays
- The environment variables
- Added
isText
andisTextSync
- Added
balUtilPaths
changes:- Improved
getEncoding
/getEncodingSync
detection- Will now scan start, middle and end, instead of just middle
- Improved
balUtilPaths
changes:- Added
getEncoding
andgetEncodingSync
- Added
balUtilModules
changes:- Failing to retrieve the path on
getGitPath
,getNodePath
andgetNpmPath
will now result in an error
- Failing to retrieve the path on
balUtilModules
changes:- Fixed
exec
andexecMultiple
- Added
gitCommands
,nodeCommands
andnpmCommands
- Fixed
- Dropped node v0.4 support, min required version now 0.6
- Repackaged
balUtilHTML
changes:- Fixed
replaceElement
from mixing up elements that start with our desired selector, instead of being only our desired selector
- Fixed
balUtilModules
changes:- Added
determineExecPath
,getNpmPath
,getTmpPath
,nodeCommand
andgitCommand
initNodeModules
andinitGitRepo
will now get the determined path of the executable if a path isn't passed
- Added
- Re-added markdown files to npm distribution as they are required for the npm website
balUtilTypes
changes:- Better checks for
isString
andisNumber
under some environments
- Better checks for
balUtilFlow
changes:- Removed ambigious
clone
function, usedereference
orextend
ordeepExtendPlainObjects
instead
- Removed ambigious
balUtilTypes
changes:isObject
now also checks truthyness to avoidnull
andundefined
from being objectsisPlainObject
got so good, it can't get better
balUtilFlow
changes:- added
deepExtendPlainObjects
- added
balUtilModules
changes:npmCommand
will now only prefix with the nodePath if the npmPath existsnpmCommand
andinitNodeModules
now use async fs calls instead of sync calls
balUtilFlow
changes:- Added
dereference
- Added
balUtilModules
changes:- Added
stdin
option tospawn
- Added
- Rejigged
balUtilTypes
and now top level- Other components now make use of this instead of inline
typeof
andinstanceof
checks
- Other components now make use of this instead of inline
balUtilFlow
changes:isArray
andtoString
moved tobalUtilTypes
balUtilFlow
changes:- Added
clone
- Added
balUtilModules
changes:- Fixed exists warning on
initNodeModules
- Fixed exists warning on
balUtilPaths
changes:- Added
scanlist
scandir
changes:- If
readFiles
istrue
, then we will return the contents into the list entries as well as the tree entries (we weren't doing this for lists before)
- If
- Added
balUtilFlow
changes:Group
changes:- Cleaned up the context handling code
Block
changes:- Block constructor as well as
createSubBlock
arguments is now a singleopts
object, acceping the optionsname
,fn
,parentBlock
and the newcomplete
- Fixed bug introduced in v1.11.0 causing blocks to complete instantly (instead of once their tasks are finished)
- Block constructor as well as
- Added
balUtilHTML
:getAttribute(attributes,attribute)
detectIndentation(source)
removeIndentation(source)
replaceElement(source, elementNameMatcher, replaceElementCallback)
replaceElementAsync(source, elementNameMatcher, replaceElementCallback, next)
balUtilFlow
changes:wait(delay,fn)
introduced as an alternative tosetTimeout
Group
changes:push
andpushAndRun
signatures are now([context], task)
context
is optional, and what we should bind to this- it saves us having to often wrap our task pushing into for each scopes
- task completion callbacks are now optional, if not specified a task will be completed as soon as it finishes executing
balUtilEvents
,balUtilModules
changes:- Now make use of the
balUtilFlow.push|pushAndRun
newcontext
argument to simplify some loops
- Now make use of the
balUtilModules
changes:initNodeModules
will now install modules from cache, unlessforce
is true
balUtilModules
changes:initNodeModules
will now never install modules from cache
balUtilModules
changes:- Fixed
npmCommand
under some situations
- Fixed
balUtilModules
changes:- Added
spawnMultiple
,execMultiple
,gitGitPath
,getNodePath
, andnpmCommand
spawn
andexec
are now only for single commands, use the newspawnMultiple
andexecMultiple
for multiple commands instead- error exit code is now anything that isnt
0
- Added
- Fixed a problem with large asynchronous groups
balUtilFlow
changes:- Added
extractOptsAndCallback
andextend
- Added
balUtilFlow
changes:- Added
fireWithOptionalCallback
, updated groups and emitters to use this
- Added
balUtilModules
changes:initNodeModules
now supportsoutput
option
balUtilEvents
changes:EventEmitterEnhanced
changes:emitSync
andemitAsync
changes:- The next callback is now optional, if it is not detected then we will automatically mark the listener as completed once we have executed it (in other words, if it doesn't have a next callback, then we treat it as a synchronous listener)
- Fixed a problem with large synchronous groups
- Defaulted
dependencies
to an empty object, to hopefully fix npm issue #2540
balUtilEvents
changes:- Split
emitSync
andemitAsync
out ofEventSystem
and into newEventEmitterEnhanced
thatEventSystem
extends
- Split
- Made next callbacks necessary by default
balUtilModule
changes:spawn
- will now return results in the order of
err
,stdout
,stderr
,code
,signal
- now splits string commands using
/ /
- will now return results in the order of
balUtilFlow
changes:Group
will now only return error as an array if we have more than one error
- Updated for Joe v1.0.0
balUtilCompare
changes:packageCompare
will now fail gracefully if it receives malformed json
- Removed request dependency, we now use the native http/https modules
- Restructured directories
- Removed generated docs, use the wiki instead
- Moved tests from Mocha to Joe
- Travis now tests against node v0.7
balUtilPaths
changes:- Added
exists
andexistsSync
to normalize node's 0.6 to 0.8 api differences
- Added
- Made request an optional dependency
- Added expiremental
balUtilFlow.Block
- Possibly some undocumented
balUtilFlow.Group
changes
balUtilFlow
changes:Group
changes:- Constructor now supports
next
andmode
arguments in any order clear()
now clears everything- Added
hasTasks()
- Group completion callback's first argument (the error argument) is now an array of errors (or null if no errors)
- Added
breakOnError
option (defaults totrue
) - Added
autoClear
option to clear once all tasks have run (defualts tofalse
)
- Constructor now supports
balUtilFlow
changes:Group
changes:- Reverted the change made in v1.6.4 where errors in callbacks still increment the complete count
- Instead, you should be using the
hasExited()
instead ofhasCompleted()
which is used to find out if everything passed successfully
- Instead, you should be using the
- Reverted the change made in v1.6.4 where errors in callbacks still increment the complete count
balUtilFlow
changes:- Added
flow({object,action,[args],[tasks],next})
to simplify calling a series of functions of an object Group
changes:- If complete callback is called with an error, it'll still increment the complete count (it didn't before)
- Added
hasExited()
- Added
balUtilPaths
changes:writeFile
will now callensurePath
before writing the file
balUtilPaths
changes:- Fixed a problem introduced with v1.6.0 with
isDirectory
not opening the file before closing it - If the number of open files becomes a negative number, we will now throw an error
- Decreased the max amount of allowed open files from
500
to100
- Increased the wait time for opening a file from
50
to100
- This is now customisable through the global
waitingToOpenFileDelay
- This is now customisable through the global
- Fixed a problem introduced with v1.6.0 with
- Added support for
balUtilFlow
andbalUtilTypes
to be used inside web browsers
balUtilPaths
changes:- Fixed
initNodeModules
- Fixed
- We now pre-compile our coffee-script
balUtilPaths
changes:- Added
readFile
,writeFile
,mkdir
,stat
,readdir
,unlink
,rmdir
- Renamed
rmdir
tormdirDeep
- Added
balUtilModules
changes:- Removed
initGitSubmodules
,gitPull
- Added
initGitRepo
- Rewrote
initNodeModules
- Removed
balUtilPaths
changes:scan
was removed, not sure what it was used forisDirectory
now returns thefileStat
argument to the callbackscandir
changes:ignorePatterns
option when set to true now uses the newbalUtilPaths.commonIgnorePatterns
property- fixed error throwing when passed an invalid path
- now supports a new
stat
option - will return the
fileStat
argument to thefileAction
anddirAction
callbacks ignorePatterns
andignoreHiddenFiles
will now correctly be passed to child scandir calls
cpdir
andrpdir
now usespath.join
and supportignoreHiddenFiles
andignorePatterns
writetree
now usespath.join
- CoffeeScript dependency is now bundled
- Fixed incorrect octal
0700
should have been700
- Fixed a failing test due to the
bal-util.npm
tobal-util
rename - Improvements to
balUtilModules.spawn
- will only return an error if the exit code was
1
- will also contain the
code
andsignal
with the results results[x][0]
is now the stderr string, rather than an error object
- will only return an error if the exit code was
- Added
spawn
tobalUtilModules
- Added
ignoreHiddenFiles
option tobalUtilPaths.scandir
- Renamed
balUtilGroups
tobalUtilFlow
- Added
toString
,isArray
andeach
tobalUtilFlow
- Added
rpdir
,empty
, andisPathOlderThan
tobalUtilPaths
- Added
openFile
andcloseFile
to open and close files safely (always stays below the maximum number of allowed open files) - Updated all path utilities to use
openFile
andcloseFile
- Added npm scripts
- Removed single and multi modes from
exec
, now always returns the same consistentcallback(err,results)
instead
- Modularized
- Added docco docs
- Moved unit tests to Mocha
- Offers more flexible unit testing
- Offers better guarantees that tests actually ran, and that they actually ran correctly
- Added
readPath
andscantree
- Added
readFiles
option toscandir
scandir
now supports arguments in object format- Removed
parallel
- Tasks inside groups now are passed
next
as there only argument - Removed
resolvePath
,expandPath
andexpandPaths
, they were essentially the same aspath.resolve
- Most functions will now chain
comparePackage
now supports comparing two local, or two remote packages- Added
gitPull
- Added
exec
,initNodeModules
,initGitSubmodules
,EventSystem.when
- Added support for no callbacks
- Considerable improvements to
scandir
,cpdir
andrmdir
- Note, passing
false
as the file or dir actions will now skip all of that type. Passnull
if you do not want that. dirAction
is now fired before we read the directories children, if you want it to fire after then in the next callback, pass a callback in the 3rd argument. Seermdir
for an example of this.
- Note, passing
- Fixed npm web to url warnings
- Added
versionCompare
andpackageCompare
functions- Added
request
dependency
- Added
- Updated
util.Group
to supportasync
andsync
grouping
- Added util.type for testing the type of a variable
- Added util.expandPath and util.expandPaths
- Added util.Group class for your async needs :)
- Added some tests with expresso
- util.scandir now returns err,list,tree
- Added util.writetree
- Initial commit