traceur-rb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (410) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +2 -2
  3. data/lib/js/compile.js +7 -15
  4. data/lib/traceur.rb +2 -1
  5. data/lib/traceur/compilation_error.rb +27 -0
  6. data/lib/traceur/compiler.rb +4 -1
  7. data/lib/traceur/configuration.rb +1 -1
  8. data/lib/traceur/node/runner.rb +1 -1
  9. data/lib/traceur/version.rb +1 -1
  10. data/spec/examples/syntax_error.js +3 -0
  11. data/spec/integration/examples_spec.rb +6 -0
  12. data/vendor/node_modules/traceur/LICENSE +202 -0
  13. data/vendor/node_modules/traceur/README.md +5 -5
  14. data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
  15. data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
  16. data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
  17. data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
  18. data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
  19. data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
  20. data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
  21. data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
  22. data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
  23. data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
  24. data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
  25. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
  26. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
  27. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
  28. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
  29. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
  30. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
  31. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
  32. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
  33. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
  34. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
  35. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
  36. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  37. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
  38. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  39. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  40. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
  41. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
  42. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
  43. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
  44. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
  45. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
  46. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
  47. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
  48. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
  49. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
  50. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
  51. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
  52. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
  53. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
  54. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
  55. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
  56. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
  57. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
  58. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
  59. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
  60. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
  61. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
  62. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
  63. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
  64. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
  65. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
  66. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
  67. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
  68. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
  69. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
  70. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
  71. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
  72. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
  73. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
  74. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
  75. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
  76. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
  77. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
  78. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
  79. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
  80. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
  81. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
  82. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
  83. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
  84. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
  85. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
  86. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  87. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
  88. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
  89. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
  90. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
  91. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
  92. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
  93. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
  94. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
  95. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
  96. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
  97. data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
  98. data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
  99. data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
  100. data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
  101. data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
  102. data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
  103. data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
  104. data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
  105. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
  106. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
  107. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
  108. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
  109. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
  110. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
  111. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
  112. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
  113. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
  114. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
  115. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
  116. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
  117. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
  118. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
  119. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
  120. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
  121. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
  122. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
  123. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
  124. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
  125. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
  126. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
  127. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
  128. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
  129. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
  130. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
  131. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
  132. data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
  133. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
  134. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
  135. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
  136. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
  137. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
  138. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
  139. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
  140. data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
  141. data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
  142. data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
  143. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
  144. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
  145. data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
  146. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
  147. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
  148. data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
  149. data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
  150. data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
  151. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
  152. data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
  153. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
  154. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
  155. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
  156. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
  157. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
  158. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
  159. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
  160. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
  161. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
  162. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
  163. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
  164. data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
  165. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
  166. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
  167. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
  168. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
  169. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
  170. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
  171. data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
  172. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
  173. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
  174. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
  175. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
  176. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
  177. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
  178. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  179. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
  180. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
  181. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  182. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
  183. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
  184. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
  185. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
  186. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
  187. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  188. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
  189. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  190. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
  191. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
  192. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
  193. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
  194. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  195. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  196. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  197. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  198. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
  199. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
  200. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
  201. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
  202. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  203. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  204. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
  205. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  206. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  207. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
  208. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
  209. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
  210. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
  211. data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
  212. data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
  213. data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
  214. data/vendor/node_modules/traceur/package.json +234 -20
  215. data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
  216. data/vendor/node_modules/traceur/src/node/System.js +32 -5
  217. data/vendor/node_modules/traceur/src/node/api.js +28 -93
  218. data/vendor/node_modules/traceur/src/node/command.js +84 -19
  219. data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
  220. data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
  221. data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
  222. data/vendor/node_modules/traceur/src/node/require.js +7 -21
  223. data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
  224. data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
  225. data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
  226. data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
  227. metadata +196 -190
  228. data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
  229. data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
  230. data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
  231. data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
  232. data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
  233. data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
  234. data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
  235. data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
  236. data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
  237. data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
  238. data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
  239. data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
  240. data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
  241. data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
  242. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
  243. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
  244. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
  245. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
  246. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
  247. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
  248. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
  249. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
  250. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
  251. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
  252. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
  253. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
  254. data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
  255. data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
  256. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
  257. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
  258. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
  259. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
  260. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
  261. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
  262. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
  263. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
  264. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
  265. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
  266. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
  267. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
  268. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
  269. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
  270. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
  271. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
  272. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
  273. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
  274. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
  275. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
  276. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
  277. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
  278. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
  279. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
  280. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
  281. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
  282. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
  283. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
  284. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
  285. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
  286. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
  287. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
  288. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
  289. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
  290. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
  291. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
  292. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
  293. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
  294. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
  295. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
  296. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
  297. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
  298. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
  299. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
  300. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
  301. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
  302. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
  303. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
  304. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
  305. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
  306. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
  307. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
  308. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
  309. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
  310. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
  311. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
  312. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
  313. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
  314. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
  315. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
  316. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
  317. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
  318. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
  319. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
  320. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
  321. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
  322. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
  323. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
  324. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
  325. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
  326. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
  327. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
  328. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
  329. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
  330. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
  331. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
  332. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
  333. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
  334. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
  335. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
  336. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
  337. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
  338. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
  339. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
  340. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
  341. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
  342. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
  343. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
  344. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
  345. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
  346. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
  347. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
  348. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
  349. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
  350. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
  351. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
  352. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
  353. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
  354. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
  355. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
  356. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
  357. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
  358. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
  359. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
  360. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
  361. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
  362. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
  363. data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
  364. data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
  365. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
  366. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
  367. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
  368. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
  369. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
  370. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
  371. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
  372. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
  373. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
  374. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
  375. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
  376. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
  377. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
  378. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
  379. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
  380. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
  381. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
  382. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
  383. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
  384. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
  385. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
  386. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
  387. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
  388. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
  389. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
  390. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
  391. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
  392. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
  393. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
  394. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
  395. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
  396. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
  397. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
  398. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
  399. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
  400. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
  401. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
  402. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
  403. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
  404. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
  405. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
  406. data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
  407. data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
  408. data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
  409. data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
  410. data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -0,0 +1,182 @@
1
+ # skip quotes for now
2
+ # "{x,x}"
3
+ # {"x,x"}
4
+ # {x","x}
5
+ # '{a,b}{{a,b},a,b}'
6
+ A{b,{d,e},{f,g}}Z
7
+ PRE-{a,b}{{a,b},a,b}-POST
8
+ \\{a,b}{{a,b},a,b}
9
+ {{a,b}
10
+ {a,b}}
11
+ {,}
12
+ a{,}
13
+ {,}b
14
+ a{,}b
15
+ a{b}c
16
+ a{1..5}b
17
+ a{01..5}b
18
+ a{-01..5}b
19
+ a{-01..5..3}b
20
+ a{001..9}b
21
+ a{b,c{d,e},{f,g}h}x{y,z
22
+ a{b,c{d,e},{f,g}h}x{y,z\\}
23
+ a{b,c{d,e},{f,g}h}x{y,z}
24
+ a{b{c{d,e}f{x,y{{g}h
25
+ a{b{c{d,e}f{x,y{}g}h
26
+ a{b{c{d,e}f{x,y}}g}h
27
+ a{b{c{d,e}f}g}h
28
+ a{{x,y},z}b
29
+ f{x,y{g,z}}h
30
+ f{x,y{{g,z}}h
31
+ f{x,y{{g,z}}h}
32
+ f{x,y{{g}h
33
+ f{x,y{{g}}h
34
+ f{x,y{}g}h
35
+ z{a,b{,c}d
36
+ z{a,b},c}d
37
+ {-01..5}
38
+ {-05..100..5}
39
+ {-05..100}
40
+ {0..5..2}
41
+ {0001..05..2}
42
+ {0001..-5..2}
43
+ {0001..-5..-2}
44
+ {0001..5..-2}
45
+ {01..5}
46
+ {1..05}
47
+ {1..05..3}
48
+ {05..100}
49
+ {0a..0z}
50
+ {a,b\\}c,d}
51
+ {a,b{c,d}
52
+ {a,b}c,d}
53
+ {a..F}
54
+ {A..f}
55
+ {a..Z}
56
+ {A..z}
57
+ {z..A}
58
+ {Z..a}
59
+ {a..F..2}
60
+ {A..f..02}
61
+ {a..Z..5}
62
+ d{a..Z..5}b
63
+ {A..z..10}
64
+ {z..A..-2}
65
+ {Z..a..20}
66
+ {a{,b}
67
+ {a},b}
68
+ {x,y{,}g}
69
+ {x,y{}g}
70
+ {{a,b}
71
+ {{a,b},c}
72
+ {{a,b}c}
73
+ {{a,b},}
74
+ X{{a,b},}X
75
+ {{a,b},}c
76
+ {{a,b}.}
77
+ {{a,b}}
78
+ X{a..#}X
79
+ # this next one is an empty string
80
+
81
+ {-10..00}
82
+ # Need to escape slashes in here for reasons i guess.
83
+ {a,\\\\{a,b}c}
84
+ {a,\\{a,b}c}
85
+ a,\\{b,c}
86
+ {-10.\\.00}
87
+ #### bash tests/braces.tests
88
+ # Note that some tests are edited out because some features of
89
+ # bash are intentionally not supported in this brace expander.
90
+ ff{c,b,a}
91
+ f{d,e,f}g
92
+ {l,n,m}xyz
93
+ {abc\\,def}
94
+ {abc}
95
+ {x\\,y,\\{abc\\},trie}
96
+ # not impementing back-ticks obviously
97
+ # XXXX\\{`echo a b c | tr ' ' ','`\\}
98
+ {}
99
+ # We only ever have to worry about parsing a single argument,
100
+ # not a command line, so spaces have a different meaning than bash.
101
+ # { }
102
+ }
103
+ {
104
+ abcd{efgh
105
+ # spaces
106
+ # foo {1,2} bar
107
+ # not impementing back-ticks obviously
108
+ # `zecho foo {1,2} bar`
109
+ # $(zecho foo {1,2} bar)
110
+ # ${var} is not a variable here, like it is in bash. omit.
111
+ # foo{bar,${var}.}
112
+ # foo{bar,${var}}
113
+ # isaacs: skip quotes for now
114
+ # "${var}"{x,y}
115
+ # $var{x,y}
116
+ # ${var}{x,y}
117
+ # new sequence brace operators
118
+ {1..10}
119
+ # this doesn't work yet
120
+ {0..10,braces}
121
+ # but this does
122
+ {{0..10},braces}
123
+ x{{0..10},braces}y
124
+ {3..3}
125
+ x{3..3}y
126
+ {10..1}
127
+ {10..1}y
128
+ x{10..1}y
129
+ {a..f}
130
+ {f..a}
131
+ {a..A}
132
+ {A..a}
133
+ {f..f}
134
+ # mixes are incorrectly-formed brace expansions
135
+ {1..f}
136
+ {f..1}
137
+ # spaces
138
+ # 0{1..9} {10..20}
139
+ # do negative numbers work?
140
+ {-1..-10}
141
+ {-20..0}
142
+ # weirdly-formed brace expansions -- fixed in post-bash-3.1
143
+ a-{b{d,e}}-c
144
+ a-{bdef-{g,i}-c
145
+ # isaacs: skip quotes for now
146
+ # {"klklkl"}{1,2,3}
147
+ # isaacs: this is a valid test, though
148
+ {klklkl}{1,2,3}
149
+ # {"x,x"}
150
+ {1..10..2}
151
+ {-1..-10..2}
152
+ {-1..-10..-2}
153
+ {10..1..-2}
154
+ {10..1..2}
155
+ {1..20..2}
156
+ {1..20..20}
157
+ {100..0..5}
158
+ {100..0..-5}
159
+ {a..z}
160
+ {a..z..2}
161
+ {z..a..-2}
162
+ # make sure brace expansion handles ints > 2**31 - 1 using intmax_t
163
+ {2147483645..2147483649}
164
+ # unwanted zero-padding -- fixed post-bash-4.0
165
+ {10..0..2}
166
+ {10..0..-2}
167
+ {-50..-0..5}
168
+ # bad
169
+ {1..10.f}
170
+ {1..ff}
171
+ {1..10..ff}
172
+ {1.20..2}
173
+ {1..20..f2}
174
+ {1..20..2f}
175
+ {1..2f..2}
176
+ {1..ff..2}
177
+ {1..ff}
178
+ {1..f}
179
+ {1..0f}
180
+ {1..10f}
181
+ {1..10.f}
182
+ {1..10.f}
@@ -0,0 +1,9 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('ignores ${', function(t) {
5
+ t.deepEqual(expand('${1..3}'), ['${1..3}']);
6
+ t.deepEqual(expand('${a,b}${c,d}'), ['${a,b}${c,d}']);
7
+ t.deepEqual(expand('x${a,b}x${c,d}x'), ['x${a,b}x${c,d}x']);
8
+ t.end();
9
+ });
@@ -0,0 +1,10 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('empty option', function(t) {
5
+ t.deepEqual(expand('-v{,,,,}'), [
6
+ '-v', '-v', '-v', '-v', '-v'
7
+ ]);
8
+ t.end();
9
+ });
10
+
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ # Bash 4.3 because of arbitrary need to pick a single standard.
6
+
7
+ if [ "${BASH_VERSINFO[0]}" != "4" ] || [ "${BASH_VERSINFO[1]}" != "3" ]; then
8
+ echo "this script requires bash 4.3" >&2
9
+ exit 1
10
+ fi
11
+
12
+ CDPATH= cd "$(dirname "$0")"
13
+
14
+ js='require("./")(process.argv[1]).join(" ")'
15
+
16
+ cat cases.txt | \
17
+ while read case; do
18
+ if [ "${case:0:1}" = "#" ]; then
19
+ continue;
20
+ fi;
21
+ b="$($BASH -c 'for c in '"$case"'; do echo ["$c"]; done')"
22
+ echo "$case"
23
+ echo -n "$b><><><><";
24
+ done > bash-results.txt
@@ -0,0 +1,15 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('negative increment', function(t) {
5
+ t.deepEqual(expand('{3..1}'), ['3', '2', '1']);
6
+ t.deepEqual(expand('{10..8}'), ['10', '9', '8']);
7
+ t.deepEqual(expand('{10..08}'), ['10', '09', '08']);
8
+ t.deepEqual(expand('{c..a}'), ['c', 'b', 'a']);
9
+
10
+ t.deepEqual(expand('{4..0..2}'), ['4', '2', '0']);
11
+ t.deepEqual(expand('{4..0..-2}'), ['4', '2', '0']);
12
+ t.deepEqual(expand('{e..a..2}'), ['e', 'c', 'a']);
13
+
14
+ t.end();
15
+ });
@@ -0,0 +1,16 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('nested', function(t) {
5
+ t.deepEqual(expand('{a,b{1..3},c}'), [
6
+ 'a', 'b1', 'b2', 'b3', 'c'
7
+ ]);
8
+ t.deepEqual(expand('{{A..Z},{a..z}}'),
9
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
10
+ );
11
+ t.deepEqual(expand('ppp{,config,oe{,conf}}'), [
12
+ 'ppp', 'pppconfig', 'pppoe', 'pppoeconf'
13
+ ]);
14
+ t.end();
15
+ });
16
+
@@ -0,0 +1,10 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('order', function(t) {
5
+ t.deepEqual(expand('a{d,c,b}e'), [
6
+ 'ade', 'ace', 'abe'
7
+ ]);
8
+ t.end();
9
+ });
10
+
@@ -0,0 +1,13 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('pad', function(t) {
5
+ t.deepEqual(expand('{9..11}'), [
6
+ '9', '10', '11'
7
+ ]);
8
+ t.deepEqual(expand('{09..11}'), [
9
+ '09', '10', '11'
10
+ ]);
11
+ t.end();
12
+ });
13
+
@@ -0,0 +1,7 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('x and y of same type', function(t) {
5
+ t.deepEqual(expand('{a..9}'), ['{a..9}']);
6
+ t.end();
7
+ });
@@ -0,0 +1,50 @@
1
+ var test = require('tape');
2
+ var expand = require('..');
3
+
4
+ test('numeric sequences', function(t) {
5
+ t.deepEqual(expand('a{1..2}b{2..3}c'), [
6
+ 'a1b2c', 'a1b3c', 'a2b2c', 'a2b3c'
7
+ ]);
8
+ t.deepEqual(expand('{1..2}{2..3}'), [
9
+ '12', '13', '22', '23'
10
+ ]);
11
+ t.end();
12
+ });
13
+
14
+ test('numeric sequences with step count', function(t) {
15
+ t.deepEqual(expand('{0..8..2}'), [
16
+ '0', '2', '4', '6', '8'
17
+ ]);
18
+ t.deepEqual(expand('{1..8..2}'), [
19
+ '1', '3', '5', '7'
20
+ ]);
21
+ t.end();
22
+ });
23
+
24
+ test('numeric sequence with negative x / y', function(t) {
25
+ t.deepEqual(expand('{3..-2}'), [
26
+ '3', '2', '1', '0', '-1', '-2'
27
+ ]);
28
+ t.end();
29
+ });
30
+
31
+ test('alphabetic sequences', function(t) {
32
+ t.deepEqual(expand('1{a..b}2{b..c}3'), [
33
+ '1a2b3', '1a2c3', '1b2b3', '1b2c3'
34
+ ]);
35
+ t.deepEqual(expand('{a..b}{b..c}'), [
36
+ 'ab', 'ac', 'bb', 'bc'
37
+ ]);
38
+ t.end();
39
+ });
40
+
41
+ test('alphabetic sequences with step count', function(t) {
42
+ t.deepEqual(expand('{a..k..2}'), [
43
+ 'a', 'c', 'e', 'g', 'i', 'k'
44
+ ]);
45
+ t.deepEqual(expand('{b..k..2}'), [
46
+ 'b', 'd', 'f', 'h', 'j'
47
+ ]);
48
+ t.end();
49
+ });
50
+
@@ -0,0 +1,60 @@
1
+ {
2
+ "author": {
3
+ "name": "Isaac Z. Schlueter",
4
+ "email": "i@izs.me",
5
+ "url": "http://blog.izs.me"
6
+ },
7
+ "name": "minimatch",
8
+ "description": "a glob matcher in javascript",
9
+ "version": "2.0.1",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git://github.com/isaacs/minimatch.git"
13
+ },
14
+ "main": "minimatch.js",
15
+ "scripts": {
16
+ "test": "tap test/*.js",
17
+ "prepublish": "browserify -o browser.js -e minimatch.js"
18
+ },
19
+ "engines": {
20
+ "node": "*"
21
+ },
22
+ "dependencies": {
23
+ "brace-expansion": "^1.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "browserify": "^6.3.3",
27
+ "tap": ""
28
+ },
29
+ "license": {
30
+ "type": "MIT",
31
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
32
+ },
33
+ "gitHead": "eac219d8f665c8043fda9a1cd34eab9b006fae01",
34
+ "bugs": {
35
+ "url": "https://github.com/isaacs/minimatch/issues"
36
+ },
37
+ "homepage": "https://github.com/isaacs/minimatch",
38
+ "_id": "minimatch@2.0.1",
39
+ "_shasum": "6c3760b45f66ed1cd5803143ee8d372488f02c37",
40
+ "_from": "minimatch@>=2.0.1 <3.0.0",
41
+ "_npmVersion": "2.1.11",
42
+ "_nodeVersion": "0.10.16",
43
+ "_npmUser": {
44
+ "name": "isaacs",
45
+ "email": "i@izs.me"
46
+ },
47
+ "maintainers": [
48
+ {
49
+ "name": "isaacs",
50
+ "email": "i@izs.me"
51
+ }
52
+ ],
53
+ "dist": {
54
+ "shasum": "6c3760b45f66ed1cd5803143ee8d372488f02c37",
55
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.1.tgz"
56
+ },
57
+ "directories": {},
58
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.1.tgz",
59
+ "readme": "ERROR: No README data found!"
60
+ }
@@ -0,0 +1,399 @@
1
+ // http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
2
+ //
3
+ // TODO: Some of these tests do very bad things with backslashes, and will
4
+ // most likely fail badly on windows. They should probably be skipped.
5
+
6
+ var tap = require("tap")
7
+ , globalBefore = Object.keys(global)
8
+ , mm = require("../")
9
+ , files = [ "a", "b", "c", "d", "abc"
10
+ , "abd", "abe", "bb", "bcd"
11
+ , "ca", "cb", "dd", "de"
12
+ , "bdir/", "bdir/cfile"]
13
+ , next = files.concat([ "a-b", "aXb"
14
+ , ".x", ".y" ])
15
+
16
+
17
+ var patterns =
18
+ [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
19
+ , ["a*", ["a", "abc", "abd", "abe"]]
20
+ , ["X*", ["X*"], {nonull: true}]
21
+
22
+ // allow null glob expansion
23
+ , ["X*", []]
24
+
25
+ // isaacs: Slightly different than bash/sh/ksh
26
+ // \\* is not un-escaped to literal "*" in a failed match,
27
+ // but it does make it get treated as a literal star
28
+ , ["\\*", ["\\*"], {nonull: true}]
29
+ , ["\\**", ["\\**"], {nonull: true}]
30
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
31
+
32
+ , ["b*/", ["bdir/"]]
33
+ , ["c*", ["c", "ca", "cb"]]
34
+ , ["**", files]
35
+
36
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
37
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
38
+
39
+ , "legendary larry crashes bashes"
40
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
41
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
42
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
43
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
44
+
45
+ , "character classes"
46
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
47
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
48
+ "bdir/", "ca", "cb", "dd", "de"]]
49
+ , ["a*[^c]", ["abd", "abe"]]
50
+ , function () { files.push("a-b", "aXb") }
51
+ , ["a[X-]b", ["a-b", "aXb"]]
52
+ , function () { files.push(".x", ".y") }
53
+ , ["[^a-c]*", ["d", "dd", "de"]]
54
+ , function () { files.push("a*b/", "a*b/ooo") }
55
+ , ["a\\*b/*", ["a*b/ooo"]]
56
+ , ["a\\*?/*", ["a*b/ooo"]]
57
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
58
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
59
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
60
+ , ["a[b]c", ["abc"]]
61
+ , ["a[\\b]c", ["abc"]]
62
+ , ["a?c", ["abc"]]
63
+ , ["a\\*c", [], {null: true}, ["abc"]]
64
+ , ["", [""], { null: true }, [""]]
65
+
66
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
67
+ "bash/tests/glob-test"
68
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
69
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
70
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
71
+ , ["a***c", ["abc"], null, ["abc"]]
72
+ , ["a*****?c", ["abc"], null, ["abc"]]
73
+ , ["?*****??", ["abc"], null, ["abc"]]
74
+ , ["*****??", ["abc"], null, ["abc"]]
75
+ , ["?*****?c", ["abc"], null, ["abc"]]
76
+ , ["?***?****c", ["abc"], null, ["abc"]]
77
+ , ["?***?****?", ["abc"], null, ["abc"]]
78
+ , ["?***?****", ["abc"], null, ["abc"]]
79
+ , ["*******c", ["abc"], null, ["abc"]]
80
+ , ["*******?", ["abc"], null, ["abc"]]
81
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
82
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
83
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
84
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
85
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
86
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
87
+ , ["[-abc]", ["-"], null, ["-"]]
88
+ , ["[abc-]", ["-"], null, ["-"]]
89
+ , ["\\", ["\\"], null, ["\\"]]
90
+ , ["[\\\\]", ["\\"], null, ["\\"]]
91
+ , ["[[]", ["["], null, ["["]]
92
+ , ["[", ["["], null, ["["]]
93
+ , ["[*", ["[abc"], null, ["[abc"]]
94
+ , "a right bracket shall lose its special meaning and\n" +
95
+ "represent itself in a bracket expression if it occurs\n" +
96
+ "first in the list. -- POSIX.2 2.8.3.2"
97
+ , ["[]]", ["]"], null, ["]"]]
98
+ , ["[]-]", ["]"], null, ["]"]]
99
+ , ["[a-\z]", ["p"], null, ["p"]]
100
+ , ["??**********?****?", [], { null: true }, ["abc"]]
101
+ , ["??**********?****c", [], { null: true }, ["abc"]]
102
+ , ["?************c****?****", [], { null: true }, ["abc"]]
103
+ , ["*c*?**", [], { null: true }, ["abc"]]
104
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
105
+ , ["a********???*******", [], { null: true }, ["abc"]]
106
+ , ["[]", [], { null: true }, ["a"]]
107
+ , ["[abc", [], { null: true }, ["["]]
108
+
109
+ , "nocase tests"
110
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
111
+ , ["xYz", "ABC", "IjK"]]
112
+ , ["ab*", ["ABC"], { nocase: true, null: true }
113
+ , ["xYz", "ABC", "IjK"]]
114
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
115
+ , ["xYz", "ABC", "IjK"]]
116
+
117
+ // [ pattern, [matches], MM opts, files, TAP opts]
118
+ , "onestar/twostar"
119
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
120
+ , ["{/?,*}", ["/a", "bb"], {null: true}
121
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
122
+
123
+ , "dots should not match unless requested"
124
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
125
+
126
+ // .. and . can only match patterns starting with .,
127
+ // even when options.dot is set.
128
+ , function () {
129
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
130
+ }
131
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
132
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
133
+ , ["a/*/b", ["a/c/b"], {dot:false}]
134
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
135
+
136
+
137
+ // this also tests that changing the options needs
138
+ // to change the cache key, even if the pattern is
139
+ // the same!
140
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
141
+ , [ ".a/.d", "a/.d", "a/b"]]
142
+
143
+ , "paren sets cannot contain slashes"
144
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
145
+
146
+ // brace sets trump all else.
147
+ //
148
+ // invalid glob pattern. fails on bash4 and bsdglob.
149
+ // however, in this implementation, it's easier just
150
+ // to do the intuitive thing, and let brace-expansion
151
+ // actually come before parsing any extglob patterns,
152
+ // like the documentation seems to say.
153
+ //
154
+ // XXX: if anyone complains about this, either fix it
155
+ // or tell them to grow up and stop complaining.
156
+ //
157
+ // bash/bsdglob says this:
158
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
159
+ // but we do this instead:
160
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
161
+
162
+ // test partial parsing in the presence of comment/negation chars
163
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
164
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
165
+
166
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
167
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
168
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
169
+ , {}
170
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
171
+
172
+
173
+ // crazy nested {,,} and *(||) tests.
174
+ , function () {
175
+ files = [ "a", "b", "c", "d"
176
+ , "ab", "ac", "ad"
177
+ , "bc", "cb"
178
+ , "bc,d", "c,db", "c,d"
179
+ , "d)", "(b|c", "*(b|c"
180
+ , "b|c", "b|cc", "cb|c"
181
+ , "x(a|b|c)", "x(a|c)"
182
+ , "(a|b|c)", "(a|c)"]
183
+ }
184
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
185
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
186
+ // a
187
+ // *(b|c)
188
+ // *(b|d)
189
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
190
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
191
+
192
+
193
+ // test various flag settings.
194
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
195
+ , { noext: true } ]
196
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
197
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
198
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
199
+
200
+
201
+ // begin channelling Boole and deMorgan...
202
+ , "negation tests"
203
+ , function () {
204
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
205
+ }
206
+
207
+ // anything that is NOT a* matches.
208
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
209
+
210
+ // anything that IS !a* matches.
211
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
212
+
213
+ // anything that IS a* matches
214
+ , ["!!a*", ["a!b"]]
215
+
216
+ // anything that is NOT !a* matches
217
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
218
+
219
+ // negation nestled within a pattern
220
+ , function () {
221
+ files = [ "foo.js"
222
+ , "foo.bar"
223
+ // can't match this one without negative lookbehind.
224
+ , "foo.js.js"
225
+ , "blar.js"
226
+ , "foo."
227
+ , "boo.js.boo" ]
228
+ }
229
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
230
+
231
+ // https://github.com/isaacs/minimatch/issues/5
232
+ , function () {
233
+ files = [ 'a/b/.x/c'
234
+ , 'a/b/.x/c/d'
235
+ , 'a/b/.x/c/d/e'
236
+ , 'a/b/.x'
237
+ , 'a/b/.x/'
238
+ , 'a/.x/b'
239
+ , '.x'
240
+ , '.x/'
241
+ , '.x/a'
242
+ , '.x/a/b'
243
+ , 'a/.x/b/.x/c'
244
+ , '.x/.x' ]
245
+ }
246
+ , ["**/.x/**", [ '.x/'
247
+ , '.x/a'
248
+ , '.x/a/b'
249
+ , 'a/.x/b'
250
+ , 'a/b/.x/'
251
+ , 'a/b/.x/c'
252
+ , 'a/b/.x/c/d'
253
+ , 'a/b/.x/c/d/e' ] ]
254
+
255
+ ]
256
+
257
+ var regexps =
258
+ [ '/^(?:(?=.)a[^/]*?)$/',
259
+ '/^(?:(?=.)X[^/]*?)$/',
260
+ '/^(?:(?=.)X[^/]*?)$/',
261
+ '/^(?:\\*)$/',
262
+ '/^(?:(?=.)\\*[^/]*?)$/',
263
+ '/^(?:\\*\\*)$/',
264
+ '/^(?:(?=.)b[^/]*?\\/)$/',
265
+ '/^(?:(?=.)c[^/]*?)$/',
266
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
267
+ '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/',
268
+ '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/',
269
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/',
270
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/',
271
+ '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/',
272
+ '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/',
273
+ '/^(?:(?=.)a[^/]*?[^c])$/',
274
+ '/^(?:(?=.)a[X-]b)$/',
275
+ '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/',
276
+ '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/',
277
+ '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/',
278
+ '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/',
279
+ '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/',
280
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/',
281
+ '/^(?:(?=.)a[b]c)$/',
282
+ '/^(?:(?=.)a[b]c)$/',
283
+ '/^(?:(?=.)a[^/]c)$/',
284
+ '/^(?:a\\*c)$/',
285
+ 'false',
286
+ '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/',
287
+ '/^(?:man\\/man1\\/bash\\.1)$/',
288
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/',
289
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
290
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
291
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
292
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
293
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
294
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
295
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
296
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/',
297
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
298
+ '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
299
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
300
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/',
301
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/',
302
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/',
303
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
304
+ '/^(?:(?!\\.)(?=.)[-abc])$/',
305
+ '/^(?:(?!\\.)(?=.)[abc-])$/',
306
+ '/^(?:\\\\)$/',
307
+ '/^(?:(?!\\.)(?=.)[\\\\])$/',
308
+ '/^(?:(?!\\.)(?=.)[\\[])$/',
309
+ '/^(?:\\[)$/',
310
+ '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/',
311
+ '/^(?:(?!\\.)(?=.)[\\]])$/',
312
+ '/^(?:(?!\\.)(?=.)[\\]-])$/',
313
+ '/^(?:(?!\\.)(?=.)[a-z])$/',
314
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
315
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
316
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
317
+ '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
318
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
319
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
320
+ '/^(?:\\[\\])$/',
321
+ '/^(?:\\[abc)$/',
322
+ '/^(?:(?=.)XYZ)$/i',
323
+ '/^(?:(?=.)ab[^/]*?)$/i',
324
+ '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i',
325
+ '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/',
326
+ '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/',
327
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
328
+ '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/',
329
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
330
+ '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/',
331
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
332
+ '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/',
333
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/',
334
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
335
+ '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/',
336
+ '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/',
337
+ '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/',
338
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
339
+ '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/',
340
+ '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/',
341
+ '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/',
342
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
343
+ '/^(?:(?=.)a[^/]b)$/',
344
+ '/^(?:(?=.)#[^/]*?)$/',
345
+ '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
346
+ '/^(?:(?=.)\\!a[^/]*?)$/',
347
+ '/^(?:(?=.)a[^/]*?)$/',
348
+ '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
349
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
350
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
351
+ var re = 0;
352
+
353
+ tap.test("basic tests", function (t) {
354
+ var start = Date.now()
355
+
356
+ // [ pattern, [matches], MM opts, files, TAP opts]
357
+ patterns.forEach(function (c) {
358
+ if (typeof c === "function") return c()
359
+ if (typeof c === "string") return t.comment(c)
360
+
361
+ var pattern = c[0]
362
+ , expect = c[1].sort(alpha)
363
+ , options = c[2] || {}
364
+ , f = c[3] || files
365
+ , tapOpts = c[4] || {}
366
+
367
+ // options.debug = true
368
+ var m = new mm.Minimatch(pattern, options)
369
+ var r = m.makeRe()
370
+ var expectRe = regexps[re++]
371
+ tapOpts.re = String(r) || JSON.stringify(r)
372
+ tapOpts.files = JSON.stringify(f)
373
+ tapOpts.pattern = pattern
374
+ tapOpts.set = m.set
375
+ tapOpts.negated = m.negate
376
+
377
+ var actual = mm.match(f, pattern, options)
378
+ actual.sort(alpha)
379
+
380
+ t.equivalent( actual, expect
381
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
382
+ , tapOpts )
383
+
384
+ t.equal(tapOpts.re, expectRe, null, tapOpts)
385
+ })
386
+
387
+ t.comment("time=" + (Date.now() - start) + "ms")
388
+ t.end()
389
+ })
390
+
391
+ tap.test("global leak test", function (t) {
392
+ var globalAfter = Object.keys(global)
393
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
394
+ t.end()
395
+ })
396
+
397
+ function alpha (a, b) {
398
+ return a > b ? 1 : -1
399
+ }