From 77cc459acd295e23eaf01bf11743f90dea9fc833 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Oct 2023 06:56:40 +0000 Subject: [PATCH] Publish new versions --- .changeset/commander-eleven.md | 5 -- .changeset/cyan-ways-fry.md | 28 ------- .changeset/eight-coats-tie.md | 6 -- .changeset/fifty-gifts-sort.md | 8 -- .changeset/four-teachers-tan.md | 20 ----- .changeset/lazy-walls-swim.md | 6 -- .changeset/sour-jeans-tell.md | 5 -- packages/react-docgen-cli/CHANGELOG.md | 28 +++++++ packages/react-docgen-cli/package.json | 4 +- packages/react-docgen/CHANGELOG.md | 77 +++++++++++++++++++ packages/react-docgen/package.json | 2 +- packages/website/package.json | 2 +- .../src/pages/docs/release-notes/cli.mdx | 28 +++++++ .../pages/docs/release-notes/react-docgen.mdx | 77 +++++++++++++++++++ pnpm-lock.yaml | 4 +- 15 files changed, 216 insertions(+), 84 deletions(-) delete mode 100644 .changeset/commander-eleven.md delete mode 100644 .changeset/cyan-ways-fry.md delete mode 100644 .changeset/eight-coats-tie.md delete mode 100644 .changeset/fifty-gifts-sort.md delete mode 100644 .changeset/four-teachers-tan.md delete mode 100644 .changeset/lazy-walls-swim.md delete mode 100644 .changeset/sour-jeans-tell.md diff --git a/.changeset/commander-eleven.md b/.changeset/commander-eleven.md deleted file mode 100644 index ddf368d74bb..00000000000 --- a/.changeset/commander-eleven.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@react-docgen/cli': minor ---- - -update dependency commander to v11 diff --git a/.changeset/cyan-ways-fry.md b/.changeset/cyan-ways-fry.md deleted file mode 100644 index 12c196f818c..00000000000 --- a/.changeset/cyan-ways-fry.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'react-docgen': major ---- - -`getTypeFromReactComponent` now returns an array of paths to types instead of -just one. This can appear when multiple type definitions are found for a -component, for example: - -```ts -const Component: React.FC = (props: { some: string }) => {}; -``` - -In this example both the `Props` definition as well as `{ some: string }` are -now found and used. - -Here is a simple diff to illustrate the change when using -`getTypeFromReactComponent`: - -```diff - -const type = getTypeFromReactComponent(path) - --if (type) { -+if (type.length > 0) { - // do smth -} - -``` diff --git a/.changeset/eight-coats-tie.md b/.changeset/eight-coats-tie.md deleted file mode 100644 index 902c2245b07..00000000000 --- a/.changeset/eight-coats-tie.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'react-docgen': patch ---- - -Fix detection of react class components when super class is imported via named -import. diff --git a/.changeset/fifty-gifts-sort.md b/.changeset/fifty-gifts-sort.md deleted file mode 100644 index c8ac62d9a2f..00000000000 --- a/.changeset/fifty-gifts-sort.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@react-docgen/cli': major -'react-docgen': major ---- - -Drop support for Node.js version 14. - -The minimum supported version is now 16.14.0 diff --git a/.changeset/four-teachers-tan.md b/.changeset/four-teachers-tan.md deleted file mode 100644 index a33755e332a..00000000000 --- a/.changeset/four-teachers-tan.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'react-docgen': major ---- - -`resolveToValue` will not resolve to `ImportDeclaration` anymore but instead to -one of the possible specifiers (`ImportSpecifier`, `ImportDefaultSpecifier` or -`ImportNamespaceSpecifier`). This gives better understanding to which specifier -exactly `resolveToValue` did resolve a NodePath to. - -Here is a possible easy fix for this in a code snippet that uses -`resolveToValue` - -```diff -const resolved = resolveToValue(path); - --if (resolved.isImportDeclaration()) { -+if (resolved.parentPath?.isImportDeclaration()) { - // do smth -} -``` diff --git a/.changeset/lazy-walls-swim.md b/.changeset/lazy-walls-swim.md deleted file mode 100644 index caf87ccf69f..00000000000 --- a/.changeset/lazy-walls-swim.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'react-docgen': patch ---- - -Remove unnecessary call to `resolveToValue` when trying to find props type from -react components. diff --git a/.changeset/sour-jeans-tell.md b/.changeset/sour-jeans-tell.md deleted file mode 100644 index 27c67adb2e4..00000000000 --- a/.changeset/sour-jeans-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-docgen': minor ---- - -Add support for React.FC in TypeScript diff --git a/packages/react-docgen-cli/CHANGELOG.md b/packages/react-docgen-cli/CHANGELOG.md index d9ba168e293..eaeaeebb1ca 100644 --- a/packages/react-docgen-cli/CHANGELOG.md +++ b/packages/react-docgen-cli/CHANGELOG.md @@ -1,5 +1,33 @@ # Release Notes +## 2.0.0 + +### Major Changes + +- [#848](https://github.com/reactjs/react-docgen/pull/848) + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8) + Thanks [@danez](https://github.com/danez)! - Drop support for Node.js + version 14. + + The minimum supported version is now 16.14.0 + +### Minor Changes + +- [`b0a46e7`](https://github.com/reactjs/react-docgen/commit/b0a46e7429f2a7449eebeff329753b25ac4226c9) + Thanks [@danez](https://github.com/danez)! - update dependency commander to + v11 + +### Patch Changes + +- Updated dependencies + [[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae), + [`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd), + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8), + [`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b), + [`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b), + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae)]: + - react-docgen@7.0.0 + ## 1.0.4 ### Patch Changes diff --git a/packages/react-docgen-cli/package.json b/packages/react-docgen-cli/package.json index cdc38733a81..e145a55e53e 100644 --- a/packages/react-docgen-cli/package.json +++ b/packages/react-docgen-cli/package.json @@ -1,6 +1,6 @@ { "name": "@react-docgen/cli", - "version": "1.0.4", + "version": "2.0.0", "description": "A CLI to extract information from React components for documentation generation.", "repository": { "type": "git", @@ -35,7 +35,7 @@ "commander": "11.0.0", "debug": "4.3.4", "fast-glob": "3.3.1", - "react-docgen": "workspace:6.0.4", + "react-docgen": "workspace:7.0.0", "slash": "5.1.0" }, "devDependencies": { diff --git a/packages/react-docgen/CHANGELOG.md b/packages/react-docgen/CHANGELOG.md index e9d524fcb16..f3fbc93f86e 100644 --- a/packages/react-docgen/CHANGELOG.md +++ b/packages/react-docgen/CHANGELOG.md @@ -1,5 +1,82 @@ # Release Notes +## 7.0.0 + +### Major Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae) + Thanks [@danez](https://github.com/danez)! - `getTypeFromReactComponent` now + returns an array of paths to types instead of just one. This can appear when + multiple type definitions are found for a component, for example: + + ```ts + const Component: React.FC = (props: { some: string }) => {}; + ``` + + In this example both the `Props` definition as well as `{ some: string }` are + now found and used. + + Here is a simple diff to illustrate the change when using + `getTypeFromReactComponent`: + + ```diff + + const type = getTypeFromReactComponent(path) + + -if (type) { + +if (type.length > 0) { + // do smth + } + + ``` + +- [#848](https://github.com/reactjs/react-docgen/pull/848) + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8) + Thanks [@danez](https://github.com/danez)! - Drop support for Node.js + version 14. + + The minimum supported version is now 16.14.0 + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b) + Thanks [@danez](https://github.com/danez)! - `resolveToValue` will not resolve + to `ImportDeclaration` anymore but instead to one of the possible specifiers + (`ImportSpecifier`, `ImportDefaultSpecifier` or `ImportNamespaceSpecifier`). + This gives better understanding to which specifier exactly `resolveToValue` + did resolve a NodePath to. + + Here is a possible easy fix for this in a code snippet that uses + `resolveToValue` + + ```diff + const resolved = resolveToValue(path); + + -if (resolved.isImportDeclaration()) { + +if (resolved.parentPath?.isImportDeclaration()) { + // do smth + } + ``` + +### Minor Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae) + Thanks [@danez](https://github.com/danez)! - Add support for React.FC in + TypeScript + +### Patch Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd) + Thanks [@danez](https://github.com/danez)! - Fix detection of react class + components when super class is imported via named import. + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b) + Thanks [@danez](https://github.com/danez)! - Remove unnecessary call to + `resolveToValue` when trying to find props type from react components. + ## 6.0.4 ### Patch Changes diff --git a/packages/react-docgen/package.json b/packages/react-docgen/package.json index 8d58451961c..35bff00b958 100644 --- a/packages/react-docgen/package.json +++ b/packages/react-docgen/package.json @@ -1,6 +1,6 @@ { "name": "react-docgen", - "version": "6.0.4", + "version": "7.0.0", "description": "A library to extract information from React components for documentation generation.", "repository": { "type": "git", diff --git a/packages/website/package.json b/packages/website/package.json index 52d1228c65f..60b210cd21f 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -27,7 +27,7 @@ "postcss": "8.4.31", "postcss-lightningcss": "1.0.0", "react": "18.2.0", - "react-docgen": "workspace:6.0.4", + "react-docgen": "workspace:7.0.0", "react-dom": "18.2.0", "tailwindcss": "3.3.3" }, diff --git a/packages/website/src/pages/docs/release-notes/cli.mdx b/packages/website/src/pages/docs/release-notes/cli.mdx index d9ba168e293..eaeaeebb1ca 100644 --- a/packages/website/src/pages/docs/release-notes/cli.mdx +++ b/packages/website/src/pages/docs/release-notes/cli.mdx @@ -1,5 +1,33 @@ # Release Notes +## 2.0.0 + +### Major Changes + +- [#848](https://github.com/reactjs/react-docgen/pull/848) + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8) + Thanks [@danez](https://github.com/danez)! - Drop support for Node.js + version 14. + + The minimum supported version is now 16.14.0 + +### Minor Changes + +- [`b0a46e7`](https://github.com/reactjs/react-docgen/commit/b0a46e7429f2a7449eebeff329753b25ac4226c9) + Thanks [@danez](https://github.com/danez)! - update dependency commander to + v11 + +### Patch Changes + +- Updated dependencies + [[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae), + [`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd), + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8), + [`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b), + [`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b), + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae)]: + - react-docgen@7.0.0 + ## 1.0.4 ### Patch Changes diff --git a/packages/website/src/pages/docs/release-notes/react-docgen.mdx b/packages/website/src/pages/docs/release-notes/react-docgen.mdx index e9d524fcb16..f3fbc93f86e 100644 --- a/packages/website/src/pages/docs/release-notes/react-docgen.mdx +++ b/packages/website/src/pages/docs/release-notes/react-docgen.mdx @@ -1,5 +1,82 @@ # Release Notes +## 7.0.0 + +### Major Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae) + Thanks [@danez](https://github.com/danez)! - `getTypeFromReactComponent` now + returns an array of paths to types instead of just one. This can appear when + multiple type definitions are found for a component, for example: + + ```ts + const Component: React.FC = (props: { some: string }) => {}; + ``` + + In this example both the `Props` definition as well as `{ some: string }` are + now found and used. + + Here is a simple diff to illustrate the change when using + `getTypeFromReactComponent`: + + ```diff + + const type = getTypeFromReactComponent(path) + + -if (type) { + +if (type.length > 0) { + // do smth + } + + ``` + +- [#848](https://github.com/reactjs/react-docgen/pull/848) + [`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8) + Thanks [@danez](https://github.com/danez)! - Drop support for Node.js + version 14. + + The minimum supported version is now 16.14.0 + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b) + Thanks [@danez](https://github.com/danez)! - `resolveToValue` will not resolve + to `ImportDeclaration` anymore but instead to one of the possible specifiers + (`ImportSpecifier`, `ImportDefaultSpecifier` or `ImportNamespaceSpecifier`). + This gives better understanding to which specifier exactly `resolveToValue` + did resolve a NodePath to. + + Here is a possible easy fix for this in a code snippet that uses + `resolveToValue` + + ```diff + const resolved = resolveToValue(path); + + -if (resolved.isImportDeclaration()) { + +if (resolved.parentPath?.isImportDeclaration()) { + // do smth + } + ``` + +### Minor Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae) + Thanks [@danez](https://github.com/danez)! - Add support for React.FC in + TypeScript + +### Patch Changes + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd) + Thanks [@danez](https://github.com/danez)! - Fix detection of react class + components when super class is imported via named import. + +- [#846](https://github.com/reactjs/react-docgen/pull/846) + [`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b) + Thanks [@danez](https://github.com/danez)! - Remove unnecessary call to + `resolveToValue` when trying to find props type from react components. + ## 6.0.4 ### Patch Changes diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f7c5c0117a..3def98ab77b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,7 +135,7 @@ importers: specifier: 3.3.1 version: 3.3.1 react-docgen: - specifier: workspace:6.0.4 + specifier: workspace:7.0.0 version: link:../react-docgen slash: specifier: 5.1.0 @@ -196,7 +196,7 @@ importers: specifier: 18.2.0 version: 18.2.0 react-docgen: - specifier: workspace:6.0.4 + specifier: workspace:7.0.0 version: link:../react-docgen react-dom: specifier: 18.2.0