You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

397 lines
15 KiB

  1. ## History
  2. - v1.15.4 January 8, 2013
  3. - `balUtilPaths` changes:
  4. - Renamed `testIgnorePatterns` to `isIgnoredPath`
  5. - Added aliases for b/c compatibility
  6. - Added new `ignorePaths` option
  7. - v1.15.3 December 24, 2012
  8. - `balUtilModules` changes:
  9. - Added `requireFresh`
  10. - v1.15.2 December 16, 2012
  11. - `balUtilPaths` changes:
  12. - Fixed `scandir` not inheriting ignore patterns when recursing
  13. - v1.15.1 December 15, 2012
  14. - `balUtilPaths` changes:
  15. - Fixed `testIgnorePatterns` when `ignoreCommonPatterns` is set to `true`
  16. - v1.15.0 December 15, 2012
  17. - `balUtilPaths` changes:
  18. - Added `testIgnorePatterns`
  19. - Renamed `ignorePatterns` to `ignoreCommonPatterns`, and added new `ignoreCustomPatterns`
  20. - Affects `scandir` options
  21. - Added emac cache files to `ignoreCommonPatterns`
  22. - v1.14.1 December 14, 2012
  23. - `balUtilModules` changes:
  24. - Added `getExecPath` that will fetch an executable path based on the paths within the environment `PATH` variable
  25. - Rebuilt with CoffeeScript 1.4.x
  26. - v1.14.0 November 23, 2012
  27. - `balUtilPaths` changes:
  28. - `readPath` will now follow url redirects
  29. - v1.13.13 October 26, 2012
  30. - `balUtilPaths` changes:
  31. - Files that start with `~` are now correctly ignored in `commonIgnorePatterns`
  32. - v1.13.12 October 22, 2012
  33. - `balUtilFlow` changes:
  34. - `extend` is now an alias of `shallowExtendPlainObjects` as they were exactly the same
  35. - `balUtilHTML` changes:
  36. - `replaceElement` and `replaceElementAsync` changes:
  37. - now accept arguments in object form as well
  38. - accept a `removeIndentation` argument that defaults to `true`
  39. - v1.13.11 October 22, 2012
  40. - `balUtilPaths` changes:
  41. - `ensurePath` now returns `err` and `exists` instead of just `err`
  42. - `balUtilModules` changes:
  43. - `initGitRepo` will now default `remote` to `origin` and `branch` to `master`
  44. - Added `initOrPullGitRepo`
  45. - v1.13.10 October 7, 2012
  46. - `balUtilPaths` changes:
  47. - Added `shallowExtendPlainObjects`
  48. - v1.13.9 October 7, 2012
  49. - `balUtilPaths` changes:
  50. - VIM swap files now added to `commonIgnorePatterns`
  51. - Thanks to [Sean Fridman](https://github.com/sfrdmn) for [pull request #4](https://github.com/balupton/bal-util/pull/4)
  52. - v1.13.8 October 2, 2012
  53. - `balUtilModules` changes:
  54. - Added `openProcess` and `closeProcess`, and using them in `spawn` and `exec`, used to prevent `EMFILE` errors when there are too many open processes
  55. - Max number of open processes is configurable via the `NODE_MAX_OPEN_PROCESSES` environment variable
  56. ` balUtilPaths` changes:
  57. - Max number of open files is now configurable via the`NODE_MAX_OPEN_FILES` environment variable
  58. - v1.13.7 September 24, 2012
  59. - `balUtilPaths` changes:
  60. - Added `textExtensions` and `binaryExtensions`
  61. - The environment variables `TEXT_EXTENSIONS` and `BINARY_EXTENSIONS` will append to these arrays
  62. - Added `isText` and `isTextSync`
  63. - v1.13.6 September 18, 2012
  64. - `balUtilPaths` changes:
  65. - Improved `getEncoding`/`getEncodingSync` detection
  66. - Will now scan start, middle and end, instead of just middle
  67. - v1.13.5 September 13, 2012
  68. - `balUtilPaths` changes:
  69. - Added `getEncoding` and `getEncodingSync`
  70. - v1.13.4 August 28, 2012
  71. - `balUtilModules` changes:
  72. - Failing to retrieve the path on `getGitPath`, `getNodePath` and `getNpmPath` will now result in an error
  73. - v1.13.3 August 28, 2012
  74. - `balUtilModules` changes:
  75. - Fixed `exec` and `execMultiple`
  76. - Added `gitCommands`, `nodeCommands` and `npmCommands`
  77. - Dropped node v0.4 support, min required version now 0.6
  78. - v1.13.2 August 16, 2012
  79. - Repackaged
  80. - v1.13.1 August 16, 2012
  81. - `balUtilHTML` changes:
  82. - Fixed `replaceElement` from mixing up elements that start with our desired selector, instead of being only our desired selector
  83. - v1.13.0 August 3, 2012
  84. - `balUtilModules` changes:
  85. - Added `determineExecPath`, `getNpmPath`, `getTmpPath`, `nodeCommand` and `gitCommand`
  86. - `initNodeModules` and `initGitRepo` will now get the determined path of the executable if a path isn't passed
  87. - Re-added markdown files to npm distribution as they are required for the npm website
  88. - v1.12.5 July 18, 2012
  89. - `balUtilTypes` changes:
  90. - Better checks for `isString` and `isNumber` under some environments
  91. - `balUtilFlow` changes:
  92. - Removed ambigious `clone` function, use `dereference` or `extend` or `deepExtendPlainObjects` instead
  93. - v1.12.4 July 12, 2012
  94. - `balUtilTypes` changes:
  95. - `isObject` now also checks truthyness to avoid `null` and `undefined` from being objects
  96. - `isPlainObject` got so good, it can't get better
  97. - `balUtilFlow` changes:
  98. - added `deepExtendPlainObjects`
  99. - v1.12.3 July 12, 2012
  100. - `balUtilModules` changes:
  101. - `npmCommand` will now only prefix with the nodePath if the npmPath exists
  102. - `npmCommand` and `initNodeModules` now use async fs calls instead of sync calls
  103. - v1.12.2 July 12, 2012
  104. - `balUtilFlow` changes:
  105. - Added `dereference`
  106. - v1.12.1 July 10, 2012
  107. - `balUtilModules` changes:
  108. - Added `stdin` option to `spawn`
  109. - v1.12.0 July 7, 2012
  110. - Rejigged `balUtilTypes` and now top level
  111. - Other components now make use of this instead of inline `typeof` and `instanceof` checks
  112. - `balUtilFlow` changes:
  113. - `isArray` and `toString` moved to `balUtilTypes`
  114. - v1.11.2 July 7, 2012
  115. - `balUtilFlow` changes:
  116. - Added `clone`
  117. - `balUtilModules` changes:
  118. - Fixed exists warning on `initNodeModules`
  119. - `balUtilPaths` changes:
  120. - Added `scanlist`
  121. - `scandir` changes:
  122. - If `readFiles` is `true`, then we will return the contents into the list entries as well as the tree entries (we weren't doing this for lists before)
  123. - v1.11.1 July 4, 2012
  124. - `balUtilFlow` changes:
  125. - `Group` changes:
  126. - Cleaned up the context handling code
  127. - `Block` changes:
  128. - Block constructor as well as `createSubBlock` arguments is now a single `opts` object, acceping the options `name`, `fn`, `parentBlock` and the new `complete`
  129. - Fixed bug introduced in v1.11.0 causing blocks to complete instantly (instead of once their tasks are finished)
  130. - v1.11.0 July 1, 2012
  131. - Added `balUtilHTML`:
  132. - `getAttribute(attributes,attribute)`
  133. - `detectIndentation(source)`
  134. - `removeIndentation(source)`
  135. - `replaceElement(source, elementNameMatcher, replaceElementCallback)`
  136. - `replaceElementAsync(source, elementNameMatcher, replaceElementCallback, next)`
  137. - `balUtilFlow` changes:
  138. - `wait(delay,fn)` introduced as an alternative to `setTimeout`
  139. - `Group` changes:
  140. - `push` and `pushAndRun` signatures are now `([context], task)`
  141. - `context` is optional, and what we should bind to this
  142. - it saves us having to often wrap our task pushing into for each scopes
  143. - task completion callbacks are now optional, if not specified a task will be completed as soon as it finishes executing
  144. - `balUtilEvents`, `balUtilModules` changes:
  145. - Now make use of the `balUtilFlow.push|pushAndRun` new `context` argument to simplify some loops
  146. - v1.10.3 June 26, 2012
  147. - `balUtilModules` changes:
  148. - `initNodeModules` will now install modules from cache, unless `force` is true
  149. - v1.10.2 June 26, 2012
  150. - `balUtilModules` changes:
  151. - `initNodeModules` will now never install modules from cache
  152. - v1.10.1 June 26, 2012
  153. - `balUtilModules` changes:
  154. - Fixed `npmCommand` under some situations
  155. - v1.10.0 June 26, 2012
  156. - `balUtilModules` changes:
  157. - Added `spawnMultiple`, `execMultiple`, `gitGitPath`, `getNodePath`, and `npmCommand`
  158. - `spawn` and `exec` are now only for single commands, use the new `spawnMultiple` and `execMultiple` for multiple commands instead
  159. - error exit code is now anything that isnt `0`
  160. - v1.9.4 June 22, 2012
  161. - Fixed a problem with large asynchronous groups
  162. - v1.9.3 June 22, 2012
  163. - `balUtilFlow` changes:
  164. - Added `extractOptsAndCallback` and `extend`
  165. - v1.9.2 June 21, 2012
  166. - `balUtilFlow` changes:
  167. - Added `fireWithOptionalCallback`, updated groups and emitters to use this
  168. - v1.9.1 June 21, 2012
  169. - `balUtilModules` changes:
  170. - `initNodeModules` now supports `output` option
  171. - v1.9.0 June 21, 2012
  172. - `balUtilEvents` changes:
  173. - `EventEmitterEnhanced` changes:
  174. - `emitSync` and `emitAsync` changes:
  175. - 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)
  176. - v1.8.8 June 19, 2012
  177. - Fixed a problem with large synchronous groups
  178. - v1.8.7 June 19, 2012
  179. - Defaulted `dependencies` to an empty object, to hopefully fix [npm issue #2540](https://github.com/isaacs/npm/pull/2540)
  180. - v1.8.6 June 19, 2012
  181. - `balUtilEvents` changes:
  182. - Split `emitSync` and `emitAsync` out of `EventSystem` and into new `EventEmitterEnhanced` that `EventSystem` extends
  183. - v1.8.5 June 11, 2012
  184. - Made next callbacks necessary by default
  185. - v1.8.4 June 11, 2012
  186. - `balUtilModule` changes:
  187. - `spawn`
  188. - will now return results in the order of `err`, `stdout`, `stderr`, `code`, `signal`
  189. - now splits string commands using `/ /`
  190. - `balUtilFlow` changes:
  191. - `Group` will now only return error as an array if we have more than one error
  192. - Updated for Joe v1.0.0
  193. - v1.8.3 June 9, 2012
  194. - `balUtilCompare` changes:
  195. - `packageCompare` will now fail gracefully if it receives malformed json
  196. - v1.8.2 June 9, 2012
  197. - Removed request dependency, we now use the native http/https modules
  198. - v1.8.1 June 9, 2012
  199. - Restructured directories
  200. - Removed generated docs, use the wiki instead
  201. - Moved tests from Mocha to [Joe](https://github.com/bevry/joe)
  202. - Travis now tests against node v0.7
  203. - `balUtilPaths` changes:
  204. - Added `exists` and `existsSync` to normalize node's 0.6 to 0.8 api differences
  205. - Made [request](https://github.com/mikeal/request) an optional dependency
  206. - v1.8.0 June 9, 2012
  207. - Added expiremental `balUtilFlow.Block`
  208. - Possibly some undocumented `balUtilFlow.Group` changes
  209. - v1.7.0 June 4, 2012
  210. - `balUtilFlow` changes:
  211. - `Group` changes:
  212. - Constructor now supports `next` and `mode` arguments in any order
  213. - `clear()` now clears everything
  214. - Added `hasTasks()`
  215. - Group completion callback's first argument (the error argument) is now an array of errors (or null if no errors)
  216. - Added `breakOnError` option (defaults to `true`)
  217. - Added `autoClear` option to clear once all tasks have run (defualts to `false`)
  218. - v1.6.5 May 30, 2012
  219. - `balUtilFlow` changes:
  220. - `Group` changes:
  221. - Reverted the change made in v1.6.4 where errors in callbacks still increment the complete count
  222. - Instead, you should be using the `hasExited()` instead of `hasCompleted()` which is used to find out if everything passed successfully
  223. - v1.6.4 May 30, 2012
  224. - `balUtilFlow` changes:
  225. - Added `flow({object,action,[args],[tasks],next})` to simplify calling a series of functions of an object
  226. - `Group` changes:
  227. - If complete callback is called with an error, it'll still increment the complete count (it didn't before)
  228. - Added `hasExited()`
  229. - `balUtilPaths` changes:
  230. - `writeFile` will now call `ensurePath` before writing the file
  231. - v1.6.3 May 22, 2012
  232. - `balUtilPaths` changes:
  233. - Fixed a problem introduced with v1.6.0 with `isDirectory` not opening the file before closing it
  234. - If the number of open files becomes a negative number, we will now throw an error
  235. - Decreased the max amount of allowed open files from `500` to `100`
  236. - Increased the wait time for opening a file from `50` to `100`
  237. - This is now customisable through the global `waitingToOpenFileDelay`
  238. - v1.6.2 May 13, 2012
  239. - Added support for `balUtilFlow` and `balUtilTypes` to be used inside web browsers
  240. - v1.6.1 May 4, 2012
  241. - `balUtilPaths` changes:
  242. - Fixed `initNodeModules`
  243. - v1.6.0 May 4, 2012
  244. - We now pre-compile our coffee-script
  245. - `balUtilPaths` changes:
  246. - Added `readFile`, `writeFile`, `mkdir`, `stat`, `readdir`, `unlink`, `rmdir`
  247. - Renamed `rmdir` to `rmdirDeep`
  248. - `balUtilModules` changes:
  249. - Removed `initGitSubmodules`, `gitPull`
  250. - Added `initGitRepo`
  251. - Rewrote `initNodeModules`
  252. - v1.5.0 April 18, 2012
  253. - `balUtilPaths` changes:
  254. - `scan` was removed, not sure what it was used for
  255. - `isDirectory` now returns the `fileStat` argument to the callback
  256. - `scandir` changes:
  257. - `ignorePatterns` option when set to true now uses the new `balUtilPaths.commonIgnorePatterns` property
  258. - fixed error throwing when passed an invalid path
  259. - now supports a new `stat` option
  260. - will return the `fileStat` argument to the `fileAction` and `dirAction` callbacks
  261. - `ignorePatterns` and `ignoreHiddenFiles` will now correctly be passed to child scandir calls
  262. - `cpdir` and `rpdir` now uses `path.join` and support `ignoreHiddenFiles` and `ignorePatterns`
  263. - `writetree` now uses `path.join`
  264. - v1.4.3 April 14, 2012
  265. - CoffeeScript dependency is now bundled
  266. - Fixed incorrect octal `0700` should have been `700`
  267. - v1.4.2 April 5, 2012
  268. - Fixed a failing test due to the `bal-util.npm` to `bal-util` rename
  269. - Improvements to `balUtilModules.spawn`
  270. - will only return an error if the exit code was `1`
  271. - will also contain the `code` and `signal` with the results
  272. - `results[x][0]` is now the stderr string, rather than an error object
  273. - v1.4.1 April 5, 2012
  274. - Added `spawn` to `balUtilModules`
  275. - Added `ignoreHiddenFiles` option to `balUtilPaths.scandir`
  276. - v1.4.0 April 2, 2012
  277. - Renamed `balUtilGroups` to `balUtilFlow`
  278. - Added `toString`, `isArray` and `each` to `balUtilFlow`
  279. - Added `rpdir`, `empty`, and `isPathOlderThan` to `balUtilPaths`
  280. - v1.3.0 February 26, 2012
  281. - Added `openFile` and `closeFile` to open and close files safely (always stays below the maximum number of allowed open files)
  282. - Updated all path utilities to use `openFile` and `closeFile`
  283. - Added npm scripts
  284. - v1.2.0 February 14, 2012
  285. - Removed single and multi modes from `exec`, now always returns the same consistent `callback(err,results)` instead
  286. - v1.1.0 February 6, 2012
  287. - Modularized
  288. - Added [docco](http://jashkenas.github.com/docco/) docs
  289. - v1.0 February 5, 2012
  290. - Moved unit tests to [Mocha](http://visionmedia.github.com/mocha/)
  291. - Offers more flexible unit testing
  292. - Offers better guarantees that tests actually ran, and that they actually ran correctly
  293. - Added `readPath` and `scantree`
  294. - Added `readFiles` option to `scandir`
  295. - `scandir` now supports arguments in object format
  296. - Removed `parallel`
  297. - Tasks inside groups now are passed `next` as there only argument
  298. - Removed `resolvePath`, `expandPath` and `expandPaths`, they were essentially the same as `path.resolve`
  299. - Most functions will now chain
  300. - `comparePackage` now supports comparing two local, or two remote packages
  301. - Added `gitPull`
  302. - v0.9 January 18, 2012
  303. - Added `exec`, `initNodeModules`, `initGitSubmodules`, `EventSystem.when`
  304. - Added support for no callbacks
  305. - v0.8 November 2, 2011
  306. - Considerable improvements to `scandir`, `cpdir` and `rmdir`
  307. - Note, passing `false` as the file or dir actions will now skip all of that type. Pass `null` if you do not want that.
  308. - `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. See `rmdir` for an example of this.
  309. - Fixed npm web to url warnings
  310. - v0.7 October 3, 2011
  311. - Added `versionCompare` and `packageCompare` functions
  312. - Added `request` dependency
  313. - v0.6 September 14, 2011
  314. - Updated `util.Group` to support `async` and `sync` grouping
  315. - v0.4 June 2, 2011
  316. - Added util.type for testing the type of a variable
  317. - Added util.expandPath and util.expandPaths
  318. - v0.3 June 1, 2011
  319. - Added util.Group class for your async needs :)
  320. - v0.2 May 20, 2011
  321. - Added some tests with expresso
  322. - util.scandir now returns err,list,tree
  323. - Added util.writetree
  324. - v0.1 May 18, 2011
  325. - Initial commit