Skip to content

Commit

Permalink
Publish new versions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 11, 2023
1 parent 71df550 commit 77cc459
Show file tree
Hide file tree
Showing 15 changed files with 216 additions and 84 deletions.
5 changes: 0 additions & 5 deletions .changeset/commander-eleven.md

This file was deleted.

28 changes: 0 additions & 28 deletions .changeset/cyan-ways-fry.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/eight-coats-tie.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/fifty-gifts-sort.md

This file was deleted.

20 changes: 0 additions & 20 deletions .changeset/four-teachers-tan.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/lazy-walls-swim.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-jeans-tell.md

This file was deleted.

28 changes: 28 additions & 0 deletions packages/react-docgen-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/react-docgen-cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
77 changes: 77 additions & 0 deletions packages/react-docgen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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> = (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
Expand Down
2 changes: 1 addition & 1 deletion packages/react-docgen/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
28 changes: 28 additions & 0 deletions packages/website/src/pages/docs/release-notes/cli.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
77 changes: 77 additions & 0 deletions packages/website/src/pages/docs/release-notes/react-docgen.mdx
Original file line number Diff line number Diff line change
@@ -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> = (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
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77cc459

Please sign in to comment.