From abf25c9b19c4ac28b5ef5b55842fd7dbf58eff38 Mon Sep 17 00:00:00 2001 From: tgreyuk Date: Fri, 20 Jan 2023 22:28:42 +0000 Subject: [PATCH] Added docusuaurs to workspaces --- .changeset/polite-planets-knock.md | 10 ++++++++++ .changeset/twenty-moose-promise.md | 5 +++++ .github/workflows/release.yml | 7 +++++-- package.json | 2 +- .../test/specs/__snapshots__/plugin.spec.ts.snap | 14 -------------- .../test/specs/plugin.spec.ts | 12 ++++-------- scripts/changesets/changelog.js | 9 ++++----- 7 files changed, 29 insertions(+), 30 deletions(-) create mode 100644 .changeset/polite-planets-knock.md create mode 100644 .changeset/twenty-moose-promise.md diff --git a/.changeset/polite-planets-knock.md b/.changeset/polite-planets-knock.md new file mode 100644 index 000000000..9468ffa8a --- /dev/null +++ b/.changeset/polite-planets-knock.md @@ -0,0 +1,10 @@ +--- +'typedoc-plugin-markdown': major +--- + +- Removal of handlebars. +- MDX 2 support as standard. +- Updated directory structure to follow the project module structure. +- Ability to choose which symbols should be rendered to a single doc, with the ability to add all symbols into single doc. +- Ability to choose between list/table styles. +- UI improvements. diff --git a/.changeset/twenty-moose-promise.md b/.changeset/twenty-moose-promise.md new file mode 100644 index 000000000..4404223a3 --- /dev/null +++ b/.changeset/twenty-moose-promise.md @@ -0,0 +1,5 @@ +--- +'docusaurus-plugin-typedoc': minor +--- + +- Compatibility updates for typedoc-plugin-markdown diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09b344111..d73a8f514 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: Release -on: [pull_request] +on: + push: + branches: + - next-release concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: @@ -13,7 +16,7 @@ jobs: with: node-version: 16 - name: Install Dependencies - run: yarn + run: npm install - name: Create Release Pull Request uses: changesets/action@v1 env: diff --git a/package.json b/package.json index 283c88ffe..7568a5a3e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "workspaces": [ "packages/typedoc-plugin-markdown", - "packages/typedoc-plugin-markdown" + "packages/docusaurus-plugin-typedoc" ], "scripts": { "lint": "npm run lint --workspaces", diff --git a/packages/docusaurus-plugin-typedoc/test/specs/__snapshots__/plugin.spec.ts.snap b/packages/docusaurus-plugin-typedoc/test/specs/__snapshots__/plugin.spec.ts.snap index d3b2de2e3..460cc8bf0 100644 --- a/packages/docusaurus-plugin-typedoc/test/specs/__snapshots__/plugin.spec.ts.snap +++ b/packages/docusaurus-plugin-typedoc/test/specs/__snapshots__/plugin.spec.ts.snap @@ -1,19 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Plugin: (docs) should render 1`] = ` -[ - "_category_.yml", - "classes", - "enums", - "functions", - "index.md", - "interfaces", - "Modules.md", - "namespaces", - "variables", -] -`; - exports[`Plugin: (docs) should write category yaml 1`] = ` "label: "Classes" position: 3" diff --git a/packages/docusaurus-plugin-typedoc/test/specs/plugin.spec.ts b/packages/docusaurus-plugin-typedoc/test/specs/plugin.spec.ts index 683976e42..1167e13b2 100644 --- a/packages/docusaurus-plugin-typedoc/test/specs/plugin.spec.ts +++ b/packages/docusaurus-plugin-typedoc/test/specs/plugin.spec.ts @@ -33,21 +33,17 @@ describe(`Plugin:`, () => { tmpobj = tmp.dirSync(); await bootstrap(tmpobj); }); - test(`should render`, () => { - const files = fs.readdirSync(tmpobj.name + '/docs/api'); - expect(files.sort((a, b) => a.localeCompare(b))).toMatchSnapshot(); - }); test(`should write doc`, () => { - const sidebar = fs.readFileSync(tmpobj.name + '/docs/api/index.md'); - expect(sidebar.toString()).toMatchSnapshot(); + const indexDoc = fs.readFileSync(tmpobj.name + '/docs/api/index.md'); + expect(indexDoc.toString()).toMatchSnapshot(); }); test(`should write category yaml`, () => { - const sidebar = fs.readFileSync( + const categoryYaml = fs.readFileSync( tmpobj.name + '/docs/api/classes/_category_.yml', ); - expect(sidebar.toString()).toMatchSnapshot(); + expect(categoryYaml.toString()).toMatchSnapshot(); }); }); }); diff --git a/scripts/changesets/changelog.js b/scripts/changesets/changelog.js index 6f6899e41..b04edcbe6 100644 --- a/scripts/changesets/changelog.js +++ b/scripts/changesets/changelog.js @@ -1,15 +1,14 @@ const getReleaseLine = async (changeset, _type) => { - const [firstLine, ...futureLines] = changeset.summary + /*const [firstLine, ...futureLines] = changeset.summary .split('\n') .map((l) => l.trimRight()); - let returnVal = `- ${firstLine}`; + let returnVal = `- ${firstLine}`; if (futureLines.length > 0) { returnVal += `\n- ${futureLines.map((l) => ` ${l}`).join('\n')}`; - } - - return returnVal; + }*/ + return changeset.summary; }; const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {