Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
03e4f07
fix: Include builtModules fix for webpack 5
bebraw Jun 30, 2021
e4aa1bf
fix: Fix comment
bebraw Jun 30, 2021
543e905
fix(dependency): Add webpack 5 specific serialization logic
bebraw Jul 29, 2021
edd608f
Merge pull request #49 from zhzz/fix-custom-options
hipstersmoothie Mar 21, 2022
078d4c6
Update CHANGELOG.md [skip ci]
hipstersmoothie Mar 21, 2022
6a44aa1
Update contributors [skip ci]
hipstersmoothie Mar 21, 2022
aa34505
Bump version to: 1.0.1 [skip ci]
hipstersmoothie Mar 21, 2022
b6b5d06
update typescript and fix deprecation warnings
Sep 13, 2022
712fbef
Merge pull request #70 from sairus2k/master
hipstersmoothie Oct 17, 2022
f1ce744
Update CHANGELOG.md [skip ci]
hipstersmoothie Oct 17, 2022
82a3210
Update contributors [skip ci]
hipstersmoothie Oct 17, 2022
ac554fd
Bump version to: 1.0.2 [skip ci]
hipstersmoothie Oct 17, 2022
5513a3e
Merge branch 'master' into fix/fix-webpack-4-hmr
hipstersmoothie Feb 3, 2023
d1cb09b
Merge branch 'master' into fix/add-missing-dep-method
hipstersmoothie Feb 3, 2023
4f4551a
Merge pull request #45 from bebraw/fix/fix-webpack-4-hmr
hipstersmoothie Feb 3, 2023
80bf5da
Merge branch 'master' into fix/add-missing-dep-method
hipstersmoothie Feb 3, 2023
6ebd8ba
Update CHANGELOG.md [skip ci]
hipstersmoothie Feb 3, 2023
157d2e7
Bump version to: 1.0.3 [skip ci]
hipstersmoothie Feb 3, 2023
9fc7250
Merge pull request #46 from bebraw/fix/add-missing-dep-method
hipstersmoothie Feb 3, 2023
713879e
Update CHANGELOG.md [skip ci]
hipstersmoothie Feb 3, 2023
f12f503
Update contributors [skip ci]
hipstersmoothie Feb 3, 2023
8465469
Bump version to: 1.0.4 [skip ci]
hipstersmoothie Feb 3, 2023
966f4db
Add test snapshot for displayName bug
TrevorBurnham Nov 14, 2021
a91043f
Use component expression name as identifier
TrevorBurnham Dec 5, 2021
b4968c4
Merge pull request #58 from TrevorBurnham/trevorburnham/51-displaynam…
hipstersmoothie Feb 5, 2023
4cf05a0
Update CHANGELOG.md [skip ci]
hipstersmoothie Feb 5, 2023
7d827ee
Update contributors [skip ci]
hipstersmoothie Feb 5, 2023
99391d3
Bump version to: 1.0.5 [skip ci]
hipstersmoothie Feb 5, 2023
bea78fc
Use @storybook/react-docgen-typescript fork
shilman Mar 3, 2023
744cf99
Fix publish
shilman Mar 3, 2023
f9c48c0
Update yarn.lock
shilman Mar 3, 2023
cd77847
Fix default export component handling
shilman Mar 3, 2023
0630821
Fix function component
shilman Mar 20, 2023
7852ae9
Failing test
kasperpeulen Apr 11, 2023
e6af358
Add FunctionComponent to the list of expression that need to get the …
kasperpeulen Apr 11, 2023
8702b01
Use same list for defaultComponentTypes as react-docgen-typescript
kasperpeulen Apr 11, 2023
0c3f3b7
Merge pull request #10 from kasperpeulen/kasper/fix-default-export-fc…
kasperpeulen Apr 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,36 @@
"profile": "https://survivejs.com/",
"contributions": [
"infra",
"test",
"code",
"doc"
]
},
{
"login": "zhzz",
"name": "Egor Pogadaev",
"avatar_url": "https://avatars.githubusercontent.com/u/4607770?v=4",
"profile": "https://github.com/zhzz",
"contributions": [
"test",
"code"
]
},
{
"login": "sairus2k",
"name": "Anton Savoskin",
"avatar_url": "https://avatars.githubusercontent.com/u/1106887?v=4",
"profile": "https://github.com/sairus2k",
"contributions": [
"code"
]
},
{
"login": "TrevorBurnham",
"name": "Trevor Burnham",
"avatar_url": "https://avatars.githubusercontent.com/u/224895?v=4",
"profile": "http://trevorburnham.com/",
"contributions": [
"test",
"code"
]
Expand Down
38 changes: 6 additions & 32 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,25 @@
name: Node CI
name: Publish

on:
push:
branches:
- master
pull_request:
branches:
- master
on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and lint
run: |
yarn
yarn build
yarn lint
yarn test

release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 12.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --frozen-lockfile
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
# v1.0.5 (Sun Feb 05 2023)

#### 🐛 Bug Fix

- Use component expression name as identifier [#58](https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/58) ([@TrevorBurnham](https://github.com/TrevorBurnham))

#### Authors: 1

- Trevor Burnham ([@TrevorBurnham](https://github.com/TrevorBurnham))

---

# v1.0.4 (Fri Feb 03 2023)

#### 🐛 Bug Fix

- fix: Add missing getModuleEvaluationSideEffectsState [#46](https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/46) ([@bebraw](https://github.com/bebraw) [@hipstersmoothie](https://github.com/hipstersmoothie))

#### Authors: 2

- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
- Juho Vepsäläinen ([@bebraw](https://github.com/bebraw))

---

# v1.0.3 (Fri Feb 03 2023)

#### 🐛 Bug Fix

- fix - Fix webpack 4 hmr after refresh + fix rebuild performance + fix webpack 5 serialization [#45](https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/45) ([@bebraw](https://github.com/bebraw) [@hipstersmoothie](https://github.com/hipstersmoothie))

#### Authors: 2

- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
- Juho Vepsäläinen ([@bebraw](https://github.com/bebraw))

---

# v1.0.2 (Mon Oct 17 2022)

:tada: This release contains work from a new contributor! :tada:

Thank you, Anton Savoskin ([@sairus2k](https://github.com/sairus2k)), for all your work!

#### 🐛 Bug Fix

- Update typescript and fix deprecation warnings [#70](https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/70) (a.savoskin@kvarta.ru)

#### Authors: 1

- Anton Savoskin ([@sairus2k](https://github.com/sairus2k))

---

# v1.0.1 (Mon Mar 21 2022)

#### 🐛 Bug Fix

- fix: respect falsy custom options [#49](https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/49) ([@zhzz](https://github.com/zhzz))

#### Authors: 1

- Egor Pogadaev ([@zhzz](https://github.com/zhzz))

---

# v1.0.0 (Sat Jun 05 2021)

#### 💥 Breaking Change
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="http://hipstersmoothie.com/"><img src="https://avatars3.githubusercontent.com/u/1192452?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Lisowski</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=hipstersmoothie" title="Code">💻</a> <a href="#design-hipstersmoothie" title="Design">🎨</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=hipstersmoothie" title="Documentation">📖</a> <a href="#ideas-hipstersmoothie" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-hipstersmoothie" title="Maintenance">🚧</a> <a href="#infra-hipstersmoothie" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=hipstersmoothie" title="Tests">⚠️</a></td>
<td align="center"><a href="http://shilman.net/"><img src="https://avatars2.githubusercontent.com/u/488689?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michael Shilman</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=shilman" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/kherock"><img src="https://avatars.githubusercontent.com/u/4993980?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kyle Herock</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=kherock" title="Code">💻</a></td>
<td align="center"><a href="https://survivejs.com/"><img src="https://avatars.githubusercontent.com/u/166921?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juho Vepsäläinen</b></sub></a><br /><a href="#infra-bebraw" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=bebraw" title="Tests">⚠️</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=bebraw" title="Code">💻</a></td>
<td align="center"><a href="https://survivejs.com/"><img src="https://avatars.githubusercontent.com/u/166921?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juho Vepsäläinen</b></sub></a><br /><a href="#infra-bebraw" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=bebraw" title="Tests">⚠️</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=bebraw" title="Code">💻</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=bebraw" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/zhzz"><img src="https://avatars.githubusercontent.com/u/4607770?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Egor Pogadaev</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=zhzz" title="Tests">⚠️</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=zhzz" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/sairus2k"><img src="https://avatars.githubusercontent.com/u/1106887?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anton Savoskin</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=sairus2k" title="Code">💻</a></td>
<td align="center"><a href="http://trevorburnham.com/"><img src="https://avatars.githubusercontent.com/u/224895?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Trevor Burnham</b></sub></a><br /><a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=TrevorBurnham" title="Tests">⚠️</a> <a href="https://github.com/hipstersmoothie/react-docgen-typescript-plugin/commits?author=TrevorBurnham" title="Code">💻</a></td>
</tr>
</table>

Expand Down
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-docgen-typescript-plugin",
"version": "1.0.0",
"name": "@storybook/react-docgen-typescript-plugin",
"version": "1.0.5",
"description": "A webpack plugin to inject react typescript docgen information.",
"license": "MIT",
"repository": "hipstersmoothie/react-docgen-typescript-plugin",
Expand Down Expand Up @@ -38,7 +38,7 @@
"find-cache-dir": "^3.3.1",
"flat-cache": "^3.0.4",
"micromatch": "^4.0.2",
"react-docgen-typescript": "^1.22.0",
"react-docgen-typescript": "^2.2.2",
"tslib": "^2.0.0"
},
"devDependencies": {
Expand All @@ -51,8 +51,7 @@
"@types/react": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"auto": "^10.2.3",
"auto-config-hipstersmoothie": "^4.0.0",
"auto": "^10.43.0",
"eslint": "^7.14.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "6.11.0",
Expand All @@ -69,22 +68,19 @@
"react": "^17.0.1",
"ts-jest": "^26.5.6",
"ts-loader": "^9.1.2",
"typescript": "3.8.3",
"typescript": "4.8.3",
"webpack": "^5.36.2",
"webpack-cli": "^4.7.0",
"yarn-add-no-save": "^1.0.3"
},
"peerDependencies": {
"typescript": ">= 3.x",
"typescript": ">= 4.x",
"webpack": ">= 4"
},
"lint-staged": {
"*.{js,css,md}": [
"prettier --write",
"git add"
]
},
"auto": {
"extends": "hipstersmoothie"
}
}
35 changes: 35 additions & 0 deletions src/__tests__/__fixtures__/DefaultExportComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import * as React from "react";

interface DefaultPropValueComponentProps {
/**
* Button color.
*
* @default blue
**/
color: "blue" | "green";

/**
* Button counter.
*/
counter: number;

/**
* Button disabled.
*/
disabled: boolean;
}

/**
* Component with a prop with a default value.
*/
export default function DefaultExportComponent(props: React.PropsWithChildren<DefaultPropValueComponentProps) {
return (<button disabled={props.disabled} style={{ backgroundColor: props.color }}>
{props.counter}
{props.children}
</button>);
}

DefaultExportComponent.defaultProps = {
counter: 123,
disabled: false,
};
34 changes: 34 additions & 0 deletions src/__tests__/__fixtures__/DefaultExportComponentFC.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as React from "react";

interface DefaultExportComponentFCProps {
/**
* Button color.
*
* @default blue
**/
color: "blue" | "green";

/**
* Button counter.
*/
counter: number;

/**
* Button disabled.
*/
disabled: boolean;
}

/**
* Component with a prop with a default value.
*/
const DefaultExportComponentFC: React.FC<DefaultExportComponentFCProps> = (
props
) => (
<button disabled={props.disabled} style={{ backgroundColor: props.color }}>
{props.counter}
{props.children}
</button>
);

export default DefaultExportComponentFC;
34 changes: 34 additions & 0 deletions src/__tests__/__fixtures__/DefaultExportComponentFC2.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as React from "react";

interface DefaultExportComponentFC2Props {
/**
* Button color.
*
* @default blue
**/
color: "blue" | "green";

/**
* Button counter.
*/
counter: number;

/**
* Button disabled.
*/
disabled: boolean;
}

/**
* Component with a prop with a default value.
*/
const DefaultExportComponentFC2 = (
props: React.PropsWithChildren<DefaultExportComponentFC2Props>
) => (
<button disabled={props.disabled} style={{ backgroundColor: props.color }}>
{props.counter}
{props.children}
</button>
);

export default DefaultExportComponentFC2;
34 changes: 34 additions & 0 deletions src/__tests__/__fixtures__/DefaultExportComponentFC3.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as React from "react";

interface DefaultExportComponentFC3Props {
/**
* Button color.
*
* @default blue
**/
color: "blue" | "green";

/**
* Button counter.
*/
counter: number;

/**
* Button disabled.
*/
disabled: boolean;
}

/**
* Component with a prop with a default value.
*/
export const DefaultExportComponentFC3: React.FC<DefaultExportComponentFC3Props> = (
props
) => (
<button disabled={props.disabled} style={{ backgroundColor: props.color }}>
{props.counter}
{props.children}
</button>
);

export default DefaultExportComponentFC3;
Loading