diff --git a/.changeset/cool-spiders-try.md b/.changeset/cool-spiders-try.md new file mode 100644 index 0000000..68e587e --- /dev/null +++ b/.changeset/cool-spiders-try.md @@ -0,0 +1,5 @@ +--- +"@effect/docgen": patch +--- + +patch markdown-toc to prevent duplicate links diff --git a/package.json b/package.json index bbf3929..63fe078 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "effect": "2.0.0-next.24", "fs-extra": "^11.1.1", "glob": "^10.3.3", - "markdown-toc": "^1.2.0", + "markdown-toc": "github:effect-ts/markdown-toc", "prettier": "^2.8.8", "rimraf": "^5.0.1", "ts-morph": "^19.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0551d5..8ee2f3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ dependencies: specifier: ^10.3.3 version: 10.3.3 markdown-toc: - specifier: ^1.2.0 - version: 1.2.0 + specifier: github:effect-ts/markdown-toc + version: github.com/effect-ts/markdown-toc/4bfeb0f140105440ea0d12df2fa23199cc3ec1d5 prettier: specifier: ^2.8.8 version: 2.8.8 @@ -1427,13 +1427,6 @@ packages: engines: {node: '>=6'} dev: true - /ansi-red@0.1.1: - resolution: {integrity: sha512-ewaIr5y+9CUTGFwZfpECUbFlGcC0GCw1oqR9RI6h1gQCd9Aj2GxSckCnPsVJnmfMZbwFYE+leZGASgkWl06Jow==} - engines: {node: '>=0.10.0'} - dependencies: - ansi-wrap: 0.1.0 - dev: false - /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1464,11 +1457,6 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - /ansi-wrap@0.1.0: - resolution: {integrity: sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==} - engines: {node: '>=0.10.0'} - dev: false - /any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} dev: true @@ -1786,13 +1774,6 @@ packages: resolution: {integrity: sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==} dev: false - /coffee-script@1.12.7: - resolution: {integrity: sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==} - engines: {node: '>=0.8.0'} - deprecated: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) - hasBin: true - dev: false - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2908,15 +2889,14 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /gray-matter@2.1.1: - resolution: {integrity: sha512-vbmvP1Fe/fxuT2QuLVcqb2BfK7upGhhbLIt9/owWEvPYrZZEkelLcq2HqzxosV+PQ67dUFLaAeNpH7C4hhICAA==} + /gray-matter@3.1.1: + resolution: {integrity: sha512-nZ1qjLmayEv0/wt3sHig7I0s3/sJO0dkAaKYQ5YAOApUtYEOonXSFdWvL1khvnZMTvov4UufkqlFsilPnejEXA==} engines: {node: '>=0.10.0'} dependencies: - ansi-red: 0.1.1 - coffee-script: 1.12.7 extend-shallow: 2.0.1 js-yaml: 3.14.1 - toml: 2.3.6 + kind-of: 5.1.0 + strip-bom-string: 1.0.0 dev: false /gulp-header@1.8.12: @@ -3491,6 +3471,11 @@ packages: is-buffer: 1.1.6 dev: false + /kind-of@5.1.0: + resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} + engines: {node: '>=0.10.0'} + dev: false + /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -3663,25 +3648,6 @@ packages: engines: {node: '>=0.10.0'} dev: false - /markdown-toc@1.2.0: - resolution: {integrity: sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg==} - engines: {node: '>=0.10.0'} - hasBin: true - dependencies: - concat-stream: 1.6.2 - diacritics-map: 0.1.0 - gray-matter: 2.1.1 - lazy-cache: 2.0.2 - list-item: 1.1.1 - markdown-link: 0.1.1 - minimist: 1.2.8 - mixin-deep: 1.3.2 - object.pick: 1.3.0 - remarkable: 1.7.4 - repeat-string: 1.6.1 - strip-color: 0.1.0 - dev: false - /math-random@1.0.4: resolution: {integrity: sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==} dev: false @@ -4663,6 +4629,11 @@ packages: dependencies: ansi-regex: 6.0.1 + /strip-bom-string@1.0.0: + resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} + engines: {node: '>=0.10.0'} + dev: false + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -4829,10 +4800,6 @@ packages: dependencies: is-number: 7.0.0 - /toml@2.3.6: - resolution: {integrity: sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==} - dev: false - /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true @@ -5468,4 +5435,25 @@ packages: engines: {node: '>=12.20'} dev: true + github.com/effect-ts/markdown-toc/4bfeb0f140105440ea0d12df2fa23199cc3ec1d5: + resolution: {tarball: https://codeload.github.com/effect-ts/markdown-toc/tar.gz/4bfeb0f140105440ea0d12df2fa23199cc3ec1d5} + name: markdown-toc + version: 1.2.0 + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + concat-stream: 1.6.2 + diacritics-map: 0.1.0 + gray-matter: 3.1.1 + lazy-cache: 2.0.2 + list-item: 1.1.1 + markdown-link: 0.1.1 + minimist: 1.2.8 + mixin-deep: 1.3.2 + object.pick: 1.3.0 + remarkable: 1.7.4 + repeat-string: 1.6.1 + strip-color: 0.1.0 + dev: false + publishDirectory: dist diff --git a/scripts/copy-package-json.ts b/scripts/copy-package-json.ts index e326067..e8106a3 100644 --- a/scripts/copy-package-json.ts +++ b/scripts/copy-package-json.ts @@ -4,8 +4,13 @@ import * as FileSystem from "../src/FileSystem" const excludedPrefixes = ["@effect", "effect", "chalk"] -const excludeEffectPackages = (deps: Record): Record => { - return ReadonlyRecord.filter(deps, (_, k) => !excludedPrefixes.some((_) => k.startsWith(_))) +const excludeEffectPackages = ( + deps: Record +): Record => { + return ReadonlyRecord.filter( + deps, + (_, k) => !excludedPrefixes.some((_) => k.startsWith(_)) + ) } const read = FileSystem.FileSystem.pipe(