phantom-pr 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/dist/cli.js +7 -0
  2. package/dist/cli.js.map +1 -1
  3. package/node_modules/ignore/LICENSE-MIT +21 -0
  4. package/node_modules/ignore/README.md +452 -0
  5. package/node_modules/ignore/index.d.ts +81 -0
  6. package/node_modules/ignore/index.js +784 -0
  7. package/node_modules/ignore/legacy.js +681 -0
  8. package/node_modules/ignore/package.json +87 -0
  9. package/node_modules/yaml/LICENSE +13 -0
  10. package/node_modules/yaml/README.md +172 -0
  11. package/node_modules/yaml/bin.mjs +11 -0
  12. package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
  13. package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
  14. package/node_modules/yaml/browser/dist/compose/compose-node.js +102 -0
  15. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
  16. package/node_modules/yaml/browser/dist/compose/composer.js +217 -0
  17. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
  18. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
  19. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
  20. package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  21. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
  22. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
  23. package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
  24. package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  25. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
  26. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  27. package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
  28. package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
  29. package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  30. package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  31. package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  32. package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
  33. package/node_modules/yaml/browser/dist/errors.js +57 -0
  34. package/node_modules/yaml/browser/dist/index.js +17 -0
  35. package/node_modules/yaml/browser/dist/log.js +11 -0
  36. package/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
  37. package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
  38. package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
  39. package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  40. package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
  41. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
  42. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
  43. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
  44. package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
  45. package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
  46. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
  47. package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  48. package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  49. package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  50. package/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
  51. package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  52. package/node_modules/yaml/browser/dist/parse/parser.js +967 -0
  53. package/node_modules/yaml/browser/dist/public-api.js +102 -0
  54. package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
  55. package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
  56. package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
  57. package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
  58. package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  59. package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  60. package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  61. package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  62. package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  63. package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  64. package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
  65. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
  66. package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  67. package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  68. package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  69. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
  70. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
  71. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
  72. package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
  73. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
  74. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  75. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
  76. package/node_modules/yaml/browser/dist/stringify/stringify.js +128 -0
  77. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +143 -0
  78. package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
  79. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
  80. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
  81. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
  82. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
  83. package/node_modules/yaml/browser/dist/util.js +11 -0
  84. package/node_modules/yaml/browser/dist/visit.js +233 -0
  85. package/node_modules/yaml/browser/index.js +5 -0
  86. package/node_modules/yaml/browser/package.json +3 -0
  87. package/node_modules/yaml/dist/cli.d.ts +8 -0
  88. package/node_modules/yaml/dist/cli.mjs +201 -0
  89. package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  90. package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  91. package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  92. package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  93. package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  94. package/node_modules/yaml/dist/compose/compose-node.js +105 -0
  95. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  96. package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  97. package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  98. package/node_modules/yaml/dist/compose/composer.js +222 -0
  99. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  100. package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  101. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  102. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  103. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  104. package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  105. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  106. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  107. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  108. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  109. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  110. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
  111. package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  112. package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  113. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  114. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  115. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  116. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  117. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  118. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  119. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  120. package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  121. package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  122. package/node_modules/yaml/dist/doc/Document.js +337 -0
  123. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  124. package/node_modules/yaml/dist/doc/anchors.js +76 -0
  125. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  126. package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  127. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  128. package/node_modules/yaml/dist/doc/createNode.js +90 -0
  129. package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  130. package/node_modules/yaml/dist/doc/directives.js +178 -0
  131. package/node_modules/yaml/dist/errors.d.ts +21 -0
  132. package/node_modules/yaml/dist/errors.js +62 -0
  133. package/node_modules/yaml/dist/index.d.ts +25 -0
  134. package/node_modules/yaml/dist/index.js +50 -0
  135. package/node_modules/yaml/dist/log.d.ts +3 -0
  136. package/node_modules/yaml/dist/log.js +19 -0
  137. package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  138. package/node_modules/yaml/dist/nodes/Alias.js +116 -0
  139. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  140. package/node_modules/yaml/dist/nodes/Collection.js +151 -0
  141. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  142. package/node_modules/yaml/dist/nodes/Node.js +40 -0
  143. package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  144. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  145. package/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
  146. package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  147. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  148. package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  149. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  150. package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  151. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  152. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  153. package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  154. package/node_modules/yaml/dist/nodes/identity.js +53 -0
  155. package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  156. package/node_modules/yaml/dist/nodes/toJS.js +39 -0
  157. package/node_modules/yaml/dist/options.d.ts +344 -0
  158. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  159. package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  160. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  161. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  162. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  163. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  164. package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  165. package/node_modules/yaml/dist/parse/cst.js +112 -0
  166. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  167. package/node_modules/yaml/dist/parse/lexer.js +719 -0
  168. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  169. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  170. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  171. package/node_modules/yaml/dist/parse/parser.js +972 -0
  172. package/node_modules/yaml/dist/public-api.d.ts +44 -0
  173. package/node_modules/yaml/dist/public-api.js +107 -0
  174. package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  175. package/node_modules/yaml/dist/schema/Schema.js +39 -0
  176. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  177. package/node_modules/yaml/dist/schema/common/map.js +19 -0
  178. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  179. package/node_modules/yaml/dist/schema/common/null.js +17 -0
  180. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  181. package/node_modules/yaml/dist/schema/common/seq.js +19 -0
  182. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  183. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  184. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  185. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  186. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  187. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  188. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  189. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  190. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  191. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  192. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  193. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  194. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  195. package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  196. package/node_modules/yaml/dist/schema/tags.js +99 -0
  197. package/node_modules/yaml/dist/schema/types.d.ts +92 -0
  198. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  199. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  200. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  201. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  202. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  203. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  204. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  205. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  206. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  207. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
  208. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  209. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  210. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  211. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  212. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  213. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  214. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  215. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  216. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  217. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  218. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  219. package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  220. package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  221. package/node_modules/yaml/dist/stringify/stringify.js +131 -0
  222. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  223. package/node_modules/yaml/dist/stringify/stringifyCollection.js +145 -0
  224. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  225. package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  226. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  227. package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  228. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  229. package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
  230. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  231. package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  232. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  233. package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  234. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  235. package/node_modules/yaml/dist/test-events.js +134 -0
  236. package/node_modules/yaml/dist/util.d.ts +16 -0
  237. package/node_modules/yaml/dist/util.js +28 -0
  238. package/node_modules/yaml/dist/visit.d.ts +102 -0
  239. package/node_modules/yaml/dist/visit.js +236 -0
  240. package/node_modules/yaml/package.json +97 -0
  241. package/node_modules/yaml/util.js +2 -0
  242. package/package.json +5 -1
package/dist/cli.js CHANGED
@@ -185,9 +185,16 @@ async function main(argv) {
185
185
  }
186
186
  function shouldRunMain() {
187
187
  // Avoid side effects when imported (tests). Preserve CLI behavior when executed directly.
188
+ // Check if we're being run as a CLI (not imported as a module in tests).
188
189
  const entry = process.argv[1];
189
190
  if (!entry)
190
191
  return true;
192
+ // Check if entry ends with cli.js (handles symlinks, node_modules paths, etc.)
193
+ const entryNorm = entry.replace(/\\/g, '/').toLowerCase();
194
+ if (entryNorm.endsWith('/cli.js') || entryNorm.endsWith('/dist/cli.js')) {
195
+ return true;
196
+ }
197
+ // Fallback: try URL comparison
191
198
  try {
192
199
  const entryUrl = pathToFileURL(path.resolve(entry)).href;
193
200
  return entryUrl === import.meta.url;
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAA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AC;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,+EAA+E;IAC/E,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1D,IAAI,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;QACxE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACzD,OAAO,QAAQ,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,IAAI,aAAa,EAAE;IAAE,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
2
+ http://kael.me/
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,452 @@
1
+ | Linux / MacOS / Windows | Coverage | Downloads |
2
+ | ----------------------- | -------- | --------- |
3
+ | [![build][bb]][bl] | [![coverage][cb]][cl] | [![downloads][db]][dl] |
4
+
5
+ [bb]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml/badge.svg
6
+ [bl]: https://github.com/kaelzhang/node-ignore/actions/workflows/nodejs.yml
7
+
8
+ [cb]: https://codecov.io/gh/kaelzhang/node-ignore/branch/master/graph/badge.svg
9
+ [cl]: https://codecov.io/gh/kaelzhang/node-ignore
10
+
11
+ [db]: http://img.shields.io/npm/dm/ignore.svg
12
+ [dl]: https://www.npmjs.org/package/ignore
13
+
14
+ # ignore
15
+
16
+ `ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore).
17
+
18
+ `ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore).
19
+
20
+ Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec.
21
+
22
+ To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`.
23
+
24
+ To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way.
25
+
26
+ ### Tested on
27
+
28
+ `ignore` is fully tested, and has more than **five hundreds** of unit tests.
29
+
30
+ - Linux + Node: `0.8` - `7.x`
31
+ - Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor.
32
+
33
+ Actually, `ignore` does not rely on any versions of node specially.
34
+
35
+ Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md).
36
+
37
+ ## Table Of Main Contents
38
+
39
+ - [Usage](#usage)
40
+ - [`Pathname` Conventions](#pathname-conventions)
41
+ - See Also:
42
+ - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules.
43
+ - [Upgrade Guide](#upgrade-guide)
44
+
45
+ ## Install
46
+
47
+ ```sh
48
+ npm i ignore
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ```js
54
+ import ignore from 'ignore'
55
+ const ig = ignore().add(['.abc/*', '!.abc/d/'])
56
+ ```
57
+
58
+ ### Filter the given paths
59
+
60
+ ```js
61
+ const paths = [
62
+ '.abc/a.js', // filtered out
63
+ '.abc/d/e.js' // included
64
+ ]
65
+
66
+ ig.filter(paths) // ['.abc/d/e.js']
67
+ ig.ignores('.abc/a.js') // true
68
+ ```
69
+
70
+ ### As the filter function
71
+
72
+ ```js
73
+ paths.filter(ig.createFilter()); // ['.abc/d/e.js']
74
+ ```
75
+
76
+ ### Win32 paths will be handled
77
+
78
+ ```js
79
+ ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
80
+ // if the code above runs on windows, the result will be
81
+ // ['.abc\\d\\e.js']
82
+ ```
83
+
84
+ ## Why another ignore?
85
+
86
+ - `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family.
87
+
88
+ - `ignore` only contains utility methods to filter paths according to the specified ignore rules, so
89
+ - `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations.
90
+ - `ignore` don't cares about sub-modules of git projects.
91
+
92
+ - Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as:
93
+ - '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'.
94
+ - '`**/foo`' should match '`foo`' anywhere.
95
+ - Prevent re-including a file if a parent directory of that file is excluded.
96
+ - Handle trailing whitespaces:
97
+ - `'a '`(one space) should not match `'a '`(two spaces).
98
+ - `'a \ '` matches `'a '`
99
+ - All test cases are verified with the result of `git check-ignore`.
100
+
101
+ # Methods
102
+
103
+ ## .add(pattern: string | Ignore): this
104
+ ## .add(patterns: Array<string | Ignore>): this
105
+ ## .add({pattern: string, mark?: string}): this since 7.0.0
106
+
107
+ - **pattern** `string | Ignore` An ignore pattern string, or the `Ignore` instance
108
+ - **patterns** `Array<string | Ignore>` Array of ignore patterns.
109
+ - **mark?** `string` Pattern mark, which is used to associate the pattern with a certain marker, such as the line no of the `.gitignore` file. Actually it could be an arbitrary string and is optional.
110
+
111
+ Adds a rule or several rules to the current manager.
112
+
113
+ Returns `this`
114
+
115
+ Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename.
116
+
117
+ ```js
118
+ ignore().add('#abc').ignores('#abc') // false
119
+ ignore().add('\\#abc').ignores('#abc') // true
120
+ ```
121
+
122
+ `pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file:
123
+
124
+ ```js
125
+ ignore()
126
+ .add(fs.readFileSync(filenameOfGitignore).toString())
127
+ .filter(filenames)
128
+ ```
129
+
130
+ `pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance.
131
+
132
+ ## .ignores(pathname: [Pathname](#pathname-conventions)): boolean
133
+
134
+ > new in 3.2.0
135
+
136
+ Returns `Boolean` whether `pathname` should be ignored.
137
+
138
+ ```js
139
+ ig.ignores('.abc/a.js') // true
140
+ ```
141
+
142
+ Please **PAY ATTENTION** that `.ignores()` is **NOT** equivalent to `git check-ignore` although in most cases they return equivalent results.
143
+
144
+ However, for the purposes of imitating the behavior of `git check-ignore`, please use `.checkIgnore()` instead.
145
+
146
+ ### `Pathname` Conventions:
147
+
148
+ #### 1. `Pathname` should be a `path.relative()`d pathname
149
+
150
+ `Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory,
151
+
152
+ ```js
153
+ // WRONG, an error will be thrown
154
+ ig.ignores('./abc')
155
+
156
+ // WRONG, for it will never happen, and an error will be thrown
157
+ // If the gitignore rule locates at the root directory,
158
+ // `'/abc'` should be changed to `'abc'`.
159
+ // ```
160
+ // path.relative('/', '/abc') -> 'abc'
161
+ // ```
162
+ ig.ignores('/abc')
163
+
164
+ // WRONG, that it is an absolute path on Windows, an error will be thrown
165
+ ig.ignores('C:\\abc')
166
+
167
+ // Right
168
+ ig.ignores('abc')
169
+
170
+ // Right
171
+ ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc'
172
+ ```
173
+
174
+ In other words, each `Pathname` here should be a relative path to the directory of the gitignore rules.
175
+
176
+ Suppose the dir structure is:
177
+
178
+ ```
179
+ /path/to/your/repo
180
+ |-- a
181
+ | |-- a.js
182
+ |
183
+ |-- .b
184
+ |
185
+ |-- .c
186
+ |-- .DS_store
187
+ ```
188
+
189
+ Then the `paths` might be like this:
190
+
191
+ ```js
192
+ [
193
+ 'a/a.js'
194
+ '.b',
195
+ '.c/.DS_store'
196
+ ]
197
+ ```
198
+
199
+ #### 2. filenames and dirnames
200
+
201
+ `node-ignore` does NO `fs.stat` during path matching, so `node-ignore` treats
202
+ - `foo` as a file
203
+ - **`foo/` as a directory**
204
+
205
+ For the example below:
206
+
207
+ ```js
208
+ // First, we add a ignore pattern to ignore a directory
209
+ ig.add('config/')
210
+
211
+ // `ig` does NOT know if 'config', in the real world,
212
+ // is a normal file, directory or something.
213
+
214
+ ig.ignores('config')
215
+ // `ig` treats `config` as a file, so it returns `false`
216
+
217
+ ig.ignores('config/')
218
+ // returns `true`
219
+ ```
220
+
221
+ Specially for people who develop some library based on `node-ignore`, it is important to understand that.
222
+
223
+ Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory:
224
+
225
+ ```js
226
+ import glob from 'glob'
227
+
228
+ glob('**', {
229
+ // Adds a / character to directory matches.
230
+ mark: true
231
+ }, (err, files) => {
232
+ if (err) {
233
+ return console.error(err)
234
+ }
235
+
236
+ let filtered = ignore().add(patterns).filter(files)
237
+ console.log(filtered)
238
+ })
239
+ ```
240
+
241
+
242
+ ## .filter(paths: Array&lt;Pathname&gt;): Array&lt;Pathname&gt;
243
+
244
+ ```ts
245
+ type Pathname = string
246
+ ```
247
+
248
+ Filters the given array of pathnames, and returns the filtered array.
249
+
250
+ - **paths** `Array.<Pathname>` The array of `pathname`s to be filtered.
251
+
252
+ ## .createFilter()
253
+
254
+ Creates a filter function which could filter an array of paths with `Array.prototype.filter`.
255
+
256
+ Returns `function(path)` the filter function.
257
+
258
+ ## .test(pathname: Pathname): TestResult
259
+
260
+ > New in 5.0.0
261
+
262
+ Returns `TestResult`
263
+
264
+ ```ts
265
+ // Since 5.0.0
266
+ interface TestResult {
267
+ ignored: boolean
268
+ // true if the `pathname` is finally unignored by some negative pattern
269
+ unignored: boolean
270
+ // The `IgnoreRule` which ignores the pathname
271
+ rule?: IgnoreRule
272
+ }
273
+
274
+ // Since 7.0.0
275
+ interface IgnoreRule {
276
+ // The original pattern
277
+ pattern: string
278
+ // Whether the pattern is a negative pattern
279
+ negative: boolean
280
+ // Which is used for other packages to build things upon `node-ignore`
281
+ mark?: string
282
+ }
283
+ ```
284
+
285
+ - `{ignored: true, unignored: false}`: the `pathname` is ignored
286
+ - `{ignored: false, unignored: true}`: the `pathname` is unignored
287
+ - `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules.
288
+
289
+ ## .checkIgnore(target: string): TestResult
290
+
291
+ > new in 7.0.0
292
+
293
+ Debugs gitignore / exclude files, which is equivalent to `git check-ignore -v`. Usually this method is used for other packages to implement the function of `git check-ignore -v` upon `node-ignore`
294
+
295
+ - **target** `string` the target to test.
296
+
297
+ Returns `TestResult`
298
+
299
+ ```js
300
+ ig.add({
301
+ pattern: 'foo/*',
302
+ mark: '60'
303
+ })
304
+
305
+ const {
306
+ ignored,
307
+ rule
308
+ } = checkIgnore('foo/')
309
+
310
+ if (ignored) {
311
+ console.log(`.gitignore:${result}:${rule.mark}:${rule.pattern} foo/`)
312
+ }
313
+
314
+ // .gitignore:60:foo/* foo/
315
+ ```
316
+
317
+ Please pay attention that this method does not have a strong built-in cache mechanism.
318
+
319
+ The purpose of introducing this method is to make it possible to implement the `git check-ignore` command in JavaScript based on `node-ignore`.
320
+
321
+ So do not use this method in those situations where performance is extremely important.
322
+
323
+ ## static `isPathValid(pathname): boolean` since 5.0.0
324
+
325
+ Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname).
326
+
327
+ This method is **NOT** used to check if an ignore pattern is valid.
328
+
329
+ ```js
330
+ import {isPathValid} from 'ignore'
331
+
332
+ isPathValid('./foo') // false
333
+ ```
334
+
335
+ ## <strike>.addIgnoreFile(path)</strike>
336
+
337
+ REMOVED in `3.x` for now.
338
+
339
+ To upgrade `ignore@2.x` up to `3.x`, use
340
+
341
+ ```js
342
+ import fs from 'fs'
343
+
344
+ if (fs.existsSync(filename)) {
345
+ ignore().add(fs.readFileSync(filename).toString())
346
+ }
347
+ ```
348
+
349
+ instead.
350
+
351
+ ## ignore(options)
352
+
353
+ ### `options.ignorecase` since 4.0.0
354
+
355
+ Similar to the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive.
356
+
357
+ ```js
358
+ const ig = ignore({
359
+ ignorecase: false
360
+ })
361
+
362
+ ig.add('*.png')
363
+
364
+ ig.ignores('*.PNG') // false
365
+ ```
366
+
367
+ ### `options.ignoreCase?: boolean` since 5.2.0
368
+
369
+ Which is an alternative to `options.ignoreCase`
370
+
371
+ ### `options.allowRelativePaths?: boolean` since 5.2.0
372
+
373
+ This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions).
374
+
375
+ However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior
376
+
377
+ ```js
378
+ ignore({
379
+ allowRelativePaths: true
380
+ }).ignores('../foo/bar.js') // And it will not throw
381
+ ```
382
+
383
+ ****
384
+
385
+ # Upgrade Guide
386
+
387
+ ## Upgrade 4.x -> 5.x
388
+
389
+ Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory.
390
+
391
+ While `ignore < 5.0.0` did not make sure what the return value was, as well as
392
+
393
+ ```ts
394
+ .ignores(pathname: Pathname): boolean
395
+
396
+ .filter(pathnames: Array<Pathname>): Array<Pathname>
397
+
398
+ .createFilter(): (pathname: Pathname) => boolean
399
+
400
+ .test(pathname: Pathname): {ignored: boolean, unignored: boolean}
401
+ ```
402
+
403
+ See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details.
404
+
405
+ If there are invalid pathnames, the conversion and filtration should be done by users.
406
+
407
+ ```js
408
+ import {isPathValid} from 'ignore' // introduced in 5.0.0
409
+
410
+ const paths = [
411
+ // invalid
412
+ //////////////////
413
+ '',
414
+ false,
415
+ '../foo',
416
+ '.',
417
+ //////////////////
418
+
419
+ // valid
420
+ 'foo'
421
+ ]
422
+ .filter(isPathValid)
423
+
424
+ ig.filter(paths)
425
+ ```
426
+
427
+ ## Upgrade 3.x -> 4.x
428
+
429
+ Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6:
430
+
431
+ ```js
432
+ var ignore = require('ignore/legacy')
433
+ ```
434
+
435
+ ## Upgrade 2.x -> 3.x
436
+
437
+ - All `options` of 2.x are unnecessary and removed, so just remove them.
438
+ - `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed.
439
+ - `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details.
440
+
441
+ ****
442
+
443
+ # Collaborators
444
+
445
+ - [@whitecolor](https://github.com/whitecolor) *Alex*
446
+ - [@SamyPesse](https://github.com/SamyPesse) *Samy Pessé*
447
+ - [@azproduction](https://github.com/azproduction) *Mikhail Davydov*
448
+ - [@TrySound](https://github.com/TrySound) *Bogdan Chadkin*
449
+ - [@JanMattner](https://github.com/JanMattner) *Jan Mattner*
450
+ - [@ntwb](https://github.com/ntwb) *Stephen Edgar*
451
+ - [@kasperisager](https://github.com/kasperisager) *Kasper Isager*
452
+ - [@sandersn](https://github.com/sandersn) *Nathan Shively-Sanders*
@@ -0,0 +1,81 @@
1
+ type Pathname = string
2
+
3
+ interface IgnoreRule {
4
+ pattern: string
5
+ mark?: string
6
+ negative: boolean
7
+ }
8
+
9
+ interface TestResult {
10
+ ignored: boolean
11
+ unignored: boolean
12
+ rule?: IgnoreRule
13
+ }
14
+
15
+ interface PatternParams {
16
+ pattern: string
17
+ mark?: string
18
+ }
19
+
20
+ /**
21
+ * Creates new ignore manager.
22
+ */
23
+ declare function ignore(options?: ignore.Options): ignore.Ignore
24
+ declare namespace ignore {
25
+ interface Ignore {
26
+ /**
27
+ * Adds one or several rules to the current manager.
28
+ * @param {string[]} patterns
29
+ * @returns IgnoreBase
30
+ */
31
+ add(
32
+ patterns: string | Ignore | readonly (string | Ignore)[] | PatternParams
33
+ ): this
34
+
35
+ /**
36
+ * Filters the given array of pathnames, and returns the filtered array.
37
+ * NOTICE that each path here should be a relative path to the root of your repository.
38
+ * @param paths the array of paths to be filtered.
39
+ * @returns The filtered array of paths
40
+ */
41
+ filter(pathnames: readonly Pathname[]): Pathname[]
42
+
43
+ /**
44
+ * Creates a filter function which could filter
45
+ * an array of paths with Array.prototype.filter.
46
+ */
47
+ createFilter(): (pathname: Pathname) => boolean
48
+
49
+ /**
50
+ * Returns Boolean whether pathname should be ignored.
51
+ * @param {string} pathname a path to check
52
+ * @returns boolean
53
+ */
54
+ ignores(pathname: Pathname): boolean
55
+
56
+ /**
57
+ * Returns whether pathname should be ignored or unignored
58
+ * @param {string} pathname a path to check
59
+ * @returns TestResult
60
+ */
61
+ test(pathname: Pathname): TestResult
62
+
63
+ /**
64
+ * Debugs ignore rules and returns the checking result, which is
65
+ * equivalent to `git check-ignore -v`.
66
+ * @returns TestResult
67
+ */
68
+ checkIgnore(pathname: Pathname): TestResult
69
+ }
70
+
71
+ interface Options {
72
+ ignorecase?: boolean
73
+ // For compatibility
74
+ ignoreCase?: boolean
75
+ allowRelativePaths?: boolean
76
+ }
77
+
78
+ function isPathValid(pathname: string): boolean
79
+ }
80
+
81
+ export = ignore