Skip to content

Commit de7b230

Browse files
Packages ready to publish (#847)
Publish new versions Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 5bd3b72 commit de7b230

20 files changed

+278
-112
lines changed

.changeset/commander-eleven.md

-5
This file was deleted.

.changeset/cyan-ways-fry.md

-28
This file was deleted.

.changeset/early-snakes-brake.md

-5
This file was deleted.

.changeset/eight-coats-tie.md

-6
This file was deleted.

.changeset/fifty-gifts-sort.md

-8
This file was deleted.

.changeset/four-teachers-tan.md

-20
This file was deleted.

.changeset/hip-kangaroos-sing.md

-5
This file was deleted.

.changeset/lazy-walls-swim.md

-6
This file was deleted.

.changeset/perfect-turtles-reply.md

-8
This file was deleted.

.changeset/sour-jeans-tell.md

-5
This file was deleted.

.changeset/unlucky-stingrays-lick.md

-5
This file was deleted.

.changeset/young-carrots-sort.md

-5
This file was deleted.

packages/react-docgen-cli/CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Release Notes
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- [#848](https://github.com/reactjs/react-docgen/pull/848)
8+
[`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8)
9+
Thanks [@danez](https://github.com/danez)! - Drop support for Node.js
10+
version 14.
11+
12+
The minimum supported version is now 16.14.0
13+
14+
### Minor Changes
15+
16+
- [`b0a46e7`](https://github.com/reactjs/react-docgen/commit/b0a46e7429f2a7449eebeff329753b25ac4226c9)
17+
Thanks [@danez](https://github.com/danez)! - update dependency commander to
18+
v11
19+
20+
### Patch Changes
21+
22+
- [#859](https://github.com/reactjs/react-docgen/pull/859)
23+
[`7dd2264`](https://github.com/reactjs/react-docgen/commit/7dd22646877d9a454f7809de5cbbb72499758916)
24+
Thanks [@renovate](https://github.com/apps/renovate)! - update dependency
25+
commander to v11.1.0
26+
27+
- Updated dependencies
28+
[[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae),
29+
[`6312f2f`](https://github.com/reactjs/react-docgen/commit/6312f2f47b9f679b5bf923a30855e813193ed4af),
30+
[`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd),
31+
[`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8),
32+
[`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b),
33+
[`74b6680`](https://github.com/reactjs/react-docgen/commit/74b6680910037b1b4b64dd57769b652bf775675e),
34+
[`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b),
35+
[`40ebb00`](https://github.com/reactjs/react-docgen/commit/40ebb0010a7a380f89e0c79a4a937cf9a50a3245),
36+
[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae),
37+
[`3be404e`](https://github.com/reactjs/react-docgen/commit/3be404eee6c8fc7bd867fea9d1987b7f438107d6)]:
38+
39+
340
## 1.0.4
441

542
### Patch Changes

packages/react-docgen-cli/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-docgen/cli",
3-
"version": "1.0.4",
3+
"version": "2.0.0",
44
"description": "A CLI to extract information from React components for documentation generation.",
55
"repository": {
66
"type": "git",
@@ -35,7 +35,7 @@
3535
"commander": "11.1.0",
3636
"debug": "4.3.4",
3737
"fast-glob": "3.3.1",
38-
"react-docgen": "workspace:6.0.4",
38+
"react-docgen": "workspace:7.0.0",
3939
"slash": "5.1.0"
4040
},
4141
"devDependencies": {

packages/react-docgen/CHANGELOG.md

+99
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,104 @@
11
# Release Notes
22

3+
## 7.0.0
4+
5+
### Major Changes
6+
7+
- [#846](https://github.com/reactjs/react-docgen/pull/846)
8+
[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae)
9+
Thanks [@danez](https://github.com/danez)! - `getTypeFromReactComponent` now
10+
returns an array of paths to types instead of just one. This can appear when
11+
multiple type definitions are found for a component, for example:
12+
13+
```ts
14+
const Component: React.FC<Props> = (props: { some: string }) => {};
15+
```
16+
17+
In this example both the `Props` definition as well as `{ some: string }` are
18+
now found and used.
19+
20+
Here is a simple diff to illustrate the change when using
21+
`getTypeFromReactComponent`:
22+
23+
```diff
24+
25+
const type = getTypeFromReactComponent(path)
26+
27+
-if (type) {
28+
+if (type.length > 0) {
29+
// do smth
30+
}
31+
32+
```
33+
34+
- [#848](https://github.com/reactjs/react-docgen/pull/848)
35+
[`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8)
36+
Thanks [@danez](https://github.com/danez)! - Drop support for Node.js
37+
version 14.
38+
39+
The minimum supported version is now 16.14.0
40+
41+
- [#846](https://github.com/reactjs/react-docgen/pull/846)
42+
[`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b)
43+
Thanks [@danez](https://github.com/danez)! - `resolveToValue` will not resolve
44+
to `ImportDeclaration` anymore but instead to one of the possible specifiers
45+
(`ImportSpecifier`, `ImportDefaultSpecifier` or `ImportNamespaceSpecifier`).
46+
This gives better understanding to which specifier exactly `resolveToValue`
47+
did resolve a NodePath to.
48+
49+
Here is a possible easy fix for this in a code snippet that uses
50+
`resolveToValue`
51+
52+
```diff
53+
const resolved = resolveToValue(path);
54+
55+
-if (resolved.isImportDeclaration()) {
56+
+if (resolved.parentPath?.isImportDeclaration()) {
57+
// do smth
58+
}
59+
```
60+
61+
### Minor Changes
62+
63+
- [#862](https://github.com/reactjs/react-docgen/pull/862)
64+
[`40ebb00`](https://github.com/reactjs/react-docgen/commit/40ebb0010a7a380f89e0c79a4a937cf9a50a3245)
65+
Thanks [@danez](https://github.com/danez)! - Support `PropsWithoutRef`,
66+
`PropsWithRef` and `PropsWithChildren` in TypeScript.
67+
68+
Component props are now detected correctly when these builtin types are used,
69+
but they do currently not add any props to the documentation.
70+
71+
- [#846](https://github.com/reactjs/react-docgen/pull/846)
72+
[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae)
73+
Thanks [@danez](https://github.com/danez)! - Add support for `React.FC` in
74+
TypeScript.
75+
76+
### Patch Changes
77+
78+
- [`6312f2f`](https://github.com/reactjs/react-docgen/commit/6312f2f47b9f679b5bf923a30855e813193ed4af)
79+
Thanks [@renovate[bot]](https://github.com/renovate%5Bbot%5D)! - update
80+
dependency @types/doctrine to ^0.0.7
81+
82+
- [#846](https://github.com/reactjs/react-docgen/pull/846)
83+
[`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd)
84+
Thanks [@danez](https://github.com/danez)! - Fix detection of react class
85+
components when super class is imported via named import.
86+
87+
- [#861](https://github.com/reactjs/react-docgen/pull/861)
88+
[`74b6680`](https://github.com/reactjs/react-docgen/commit/74b6680910037b1b4b64dd57769b652bf775675e)
89+
Thanks [@renovate](https://github.com/apps/renovate)! - update dependency
90+
@types/doctrine to ^0.0.8
91+
92+
- [#846](https://github.com/reactjs/react-docgen/pull/846)
93+
[`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b)
94+
Thanks [@danez](https://github.com/danez)! - Remove unnecessary call to
95+
`resolveToValue` when trying to find props type from react components.
96+
97+
- [#858](https://github.com/reactjs/react-docgen/pull/858)
98+
[`3be404e`](https://github.com/reactjs/react-docgen/commit/3be404eee6c8fc7bd867fea9d1987b7f438107d6)
99+
Thanks [@danez](https://github.com/danez)! - Fix detection of React.Children
100+
with ESM imports
101+
3102
## 6.0.4
4103

5104
### Patch Changes

packages/react-docgen/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-docgen",
3-
"version": "6.0.4",
3+
"version": "7.0.0",
44
"description": "A library to extract information from React components for documentation generation.",
55
"repository": {
66
"type": "git",

packages/website/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"postcss": "8.4.31",
2828
"postcss-lightningcss": "1.0.0",
2929
"react": "18.2.0",
30-
"react-docgen": "workspace:6.0.4",
30+
"react-docgen": "workspace:7.0.0",
3131
"react-dom": "18.2.0",
3232
"tailwindcss": "3.3.3"
3333
},

packages/website/src/pages/docs/release-notes/cli.mdx

+37
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Release Notes
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- [#848](https://github.com/reactjs/react-docgen/pull/848)
8+
[`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8)
9+
Thanks [@danez](https://github.com/danez)! - Drop support for Node.js
10+
version 14.
11+
12+
The minimum supported version is now 16.14.0
13+
14+
### Minor Changes
15+
16+
- [`b0a46e7`](https://github.com/reactjs/react-docgen/commit/b0a46e7429f2a7449eebeff329753b25ac4226c9)
17+
Thanks [@danez](https://github.com/danez)! - update dependency commander to
18+
v11
19+
20+
### Patch Changes
21+
22+
- [#859](https://github.com/reactjs/react-docgen/pull/859)
23+
[`7dd2264`](https://github.com/reactjs/react-docgen/commit/7dd22646877d9a454f7809de5cbbb72499758916)
24+
Thanks [@renovate](https://github.com/apps/renovate)! - update dependency
25+
commander to v11.1.0
26+
27+
- Updated dependencies
28+
[[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae),
29+
[`6312f2f`](https://github.com/reactjs/react-docgen/commit/6312f2f47b9f679b5bf923a30855e813193ed4af),
30+
[`c01d1a0`](https://github.com/reactjs/react-docgen/commit/c01d1a00fdba76cea38eebc953fd3d2dd3f12fbd),
31+
[`dda8915`](https://github.com/reactjs/react-docgen/commit/dda8915ce9f8d5065372570d590405f2c2403bd8),
32+
[`62e692f`](https://github.com/reactjs/react-docgen/commit/62e692fcca6f3d17dcf81ce72f2db1a95b2d694b),
33+
[`74b6680`](https://github.com/reactjs/react-docgen/commit/74b6680910037b1b4b64dd57769b652bf775675e),
34+
[`0641700`](https://github.com/reactjs/react-docgen/commit/0641700e4425390c0fe50e216a71e5e18322ab3b),
35+
[`40ebb00`](https://github.com/reactjs/react-docgen/commit/40ebb0010a7a380f89e0c79a4a937cf9a50a3245),
36+
[`82154c3`](https://github.com/reactjs/react-docgen/commit/82154c3b59bf22acf3068165f87b089138fdf7ae),
37+
[`3be404e`](https://github.com/reactjs/react-docgen/commit/3be404eee6c8fc7bd867fea9d1987b7f438107d6)]:
38+
39+
340
## 1.0.4
441

542
### Patch Changes

0 commit comments

Comments
 (0)