Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use exports #61525

Closed
wants to merge 16 commits into from
Closed

refactor: use exports #61525

wants to merge 16 commits into from

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Feb 1, 2024

Closes NEXT-2332

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Feb 1, 2024
"types": "./dist/pages/_document.d.ts",
"default": "./dist/pages/_document.js"
},
"./dist/*": {
Copy link
Member Author

Choose a reason for hiding this comment

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

This should provide backward compatibility for imports like next/dist/... but technically this was never supported. We could get rid of it in a major release

balazsorban44 added a commit that referenced this pull request Feb 2, 2024
Bumping ESLint to the newest version.

Related: #61525

Closes NEXT-2336
balazsorban44 added a commit that referenced this pull request Feb 5, 2024
### What?

This PR adds JSDoc comments to the most common public APIs to improve
the DX in IDEs like VSCode.

### Why?

Currently, we provide no information on some of the most used APIs in
IDEs, which makes it harder than it needs to be to look up the extra
information.

<details>
<summary><b>Before:</b></summary>
<img
src="https://github.com/vercel/next.js/assets/18369201/8b6092e8-8f9b-49da-a3df-b07a59982069"
width="640"/>
</details>

<details>
<summary><b>After:</b></summary>
<img
src="https://github.com/vercel/next.js/assets/18369201/30216f76-414a-43b0-9aa6-2fdd742ab3fe"
width="640"/>
</details>

### How?

Using JSDoc comments, I added a basic description to most public APIs
that link back to the current docs for more details. The description is
kept minimal to avoid out-of-sync documentation.

Note: In the future, the flow could be reversed here, and our API
Reference docs could actually be generated from a single source of
truth, the source code itself. However, this will require more work by
re-organizing our public API submodules in a single directory, (related
#61525), so the API docs are easy to maintain even without a deeper
knowledge of the codebase.

Note: These comments should also be extended to
methods/properties/arguments in these public APIs in the future.

Closes NEXT-2357

[Slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1706735292633029)
@balazsorban44 balazsorban44 mentioned this pull request Feb 7, 2024
1 task
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants