Skip to content

docs: add descriptions to plugin README.tmpl.md files#598

Merged
kdy1 merged 1 commit into
mainfrom
claude/issue-200-20260321-0100
Mar 21, 2026
Merged

docs: add descriptions to plugin README.tmpl.md files#598
kdy1 merged 1 commit into
mainfrom
claude/issue-200-20260321-0100

Conversation

@kdy1
Copy link
Copy Markdown
Member

@kdy1 kdy1 commented Mar 21, 2026

Add descriptive introductions to 12 plugin README.tmpl.md files that were missing explanations of what the plugins do.

Fixes #200

Generated with Claude Code

Add descriptive introductions to 12 plugin README.tmpl.md files that
were missing explanations of what the plugins do.

Fixes #200

Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 21, 2026

⚠️ No Changeset found

Latest commit: 0ed50bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kdy1 kdy1 enabled auto-merge (squash) March 21, 2026 01:06
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 21, 2026

PR Review: docs: add descriptions to plugin README.tmpl.md files

Overall this is a helpful documentation improvement — adding plugin descriptions makes it much easier for users to understand what each package does at a glance. Most descriptions are accurate and well-written. However, there is one factual issue that should be addressed before merging.

Bug: Inaccurate description for @swc/plugin-jest

The description currently reads:

@swc/plugin-jest is a drop-in replacement for babel-jest that uses SWC to transform your code, enabling significantly faster Jest-based testing.

This is incorrect. Looking at the source code (packages/jest/src/lib.rs), @swc/plugin-jest is a SWC WASM plugin that hoists jest.mock(), jest.unmock(), jest.enableAutomock(), jest.disableAutomock(), and jest.deepUnmock() calls to the top of files — the same behavior as babel-plugin-jest-hoist.

The actual drop-in replacement for babel-jest is the separate @swc/jest package. This plugin runs within SWC's plugin system and handles the mock-hoisting transform specifically.

Suggested replacement:

`@swc/plugin-jest` is a SWC plugin that hoists `jest.mock()`, `jest.unmock()`, and related Jest API calls to the top of each file, matching the hoisting behavior of `babel-plugin-jest-hoist`. It is used alongside `@swc/jest` (the `babel-jest` replacement) to ensure Jest mocks work correctly when SWC is your compiler.

Minor observations (non-blocking)

  • packages/relay/README.tmpl.md: Uses ### (H3) for the top-level heading while all other packages use # (H1). This is a pre-existing inconsistency, but worth noting since you're touching the file — aligning it would improve consistency.

  • packages/swc-sdk/README.tmpl.md: Uses # Usage (H1) for the Usage section heading while other packages conventionally use ## Usage (H2). Also pre-existing.

  • packages/transform-imports/README.tmpl.md: The example given (import Button from 'react-bootstrap/lib/Button') accurately matches the Config section immediately below, which is a nice touch.

  • All other descriptions (loadable-components, noop, react-remove-properties, relay, remove-console, styled-components, styled-jsx, swc-confidential, swc-magic, swc-sdk, transform-imports) are factually accurate and well-written.

Summary

Please fix the @swc/plugin-jest description — it currently mischaracterizes the package in a way that could mislead users into thinking they don't need @swc/jest. The rest of the changes are good to go.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ed50bfd02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1,3 +1,5 @@
# @swc/plugin-jest

`@swc/plugin-jest` is a drop-in replacement for `babel-jest` that uses SWC to transform your code, enabling significantly faster Jest-based testing. It integrates with Jest's transformation pipeline so you can run your test suite with minimal configuration changes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop calling @swc/plugin-jest a babel-jest replacement

Users who choose packages from the README summary will install the wrong tool here. packages/jest/src/lib.rs:20-94 only implements Jest-hoist-style reordering of jest.mock/unmock/enableAutomock calls in visit_mut_stmt_like; it does not provide Jest's transformer interface. Describing this package as a “drop-in replacement for babel-jest” will send Jest users to a plugin that cannot run their test suite on its own.

Useful? React with 👍 / 👎.

@@ -1,5 +1,7 @@
# @swc/plugin-swc-sdk

`@swc/plugin-swc-sdk` provides build-time transformations from the `@swc/sdk` package. It supports converting static imports annotated with `/*#__DYNAMIC__*/` into dynamic imports, and processes `markAsPure` annotations so the SWC minifier can tree-shake the marked expressions.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the nonexistent markAsPure claim from swc-sdk

This summary advertises a transform that the plugin source does not implement. In the code I checked, packages/swc-sdk/transform/src/config.rs:7-35 only exposes flag and dynamicImports settings, and packages/swc-sdk/transform/src/lib.rs:388-391 only invokes transform_flag in addition to the /*#__DYNAMIC__*/ handling earlier in the visitor. There is no markAsPure matcher or visitor anywhere under packages/swc-sdk/transform/src, so readers who depend on this documented behavior will not get the optimization they were promised.

Useful? React with 👍 / 👎.

@kdy1 kdy1 merged commit bdaf2f5 into main Mar 21, 2026
13 of 14 checks passed
@kdy1 kdy1 deleted the claude/issue-200-20260321-0100 branch March 21, 2026 01:09
kdy1 added a commit that referenced this pull request Mar 21, 2026
## Summary
- Addressed `chatgpt-codex-connector[bot]` review follow-ups across
merged PRs: #585, #591, #592, #593, #594, #595, #597, #598, #599.
- Applied the fixes as 9 separate commits (one commit per original PR)
in a single follow-up branch.

## What Changed
- #585 / #592 (`loadable-components`)
- Fixed source-less default-import matching to honor the configured
local name.
- Updated `ssr: false` detection to respect final object-literal
override order.
  - Added/updated fixtures for both behaviors.
- #591 / #594 (`formatjs`)
- Added JSX member-expression message component support (e.g.
`ReactIntl.FormattedMessage`).
  - Updated #532 regression coverage to validate the `ast: true` path.
- #593 / #595 (`graphql-codegen-client-preset`)
  - Extended `namingConvention` parsing to accept string/object forms.
- Preserved names for `keep`/unknown conventions instead of forcing
PascalCase.
- Fixed Windows absolute `filename` path handling in WASM runtime path
resolution.
  - Added unit coverage for the new config/path behaviors.
- #597 / #599 (`emotion`)
- Ensured tagged-template labels are terminated before sourcemap
comments.
- Added css-prop rewrite support for namespace imports
(`emotionReact.css`).
  - Attached PURE comments to the generated call site span.
  - Updated emotion fixtures accordingly.
- #598 (docs)
- Corrected capability descriptions in `packages/jest/README.tmpl.md`
and `packages/swc-sdk/README.tmpl.md`.

## Validation
- `cargo test -p swc_plugin_loadable_components --test fixture --
--ignored`
- `cargo test -p swc_plugin_graphql_codegen_client_preset`
- `cargo test -p swc_emotion --test fixture -- --ignored`
- `pnpm -C /Users/kdy1/.codex/worktrees/17e6/plugins/packages/formatjs
test`

All passed (formatjs has an existing non-blocking Vitest warning about
an un-awaited rejects assertion).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Plugins are missing a readme telling what they do

2 participants