rsnext/packages/next/server
Shu Ding f055b167a5
Add TypeScript plugin (#41569)
This PR implements the TypeScript plugin (only applied to the app directory), and it will be automatically added to tsconfig.json when running the CLI. Due to how TS plugins work (a package name is required to specify), hence we can't use a subpath import like `next/typescript` for the plugin. To avoid installing a separate dependency, here I propose to reuse the `next` package: if the default export is called with the TypeScript option, we can say it's being used as a plugin. There is also environment variables we can check here, however it's specifically for VS Code (`VSCODE_CLI=1`) where this plugin should be working with other editors too.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 20:59:39 +00:00
..
api-utils perf: lazy evaluate more modules (#41354) 2022-10-13 14:59:46 -07:00
base-http Improve types for <Image /> and responseLimit (#40863) 2022-09-26 22:41:25 -07:00
dev Improve type checking (#41427) 2022-10-19 18:28:36 +02:00
lib Add handling for static generation in app (#40561) 2022-09-19 18:05:28 +00:00
response-cache Eliminate path polyfill and incremental-cache from base server (#39548) 2022-08-12 15:25:47 +00:00
send-payload Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00
web Append the fragment in NextUrl.toString() (#41501) 2022-10-17 21:56:28 -07:00
accept-header.ts Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
app-render.tsx Create hash digest for errors in app in production (#41559) 2022-10-19 19:56:55 +02:00
base-server.ts BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
body-streams.ts fix(stream): Allows body larger than 16 KiB with middleware (#41270) 2022-10-17 15:26:16 -07:00
config-schema.ts BREAKING CHANGE: Remove browsersListForSwc and change default to legacyBrowsers: false (#41529) 2022-10-19 01:38:39 +00:00
config-shared.ts BREAKING CHANGE: Remove browsersListForSwc and change default to legacyBrowsers: false (#41529) 2022-10-19 01:38:39 +00:00
config-utils.ts Prebundle react for appDir (#41337) 2022-10-18 16:32:23 -07:00
config.ts BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
crypto-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
font-utils.ts Local font files adjust fallbacks (#41180) 2022-10-10 18:54:34 +00:00
get-app-route-from-entrypoint.ts App Build Stats (#38884) 2022-08-10 19:31:01 +00:00
get-page-files.ts Add initial handling for routing tests (#36635) 2022-05-03 10:37:23 +00:00
get-route-from-entrypoint.ts App Build Stats (#38884) 2022-08-10 19:31:01 +00:00
google-font-metrics.json Adding experimental size adjust based option (#41009) 2022-09-30 00:35:50 +00:00
htmlescape.ts Subresource Integrity for App Directory (#39729) 2022-09-08 15:17:15 -07:00
image-optimizer.ts docs(image): improve error message when sharp is missing in standalone mode (#41133) 2022-10-05 17:28:29 +00:00
internal-utils.ts Rename flight parameters to rsc/next (#40979) 2022-09-28 13:18:37 +02:00
load-components.ts BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
match-bundle.ts App Build Stats (#38884) 2022-08-10 19:31:01 +00:00
next-server.ts Prebundle react for appDir (#41337) 2022-10-18 16:32:23 -07:00
next-typescript.ts Add TypeScript plugin (#41569) 2022-10-19 20:59:39 +00:00
next.ts Add TypeScript plugin (#41569) 2022-10-19 20:59:39 +00:00
node-polyfill-fetch.js feat(experimental): option to polyfill fetch using undici in Node.js <18 (#40318) 2022-09-27 13:37:28 -07:00
node-polyfill-web-streams.js Update Edge Runtime (#38862) 2022-07-21 18:29:19 +00:00
node-web-streams-helper.ts Move root layout validation (#41338) 2022-10-14 13:55:09 -07:00
optimize-amp.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
post-process.ts perf: lazy evaluate more modules (#41354) 2022-10-13 14:59:46 -07:00
render-result.ts Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00
render.tsx Prebundle react for appDir (#41337) 2022-10-18 16:32:23 -07:00
request-meta.ts Fix middleware rewrite for _next/data (#41341) 2022-10-11 12:23:22 -07:00
require.ts BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
router.ts Fix middleware rewrite for _next/data (#41341) 2022-10-11 12:23:22 -07:00
serve-static.ts fix(#39706): add avif support for node serve static (#39733) 2022-08-18 17:57:12 +00:00
server-route-utils.ts Enable @typescript-eslint/no-use-before-define variables,enums,typedefs for core files (#39511) 2022-08-11 16:32:52 -05:00
utils.ts BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
web-server.ts Fix app static generation cases (#41172) 2022-10-06 21:43:23 +02:00