diff --git a/package.json b/package.json
index 5d67b6339..786bde770 100644
--- a/package.json
+++ b/package.json
@@ -65,8 +65,8 @@
"tiny-lr": "^1.1.0",
"unist-builder": "^1.0.2",
"unist-util-visit": "^1.3.0",
- "vfile": "^3.0.0",
- "vfile-reporter": "^5.0.0",
+ "vfile": "^4.0.0",
+ "vfile-reporter": "^6.0.0",
"vfile-sort": "^2.1.0",
"vinyl": "^2.1.0",
"vinyl-fs": "^3.0.2",
diff --git a/src/lint.js b/src/lint.js
index 8e5efcad8..269101123 100644
--- a/src/lint.js
+++ b/src/lint.js
@@ -77,7 +77,7 @@ function formatLint(comments) {
new VFile({
path: p
});
- vFiles[p].warn(error.message, {
+ vFiles[p].message(error.message, {
line: comment.loc.start.line + (error.commentLineNumber || 0)
});
});
diff --git a/yarn.lock b/yarn.lock
index 07fd53a21..5c6b223de 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -831,6 +831,11 @@
dependencies:
any-observable "^0.3.0"
+"@types/unist@^2.0.0", "@types/unist@^2.0.2":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
+ integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==
+
JSONStream@^1.0.3:
version "1.3.4"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.4.tgz#615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e"
@@ -920,6 +925,11 @@ ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
ansi-styles@^2.0.1, ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -927,6 +937,7 @@ ansi-styles@^2.0.1, ansi-styles@^2.2.1:
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
dependencies:
color-convert "^1.9.0"
@@ -1241,6 +1252,7 @@ bail@^1.0.0:
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
base@^0.11.1:
version "0.11.2"
@@ -1276,6 +1288,7 @@ body@^5.1.0:
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
@@ -1444,7 +1457,7 @@ chalk@^1.0.0, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
-chalk@^2.0.0, chalk@^2.0.1:
+chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
dependencies:
@@ -1452,7 +1465,7 @@ chalk@^2.0.0, chalk@^2.0.1:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1:
+chalk@^2.1.0, chalk@^2.3.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
dependencies:
@@ -1610,12 +1623,14 @@ collection-visit@^1.0.0:
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
combined-stream@^1.0.6, combined-stream@~1.0.6:
version "1.0.7"
@@ -1651,6 +1666,7 @@ component-emitter@^1.2.1:
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
concat-stream@^1.4.10, concat-stream@^1.6.0:
version "1.6.2"
@@ -2139,6 +2155,11 @@ elegant-spinner@^1.0.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e"
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
end-of-stream@^1.0.0, end-of-stream@^1.1.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
@@ -2180,6 +2201,7 @@ es-to-primitive@^1.2.0:
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
escodegen@^1.9.1:
version "1.11.1"
@@ -2606,6 +2628,7 @@ fs-mkdirp-stream@^1.0.0:
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
fsevents@^1.2.2:
version "1.2.4"
@@ -2776,7 +2799,7 @@ glob-stream@^6.1.0:
to-absolute-glob "^2.0.0"
unique-stream "^2.0.2"
-glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
+glob@^7.0.3, glob@^7.1.1, glob@^7.1.3:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
dependencies:
@@ -2787,6 +2810,18 @@ glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
+glob@^7.1.2:
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+ integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
globals-docs@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/globals-docs/-/globals-docs-2.4.0.tgz#f2c647544eb6161c7c38452808e16e693c2dafbb"
@@ -2856,6 +2891,7 @@ has-flag@^1.0.0:
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
has-symbols@^1.0.0:
version "1.0.0"
@@ -3032,11 +3068,17 @@ indent-string@^3.0.0:
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
dependencies:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
+inherits@2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
@@ -3229,6 +3271,11 @@ is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
is-generator-fn@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a"
@@ -4117,7 +4164,12 @@ lodash.templatesettings@^4.0.0:
dependencies:
lodash._reinterpolate "~3.0.0"
-lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1:
+lodash@^4.17.10:
+ version "4.17.13"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93"
+ integrity sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==
+
+lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
@@ -4360,8 +4412,9 @@ mime-types@^2.1.12, mime-types@~2.1.19:
mime-db "~1.38.0"
mime@^2.2.0:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"
+ version "2.4.4"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5"
+ integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==
mimic-fn@^1.0.0:
version "1.2.0"
@@ -4370,6 +4423,7 @@ mimic-fn@^1.0.0:
minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
dependencies:
brace-expansion "^1.1.7"
@@ -4419,8 +4473,9 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:
minimist "0.0.8"
mock-fs@^4.4.2:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.7.0.tgz#9f17e219cacb8094f4010e0a8c38589e2b33c299"
+ version "4.10.1"
+ resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.10.1.tgz#50a07a20114a6cdb119f35762f61f46266a1e323"
+ integrity sha512-w22rOL5ZYu6HbUehB5deurghGM0hS/xBVyHMGKOuQctkk93J9z9VEOhDsiWrXOprVNQpP9uzGKdl8v9mFspKuw==
modify-values@^1.0.0:
version "1.0.1"
@@ -4615,6 +4670,7 @@ oauth-sign@~0.9.0:
object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
object-copy@^0.1.0:
version "0.1.0"
@@ -4670,6 +4726,7 @@ object.pick@^1.3.0:
once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
@@ -4881,6 +4938,7 @@ path-exists@^3.0.0:
path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
path-is-inside@^1.0.1, path-is-inside@^1.0.2:
version "1.0.2"
@@ -4937,8 +4995,9 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
pify@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.0.tgz#db04c982b632fd0df9090d14aaf1c8413cadb695"
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
pinkie-promise@^2.0.0:
version "2.0.1"
@@ -4990,8 +5049,9 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.10.2:
- version "1.14.3"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
+ version "1.18.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
+ integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
pretty-format@^23.6.0:
version "23.6.0"
@@ -5873,6 +5933,15 @@ string-width@^1.0.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
+string-width@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.1.0.tgz#ba846d1daa97c3c596155308063e075ed1c99aff"
+ integrity sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^5.2.0"
+
string_decoder@0.10, string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
@@ -5912,6 +5981,13 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
+strip-ansi@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
strip-bom@3.0.0, strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
@@ -5956,9 +6032,17 @@ supports-color@^3.1.2:
dependencies:
has-flag "^1.0.0"
-supports-color@^5.3.0, supports-color@^5.4.0:
+supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^6.0.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
+ integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
dependencies:
has-flag "^3.0.0"
@@ -6244,20 +6328,32 @@ unique-stream@^2.0.2:
json-stable-stringify "^1.0.0"
through2-filter "^2.0.0"
-unist-builder@^1.0.1, unist-builder@^1.0.2:
+unist-builder@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-1.0.3.tgz#ab0f9d0f10936b74f3e913521955b0478e0ff036"
dependencies:
object-assign "^4.1.0"
+unist-builder@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-1.0.4.tgz#e1808aed30bd72adc3607f25afecebef4dd59e17"
+ integrity sha512-v6xbUPP7ILrT15fHGrNyHc1Xda8H3xVhP7/HAIotHOhVPjH5dCXA097C3Rry1Q2O+HbOLCao4hfPB+EYEjHgVg==
+ dependencies:
+ object-assign "^4.1.0"
+
unist-util-generated@^1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.2.tgz#8b993f9239d8e560be6ee6e91c3f7b7208e5ce25"
-unist-util-is@^2.0.0, unist-util-is@^2.1.2:
+unist-util-is@^2.0.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.2.tgz#1193fa8f2bfbbb82150633f3a8d2eb9a1c1d55db"
+unist-util-is@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-3.0.0.tgz#d9e84381c2468e82629e4a5be9d7d05a2dd324cd"
+ integrity sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==
+
unist-util-position@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.0.1.tgz#8e220c24658239bf7ddafada5725ed0ea1ebbc26"
@@ -6272,18 +6368,33 @@ unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz#3f37fcf351279dcbca7480ab5889bb8a832ee1c6"
-unist-util-visit-parents@^2.0.0:
+unist-util-stringify-position@^2.0.0:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.0.1.tgz#63fffc8929027bee04bfef7d2cce474f71cb6217"
+ resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz#de2a2bc8d3febfa606652673a91455b6a36fb9f3"
+ integrity sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==
dependencies:
- unist-util-is "^2.1.2"
+ "@types/unist" "^2.0.2"
-unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.3.0:
+unist-util-visit-parents@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz#25e43e55312166f3348cae6743588781d112c1e9"
+ integrity sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==
+ dependencies:
+ unist-util-is "^3.0.0"
+
+unist-util-visit@^1.0.0, unist-util-visit@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.0.tgz#1cb763647186dc26f5e1df5db6bd1e48b3cc2fb1"
dependencies:
unist-util-visit-parents "^2.0.0"
+unist-util-visit@^1.3.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.1.tgz#4724aaa8486e6ee6e26d7ff3c8685960d560b1e3"
+ integrity sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==
+ dependencies:
+ unist-util-visit-parents "^2.0.0"
+
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
@@ -6357,19 +6468,30 @@ vfile-message@^1.0.0:
dependencies:
unist-util-stringify-position "^1.1.1"
-vfile-reporter@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-5.0.0.tgz#c2bcb87a6161cbd3b41671c2aa21b8c006f4acce"
+vfile-message@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.1.tgz#951881861c22fc1eb39f873c0b93e336a64e8f6d"
+ integrity sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==
+ dependencies:
+ "@types/unist" "^2.0.2"
+ unist-util-stringify-position "^2.0.0"
+
+vfile-reporter@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-6.0.0.tgz#753119f51dec9289b7508b457afc0cddf5e07f2e"
+ integrity sha512-8Is0XxFxWJUhPJdOg3CyZTqd3ICCWg6r304PuBl818ZG91h4FMS3Q+lrOPS+cs5/DZK3H0+AkJdH0J8JEwKtDA==
dependencies:
repeat-string "^1.5.0"
- string-width "^2.0.0"
- supports-color "^5.4.0"
- unist-util-stringify-position "^1.0.0"
+ string-width "^4.0.0"
+ supports-color "^6.0.0"
+ unist-util-stringify-position "^2.0.0"
+ vfile-sort "^2.1.2"
vfile-statistics "^1.1.0"
-vfile-sort@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.1.1.tgz#03acdc8a4d7870ecf0e35499f095ddd9d14cbc41"
+vfile-sort@^2.1.0, vfile-sort@^2.1.2:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.2.1.tgz#74e714f9175618cdae96bcaedf1a3dc711d87567"
+ integrity sha512-5dt7xEhC44h0uRQKhbM2JAe0z/naHphIZlMOygtMBM9Nn0pZdaX5fshhwWit9wvsuP8t/wp43nTDRRErO1WK8g==
vfile-statistics@^1.1.0:
version "1.1.1"
@@ -6384,14 +6506,16 @@ vfile@^2.0.0:
unist-util-stringify-position "^1.0.0"
vfile-message "^1.0.0"
-vfile@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/vfile/-/vfile-3.0.0.tgz#e0995335fdafbefe0c3d59a42868d413c0409031"
+vfile@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.0.1.tgz#fc3d43a1c71916034216bf65926d5ee3c64ed60c"
+ integrity sha512-lRHFCuC4SQBFr7Uq91oJDJxlnftoTLQ7eKIpMdubhYcVMho4781a8MWXLy3qZrZ0/STD1kRiKc0cQOHm4OkPeA==
dependencies:
+ "@types/unist" "^2.0.0"
is-buffer "^2.0.0"
replace-ext "1.0.0"
- unist-util-stringify-position "^1.0.0"
- vfile-message "^1.0.0"
+ unist-util-stringify-position "^2.0.0"
+ vfile-message "^2.0.0"
vinyl-fs@^3.0.2:
version "3.0.3"
@@ -6543,6 +6667,7 @@ wrap-ansi@^2.0.0:
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
write-file-atomic@^2.1.0:
version "2.4.2"
From 2b035fd996043bf68aaf1a17e65b26bb368afa41 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Tue, 9 Jul 2019 21:54:14 -0700
Subject: [PATCH 034/231] test: Remove Node 8 support
We need to upgrade vfile-reporter to fix TypeScript, and it includes a
module, string-width, that requires Node 8. And it's probably time:
so, we're now requiring Node 8.
---
.circleci/config.yml | 1 -
package.json | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index fc2eff3a7..b4b076fae 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,6 @@ workflows:
version: 2
node-multi-build:
jobs:
- - node-v6
- node-v8
- node-v10
diff --git a/package.json b/package.json
index 786bde770..4ca6b79fd 100644
--- a/package.json
+++ b/package.json
@@ -132,7 +132,7 @@
}
},
"engines": {
- "node": ">=4"
+ "node": ">=8"
},
"lint-staged": {
"*.js": [
From 8f36e757002253d12ebadddac7d6699e5ea2a52f Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Sat, 8 Jun 2019 13:05:43 +0900
Subject: [PATCH 035/231] Formatted with Prettier
BREAKING CHANGE: The next release will require Node 8
---
src/default_theme/assets/style.css | 33 ++++++++++++++++++------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/src/default_theme/assets/style.css b/src/default_theme/assets/style.css
index 5265ea1fa..0618f4376 100644
--- a/src/default_theme/assets/style.css
+++ b/src/default_theme/assets/style.css
@@ -26,7 +26,7 @@ h4 {
}
a {
- color: #1184CE;
+ color: #1184ce;
text-decoration: none;
}
@@ -51,12 +51,12 @@ a:hover {
}
section:target h3 {
- font-weight:700;
+ font-weight: 700;
}
.documentation td,
.documentation th {
- padding: .25rem .25rem;
+ padding: 0.25rem 0.25rem;
}
h1:hover .anchorjs-link,
@@ -82,13 +82,16 @@ h4:hover .anchorjs-link {
}
}
-.pre, pre, code, .code {
- font-family: Source Code Pro,Menlo,Consolas,Liberation Mono,monospace;
+.pre,
+pre,
+code,
+.code {
+ font-family: Source Code Pro, Menlo, Consolas, Liberation Mono, monospace;
font-size: 14px;
}
.fill-light {
- background: #F9F9F9;
+ background: #f9f9f9;
}
.width2 {
@@ -100,10 +103,10 @@ h4:hover .anchorjs-link {
display: block;
width: 100%;
height: 2rem;
- padding: .5rem;
+ padding: 0.5rem;
margin-bottom: 1rem;
border: 1px solid #ccc;
- font-size: .875rem;
+ font-size: 0.875rem;
border-radius: 3px;
box-sizing: border-box;
}
@@ -115,15 +118,19 @@ table {
.prose table th,
.prose table td {
text-align: left;
- padding:8px;
- border:1px solid #ddd;
+ padding: 8px;
+ border: 1px solid #ddd;
}
-.prose table th:nth-child(1) { border-right: none; }
-.prose table th:nth-child(2) { border-left: none; }
+.prose table th:nth-child(1) {
+ border-right: none;
+}
+.prose table th:nth-child(2) {
+ border-left: none;
+}
.prose table {
- border:1px solid #ddd;
+ border: 1px solid #ddd;
}
.prose-big {
From 778d84cb6cc2e815579f9dd76497ad69f1f47192 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Tue, 9 Jul 2019 21:59:56 -0700
Subject: [PATCH 036/231] chore(release): 12.0.0
---
CHANGELOG.md | 13 +++++++++++++
package.json | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a36520c2e..245b95897 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+# [12.0.0](https://github.com/documentationjs/documentation/compare/v11.0.1...v12.0.0) (2019-07-10)
+
+
+* Formatted with Prettier ([8f36e75](https://github.com/documentationjs/documentation/commit/8f36e75))
+
+
+### BREAKING CHANGES
+
+* The next release will require Node 8
+
+
+
## [11.0.1](https://github.com/documentationjs/documentation/compare/v11.0.0...v11.0.1) (2019-06-12)
diff --git a/package.json b/package.json
index 4ca6b79fd..d6219e7b0 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "11.0.1",
+ "version": "12.0.0",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From 821a15e6bbb01d59da1a0e1e6e3d88f29ad63dda Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Wed, 10 Jul 2019 10:04:02 -0700
Subject: [PATCH 037/231] fix: Crash when called with no inputs. yargs now
variadic positional arguments undefined instead of []
---
src/commands/build.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/commands/build.js b/src/commands/build.js
index ce09d86e7..c4397626b 100644
--- a/src/commands/build.js
+++ b/src/commands/build.js
@@ -43,7 +43,7 @@ module.exports.handler = function build(argv) {
let watcher;
argv._handled = true;
- if (!argv.input.length) {
+ if (!(argv.input && argv.input.length)) {
try {
argv.input = [
JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'))
From 798d32ee26417738d21d2a6d34133f79d5dc8892 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Wed, 10 Jul 2019 10:06:32 -0700
Subject: [PATCH 038/231] chore(release): 12.0.1
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 245b95897..6277ed5d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.0.1](https://github.com/documentationjs/documentation/compare/v12.0.0...v12.0.1) (2019-07-10)
+
+
+### Bug Fixes
+
+* Crash when called with no inputs. yargs now variadic positional arguments undefined instead of [] ([821a15e](https://github.com/documentationjs/documentation/commit/821a15e))
+
+
+
# [12.0.0](https://github.com/documentationjs/documentation/compare/v11.0.1...v12.0.0) (2019-07-10)
diff --git a/package.json b/package.json
index d6219e7b0..eb61021a8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.0.0",
+ "version": "12.0.1",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From 226a666d1e1f465e357d21fdd36735dfdec55fba Mon Sep 17 00:00:00 2001
From: Ben Turner <7623873+ben-turner@users.noreply.github.com>
Date: Tue, 16 Jul 2019 14:37:41 -0700
Subject: [PATCH 039/231] deps: Remove unmaintained dependency: disparity
(#1264)
* Remove unmaintained dependency: disparity
The dependency disparity has not been updated for 4 years and is using
a very old version of the diff package which has a security alert.
This alert is not relevant to the current usage of the package, however
it does generate noise when installing. Additionally, it seems unwise to
be relying on unmaintained packages.
This commit replaces disparity with diff and adds some code to color the
output which is based on disparity's logic.
* Use chalk to color diff output instead of ansi-styles
---
package.json | 2 +-
src/commands/readme.js | 40 +++++++++++++++++++++++++++++++++-------
yarn.lock | 16 +++++-----------
3 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/package.json b/package.json
index eb61021a8..d91f99a30 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"chalk": "^2.3.0",
"chokidar": "^2.0.4",
"concat-stream": "^1.6.0",
- "disparity": "^2.0.0",
+ "diff": "^4.0.1",
"doctrine-temporary-fork": "2.1.0",
"get-port": "^4.0.0",
"git-url-parse": "^10.0.1",
diff --git a/src/commands/readme.js b/src/commands/readme.js
index a7591b8d3..11e81d351 100644
--- a/src/commands/readme.js
+++ b/src/commands/readme.js
@@ -5,7 +5,7 @@ const documentation = require('../');
const sharedOptions = require('./shared_options');
const inject = require('mdast-util-inject');
const chalk = require('chalk');
-const disparity = require('disparity');
+const diff = require('diff');
const getReadmeFile = require('../get-readme-file');
module.exports.command = 'readme [input..]';
@@ -94,22 +94,48 @@ module.exports.handler = function readme(argv) {
.process(readmeContent)
)
.then(file => {
- const diffOutput = disparity.unified(readmeContent, file.contents, {
- paths: [argv.readmeFile, argv.readmeFile]
- });
- if (!diffOutput.length) {
+ const diffRaw = diff.createPatch(
+ '',
+ readmeContent,
+ file.contents,
+ '',
+ ''
+ );
+ if (!diffRaw.length) {
log(`${argv.readmeFile} is up to date.`);
process.exit(0);
}
+ // Replace diff headers with real values
+ const cleanedDiff = diffRaw
+ .replace(/^([^\n]+)\n([^\n]+)\n/m, '')
+ .replace(/^---.*/gm, `--- ${argv.readmeFile}\tremoved`)
+ .replace(/^\+\+\+.*/gm, `+++ ${argv.readmeFile}\tadded`);
+
+ // Includes newlines for easier joins
+ const diffLines = cleanedDiff.split(/^/m);
+ const diffHeader = diffLines
+ .slice(0, 2)
+ .join('')
+ .replace(/[^\n\r]+/g, chalk.yellow('$&'));
+ const diffBody = diffLines
+ .slice(2)
+ .join('')
+ .replace(/^-[^\n\r]*/gm, chalk.red('$&'))
+ .replace(/^\+[^\n\r]*/gm, chalk.green('$&'))
+ .replace(/^@@.+@@/gm, chalk.magenta('$&'));
+
if (argv.d) {
log(
chalk.bold(`${argv.readmeFile} needs the following updates:`),
- `\n${diffOutput}`
+ `\n${diffHeader}${diffBody}`
);
process.exit(1);
} else {
- log(chalk.bold(`Updating ${argv.readmeFile}`), `\n${diffOutput}`);
+ log(
+ chalk.bold(`Updating ${argv.readmeFile}`),
+ `\n${diffHeader}${diffBody}`
+ );
}
fs.writeFileSync(argv.readmeFile, file.contents);
diff --git a/yarn.lock b/yarn.lock
index 5c6b223de..284f472b1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -930,7 +930,7 @@ ansi-regex@^4.1.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
-ansi-styles@^2.0.1, ansi-styles@^2.2.1:
+ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -2070,20 +2070,14 @@ detective@^4.0.0:
acorn "^5.2.1"
defined "^1.0.0"
-diff@^1.3.2:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
-
diff@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
-disparity@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/disparity/-/disparity-2.0.0.tgz#57ddacb47324ae5f58d2cc0da886db4ce9eeb718"
- dependencies:
- ansi-styles "^2.0.1"
- diff "^1.3.2"
+diff@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff"
+ integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==
doctrine-temporary-fork@2.1.0:
version "2.1.0"
From 4d9938518451aca3614ada2d7a76956cc6ae848a Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Tue, 16 Jul 2019 14:38:36 -0700
Subject: [PATCH 040/231] chore(release): 12.0.2
---
CHANGELOG.md | 5 +++++
package.json | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6277ed5d4..b9d278c74 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.0.2](https://github.com/documentationjs/documentation/compare/v12.0.1...v12.0.2) (2019-07-16)
+
+
+
## [12.0.1](https://github.com/documentationjs/documentation/compare/v12.0.0...v12.0.1) (2019-07-10)
diff --git a/package.json b/package.json
index d91f99a30..845e248a5 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.0.1",
+ "version": "12.0.2",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From f9039e9614019ca4960ab01137f3948ab65ff8d4 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 22 Jul 2019 14:01:43 -0700
Subject: [PATCH 041/231] fix: Allow skipped array arguments in destructuring.
Fixes #1247 (#1266)
---
__tests__/__snapshots__/test.js.snap | 39 +++++++++++++++++++++++-----
__tests__/fixture/es6.input.js | 6 ++---
src/infer/params.js | 5 +++-
3 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap
index 81879b012..e16e3e75a 100644
--- a/__tests__/__snapshots__/test.js.snap
+++ b/__tests__/__snapshots__/test.js.snap
@@ -8529,7 +8529,7 @@ have any parameter descriptions.",
"context": Object {
"loc": Object {
"end": Object {
- "column": 34,
+ "column": 36,
"line": 16,
},
"start": Object {
@@ -8593,7 +8593,7 @@ have any parameter descriptions.",
"errors": Array [],
"examples": Array [
Object {
- "description": "destructure([1, 2, 3])",
+ "description": "destructure([0, 1, 2, 3])",
},
],
"implements": Array [],
@@ -8623,7 +8623,6 @@ have any parameter descriptions.",
"name": "$0",
"properties": Array [
Object {
- "lineNumber": 16,
"name": "$0.0",
"title": "param",
},
@@ -8637,6 +8636,11 @@ have any parameter descriptions.",
"name": "$0.2",
"title": "param",
},
+ Object {
+ "lineNumber": 16,
+ "name": "$0.3",
+ "title": "param",
+ },
],
"title": "param",
"type": Object {
@@ -8656,7 +8660,7 @@ have any parameter descriptions.",
"sees": Array [],
"tags": Array [
Object {
- "description": "destructure([1, 2, 3])",
+ "description": "destructure([0, 1, 2, 3])",
"lineNumber": 2,
"title": "example",
},
@@ -11631,11 +11635,12 @@ Similar, but with an array
- \`$0.0\`
- \`$0.1\`
- \`$0.2\`
+ - \`$0.3\`
### Examples
\`\`\`javascript
-destructure([1, 2, 3])
+destructure([0, 1, 2, 3])
\`\`\`
## multiply
@@ -12271,6 +12276,28 @@ have any parameter descriptions.",
],
"type": "listItem",
},
+ Object {
+ "children": Array [
+ Object {
+ "children": Array [
+ Object {
+ "type": "inlineCode",
+ "value": "$0.3",
+ },
+ Object {
+ "type": "text",
+ "value": " ",
+ },
+ Object {
+ "type": "text",
+ "value": " ",
+ },
+ ],
+ "type": "paragraph",
+ },
+ ],
+ "type": "listItem",
+ },
],
"ordered": false,
"type": "list",
@@ -12295,7 +12322,7 @@ have any parameter descriptions.",
Object {
"lang": "javascript",
"type": "code",
- "value": "destructure([1, 2, 3])",
+ "value": "destructure([0, 1, 2, 3])",
},
Object {
"children": Array [
diff --git a/__tests__/fixture/es6.input.js b/__tests__/fixture/es6.input.js
index a300409a2..7e27ec7a4 100644
--- a/__tests__/fixture/es6.input.js
+++ b/__tests__/fixture/es6.input.js
@@ -11,9 +11,9 @@ function destructure({
/**
* Similar, but with an array
* @example
- * destructure([1, 2, 3])
+ * destructure([0, 1, 2, 3])
*/
-function destructure([a, b, c]) {}
+function destructure([, a, b, c]) {}
/**
* This function returns the number one.
@@ -184,6 +184,6 @@ class A {
// nullishCoalescingOperator
let x = a ?? b;
// logicalAssignment
- return x &&= b?.b |> String.fromCharCode;
+ return (x &&= b?.b |> String.fromCharCode);
}
}
diff --git a/src/infer/params.js b/src/infer/params.js
index dc67c0b81..93a1ae034 100644
--- a/src/infer/params.js
+++ b/src/infer/params.js
@@ -273,7 +273,10 @@ function paramToDoc(param, prefix, i) {
const newParam = {
title: 'param',
name: prefix ? prefixedName : param.name,
- lineNumber: param.loc.start.line
+ // A skipped array argument like ([, a]);
+ // looks like { name: '0', indexed: true }, and thus has no location,
+ // so we allow location to be undefined here.
+ lineNumber: param.loc ? param.loc.start.line : undefined
};
// Flow/TS annotations
From a1a2310321e8081aa78ddd7958e79b0a68a122db Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 22 Jul 2019 14:01:57 -0700
Subject: [PATCH 042/231] chore(release): 12.0.3
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9d278c74..e8f05ae93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.0.3](https://github.com/documentationjs/documentation/compare/v12.0.2...v12.0.3) (2019-07-22)
+
+
+### Bug Fixes
+
+* Allow skipped array arguments in destructuring. Fixes [#1247](https://github.com/documentationjs/documentation/issues/1247) ([#1266](https://github.com/documentationjs/documentation/issues/1266)) ([f9039e9](https://github.com/documentationjs/documentation/commit/f9039e9))
+
+
+
## [12.0.2](https://github.com/documentationjs/documentation/compare/v12.0.1...v12.0.2) (2019-07-16)
diff --git a/package.json b/package.json
index 845e248a5..e8f0590f6 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.0.2",
+ "version": "12.0.3",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From ec36b41aa972a2d92126c368d839e3a7f20f941b Mon Sep 17 00:00:00 2001
From: Vladimir Agafonkin
Date: Thu, 1 Aug 2019 02:40:22 +0300
Subject: [PATCH 043/231] feat: Add git submodules support to github linking
(#1270)
* add git submodules support in github linking
* more reliable submodule origin parsing
---
__tests__/lib/git/find_git.js | 20 +++++++++++++++-----
__tests__/lib/git/url_prefix.js | 25 +++++++++++++++++++------
__tests__/utils.js | 26 ++++++++++++++++++++++++++
package.json | 2 +-
src/git/find_git.js | 23 +++++++++++++++--------
src/git/url_prefix.js | 24 ++++++++++++++++++------
src/github.js | 15 ++++++++-------
yarn.lock | 14 +-------------
8 files changed, 103 insertions(+), 46 deletions(-)
diff --git a/__tests__/lib/git/find_git.js b/__tests__/lib/git/find_git.js
index 8619ac986..dd9886669 100644
--- a/__tests__/lib/git/find_git.js
+++ b/__tests__/lib/git/find_git.js
@@ -5,12 +5,22 @@ const findGit = require('../../../src/git/find_git');
test('findGit', function() {
mock(mockRepo.master);
+ const root =
+ path.parse(__dirname).root + path.join('my', 'repository', 'path');
+ const masterPaths = findGit(path.join(root, 'index.js'));
+ mock.restore();
- const root = path.parse(__dirname).root;
-
- expect(
- findGit(root + path.join('my', 'repository', 'path', 'index.js'))
- ).toBe(root + path.join('my', 'repository', 'path', '.git'));
+ expect(masterPaths).toEqual({
+ git: path.join(root, '.git'),
+ root
+ });
+ mock(mockRepo.submodule);
+ const submodulePaths = findGit(path.join(root, 'index.js'));
mock.restore();
+
+ expect(submodulePaths).toEqual({
+ git: path.join(path.dirname(root), '.git', 'modules', 'path'),
+ root
+ });
});
diff --git a/__tests__/lib/git/url_prefix.js b/__tests__/lib/git/url_prefix.js
index 0a917352f..2a7f53e75 100644
--- a/__tests__/lib/git/url_prefix.js
+++ b/__tests__/lib/git/url_prefix.js
@@ -5,20 +5,33 @@ const parsePackedRefs = getGithubURLPrefix.parsePackedRefs;
test('getGithubURLPrefix', function() {
mock(mockRepo.master);
-
- expect(getGithubURLPrefix('/my/repository/path/')).toBe(
- 'https://github.com/foo/bar/blob/this_is_the_sha/'
- );
-
+ const masterUrl = getGithubURLPrefix({
+ git: '/my/repository/path/.git',
+ root: '/my/repository/path'
+ });
mock.restore();
+ expect(masterUrl).toBe('https://github.com/foo/bar/blob/this_is_the_sha/');
+
mock(mockRepo.detached);
+ const detachedUrl = getGithubURLPrefix({
+ git: '/my/repository/path/.git',
+ root: '/my/repository/path'
+ });
+ mock.restore();
- expect(getGithubURLPrefix('/my/repository/path/')).toBe(
+ expect(detachedUrl).toBe(
'https://github.com/foo/bar/blob/e4cb2ffe677571d0503e659e4e64e01f45639c62/'
);
+ mock(mockRepo.submodule);
+ const submoduleUrl = getGithubURLPrefix({
+ git: '/my/repository/.git/modules/path',
+ root: '/my/repository/path'
+ });
mock.restore();
+
+ expect(submoduleUrl).toBe('https://github.com/foo/bar/blob/this_is_the_sha/');
});
test('parsePackedRefs', function() {
diff --git a/__tests__/utils.js b/__tests__/utils.js
index 874093df1..aec4d2c5c 100644
--- a/__tests__/utils.js
+++ b/__tests__/utils.js
@@ -74,6 +74,32 @@ module.exports.mockRepo = {
}
}
},
+ submodule: {
+ '/my': {
+ repository: {
+ path: {
+ '.git': 'gitdir: ../.git/modules/path',
+ 'index.js': 'module.exports = 42;'
+ },
+ '.git': {
+ config:
+ '[submodule "path"]\n' +
+ 'url = https://github.com/foo/bar\n' +
+ 'active = true',
+ modules: {
+ path: {
+ HEAD: 'ref: refs/heads/master',
+ refs: {
+ heads: {
+ master: 'this_is_the_sha'
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
malformed: {
'/my': {
repository: {
diff --git a/package.json b/package.json
index e8f0590f6..859d915ea 100644
--- a/package.json
+++ b/package.json
@@ -45,6 +45,7 @@
"glob": "^7.1.2",
"globals-docs": "^2.4.0",
"highlight.js": "^9.15.5",
+ "ini": "^1.3.5",
"js-yaml": "^3.10.0",
"lodash": "^4.17.10",
"mdast-util-inject": "^1.1.0",
@@ -58,7 +59,6 @@
"remark-html": "^8.0.0",
"remark-reference-links": "^4.0.1",
"remark-toc": "^5.0.0",
- "remote-origin-url": "0.4.0",
"resolve": "^1.8.1",
"stream-array": "^1.1.2",
"strip-json-comments": "^2.0.1",
diff --git a/src/git/find_git.js b/src/git/find_git.js
index 6a56a11f8..426b9091d 100644
--- a/src/git/find_git.js
+++ b/src/git/find_git.js
@@ -5,18 +5,25 @@ const fs = require('fs');
* Given a full path to a single file, iterate upwards through the filesystem
* to find a directory with a .git file indicating that it is a git repository
* @param filename any file within a repository
- * @returns repository path
+ * @returns repository root & its .git folder paths
*/
function findGit(filename) {
- const paths = filename.split(path.sep);
- for (let i = paths.length; i > 0; i--) {
- const p = path.resolve(
- paths.slice(0, i).join(path.sep) + path.sep + '.git'
- );
- if (fs.existsSync(p)) {
- return p;
+ let root = path.resolve(filename);
+ while (root) {
+ root = path.dirname(root);
+ let git = path.join(root, '.git');
+ if (!fs.existsSync(git)) continue;
+
+ if (fs.statSync(git).isFile()) {
+ // git submodule
+ const matches = fs.readFileSync(git, 'utf8').match(/gitdir: (.*)/);
+ if (!matches) return null;
+ git = path.join(root, matches[1]);
}
+
+ return { root, git };
}
+ return null;
}
module.exports = findGit;
diff --git a/src/git/url_prefix.js b/src/git/url_prefix.js
index aedf19ae4..64bd4f0aa 100644
--- a/src/git/url_prefix.js
+++ b/src/git/url_prefix.js
@@ -1,7 +1,7 @@
const fs = require('fs');
const path = require('path');
const gitUrlParse = require('git-url-parse');
-const getRemoteOrigin = require('remote-origin-url');
+const ini = require('ini');
/**
* Sometimes git will [pack refs](https://git-scm.com/docs/git-pack-refs)
@@ -32,15 +32,15 @@ function parsePackedRefs(packedRefs, branchName) {
* @returns {string} base HTTPS url of the GitHub repository
* @throws {Error} if the root is not a git repo
*/
-function getGithubURLPrefix(root) {
+function getGithubURLPrefix({ git, root }) {
let sha;
try {
- const head = fs.readFileSync(path.join(root, '.git', 'HEAD'), 'utf8');
+ const head = fs.readFileSync(path.join(git, 'HEAD'), 'utf8');
const branch = head.match(/ref: (.*)/);
if (branch) {
const branchName = branch[1];
- const branchFileName = path.join(root, '.git', branchName);
- const packedRefsName = path.join(root, '.git', 'packed-refs');
+ const branchFileName = path.join(git, branchName);
+ const packedRefsName = path.join(git, 'packed-refs');
if (fs.existsSync(branchFileName)) {
sha = fs.readFileSync(branchFileName, 'utf8');
} else if (fs.existsSync(packedRefsName)) {
@@ -57,7 +57,19 @@ function getGithubURLPrefix(root) {
sha = head;
}
if (sha) {
- const parsed = gitUrlParse(getRemoteOrigin.sync(root));
+ let origin;
+ if (git.indexOf(root) === 0) {
+ const config = ini.parse(
+ fs.readFileSync(path.join(git, 'config'), 'utf8')
+ );
+ origin = config['remote "origin"'].url;
+ } else {
+ const config = ini.parse(
+ fs.readFileSync(path.join(git, '..', '..', 'config'), 'utf8')
+ );
+ origin = config[`submodule "${path.basename(git)}"`].url;
+ }
+ const parsed = gitUrlParse(origin);
parsed.git_suffix = false; // eslint-disable-line
return parsed.toString('https') + '/blob/' + sha.trim() + '/';
}
diff --git a/src/github.js b/src/github.js
index 46c497837..3edb435ad 100644
--- a/src/github.js
+++ b/src/github.js
@@ -10,15 +10,16 @@ const getGithubURLPrefix = require('./git/url_prefix');
* @returns {Object} comment with github inferred
*/
module.exports = function(comment) {
- const repoPath = findGit(comment.context.file);
- const root = repoPath ? path.dirname(repoPath) : '.';
- const urlPrefix = getGithubURLPrefix(root);
- const fileRelativePath = comment.context.file
- .replace(root + path.sep, '')
- .split(path.sep)
- .join('/');
+ const paths = findGit(comment.context.file);
+
+ const urlPrefix = paths && getGithubURLPrefix(paths);
if (urlPrefix) {
+ const fileRelativePath = comment.context.file
+ .replace(paths.root + path.sep, '')
+ .split(path.sep)
+ .join('/');
+
let startLine;
let endLine;
diff --git a/yarn.lock b/yarn.lock
index 284f472b1..02e1f4a60 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3076,7 +3076,7 @@ inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-ini@^1.3.2, ini@^1.3.3, ini@~1.3.0:
+ini@^1.3.2, ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
@@ -4868,12 +4868,6 @@ parse-filepath@^1.0.2:
map-cache "^0.2.0"
path-root "^0.1.1"
-parse-git-config@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-0.2.0.tgz#272833fdd15fea146fb75d336d236b963b6ff706"
- dependencies:
- ini "^1.3.3"
-
parse-github-repo-url@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
@@ -5420,12 +5414,6 @@ remark@^9.0.0:
remark-stringify "^5.0.0"
unified "^6.0.0"
-remote-origin-url@0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/remote-origin-url/-/remote-origin-url-0.4.0.tgz#4d3e2902f34e2d37d1c263d87710b77eb4086a30"
- dependencies:
- parse-git-config "^0.2.0"
-
remove-bom-buffer@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53"
From 43cd57d3fa1155c6e93b760b0ff7704e26b70f69 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Wed, 31 Jul 2019 16:40:43 -0700
Subject: [PATCH 044/231] chore(release): 12.1.0
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8f05ae93..d304ffc5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+# [12.1.0](https://github.com/documentationjs/documentation/compare/v12.0.3...v12.1.0) (2019-07-31)
+
+
+### Features
+
+* Add git submodules support to github linking ([#1270](https://github.com/documentationjs/documentation/issues/1270)) ([ec36b41](https://github.com/documentationjs/documentation/commit/ec36b41))
+
+
+
## [12.0.3](https://github.com/documentationjs/documentation/compare/v12.0.2...v12.0.3) (2019-07-22)
diff --git a/package.json b/package.json
index 859d915ea..eda9c7105 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.0.3",
+ "version": "12.1.0",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From 27a29be207eb3bab963f6cfc2b9c09267ee91de8 Mon Sep 17 00:00:00 2001
From: Vladimir Agafonkin
Date: Fri, 2 Aug 2019 01:38:33 +0300
Subject: [PATCH 045/231] fix: Git submodule support for repo names with a dot
(#1271)
---
__tests__/lib/git/find_git.js | 12 +++++++++---
__tests__/lib/git/url_prefix.js | 4 ++--
__tests__/utils.js | 8 ++++----
src/git/url_prefix.js | 18 ++++++++++++------
4 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/__tests__/lib/git/find_git.js b/__tests__/lib/git/find_git.js
index dd9886669..d5f089947 100644
--- a/__tests__/lib/git/find_git.js
+++ b/__tests__/lib/git/find_git.js
@@ -16,11 +16,17 @@ test('findGit', function() {
});
mock(mockRepo.submodule);
- const submodulePaths = findGit(path.join(root, 'index.js'));
+ const submoduleRoot = path.join(root, '..', 'my.submodule');
+ const submodulePaths = findGit(path.join(submoduleRoot, 'index.js'));
mock.restore();
expect(submodulePaths).toEqual({
- git: path.join(path.dirname(root), '.git', 'modules', 'path'),
- root
+ git: path.join(
+ path.dirname(submoduleRoot),
+ '.git',
+ 'modules',
+ 'my.submodule'
+ ),
+ root: submoduleRoot
});
});
diff --git a/__tests__/lib/git/url_prefix.js b/__tests__/lib/git/url_prefix.js
index 2a7f53e75..22be4bf6b 100644
--- a/__tests__/lib/git/url_prefix.js
+++ b/__tests__/lib/git/url_prefix.js
@@ -26,8 +26,8 @@ test('getGithubURLPrefix', function() {
mock(mockRepo.submodule);
const submoduleUrl = getGithubURLPrefix({
- git: '/my/repository/.git/modules/path',
- root: '/my/repository/path'
+ git: '/my/repository/.git/modules/my.submodule',
+ root: '/my/repository/my.submodule'
});
mock.restore();
diff --git a/__tests__/utils.js b/__tests__/utils.js
index aec4d2c5c..001e3b4a7 100644
--- a/__tests__/utils.js
+++ b/__tests__/utils.js
@@ -77,17 +77,17 @@ module.exports.mockRepo = {
submodule: {
'/my': {
repository: {
- path: {
- '.git': 'gitdir: ../.git/modules/path',
+ 'my.submodule': {
+ '.git': 'gitdir: ../.git/modules/my.submodule',
'index.js': 'module.exports = 42;'
},
'.git': {
config:
- '[submodule "path"]\n' +
+ '[submodule "my.submodule"]\n' +
'url = https://github.com/foo/bar\n' +
'active = true',
modules: {
- path: {
+ 'my.submodule': {
HEAD: 'ref: refs/heads/master',
refs: {
heads: {
diff --git a/src/git/url_prefix.js b/src/git/url_prefix.js
index 64bd4f0aa..0e0737bef 100644
--- a/src/git/url_prefix.js
+++ b/src/git/url_prefix.js
@@ -59,14 +59,10 @@ function getGithubURLPrefix({ git, root }) {
if (sha) {
let origin;
if (git.indexOf(root) === 0) {
- const config = ini.parse(
- fs.readFileSync(path.join(git, 'config'), 'utf8')
- );
+ const config = parseGitConfig(path.join(git, 'config'));
origin = config['remote "origin"'].url;
} else {
- const config = ini.parse(
- fs.readFileSync(path.join(git, '..', '..', 'config'), 'utf8')
- );
+ const config = parseGitConfig(path.join(git, '..', '..', 'config'));
origin = config[`submodule "${path.basename(git)}"`].url;
}
const parsed = gitUrlParse(origin);
@@ -78,5 +74,15 @@ function getGithubURLPrefix({ git, root }) {
}
}
+function parseGitConfig(configPath) {
+ const str = fs
+ .readFileSync(configPath, 'utf8')
+ .replace(
+ /\[(\S+) "(.+)"\]/g,
+ (match, key, value) => `[${key} "${value.split('.').join('\\.')}"]`
+ );
+ return ini.parse(str);
+}
+
module.exports = getGithubURLPrefix;
module.exports.parsePackedRefs = parsePackedRefs;
From 29c19ffc5db6f914e7e143751ae424127e54edc9 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Thu, 1 Aug 2019 15:38:49 -0700
Subject: [PATCH 046/231] chore(release): 12.1.1
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d304ffc5c..dfd20c7e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.1.1](https://github.com/documentationjs/documentation/compare/v12.1.0...v12.1.1) (2019-08-01)
+
+
+### Bug Fixes
+
+* Git submodule support for repo names with a dot ([#1271](https://github.com/documentationjs/documentation/issues/1271)) ([27a29be](https://github.com/documentationjs/documentation/commit/27a29be))
+
+
+
# [12.1.0](https://github.com/documentationjs/documentation/compare/v12.0.3...v12.1.0) (2019-07-31)
diff --git a/package.json b/package.json
index eda9c7105..e9f49eeae 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.1.0",
+ "version": "12.1.1",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From b2c317533c281607cc6688894ef0c232cd1a38c7 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Wed, 14 Aug 2019 02:01:23 +0900
Subject: [PATCH 047/231] editorconfig rules should apply to CSS too (#1275)
helps maintain consistency.
---
.editorconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.editorconfig b/.editorconfig
index 443b276cc..597e75449 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-[**.js]
+[*.{js,css}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
From 1548574e438d7023299bddc28327a7a29e296ae9 Mon Sep 17 00:00:00 2001
From: Piotr Zduniak
Date: Mon, 9 Sep 2019 18:20:42 +0200
Subject: [PATCH 048/231] Fix a crash in ts_doctrine.js (#1278)
---
src/ts_doctrine.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ts_doctrine.js b/src/ts_doctrine.js
index efc6c4f26..19723401b 100644
--- a/src/ts_doctrine.js
+++ b/src/ts_doctrine.js
@@ -32,7 +32,7 @@ function propertyToField(property) {
}
return {
type: 'FieldType',
- key: property.key.name || property.key.value,
+ key: property.key ? property.key.name || property.key.value : '',
value: type
};
}
From 3e0958b033efc409163af244c618b09eca940792 Mon Sep 17 00:00:00 2001
From: Pelle Wessman
Date: Mon, 9 Sep 2019 18:21:39 +0200
Subject: [PATCH 049/231] fix: check for empty diff (#1273)
* Fix check for empty diff
Compare to the result of the latest diff module: https://runkit.com/embed/y4qzdzzz05qr
No diff gives this result:
```
Index:
===================================================================
---
+++
```
* Actually check the right thing in the fix as well
---
src/commands/readme.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/commands/readme.js b/src/commands/readme.js
index 11e81d351..00813c63c 100644
--- a/src/commands/readme.js
+++ b/src/commands/readme.js
@@ -101,7 +101,7 @@ module.exports.handler = function readme(argv) {
'',
''
);
- if (!diffRaw.length) {
+ if (diffRaw.split('\n').length === 5) {
log(`${argv.readmeFile} is up to date.`);
process.exit(0);
}
From 635e52e38211853a92266cef439ed158f0fa97cf Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 9 Sep 2019 09:24:11 -0700
Subject: [PATCH 050/231] chore(release): 12.1.2
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dfd20c7e0..ca2c54669 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.1.2](https://github.com/documentationjs/documentation/compare/v12.1.1...v12.1.2) (2019-09-09)
+
+
+### Bug Fixes
+
+* check for empty diff ([#1273](https://github.com/documentationjs/documentation/issues/1273)) ([3e0958b](https://github.com/documentationjs/documentation/commit/3e0958b))
+
+
+
## [12.1.1](https://github.com/documentationjs/documentation/compare/v12.1.0...v12.1.1) (2019-08-01)
diff --git a/package.json b/package.json
index e9f49eeae..6c8a0493f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.1.1",
+ "version": "12.1.2",
"author": "Tom MacWright",
"bin": {
"documentation": "./bin/documentation.js"
From e7da906b849251c2432d4c4acd61d07cf0dcfb63 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Wed, 11 Sep 2019 02:02:41 +0900
Subject: [PATCH 051/231] HTTPS link to daringfireball.net (#1280)
---
src/output/markdown.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/output/markdown.js b/src/output/markdown.js
index 8b00fac08..252f50d4e 100644
--- a/src/output/markdown.js
+++ b/src/output/markdown.js
@@ -3,7 +3,7 @@ const markdownAST = require('./markdown_ast');
/**
* Formats documentation as
- * [Markdown](http://daringfireball.net/projects/markdown/).
+ * [Markdown](https://daringfireball.net/projects/markdown/).
*
* @param {Array} comments parsed comments
* @param {Object} args Options that can customize the output
From acf3cfb059e34597b9cc5e68ee98d589276a1442 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Wed, 11 Sep 2019 02:02:49 +0900
Subject: [PATCH 052/231] fix filenames typo (#1279)
---
src/smart_glob.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/smart_glob.js b/src/smart_glob.js
index a5ace50b1..31d5c0cee 100644
--- a/src/smart_glob.js
+++ b/src/smart_glob.js
@@ -80,7 +80,7 @@ function resolveFileGlobPatterns(patterns, extensions) {
}
/**
- * Build a list of absolute filesnames on which ESLint will act.
+ * Build a list of absolute filenames on which ESLint will act.
* Ignored files are excluded from the results, as are duplicates.
*
* @param globPatterns Glob patterns.
From 3ecc358e588df09f125bb70f4de608f050c855ad Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Fri, 11 Oct 2019 03:26:38 +0900
Subject: [PATCH 053/231] HTTPS link to
https://eslint.org/docs/rules/valid-jsdoc.html (#1287)
---
docs/FAQ.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 9f52e8256..e90a5c28a 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -52,7 +52,7 @@ documentation.
* The JSDoc syntax exposes a powerful, standardized type syntax to, for example,
express parameter types like 'an array of strings'.
as `Array`, and to support custom object types with inter-linking
-* The [eslint valid-jsdoc rule](http://eslint.org/docs/rules/valid-jsdoc.html)
+* The [eslint valid-jsdoc rule](https://eslint.org/docs/rules/valid-jsdoc.html)
makes it possible to require documentation as part of your linting step,
ensuring that new code doesn't lower documentation coverage.
From bbc988e9fde00f50b2b42128e4c713a688be44b9 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Fri, 11 Oct 2019 12:58:05 -0700
Subject: [PATCH 054/231] Patch 11 (#1289)
* specify page lang in HTML template
Good practise to include this.
REF: https://www.w3.org/International/questions/qa-html-language-declarations
* Update snapshot
---
__tests__/__snapshots__/test.js.snap | 2 +-
src/default_theme/index._ | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap
index e16e3e75a..620e7a0d8 100644
--- a/__tests__/__snapshots__/test.js.snap
+++ b/__tests__/__snapshots__/test.js.snap
@@ -1528,7 +1528,7 @@ Returns **[Number][3]** numberone
exports[`html nested.input.js 1`] = `
"
-
+
| Documentation
diff --git a/src/default_theme/index._ b/src/default_theme/index._
index 2577a1859..caefed9a3 100644
--- a/src/default_theme/index._
+++ b/src/default_theme/index._
@@ -1,5 +1,5 @@
-
+
<%- config['project-name'] %> <%- config['project-version'] %> | Documentation <% if (config['project-description']) { %>
From 3506ef28baceaccec516af4cf43c4b9d7ad482b4 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Tue, 15 Oct 2019 00:55:07 +0900
Subject: [PATCH 055/231] Fix beacuse typo (#1292)
---
src/infer/access.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/infer/access.js b/src/infer/access.js
index a4f12494b..264fff9a4 100644
--- a/src/infer/access.js
+++ b/src/infer/access.js
@@ -27,7 +27,7 @@ function inferAccessWithPattern(pattern) {
comment.readonly = true;
}
- // This needs to run after inferName beacuse we infer the access based on
+ // This needs to run after inferName because we infer the access based on
// the name.
if (
re &&
From c1e4dbe923d37314169c755cc812658e4c473330 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Tue, 15 Oct 2019 00:56:41 +0900
Subject: [PATCH 056/231] Update RECIPES.md (#1291)
Fix links to HTTPS to prevent redirects
Fix hierachical typo
---
docs/RECIPES.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/RECIPES.md b/docs/RECIPES.md
index 7d96eb3c8..16255f212 100644
--- a/docs/RECIPES.md
+++ b/docs/RECIPES.md
@@ -98,7 +98,7 @@ names with the parent object. Here's an example:
```js
/**
- * This method has hierachical params
+ * This method has hierarchical params
* @param {Object} animals different kinds of animals
* @param {String} animals.fishes number of kinds of fish
*/
@@ -113,8 +113,8 @@ explicit syntax is required.
## Object Factories
-Libraries like [d3](http://d3js.org/) eschew JavaScript's `new` operator
-in favor of the ['object factory' or 'module pattern'](http://www.macwright.org/2012/06/04/the-module-pattern.html).
+Libraries like [d3](https://d3js.org) eschew JavaScript's `new` operator
+in favor of the ['object factory' or 'module pattern'](https://macwright.org/2012/06/04/the-module-pattern.html).
The factory function is a normal function that yields an object. That object
has properties. In this case, we don't use the `@class` tag because
From d5b5e3ccff83c0001ced44c69c6dd2fc2066d0bb Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Tue, 15 Oct 2019 01:02:30 +0900
Subject: [PATCH 057/231] Update CODE_OF_CONDUCT.md (#1290)
Update to latest version from: https://www.contributor-covenant.org/version/1/4/code-of-conduct.md
---
CODE_OF_CONDUCT.md | 78 +++++++++++++++++++++++++++++++++++++++-------
1 file changed, 66 insertions(+), 12 deletions(-)
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 65c05c574..c06638aef 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,22 +1,76 @@
-# Contributor Code of Conduct
+# Contributor Covenant Code of Conduct
-As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
+## Our Pledge
-We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to make participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
-* Publishing other's private information, such as physical or electronic addresses, without explicit permission
-* Other unethical or unprofessional conduct.
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies within all project spaces, and it also applies when
+an individual is representing the project or its community in public spaces.
+Examples of representing a project or community include using an official
+project e-mail address, posting via an official social media account, or acting
+as an appointed representative at an online or offline event. Representation of
+a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team. All complaints will be reviewed and
+investigated and will result in a response that is deemed necessary and appropriate
+to the circumstances. The project team is obligated to maintain confidentiality with
+regard to the reporter of an incident. Further details of specific enforcement
+policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
+## Attribution
-This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
+[homepage]: https://www.contributor-covenant.org
-This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
\ No newline at end of file
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
From 6e6298255bc738ae6ab21c19eb390f4845f6358a Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Wed, 16 Oct 2019 00:25:39 +0900
Subject: [PATCH 058/231] Add homepage to package.json (#1282)
This PR adds "homepage": "https://documentation.js.org" to package.json
REF: https://docs.npmjs.com/files/package.json#homepage
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 6c8a0493f..605005233 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"description": "a documentation generator",
"version": "12.1.2",
"author": "Tom MacWright",
+ "homepage": "https://documentation.js.org",
"bin": {
"documentation": "./bin/documentation.js"
},
From 344e8045ff87ed36199ee122de1725f219c245a4 Mon Sep 17 00:00:00 2001
From: Guillaume Grossetie
Date: Mon, 4 Nov 2019 17:51:28 +0100
Subject: [PATCH 059/231] fix: upgrade git-url-parse to fix a parsing issue
(#1296)
---
package.json | 2 +-
yarn.lock | 40 +++++++++++++++++++++++++++++-----------
2 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/package.json b/package.json
index 605005233..e406273de 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
"diff": "^4.0.1",
"doctrine-temporary-fork": "2.1.0",
"get-port": "^4.0.0",
- "git-url-parse": "^10.0.1",
+ "git-url-parse": "^11.1.2",
"github-slugger": "1.2.0",
"glob": "^7.1.2",
"globals-docs": "^2.4.0",
diff --git a/yarn.lock b/yarn.lock
index 02e1f4a60..c68bbdad1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2733,18 +2733,20 @@ git-semver-tags@^1.3.0, git-semver-tags@^1.3.6:
meow "^4.0.0"
semver "^5.5.0"
-git-up@^2.0.0:
- version "2.0.10"
- resolved "https://registry.yarnpkg.com/git-up/-/git-up-2.0.10.tgz#20fe6bafbef4384cae253dc4f463c49a0c3bd2ec"
+git-up@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0"
+ integrity sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw==
dependencies:
is-ssh "^1.3.0"
- parse-url "^1.3.0"
+ parse-url "^5.0.0"
-git-url-parse@^10.0.1:
- version "10.0.1"
- resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-10.0.1.tgz#75f153b24ac7297447fc583cf9fac23a5ae687c1"
+git-url-parse@^11.1.2:
+ version "11.1.2"
+ resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.2.tgz#aff1a897c36cc93699270587bea3dbcbbb95de67"
+ integrity sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ==
dependencies:
- git-up "^2.0.0"
+ git-up "^4.0.0"
gitconfiglocal@^1.0.0:
version "1.0.0"
@@ -4599,6 +4601,11 @@ normalize-path@^2.0.1, normalize-path@^2.1.1:
dependencies:
remove-trailing-separator "^1.0.1"
+normalize-url@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
+ integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
+
now-and-later@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee"
@@ -4894,11 +4901,22 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
-parse-url@^1.3.0:
- version "1.3.11"
- resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-1.3.11.tgz#57c15428ab8a892b1f43869645c711d0e144b554"
+parse-path@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff"
+ integrity sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA==
+ dependencies:
+ is-ssh "^1.3.0"
+ protocols "^1.4.0"
+
+parse-url@^5.0.0:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.1.tgz#99c4084fc11be14141efa41b3d117a96fcb9527f"
+ integrity sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg==
dependencies:
is-ssh "^1.3.0"
+ normalize-url "^3.3.0"
+ parse-path "^4.0.0"
protocols "^1.4.0"
parse5@4.0.0:
From 6b9e5ce2579bc285647a62086447c05588c209b6 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 4 Nov 2019 08:51:52 -0800
Subject: [PATCH 060/231] chore(release): 12.1.3
---
CHANGELOG.md | 10 ++++++++++
package.json | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca2c54669..0ef946bd6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.1.3](https://github.com/documentationjs/documentation/compare/v12.1.2...v12.1.3) (2019-11-04)
+
+
+### Bug Fixes
+
+* upgrade git-url-parse to fix a parsing issue ([#1296](https://github.com/documentationjs/documentation/issues/1296)) ([344e804](https://github.com/documentationjs/documentation/commit/344e804))
+
+
+
## [12.1.2](https://github.com/documentationjs/documentation/compare/v12.1.1...v12.1.2) (2019-09-09)
diff --git a/package.json b/package.json
index e406273de..f06f96aaf 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.1.2",
+ "version": "12.1.3",
"author": "Tom MacWright",
"homepage": "https://documentation.js.org",
"bin": {
From 6cdd5cc44526d2d57673daa3815737aa157d8724 Mon Sep 17 00:00:00 2001
From: Andrey Sitnik
Date: Thu, 14 Nov 2019 18:29:57 -0800
Subject: [PATCH 061/231] build: Reduce npm package by removing development
files (#1298)
---
.npmignore | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.npmignore b/.npmignore
index 7895e9330..7c3ebf56a 100644
--- a/.npmignore
+++ b/.npmignore
@@ -7,3 +7,9 @@
circle.yml
coverage
__tests__
+.circleci
+.github
+.prettierignore
+.prettierrc
+CODE_OF_CONDUCT.md
+ISSUE_TEMPLATE.md
From e0eefde467bc13d45b2a7295d5d69cfbf3d7780e Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Thu, 14 Nov 2019 18:31:36 -0800
Subject: [PATCH 062/231] chore(release): 12.1.4
---
CHANGELOG.md | 5 +++++
package.json | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ef946bd6..256abd76c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [12.1.4](https://github.com/documentationjs/documentation/compare/v12.1.3...v12.1.4) (2019-11-15)
+
+
+
## [12.1.3](https://github.com/documentationjs/documentation/compare/v12.1.2...v12.1.3) (2019-11-04)
diff --git a/package.json b/package.json
index f06f96aaf..4cb47e5a4 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "documentation",
"description": "a documentation generator",
- "version": "12.1.3",
+ "version": "12.1.4",
"author": "Tom MacWright",
"homepage": "https://documentation.js.org",
"bin": {
From d0f7eeb783d87794dea0636040afffee7082f9a5 Mon Sep 17 00:00:00 2001
From: Zearin
Date: Sun, 9 Feb 2020 14:15:00 -0500
Subject: [PATCH 063/231] docs: Minor tweaks to formatting and phrasing.
(#1303)
---
docs/GETTING_STARTED.md | 44 ++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md
index d6841c109..3394b3988 100644
--- a/docs/GETTING_STARTED.md
+++ b/docs/GETTING_STARTED.md
@@ -7,7 +7,7 @@ in the JSDoc format.
**But don't worry! Even though it's embedded in your code, JSDoc is not code. It's a simple and standard
syntax for writing documentation. You don't need to be a developer to use it.**
-Before you continue, make sure `documentation` is on your system (do `npm install -g documentation`, if not installed).
+Before you continue, make sure `documentation` is on your system. (If it's not installed, run `npm install -g documentation`.)
Now, let's dive in.
@@ -31,7 +31,7 @@ function addOne(input) {
The comment before the `addOne` function is a JSDoc comment. Note that it
begins with `/**` instead of `/*`. JSDoc requires this.
-If you were to write a comment like
+If you were to write a comment like this:
```js
// --- INVALID - this is ignored by JSDOC ---
@@ -40,7 +40,7 @@ If you were to write a comment like
// @returns {number} that number, plus one.
```
-the comment would be ignored by `documentation` because it uses `//` syntax instead of `/**`.
+...the comment would be ignored by `documentation`, because it uses `//` syntax instead of `/**`.
It's not valid JSDoc syntax.
Let's break down the earlier JSDoc example:
@@ -64,8 +64,7 @@ On the second line:
* `{number}` is **a type**. It says that the input to this function is
a JavaScript "number". It could also say `{string}`,
`{Object}`, `{Date}`, or any other JavaScript built-in type. And if you
- defined a custom class, like `FooClass`, you can use it as a type too by
- saying `{FooClass}`.
+ defined a custom class, like `FooClass`, you can use it as a type, too! Just say `{FooClass}`.
* `input` is the name of the input variable. It matches what the code
says right below it (`function addOne(input)`).
* `any number` is the description of the input.
@@ -82,7 +81,7 @@ This is the syntax that describes an optional parameter:
* @param {number} [input=5] any number
```
-If an input is omitted, the default value of 5 will be passed to the function.
+If an input is omitted, the default value of `5` will be passed to the function.
## What `documentation` does, so you don't have to
@@ -90,14 +89,14 @@ If an input is omitted, the default value of 5 will be passed to the function.
you want to read the code for yourself, here's a summary of its magic:
**Inference**: JSDoc lets you specify absolutely everything about your code:
-use @name to say what something is called, @kind for whether it's a function
-or a class, @param for its parameters, and so on. But writing all of that
+use `@name` to say what something is called, `@kind` for whether it's a function
+or a class, `@param` for its parameters, and so on. But writing all of that
explicitly is tedious, so where it can, `documentation` automatically
-populates @name, @kind, and @memberof tags based on its reading of the
+populates `@name`, `@kind`, and `@memberof` tags based on its reading of the
code.
**Normalization**: JSDoc has multiple words for the same thing: you can
-say @augments or @extends and they'll do the same thing.
+say `@augments` or `@extends` and they'll do the same thing.
## Development Process
@@ -108,17 +107,18 @@ automated style check.
## The Tags
-[usejsdoc.com](http://usejsdoc.org/index.html) covers all available tags in the
-JSDoc syntax, and is a great reference. The most commonly used tags
-are:
-
-* @param - input given to a function as an argument
-* @returns - output value of a function
-* @name - explicitly set the documented name of a function, class, or variable
-* @private - you can use @private to document
- code and not have it included in the generated documentation,
- maybe it's not part of the public API. There's also @public and @protected
-* @example - you can use the @example tag to add inline code examples with your
+[**`usejsdoc.com`**](http://usejsdoc.org) covers all available tags in the
+JSDoc syntax, and is a great reference.
+
+The most commonly used tags are:
+
+* `@param` - input given to a function as an argument
+* `@returns` - output value of a function
+* `@name` - explicitly set the documented name of a function, class, or variable
+* `@private` - you can use `@private` to document
+ code and not have it included in the generated documentation;
+ maybe it's not part of the public API. There's also `@public` and `@protected`
+* `@example` - you can use the `@example` tag to add inline code examples with your
documentation
If your text editor does not highlight JSDoc tags,
@@ -126,7 +126,7 @@ try [using a plugin for JSDoc](https://github.com/documentationjs/documentation/
## Flow type annotations
-Alternatively, [Flow](https://flow.org/) type annotations allows for a more compact syntax:
+Alternatively, [Flow](https://flow.org) type annotations allows for a more compact syntax:
```js
/**
From 36da108c2f3b14a966b04754b3a53a3069f80bcc Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Tue, 17 Mar 2020 12:59:05 +0900
Subject: [PATCH 064/231] HTTPS link to daringfireball.net/projects/markdown/
(#1297)
---
docs/NODE_API.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/NODE_API.md b/docs/NODE_API.md
index a366b2497..9cc0659f3 100644
--- a/docs/NODE_API.md
+++ b/docs/NODE_API.md
@@ -228,4 +228,4 @@ Returns **[Promise][21]<[string][18]>**
[22]: https://developer.mozilla.org/docs/Web/API/Comment/Comment
-[23]: http://daringfireball.net/projects/markdown/
+[23]: https://daringfireball.net/projects/markdown/
From 7b82bcded98df43e07f8a3086244e33cc860f585 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Tue, 17 Mar 2020 12:59:17 +0900
Subject: [PATCH 065/231] update jsdoc.app URL in GETTING_STARTED.md (#1304)
---
docs/GETTING_STARTED.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md
index 3394b3988..c8e320785 100644
--- a/docs/GETTING_STARTED.md
+++ b/docs/GETTING_STARTED.md
@@ -107,7 +107,7 @@ automated style check.
## The Tags
-[**`usejsdoc.com`**](http://usejsdoc.org) covers all available tags in the
+[**`jsdoc.app`**](https://jsdoc.app/) covers all available tags in the
JSDoc syntax, and is a great reference.
The most commonly used tags are:
From 761aaee419e0960e3963a76217cc5bba392e6ac6 Mon Sep 17 00:00:00 2001
From: Nilesh Arnaiya <10388565+NileshArnaiya@users.noreply.github.com>
Date: Tue, 17 Mar 2020 09:46:56 +0530
Subject: [PATCH 066/231] Update GETTING_STARTED.md (#1294)
* Update GETTING_STARTED.md
* Update GETTING_STARTED.md
* Update GETTING_STARTED.md
Co-authored-by: Tom MacWright
---
docs/GETTING_STARTED.md | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md
index c8e320785..1fc98ffe8 100644
--- a/docs/GETTING_STARTED.md
+++ b/docs/GETTING_STARTED.md
@@ -62,7 +62,7 @@ On the second line:
* `@param` is **a tag**: This tag indicates that we'll be documenting a function's parameter.
* `{number}` is **a type**. It says that the input to this function is
- a JavaScript "number". It could also say `{string}`,
+ a JavaScript "number." It could also say `{string}`,
`{Object}`, `{Date}`, or any other JavaScript built-in type. And if you
defined a custom class, like `FooClass`, you can use it as a type, too! Just say `{FooClass}`.
* `input` is the name of the input variable. It matches what the code
@@ -96,7 +96,7 @@ populates `@name`, `@kind`, and `@memberof` tags based on its reading of the
code.
**Normalization**: JSDoc has multiple words for the same thing: you can
-say `@augments` or `@extends` and they'll do the same thing.
+say `@augments` or `@extends`, and they'll do the same thing.
## Development Process
@@ -108,17 +108,16 @@ automated style check.
## The Tags
[**`jsdoc.app`**](https://jsdoc.app/) covers all available tags in the
-JSDoc syntax, and is a great reference.
-
-The most commonly used tags are:
-
-* `@param` - input given to a function as an argument
-* `@returns` - output value of a function
-* `@name` - explicitly set the documented name of a function, class, or variable
-* `@private` - you can use `@private` to document
- code and not have it included in the generated documentation;
- maybe it's not part of the public API. There's also `@public` and `@protected`
-* `@example` - you can use the `@example` tag to add inline code examples with your
+JSDoc syntax, and is a great reference. The most commonly used tags
+are:
+
+* @param - input is given to a function as an argument
+* @returns - output value of a function
+* @name - explicitly set the documented name of a function, class, or variable
+* @private - you can use @private to document
+ code and not have it included in the generated documentation,
+ maybe it's not part of the public API. There's also @public and @protected
+* @example - you can use the @example tag to add inline code examples with your
documentation
If your text editor does not highlight JSDoc tags,
From efc421655b3b2dc6ee62c1cab036ba5e7f941132 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 16 Mar 2020 21:23:53 -0700
Subject: [PATCH 067/231] Patch 5 (#1311)
* disable spellcheck, autocorrect and autocapitalize on the filter input
the text entered here are likely to be functions and technical terms and as such spellcheck, autocapitalize and autocorrect would better be disabled.
* Update test snapshot
Co-authored-by: Christian Oliff
---
__tests__/__snapshots__/test.js.snap | 3 +++
src/default_theme/index._ | 3 +++
2 files changed, 6 insertions(+)
diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap
index 620e7a0d8..249da3923 100644
--- a/__tests__/__snapshots__/test.js.snap
+++ b/__tests__/__snapshots__/test.js.snap
@@ -1549,6 +1549,9 @@ exports[`html nested.input.js 1`] = `
placeholder='Filter'
id='filter-input'
class='col12 block input'
+ spellcheck='false'
+ autocapitalize='off'
+ autocorrect='off'
type='text' />
diff --git a/src/default_theme/index._ b/src/default_theme/index._
index caefed9a3..ead8c2dfc 100644
--- a/src/default_theme/index._
+++ b/src/default_theme/index._
@@ -21,6 +21,9 @@
placeholder='Filter'
id='filter-input'
class='col12 block input'
+ spellcheck='false'
+ autocapitalize='off'
+ autocorrect='off'
type='text' />
From 48bb7a283e782b2398e7b4061b5edbcf3367bb87 Mon Sep 17 00:00:00 2001
From: Tom MacWright
Date: Mon, 30 Mar 2020 23:34:33 -0700
Subject: [PATCH 068/231] feat: support for the @see tag in Markdown & HTML
* add @see ref support for parsing to html
* edit tests
* fix markdown issue with @see ref
* edit related title so it would not generate with see ref every time
* edit tests
* Fix tests
Co-authored-by: Vladimir Berezovsky
---
__tests__/__snapshots__/test.js.snap | 453 +++++++++------------------
__tests__/fixture/meta.input.js | 2 -
__tests__/lib/parse.js | 24 +-
src/default_theme/section._ | 9 +
src/output/markdown_ast.js | 2 +-
src/parse.js | 11 +-
6 files changed, 182 insertions(+), 319 deletions(-)
diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap
index 249da3923..5e3e5ff02 100644
--- a/__tests__/__snapshots__/test.js.snap
+++ b/__tests__/__snapshots__/test.js.snap
@@ -1805,6 +1805,8 @@ exports[`html nested.input.js 1`] = `
+
+
Static Members
@@ -1881,6 +1883,8 @@ This is a [link to something that does not exist]
DoesNot
+
+
@@ -1950,6 +1954,8 @@ the referenced class type
+
+
@@ -2028,6 +2034,8 @@ the referenced class type
+
+
@@ -2089,6 +2097,8 @@ the referenced class type
+
+
Example
@@ -2148,6 +2158,8 @@ k.isArrayOfBuffers();
+
+
@@ -2206,6 +2218,8 @@ k.isArrayOfBuffers();
+
+
Example
this shows you how to getFoo
@@ -2321,6 +2335,8 @@ k.isArrayOfBuffers();
+
+
@@ -2423,6 +2439,8 @@ k.isArrayOfBuffers();
+
+