Skip to content

Modernize & Overhaul#99

Open
ndelangen wants to merge 27 commits intohipstersmoothie:masterfrom
ndelangen:norbert/modernize
Open

Modernize & Overhaul#99
ndelangen wants to merge 27 commits intohipstersmoothie:masterfrom
ndelangen:norbert/modernize

Conversation

@ndelangen
Copy link
Copy Markdown

@ndelangen ndelangen commented Jan 9, 2026

  • Replace jest for vitest
  • Upgrade eslint & prettier
  • Write integration-test for plugin using webpack for source & dist
  • Format files
  • Replace build tsc system with TSup
  • Modernize JS output
  • Drop webpack 4 support (not all code was cleaned up)
  • Upgrade to yarn latest
  • re-implement using a loader mechanic, using string-replacement
  • Replace yarn for pnpm
  • Drop node18 support

 FAIL  src/__tests__/integration.test.ts > dist
Unknown Error: ERROR in ./src/__tests__/index.ts + 8 modules
Unexpected token (11:4)
| try {
|     // @ts-ignore
|     default.__docgenInfo = { "description": "Component with a prop with a default value.", "displayName": "DirectDefaultExport", "props": { "color": { "defaultValue": { value: "blue" }, "description": "Button color.", "name": "color", "required": true, "type": { "name": "\"blue\" | \"green\"" } }, "counter": { "defaultValue": null, "description": "Button counter.", "name": "counter", "required": true, "type": { "name": "number" } }, "disabled": { "defaultValue": null, "description": "Button disabled.", "name": "disabled", "required": true, "type": { "name": "boolean" } }, "tabIndex": { "defaultValue": null, "description": "", "name": "tabIndex", "required": true, "type": { "name": "number" } } } };
|     // @ts-ignore
|     if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
while analyzing module /Users/me/Projects/GitHub/react-docgen-typescript-plugin/node_modules/ts-loader/index.js??ruleSet[1].rules[0]!/Users/me/Projects/GitHub/react-docgen-typescript-plugin/src/__tests__/__fixtures__/DirectDefaultExport.tsx for concatenation

webpack compiled with 1 error
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  src/__tests__/plugin.test.ts > source
Unknown Error: ERROR in ./src/__tests__/index.ts + 8 modules
Unexpected token (11:4)
| try {
|     // @ts-ignore
|     default.__docgenInfo = { "description": "Component with a prop with a default value.", "displayName": "DirectDefaultExport", "props": { "color": { "defaultValue": { value: "blue" }, "description": "Button color.", "name": "color", "required": true, "type": { "name": "\"blue\" | \"green\"" } }, "counter": { "defaultValue": null, "description": "Button counter.", "name": "counter", "required": true, "type": { "name": "number" } }, "disabled": { "defaultValue": null, "description": "Button disabled.", "name": "disabled", "required": true, "type": { "name": "boolean" } }, "tabIndex": { "defaultValue": null, "description": "", "name": "tabIndex", "required": true, "type": { "name": "number" } } } };
|     // @ts-ignore
|     if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
while analyzing module /Users/me/Projects/GitHub/react-docgen-typescript-plugin/node_modules/ts-loader/index.js??ruleSet[1].rules[0]!/Users/me/Projects/GitHub/react-docgen-typescript-plugin/src/__tests__/__fixtures__/DirectDefaultExport.tsx for concatenation

webpack compiled with 1 error
@ndelangen
Copy link
Copy Markdown
Author

I added a failing test, which is something I need to fix in Storybook:

 FAIL  src/__tests__/integration.test.ts > dist
Unknown Error: ERROR in ./src/__tests__/index.ts + 8 modules
Unexpected token (11:4)
| try {
|     // @ts-ignore
|     default.__docgenInfo = { "description": "Component with a prop with a default value.", "displayName": "DirectDefaultExport", "props": { "color": { "defaultValue": { value: "blue" }, "description": "Button color.", "name": "color", "required": true, "type": { "name": "\"blue\" | \"green\"" } }, "counter": { "defaultValue": null, "description": "Button counter.", "name": "counter", "required": true, "type": { "name": "number" } }, "disabled": { "defaultValue": null, "description": "Button disabled.", "name": "disabled", "required": true, "type": { "name": "boolean" } }, "tabIndex": { "defaultValue": null, "description": "", "name": "tabIndex", "required": true, "type": { "name": "number" } } } };
|     // @ts-ignore
|     if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
while analyzing module /Users/me/Projects/GitHub/react-docgen-typescript-plugin/node_modules/ts-loader/index.js??ruleSet[1].rules[0]!/Users/me/Projects/GitHub/react-docgen-typescript-plugin/src/__tests__/__fixtures__/DirectDefaultExport.tsx for concatenation

webpack compiled with 1 error
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  src/__tests__/plugin.test.ts > source
Unknown Error: ERROR in ./src/__tests__/index.ts + 8 modules
Unexpected token (11:4)
| try {
|     // @ts-ignore
|     default.__docgenInfo = { "description": "Component with a prop with a default value.", "displayName": "DirectDefaultExport", "props": { "color": { "defaultValue": { value: "blue" }, "description": "Button color.", "name": "color", "required": true, "type": { "name": "\"blue\" | \"green\"" } }, "counter": { "defaultValue": null, "description": "Button counter.", "name": "counter", "required": true, "type": { "name": "number" } }, "disabled": { "defaultValue": null, "description": "Button disabled.", "name": "disabled", "required": true, "type": { "name": "boolean" } }, "tabIndex": { "defaultValue": null, "description": "", "name": "tabIndex", "required": true, "type": { "name": "number" } } } };
|     // @ts-ignore
|     if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
while analyzing module /Users/me/Projects/GitHub/react-docgen-typescript-plugin/node_modules/ts-loader/index.js??ruleSet[1].rules[0]!/Users/me/Projects/GitHub/react-docgen-typescript-plugin/src/__tests__/__fixtures__/DirectDefaultExport.tsx for concatenation

webpack compiled with 1 error

@ndelangen ndelangen changed the title Norbert/modernize Modernize & Overhaul Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant