rsnext/packages
Shu Ding 440b95e289
Refactor SWC transform to support named default export (#46778)
Since the default export syntax is not `fnDecl` but `fnExpr` I added two new methods to abstract out all the transform logic and made both `visit_mut_fn_decl` and `visit_mut_fn_expr` use that.

Next step is to support default exports without an ident (`export default async function () {}`).

Fixes NEXT-768.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-03-06 11:53:13 +00:00
..
create-next-app v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
eslint-config-next v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
eslint-plugin-next v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
font v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next chore: add jsdoc to output in next.config.js (#46804) 2023-03-05 23:21:03 +00:00
next-bundle-analyzer v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-codemod v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-env v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-mdx v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-plugin-storybook v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-polyfill-module v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-polyfill-nomodule v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
next-swc Refactor SWC transform to support named default export (#46778) 2023-03-06 11:53:13 +00:00
react-dev-overlay v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
react-refresh-utils v13.2.4-canary.4 2023-03-05 10:26:29 -08:00