From cb7161bb3151ef0dad85b8c11ee7330c060817f2 Mon Sep 17 00:00:00 2001 From: Alexandre Germain Date: Wed, 5 Apr 2023 19:49:25 +0200 Subject: [PATCH] chore(plugin-monorepo-readmes): remove plugin Deprecated since typedoc@>=0.23.16, see TypeStrong/typedoc#2065 --- .github/ISSUE_TEMPLATE/bug-report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature-request.yaml | 2 +- README.md | 2 - package-lock.json | 11 +- package.json | 1 - packages/plugin-monorepo-readmes/.eslintrc.js | 8 -- packages/plugin-monorepo-readmes/.gitignore | 1 - packages/plugin-monorepo-readmes/CHANGELOG.md | 96 -------------- packages/plugin-monorepo-readmes/README.md | 51 ------- .../__tests__/integration/.keep | 0 .../__snapshots__/simple.spec.ts.snap | 125 ------------------ .../__tests__/integration/simple.spec.ts | 31 ----- .../__tests__/mock-fs/simple/README.md | 1 - .../__tests__/mock-fs/simple/package.json | 4 - .../mock-fs/simple/packages/a/README.md | 1 - .../mock-fs/simple/packages/a/index.ts | 1 - .../mock-fs/simple/packages/a/package.json | 4 - .../mock-fs/simple/packages/b/README.md | 1 - .../mock-fs/simple/packages/b/index.ts | 1 - .../mock-fs/simple/packages/b/package.json | 4 - .../__tests__/mock-fs/simple/tsconfig.json | 7 - .../__tests__/mock-fs/simple/typedoc.js | 6 - .../plugin-monorepo-readmes/jest.config.js | 12 -- packages/plugin-monorepo-readmes/package.json | 70 ---------- .../plugin-monorepo-readmes/pages/options.md | 25 ---- .../src/find-readme-file.spec.ts | 82 ------------ .../src/find-readme-file.ts | 49 ------- packages/plugin-monorepo-readmes/src/index.ts | 3 - packages/plugin-monorepo-readmes/src/load.ts | 5 - .../src/options/build.ts | 25 ---- .../src/options/index.ts | 2 - .../src/options/types.ts | 28 ---- .../src/output/theme.ts | 7 - .../plugin-monorepo-readmes/src/plugin.ts | 86 ------------ .../tsconfig.build.json | 79 ----------- .../tsconfig.spec.json | 18 --- tools/sync-proto-modules/changelog.js | 3 + typedoc.js | 7 - 38 files changed, 15 insertions(+), 846 deletions(-) delete mode 100644 packages/plugin-monorepo-readmes/.eslintrc.js delete mode 100644 packages/plugin-monorepo-readmes/.gitignore delete mode 100644 packages/plugin-monorepo-readmes/CHANGELOG.md delete mode 100644 packages/plugin-monorepo-readmes/README.md delete mode 100644 packages/plugin-monorepo-readmes/__tests__/integration/.keep delete mode 100644 packages/plugin-monorepo-readmes/__tests__/integration/__snapshots__/simple.spec.ts.snap delete mode 100644 packages/plugin-monorepo-readmes/__tests__/integration/simple.spec.ts delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/README.md delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/package.json delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/README.md delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/index.ts delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/package.json delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/README.md delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/index.ts delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/package.json delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/tsconfig.json delete mode 100644 packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/typedoc.js delete mode 100644 packages/plugin-monorepo-readmes/jest.config.js delete mode 100644 packages/plugin-monorepo-readmes/package.json delete mode 100644 packages/plugin-monorepo-readmes/pages/options.md delete mode 100644 packages/plugin-monorepo-readmes/src/find-readme-file.spec.ts delete mode 100644 packages/plugin-monorepo-readmes/src/find-readme-file.ts delete mode 100644 packages/plugin-monorepo-readmes/src/index.ts delete mode 100644 packages/plugin-monorepo-readmes/src/load.ts delete mode 100644 packages/plugin-monorepo-readmes/src/options/build.ts delete mode 100644 packages/plugin-monorepo-readmes/src/options/index.ts delete mode 100644 packages/plugin-monorepo-readmes/src/options/types.ts delete mode 100644 packages/plugin-monorepo-readmes/src/output/theme.ts delete mode 100644 packages/plugin-monorepo-readmes/src/plugin.ts delete mode 100644 packages/plugin-monorepo-readmes/tsconfig.build.json delete mode 100644 packages/plugin-monorepo-readmes/tsconfig.spec.json diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index db6d3dd0..ab497fb1 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -8,7 +8,7 @@ body: attributes: label: Plugin description: What plugin are you encountering a problem with ? - options: ["@knodes/typedoc-plugin-code-blocks", "@knodes/typedoc-plugin-monorepo-readmes", "@knodes/typedoc-plugin-pages", "@knodes/typedoc-pluginutils", Unspecified] # !FORMAT options: [${...plugins}, Unspecified] + options: ["@knodes/typedoc-plugin-code-blocks", "@knodes/typedoc-plugin-pages", "@knodes/typedoc-pluginutils", Unspecified] # !FORMAT options: [${...plugins}, Unspecified] validations: required: true - type: input diff --git a/.github/ISSUE_TEMPLATE/feature-request.yaml b/.github/ISSUE_TEMPLATE/feature-request.yaml index 3c644f6d..5900c62d 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yaml +++ b/.github/ISSUE_TEMPLATE/feature-request.yaml @@ -8,7 +8,7 @@ body: attributes: label: Plugin description: What plugin is concerned ? - options: ["@knodes/typedoc-plugin-code-blocks", "@knodes/typedoc-plugin-monorepo-readmes", "@knodes/typedoc-plugin-pages", "@knodes/typedoc-pluginutils", Unspecified] # !FORMAT options: [${...plugins}, Unspecified] + options: ["@knodes/typedoc-plugin-code-blocks", "@knodes/typedoc-plugin-pages", "@knodes/typedoc-pluginutils", Unspecified] # !FORMAT options: [${...plugins}, Unspecified] validations: required: true - type: textarea diff --git a/README.md b/README.md index 431a8cb8..4dd91ac0 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ Plugins versions should match TypeDoc `major.minor.x` for compatibility. A TypeDoc plugin to embed source code into your output documentation * [@knodes/typedoc-plugin-pages](./packages/plugin-pages/) A TypeDoc plugin that lets you integrate your own pages into the documentation output -* [@knodes/typedoc-plugin-monorepo-readmes](./packages/plugin-monorepo-readmes/) - A TypeDoc plugin to prepend modules indexes with readmes ### Utilities diff --git a/package-lock.json b/package-lock.json index ad946482..41fac5ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4705,6 +4705,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -7084,6 +7085,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -7965,6 +7967,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -8053,6 +8056,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -10150,6 +10154,7 @@ "packages/plugin-monorepo-readmes": { "name": "@knodes/typedoc-plugin-monorepo-readmes", "version": "0.23.1", + "dev": true, "license": "MIT", "dependencies": { "@knodes/typedoc-pluginutils": "~0.23.1", @@ -14052,6 +14057,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -15814,6 +15820,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -16514,6 +16521,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -16577,7 +16585,8 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "path-is-absolute": { "version": "1.0.1", diff --git a/package.json b/package.json index a97f1840..4d3f200d 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "@commitlint/config-conventional": "^17.0.2", "@knodes/eslint-config": "^1.6.5", "@knodes/typedoc-plugin-code-blocks": "file:./packages/plugin-code-blocks", - "@knodes/typedoc-plugin-monorepo-readmes": "file:./packages/plugin-monorepo-readmes", "@knodes/typedoc-plugin-pages": "file:./packages/plugin-pages", "@knodes/typedoc-plugintestbed": "file:./packages/plugintestbed", "@knodes/typedoc-pluginutils": "file:./packages/pluginutils", diff --git a/packages/plugin-monorepo-readmes/.eslintrc.js b/packages/plugin-monorepo-readmes/.eslintrc.js deleted file mode 100644 index 47b1fe78..00000000 --- a/packages/plugin-monorepo-readmes/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: [ require( 'path' ).resolve( __dirname, '../../packages/pluginutils/.eslintrc.js' ) ], - env: { node: true }, - parserOptions: { - project: [ `${__dirname}/tsconfig.build.json`, `${__dirname}/tsconfig.spec.json` ], - }, -}; diff --git a/packages/plugin-monorepo-readmes/.gitignore b/packages/plugin-monorepo-readmes/.gitignore deleted file mode 100644 index 5dae4607..00000000 --- a/packages/plugin-monorepo-readmes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__tests__/mock-fs/**/docs \ No newline at end of file diff --git a/packages/plugin-monorepo-readmes/CHANGELOG.md b/packages/plugin-monorepo-readmes/CHANGELOG.md deleted file mode 100644 index b302838e..00000000 --- a/packages/plugin-monorepo-readmes/CHANGELOG.md +++ /dev/null @@ -1,96 +0,0 @@ -## [0.23.1](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.23.0...v0.23.1) (2022-07-19) - - -No notable changes were done in this version. - - -### Bug Fixes - -* **monorepo**: remove hacky MarkdownToSummary ([2edc787](https://github.com/KnodesCommunity/typedoc-plugins/commit/2edc78721cf5523b9cdd6d5a41290bb51e8dfed1)), closes [#130](https://github.com/KnodesCommunity/typedoc-plugins/issues/130) [TypeStrong/typedoc#2004](https://github.com/TypeStrong/typedoc/issues/2004) -* **monorepo**: windows support ([47bf765](https://github.com/KnodesCommunity/typedoc-plugins/commit/47bf765ad8c892a2bfda00562f800438f4a268ad)) - - -# [0.23.0](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.7...v0.23.0) (2022-07-19) - - -### Bug Fixes - -* **dep: @knodes/typedoc-pluginutils**: use correct Typedoc log methods for colors ([c02d8a](https://github.com/KnodesCommunity/typedoc-plugins/commit/c02d8a0dad05325005257537bdb405a847e875a5)) -* **dep: @knodes/typedoc-pluginutils**: avoid considering '.' files as relative paths ([c02d8a](https://github.com/KnodesCommunity/typedoc-plugins/commit/c02d8a0dad05325005257537bdb405a847e875a5)) - - -### Features - -* implement theme interface properly (still needs demo theme) ([c02d8a](https://github.com/KnodesCommunity/typedoc-plugins/commit/c02d8a0dad05325005257537bdb405a847e875a5)) -* add properly formatted link to README in section of workspaces ([e139146](https://github.com/KnodesCommunity/typedoc-plugins/commit/e139146ba31cfe8b40d924ce605cd9fc09b521f3)) -* **dep: @knodes/typedoc-pluginutils**: add helper to create sources with repo URL ([d069278](https://github.com/KnodesCommunity/typedoc-plugins/commit/d069278d70398244a5bbf434b27b747c40ef5866)) - - -## [0.22.7](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.6...v0.22.7) (2022-06-29) - - -No notable changes were done in this version. - - -### Bug Fixes - -* **deps**: update dependency memfs to v3.4.7 ([f9acee2](https://github.com/KnodesCommunity/typedoc-plugins/commit/f9acee29c68c7525a95f40c0982b7b4981f69ab7)) - - -## [0.22.6](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.5...v0.22.6) (2022-06-27) - - -No notable changes were done in this version. - - -### Bug Fixes - -* **monorepo**: add lodash as a dependency ([6306880](https://github.com/KnodesCommunity/typedoc-plugins/commit/6306880f7c248e2ea1e94adf5bae396702db6661)), closes [#99](https://github.com/KnodesCommunity/typedoc-plugins/issues/99) -* **build**: typedoc patcher truncate file on open ([cdb4fca](https://github.com/KnodesCommunity/typedoc-plugins/commit/cdb4fca980e6ab333498de1cb7c2f5d1880522d5)) -* **monorepo**: continue fixes for Windows scripts ([40f8d1d](https://github.com/KnodesCommunity/typedoc-plugins/commit/40f8d1d63bd54f6d68fb28d6a72f3be238799215)) -* **monorepo**: continue normalize behaviors between windows & non-windows ([c1803ef](https://github.com/KnodesCommunity/typedoc-plugins/commit/c1803ef30033890e5ee8dbb4f94868c15e1e3805)) -* **deps**: update dependency memfs to v3.4.3 ([445a9cc](https://github.com/KnodesCommunity/typedoc-plugins/commit/445a9cc2b588487dc34144130dcc0435e56a37f2)) -* **deps**: update dependency memfs to v3.4.4 ([2d83aa6](https://github.com/KnodesCommunity/typedoc-plugins/commit/2d83aa6758ed3f8cf8d32a0953aee641a3ee46df)) -* **monorepo**: normalize behavior between POSIX & Windows systems ([3ce9434](https://github.com/KnodesCommunity/typedoc-plugins/commit/3ce9434100e9e87d5af8a9dd6536a8ea93e5342c)) - - -## [0.22.5](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.4...v0.22.5) (2022-04-30) - - -No notable changes were done in this version. - - -### Bug Fixes - -* **deps**: update dependency semver to v7.3.7 ([42fbe4a](https://github.com/KnodesCommunity/typedoc-plugins/commit/42fbe4a60fd5e008c4d80bc269a4cc2e060c126a)) - - -### Features - -* add option to pass different targets to find the closest README.md near to them ([2dc6806](https://github.com/KnodesCommunity/typedoc-plugins/commit/2dc6806fffbb1b2bbaae4554fedafdff55ac1203)) - - -## [0.22.4](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.3...v0.22.4) (2022-04-07) - - -No notable changes were done in this version. - - -## [0.22.3](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.2...v0.22.3) (2022-03-21) - - -No notable changes were done in this version. - - -### Bug Fixes - -* properly resolve README.md from module source ([186e361](https://github.com/KnodesCommunity/typedoc-plugins/commit/186e3616f8e42dae7d6c74631daee44e214568cb)), closes [#21](https://github.com/KnodesCommunity/typedoc-plugins/issues/21) - - -## [0.22.2](https://github.com/KnodesCommunity/typedoc-plugins/compare/v0.22.1...v0.22.2) (2022-03-06) - - -**First release** - - -No notable changes were done in this version. diff --git a/packages/plugin-monorepo-readmes/README.md b/packages/plugin-monorepo-readmes/README.md deleted file mode 100644 index bd581ad4..00000000 --- a/packages/plugin-monorepo-readmes/README.md +++ /dev/null @@ -1,51 +0,0 @@ - -# @knodes/typedoc-plugin-monorepo-readmes - -> A TypeDoc plugin to prepend modules indexes with readmes - -[![npm version](https://img.shields.io/npm/v/@knodes/typedoc-plugin-monorepo-readmes?style=for-the-badge)](https://www.npmjs.com/package/@knodes/typedoc-plugin-monorepo-readmes) -[![npm downloads](https://img.shields.io/npm/dm/@knodes/typedoc-plugin-monorepo-readmes?style=for-the-badge)](https://www.npmjs.com/package/@knodes/typedoc-plugin-monorepo-readmes) -[![Compatible with TypeDoc](https://img.shields.io/badge/For%20typedoc-^0.23.0-green?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/typedoc) - ---- - -[![CircleCI](https://img.shields.io/circleci/build/github/KnodesCommunity/typedoc-plugins/main?style=for-the-badge)](https://circleci.com/gh/KnodesCommunity/typedoc-plugins/tree/main) -[![Code Climate coverage](https://img.shields.io/codeclimate/coverage-letter/KnodesCommunity/typedoc-plugins?style=for-the-badge)](https://codeclimate.com/github/KnodesCommunity/typedoc-plugins) -[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/KnodesCommunity/typedoc-plugins?style=for-the-badge)](https://codeclimate.com/github/KnodesCommunity/typedoc-plugins) - -For more infos, please refer to [the documentation](https://knodescommunity.github.io/typedoc-plugins/modules/_knodes_typedoc_plugin_monorepo_readmes.html) - - -## Features - -- 🎨 Compatible with the default theme -- 📁 Built for monorepos -- 🎯 Compatible with [`@knodes/typedoc-plugin-pages` indexes](https://www.npmjs.com/package/@knodes/typedoc-plugin-pages) - -## Usage - -Simply create `README.md` files next to your `package.json` in your monorepo projects/workspaces. - -You can configure file names to search to get the workspace root with the [`pluginMonorepoReadmes:rootFiles` option](https://knodescommunity.github.io/typedoc-plugins/_knodes_typedoc_plugin_monorepo_readmes/pages/options.html). - -> Example: for NX Monorepo, set it to `["project.json", "package.json"]` to correctly match both libraries & root. You could even use `"pluginMonorepoReadmes:rootFiles": ["README.md"]` to match the closest `README.md` file in any parent directory. -> -> Note that `rootFiles` are case-sensitive. - -## Configuration - -For more information on configuration, please refer to [the *options* documentation page](https://knodescommunity.github.io/typedoc-plugins/_knodes_typedoc_plugin_monorepo_readmes/pages/options.html) - - -## Quick start - -```sh -npm install --save-dev @knodes/typedoc-plugin-monorepo-readmes typedoc@^0.23.0 -``` - -## Compatibility - -This plugin version should match TypeDoc `^0.23.0` for compatibility. - -> **Note**: this plugin version was released by testing against `^0.23.28`. - diff --git a/packages/plugin-monorepo-readmes/__tests__/integration/.keep b/packages/plugin-monorepo-readmes/__tests__/integration/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/plugin-monorepo-readmes/__tests__/integration/__snapshots__/simple.spec.ts.snap b/packages/plugin-monorepo-readmes/__tests__/integration/__snapshots__/simple.spec.ts.snap deleted file mode 100644 index b2c58206..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/integration/__snapshots__/simple.spec.ts.snap +++ /dev/null @@ -1,125 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Root \`index.html\` should have correct content 1`] = ` -" - - - - - - @example/my-packages - - - - - - - - - -
-
-
-
-
-
-
-
    -
  • Preparing search index...
  • -
  • The search index is not available
  • -
@example/my-packages -
- -
-
-
-
-
-

@example/my-packages

-
- -
-
-
-
- -

- - Settings

-
-
-
-

Member Visibility

-
-
    -
  • -
  • -
  • -
  • -
-
-
-
-

Theme

-
-
-
-
- -
-
-
-

Generated using TypeDoc

-
-
- - - -" -`; diff --git a/packages/plugin-monorepo-readmes/__tests__/integration/simple.spec.ts b/packages/plugin-monorepo-readmes/__tests__/integration/simple.spec.ts deleted file mode 100644 index 20da0d6f..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/integration/simple.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { resolve } from '@knodes/typedoc-pluginutils/path'; - -import { describeDocsFile, formatHtml, runPluginBeforeAll } from '#plugintestbed'; - -const rootDir = resolve( __dirname, '../mock-fs/simple' ); -process.chdir( rootDir ); -runPluginBeforeAll( rootDir, resolve( __dirname, '../../src/index' ) ); -describe( 'Root `index.html`', describeDocsFile( rootDir, 'index.html', withContent => { - it( 'should have correct content', withContent( ( content, dom ) => { - const heading = dom.window.document.querySelectorAll( '.tsd-panel h1' ); - expect( heading ).toHaveLength( 1 ); - expect( heading[0] ).toHaveTextContent( 'Root readme' ); - expect( formatHtml( content ) ).toMatchSnapshot(); - } ) ); -} ) ); -describe( 'packages/a module`', describeDocsFile( rootDir, 'modules/_example_package_a.html', withContent => { - it.failing( 'should have correct content', withContent( ( content, dom ) => { - const heading = dom.window.document.querySelectorAll( '.tsd-panel h1' ); - expect( heading ).toHaveLength( 1 ); - expect( heading[0] ).toHaveTextContent( 'Readme of A' ); - expect( formatHtml( content ) ).toMatchSnapshot(); - } ) ); -} ) ); -describe( 'packages/b module`', describeDocsFile( rootDir, 'modules/_example_package_b.html', withContent => { - it.failing( 'should have correct content', withContent( ( content, dom ) => { - const heading = dom.window.document.querySelectorAll( '.tsd-panel h1' ); - expect( heading ).toHaveLength( 1 ); - expect( heading[0] ).toHaveTextContent( 'Readme of B' ); - expect( formatHtml( content ) ).toMatchSnapshot(); - } ) ); -} ) ); diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/README.md b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/README.md deleted file mode 100644 index b627745a..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/README.md +++ /dev/null @@ -1 +0,0 @@ -# Root readme diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/package.json b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/package.json deleted file mode 100644 index d4e6d503..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@example/my-packages", - "private": true -} \ No newline at end of file diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/README.md b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/README.md deleted file mode 100644 index 99b46a97..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/README.md +++ /dev/null @@ -1 +0,0 @@ -# Readme of A diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/index.ts b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/index.ts deleted file mode 100644 index 80e9f227..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const A = 'a'; diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/package.json b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/package.json deleted file mode 100644 index c0c64ae6..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/a/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@example/package-a", - "typedoc": {"entryPoint": "./index.ts"} -} \ No newline at end of file diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/README.md b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/README.md deleted file mode 100644 index 65ca4859..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/README.md +++ /dev/null @@ -1 +0,0 @@ -# Readme of B diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/index.ts b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/index.ts deleted file mode 100644 index 28c4501e..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const B = 'b'; diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/package.json b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/package.json deleted file mode 100644 index 950c357d..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/packages/b/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@example/package-b", - "typedoc": {"entryPoint": "./index.ts"} -} \ No newline at end of file diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/tsconfig.json b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/tsconfig.json deleted file mode 100644 index 2436591d..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "module": "CommonJS" - }, - "include": ["**/*.ts"] -} \ No newline at end of file diff --git a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/typedoc.js b/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/typedoc.js deleted file mode 100644 index 130c563d..00000000 --- a/packages/plugin-monorepo-readmes/__tests__/mock-fs/simple/typedoc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - entryPoints: [ - 'packages/*', - ], - entryPointStrategy: 'packages', -}; diff --git a/packages/plugin-monorepo-readmes/jest.config.js b/packages/plugin-monorepo-readmes/jest.config.js deleted file mode 100644 index 941a346c..00000000 --- a/packages/plugin-monorepo-readmes/jest.config.js +++ /dev/null @@ -1,12 +0,0 @@ -const base = require( '../../jest.config.base' )( __dirname ); -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ -module.exports = { - ...base, - projects: [ - base.projects[0], - { - ...base.projects[1], - setupFilesAfterEnv: [ ...base.projects[1].setupFilesAfterEnv, '@testing-library/jest-dom' ], - }, - ], -}; diff --git a/packages/plugin-monorepo-readmes/package.json b/packages/plugin-monorepo-readmes/package.json deleted file mode 100644 index 9287047e..00000000 --- a/packages/plugin-monorepo-readmes/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@knodes/typedoc-plugin-monorepo-readmes", - "version": "0.23.1", - "description": "A TypeDoc plugin to prepend modules indexes with readmes", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/KnodesCommunity/typedoc-plugins.git" - }, - "bugs": { - "url": "https://github.com/KnodesCommunity/typedoc-plugins/issues" - }, - "homepage": "https://knodescommunity.github.io/typedoc-plugins/modules/_knodes_typedoc_plugin_monorepo_readmes.html", - "author": { - "email": "gerkin@knodes.org", - "name": "GerkinDev" - }, - "keywords": [ - "documentation", - "plugin", - "typedoc", - "typedoc-plugin", - "typedocplugin" - ], - "main": "dist/index.js", - "files": [ - "dist", - "src" - ], - "scripts": { - "build": "tsc --project tsconfig.build.json", - "build:clean": "rimraf dist", - "lint": "eslint --ignore-path ../../.eslintignore '**/?(.)*.?([cm])[tj]s?(x)'", - "prepublishOnly": "npm run build:clean && npm run build", - "test": "jest --config jest.config.js" - }, - "dependencies": { - "lodash": "^4.17.21", - "@knodes/typedoc-pluginutils": "~0.23.1", - "find-up": "^4.1.0" - }, - "peerDependencies": { - "typedoc": "^0.23.0" - }, - "devDependencies": { - "@knodes/eslint-config": "^1.6.5", - "@testing-library/jest-dom": "^5.16.4", - "@types/jest": "^28.1.6", - "@types/jsdom": "^20.0.0", - "@types/lodash": "^4.14.182", - "@types/node": "^18.0.0", - "@types/react": "^18.0.14", - "@typescript-eslint/eslint-plugin": "^5.28.0", - "@typescript-eslint/parser": "^5.28.0", - "eslint": "^8.18.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsdoc": "^39.3.3", - "eslint-plugin-prefer-arrow": "^1.2.3", - "eslint-plugin-sort-export-all": "^1.2.2", - "jest": "^28.1.1", - "jest-extended": "^3.0.2", - "jest-junit": "^14.0.0", - "jsdom": "^20.0.0", - "rimraf": "^3.0.2", - "ts-jest": "^28.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.7.4" - } -} diff --git a/packages/plugin-monorepo-readmes/pages/options.md b/packages/plugin-monorepo-readmes/pages/options.md deleted file mode 100644 index 46304720..00000000 --- a/packages/plugin-monorepo-readmes/pages/options.md +++ /dev/null @@ -1,25 +0,0 @@ -## Providing options - -See {@page ~@knodes/typedoc-pluginutils:providing-options.md} to know more about how you can pass options. - -Options are prefixed with `pluginMonorepoReadmes`. - -You can also use the *TypeDoc* CLI to get all available options. - -```sh -typedoc --help -``` - -## Complete list of options - -* `rootFiles`: A list of file names used to infer packages root. This is case sensitive.\ - Type: `string[]`\ - Default: `["package.json"]` -* `logLevel`: The plugin log level.\ - Type: `LogLevel`\ - Default to the application log level. -* `readme`: The name of the readme files. This is case insensitive.\ - Type: `string[]`\ - Default: `['README.md']` - -> See {@link IPluginOptions} diff --git a/packages/plugin-monorepo-readmes/src/find-readme-file.spec.ts b/packages/plugin-monorepo-readmes/src/find-readme-file.spec.ts deleted file mode 100644 index 9f2910ca..00000000 --- a/packages/plugin-monorepo-readmes/src/find-readme-file.spec.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { DeclarationReflection, ProjectReflection, ReflectionKind, SourceReference, UrlMapping } from 'typedoc'; - -import { resolve } from '@knodes/typedoc-pluginutils/path'; - -import { restoreFs, setVirtualFs } from '#plugintestbed'; - -import { findReadmeFile } from './find-readme-file'; - -const rootDir = resolve( __dirname, '..' ); - -beforeEach( () => { - process.chdir( rootDir ); - jest.clearAllMocks(); -} ); -afterEach( restoreFs ); -const buildMapping = ( filename: string ) => { - const reflection = new DeclarationReflection( 'foo', ReflectionKind.Module, new ProjectReflection( 'test' ) ); - reflection.sources = [ - new SourceReference( resolve( rootDir, filename ), 0, 0 ), - ]; - return new UrlMapping( 'foo', reflection, jest.fn() ); -}; -describe( 'Readme file location', () => { - it( 'should capture README file along with a "package.json" file', () => { - setVirtualFs( { - foo: { - 'src': { - 'index.ts': 'export * from "./hello";', - 'hello.ts': 'export const hello = "HELLO"', - }, - 'package.json': '', - 'README.md': 'hello', - 'OTHER.md': 'yellow', - }, - } ); - expect( findReadmeFile( [ 'package.json' ], buildMapping( 'foo/src/index.ts' ), [] ) ).toEqual( { - relative: 'README.md', - absolute: resolve( rootDir, 'foo/README.md' ), - } ); - expect( findReadmeFile( [ 'package.json' ], buildMapping( 'foo/src/index.ts' ), [ 'OTHER.md' ] ) ).toEqual( { - relative: 'OTHER.md', - absolute: resolve( rootDir, 'foo/OTHER.md' ), - } ); - } ); - it( 'should return "undefined" if no readme is found along with the "package.json" file', () => { - setVirtualFs( { - foo: { - 'src': { - 'index.ts': 'export * from "./hello";', - 'hello.ts': 'export const hello = "HELLO"', - }, - 'package.json': '', - }, - } ); - expect( findReadmeFile( [ 'package.json' ], buildMapping( 'foo/src/index.ts' ), [] ) ).toEqual( undefined ); - expect( findReadmeFile( [ 'package.json' ], buildMapping( 'foo/src/index.ts' ), [ 'OTHER.md' ] ) ).toEqual( undefined ); - } ); - it( 'should fallback on each readme targets', () => { - setVirtualFs( { - foo: { - 'bar': { - 'src': { - 'index.ts': 'export * from "./hello";', - 'hello.ts': 'export const hello = "HELLO"', - }, - 'package.json': '', - }, - 'project.json': '', - 'readme.md': '', - 'other.md': '', - }, - } ); - expect( findReadmeFile( [ 'package.json', 'project.json' ], buildMapping( 'foo/bar/src/index.ts' ), [] ) ).toEqual( { - relative: 'readme.md', - absolute: resolve( rootDir, 'foo/readme.md' ), - } ); - expect( findReadmeFile( [ 'package.json', 'project.json' ], buildMapping( 'foo/bar/src/index.ts' ), [ 'other.md' ] ) ).toEqual( { - relative: 'other.md', - absolute: resolve( rootDir, 'foo/other.md' ), - } ); - } ); -} ); diff --git a/packages/plugin-monorepo-readmes/src/find-readme-file.ts b/packages/plugin-monorepo-readmes/src/find-readme-file.ts deleted file mode 100644 index ac9a8bfe..00000000 --- a/packages/plugin-monorepo-readmes/src/find-readme-file.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { readdirSync } from 'fs'; - -import { sync as findUpSync } from 'find-up'; -import { DeclarationReflection, UrlMapping } from 'typedoc'; - -import { dirname, resolve } from '@knodes/typedoc-pluginutils/path'; - -const getModuleReflectionSource = ( reflection: DeclarationReflection ) => reflection.sources?.[0]?.fullFileName; - -const findReadmeInDir = ( dir: string, readmeFile: string[] ) => readdirSync( dir ).find( f => readmeFile.includes( f.toLowerCase() ) ); - -/** - * Try to resoluve the README file in the directory of the module's `package.json`. - * - * @param readmeTargets - A list of file names to look up to locate packages root. - * @param moduleMapping - The module URL mapping. - * @param readmeCandidates - A list of files to use as readme. The first found is used. File names are NOT case sensitive. Example: `["readme-typedoc.md", "readme.md"]`. Defaults to `["readme.md"]`. - * @returns the relative & absolute path of the readme. - */ -export const findReadmeFile = ( readmeTargets: string[], moduleMapping: UrlMapping, readmeCandidates?: string[] ) => { - if( !readmeCandidates ){ - readmeCandidates = []; - } - if( readmeCandidates.length === 0 ) { - readmeCandidates.push( 'readme.md' ); - } - readmeCandidates = readmeCandidates.map( r => r.toLowerCase() ); - const src = getModuleReflectionSource( moduleMapping.model ); - if( !src ){ - return; - } - let targetFile; - for ( const readmeTarget of readmeTargets ) { - targetFile = findUpSync( readmeTarget, { cwd: dirname( src ) } ); - if ( !targetFile ){ - continue; - } - const pkgDir = dirname( targetFile ); - const readmeFile = findReadmeInDir( pkgDir, readmeCandidates ); - - if( readmeFile ){ - const absReadmeFile = resolve( pkgDir, readmeFile ); - return { - relative: readmeFile, - absolute: absReadmeFile, - }; - } - } -}; diff --git a/packages/plugin-monorepo-readmes/src/index.ts b/packages/plugin-monorepo-readmes/src/index.ts deleted file mode 100644 index fe1cea3e..00000000 --- a/packages/plugin-monorepo-readmes/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { load } from './load'; -export { IReadmePluginTheme } from './output/theme'; -export { IPluginOptions } from './options'; diff --git a/packages/plugin-monorepo-readmes/src/load.ts b/packages/plugin-monorepo-readmes/src/load.ts deleted file mode 100644 index cf277d2d..00000000 --- a/packages/plugin-monorepo-readmes/src/load.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { autoload } from '@knodes/typedoc-pluginutils'; - -import { MonorepoReadmePlugin } from './plugin'; - -export const load = autoload( MonorepoReadmePlugin ); diff --git a/packages/plugin-monorepo-readmes/src/options/build.ts b/packages/plugin-monorepo-readmes/src/options/build.ts deleted file mode 100644 index 3586f139..00000000 --- a/packages/plugin-monorepo-readmes/src/options/build.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { LogLevel, ParameterType } from 'typedoc'; - -import { OptionGroup } from '@knodes/typedoc-pluginutils'; - -import type { MonorepoReadmePlugin } from '../plugin'; -import { IPluginOptions } from './types'; - -export const buildOptions = ( plugin: MonorepoReadmePlugin ) => OptionGroup.factory( plugin ) - .add( 'rootFiles', { - help: 'A list of file names used to infer packages root. This is case sensitive.', - type: ParameterType.Array, - defaultValue: [ 'package.json' ], - } ) - .add( 'logLevel', { - help: 'The plugin log level.', - type: ParameterType.Map, - map: LogLevel, - defaultValue: plugin.application.logger.level, - } ) - .add( 'readme', { - help: 'Specify name of readme files. This is case insensitive.', - type: ParameterType.Array, - defaultValue: [ 'README.md' ], - } ) - .build(); diff --git a/packages/plugin-monorepo-readmes/src/options/index.ts b/packages/plugin-monorepo-readmes/src/options/index.ts deleted file mode 100644 index 95d7b308..00000000 --- a/packages/plugin-monorepo-readmes/src/options/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './build'; -export * from './types'; diff --git a/packages/plugin-monorepo-readmes/src/options/types.ts b/packages/plugin-monorepo-readmes/src/options/types.ts deleted file mode 100644 index 7e5a77b3..00000000 --- a/packages/plugin-monorepo-readmes/src/options/types.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { LogLevel } from 'typedoc'; - -/** - * Plugin options - */ -export interface IPluginOptions { - /** - * A list of file names used to infer packages root. - * - * @default `["package.json"]` - */ - rootFiles: string[]; - - /** - * The plugin log level. - * - * @default application.logger.level - */ - logLevel: LogLevel; - - /** - * The name of the readme files - * - * @default `['README.md']` - */ - readme: string[]; -} - diff --git a/packages/plugin-monorepo-readmes/src/output/theme.ts b/packages/plugin-monorepo-readmes/src/output/theme.ts deleted file mode 100644 index ebfdead7..00000000 --- a/packages/plugin-monorepo-readmes/src/output/theme.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Theme } from 'typedoc'; - -export interface IReadmePluginTheme extends Theme { - monorepoReadmesPlugin: true; -} - -export const isMonorepoReadmesPluginTheme = ( theme: Theme ): theme is IReadmePluginTheme => 'monorepoReadmesPlugin' in theme && ( theme as any ).monorepoReadmesPlugin; diff --git a/packages/plugin-monorepo-readmes/src/plugin.ts b/packages/plugin-monorepo-readmes/src/plugin.ts deleted file mode 100644 index 73323313..00000000 --- a/packages/plugin-monorepo-readmes/src/plugin.ts +++ /dev/null @@ -1,86 +0,0 @@ -import assert from 'assert'; -import { readFileSync } from 'fs'; - -import { Application, DeclarationReflection, DefaultTheme, JSX, MinimalSourceFile, PageEvent, ProjectReflection, ReflectionKind, RendererEvent } from 'typedoc'; - -import { ABasePlugin, CurrentPageMemo, EventsExtra, reflectionSourceUtils } from '@knodes/typedoc-pluginutils'; - -import { findReadmeFile } from './find-readme-file'; -import { buildOptions } from './options'; -import { isMonorepoReadmesPluginTheme } from './output/theme'; - -export class MonorepoReadmePlugin extends ABasePlugin { - public readonly pluginOptions = buildOptions( this ); - private readonly _currentPageMemo = CurrentPageMemo.for( this ); - public constructor( application: Application ){ - super( application, __filename ); - } - - /** - * This method is called after the plugin has been instanciated. - * - * @see {@link import('@knodes/typedoc-pluginutils').autoload}. - */ - public initialize(): void { - this.application.renderer.on( RendererEvent.BEGIN, () => { - const { theme } = this.application.renderer; - assert( theme ); - if( theme instanceof DefaultTheme && !isMonorepoReadmesPluginTheme( theme ) ){ - this.application.renderer.on( PageEvent.BEGIN, ( pageEvent: PageEvent ) => { - if( pageEvent.model instanceof DeclarationReflection && pageEvent.model.kindOf( ReflectionKind.Module ) ) { - this._modifyModuleIndexPage( theme, pageEvent as PageEvent ); - } - }, null, -1 ); // priority is set to be ran after @knodes/typedoc-plugin-pages - } else { - this.logger.warn( 'This plugin is loaded, but you are using a theme that explicitly handles readmes by itself. You probably don\'t need this plugin.' ); - } - } ); - EventsExtra.for( this.application ) - .beforeOptionsFreeze( () => { - const strategy = this.application.options.getValue( 'entryPointStrategy' ); - if( strategy !== 'packages' ){ - this.logger.warn( `This plugin is loaded, but the entry point strategy is ${strategy}, not "packages". You probably don't need this plugin.` ); - } - } ); - } - - /** - * Modify the template of the module to prepend the README. - * - * @param theme - The theme used. - * @param pageEvent - The module URL mapping to modify - */ - private _modifyModuleIndexPage( theme: DefaultTheme, pageEvent: PageEvent ){ - const readme = findReadmeFile( this.pluginOptions.getValue().rootFiles, pageEvent, this.pluginOptions.getValue().readme ); - if( !readme ){ - return; - } - const { absolute: absReadme } = readme; - const source = reflectionSourceUtils.createSourceReference( this, absReadme ); - pageEvent.model.sources = [ - source, - ...( pageEvent.model.sources ?? [] ), - ]; - this.logger.verbose( `Setting readme of ${pageEvent.model.name} as ${this.relativeToRoot( absReadme )}` ); - const baseTemplate = pageEvent.template; - pageEvent.template = props => { - const fakeProject = new ProjectReflection( props.name ); - fakeProject.sources = [ - source, - ]; - const fakePageEvent = new PageEvent( props.name ); - fakeProject.readme = this.application.converter.parseRawComment( new MinimalSourceFile( readFileSync( absReadme, 'utf-8' ), absReadme ) ).summary; - fakePageEvent.filename = props.filename; - fakePageEvent.project = props.project; - fakePageEvent.url = props.url; - fakePageEvent.model = fakeProject; - const readmeTpl = this._currentPageMemo.fakeWrapPage( fakePageEvent, () => theme.indexTemplate( fakePageEvent ) ); - const base = baseTemplate( props ); - return JSX.createElement( JSX.Fragment, null, ...[ - readmeTpl, - JSX.createElement( 'hr', null ), - base, - ] ); - }; - } -} diff --git a/packages/plugin-monorepo-readmes/tsconfig.build.json b/packages/plugin-monorepo-readmes/tsconfig.build.json deleted file mode 100644 index d164c8b7..00000000 --- a/packages/plugin-monorepo-readmes/tsconfig.build.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ - // "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - // "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./dist", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - // "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - "paths": { - "#plugintestbed": ["packages/plugintestbed"], - "@knodes/typedoc-*": ["packages/*"], - "@knodes/typedoc-pluginutils/path": ["packages/pluginutils/dist/utils/path"], - }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "forceConsistentCasingInFileNames": true, /* Disaw inconsistently-cased references to the same file. */ - }, - "include": ["src", "types/src.d.ts"], - "exclude": ["**/*.spec.ts"] -} diff --git a/packages/plugin-monorepo-readmes/tsconfig.spec.json b/packages/plugin-monorepo-readmes/tsconfig.spec.json deleted file mode 100644 index 869740ce..00000000 --- a/packages/plugin-monorepo-readmes/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "./tsconfig.build.json", - "compilerOptions": { - "types": [ - "jest", - "jest-extended", - "@testing-library/jest-dom", - "node" - ], - "paths": { - "#plugintestbed": ["packages/plugintestbed/src"], - "@knodes/typedoc-pluginutils/*": ["./packages/pluginutils/src/utils/*"], - "@knodes/typedoc-*": ["packages/*/src"], - } - }, - "include": ["src", "__tests__", "types/test.d.ts"], - "exclude": [] -} diff --git a/tools/sync-proto-modules/changelog.js b/tools/sync-proto-modules/changelog.js index 4c6f82bd..e03845f4 100644 --- a/tools/sync-proto-modules/changelog.js +++ b/tools/sync-proto-modules/changelog.js @@ -25,6 +25,9 @@ const reformatChangelogLines = ( thisProjectId, packagesIds ) => l => { return l; } const [ , scope, right ] = match; + if( scope === 'plugin-monorepo-readmes' ){ + return; + } if( scope === thisProjectId ){ return `* ${right}`; } diff --git a/typedoc.js b/typedoc.js index e35f147c..288cc96b 100644 --- a/typedoc.js +++ b/typedoc.js @@ -35,13 +35,6 @@ module.exports = { { name: 'Configuring eslint', source: 'eslint.md' }, ], }, - { - name: '@knodes/typedoc-plugin-monorepo-readmes', - moduleRoot: true, - children: [ - { name: 'Using options', source: 'options.md' }, - ], - }, { name: '@knodes/typedoc-pluginutils', moduleRoot: true,