Skip to content

Docs: Fix inaccurate and outdated documentation (#2077) - #2077

Open
vzaidman wants to merge 1 commit into
mainfrom
export-D125674123
Open

vzaidman wants to merge 1 commit into
mainfrom
export-D125674123

Conversation

@vzaidman

@vzaidman vzaidman commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Audits every page under docs/ against the current source and fixes statements that are wrong or out of date, and documents current options and APIs that were missing. This change only corrects content; readability changes follow separately.

Configuration

  • Config file lookup order: .json is tried before TypeScript files.
  • maxWorkers: configured values are not capped at the core count; the default is 50-75% of cores, not "about half".
  • unstable_perfLoggerFactory: event type is 'START_UP' (not 'STARTUP'), opts is optional and key is a number.
  • hasteImplModulePath modules must also export getCacheKey().
  • dynamicDepsInPackages only applies to files in node_modules; dynamic requires elsewhere are always rejected.
  • Fixed defaults/types of getPolyfills ([]), processModuleFilter (one module), getRunModuleStatement, schemeResolvers (not nullable), enhanceMiddleware, getTransformOptions (hot: true).
  • Fixed descriptions of assetRegistryPath, enableBabelRuntime (plugin name), rewriteRequestUrl (order relative to middleware), useGlobalHotkey (has no effect), blockList (default hides __tests__), mergeConfig (one level deep; first argument can't be a promise), tls/secureServerOptions precedence.
  • Documented missing options: the symbolicator section, resolver.dependencyExtractor, transformer.globalPrefix/allowOptionalDependencies/publicPath, serializer.polyfillModuleNames/customSerializer/experimentalSerializerHook and extra getTransformOptions fields. unstable_* options not documented before follow in the next change.

API, CLI, Getting Started

  • runServer and createConnectMiddleware have no port option; runBuild's out is optional; corrected how source maps are written and inlined.
  • runServer calls runMetro, not the other way around; fixed an example using an undefined httpServer.
  • dev sets __DEV__; production builds inline process.env.NODE_ENV as 'production'.
  • Documented missing options of loadConfig, runMetro, runBuild (including output), runServer, createConnectMiddleware, and the buildGraph and attachMetroCli exports.
  • CLI: documented serve options and the start alias, deprecated and ignored flags, get-dependencies [entryFile] and corrected defaults; every --max-workers overrides maxWorkers.
  • Documented all bundle URL query parameters and the transformer transform/getCacheKey(options) interface.

Resolution and Package Exports

  • # subpath imports are supported (the docs said they throw).
  • Corrected the Haste, directory, "browser" field and file variant resolution steps, the unstable_conditionsByPlatform field name, asset variant naming (2x), getPackage/getPackageForModule/asyncType types, resolver caching conditions, and documented missing context fields.
  • Fixed the invalid custom resolver example and outdated warning text in Package Exports, and converted absolute links to relative ones.

Other pages

  • Bundling: corrected the indexed RAM bundle header, offsets, lookup formulas and UNBUNDLE location; explained startup code and other unexplained terms.
  • Caching: HttpCache doesn't exist; documented HttpStore options, HttpGetStore error handling and AutoCleanFileStore(options).
  • Module API, Source Map Format and Local Development: corrected dynamicDepsInPackages scope, the mappings grammar and the project scaffolding command.

Also adds a doc comment to getMaxWorkers.

Changelog: [Internal]

Differential Revision: D125674123

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 19, 2026
@meta-codesync

meta-codesync Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@vzaidman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125674123.

@vzaidman
vzaidman requested a review from robhogan October 19, 2026 12:18
@meta-codesync meta-codesync Bot changed the title Docs: Fix inaccurate and outdated documentation Docs: Fix inaccurate and outdated documentation (#2077) Oct 19, 2026
meta-codesync Bot pushed a commit that referenced this pull request Oct 19, 2026
Summary:

Audits every page under `docs/` against the current source and fixes statements that are wrong or out of date, and documents current options and APIs that were missing. This change only corrects content; readability changes follow separately.

**Configuration**
- Config file lookup order: `.json` is tried before TypeScript files.
- `maxWorkers`: configured values are not capped at the core count; the default is 50-75% of cores, not "about half".
- `unstable_perfLoggerFactory`: event type is `'START_UP'` (not `'STARTUP'`), `opts` is optional and `key` is a number.
- `hasteImplModulePath` modules must also export `getCacheKey()`.
- `dynamicDepsInPackages` only applies to files in `node_modules`; dynamic requires elsewhere are always rejected.
- Fixed defaults/types of `getPolyfills` (`[]`), `processModuleFilter` (one module), `getRunModuleStatement`, `schemeResolvers` (not nullable), `enhanceMiddleware`, `getTransformOptions` (`hot: true`).
- Fixed descriptions of `assetRegistryPath`, `enableBabelRuntime` (plugin name), `rewriteRequestUrl` (order relative to middleware), `useGlobalHotkey` (has no effect), `blockList` (default hides `__tests__`), `mergeConfig` (one level deep; first argument can't be a promise), `tls`/`secureServerOptions` precedence.
- Documented missing options: the `symbolicator` section, `resolver.dependencyExtractor`, `transformer.globalPrefix`/`allowOptionalDependencies`/`publicPath`, `serializer.polyfillModuleNames`/`customSerializer`/`experimentalSerializerHook` and extra `getTransformOptions` fields. `unstable_*` options not documented before follow in the next change.

**API, CLI, Getting Started**
- `runServer` and `createConnectMiddleware` have no `port` option; `runBuild`'s `out` is optional; corrected how source maps are written and inlined.
- `runServer` calls `runMetro`, not the other way around; fixed an example using an undefined `httpServer`.
- `dev` sets `__DEV__`; production builds inline `process.env.NODE_ENV` as `'production'`.
- Documented missing options of `loadConfig`, `runMetro`, `runBuild` (including `output`), `runServer`, `createConnectMiddleware`, and the `buildGraph` and `attachMetroCli` exports.
- CLI: documented `serve` options and the `start` alias, deprecated and ignored flags, `get-dependencies [entryFile]` and corrected defaults; every `--max-workers` overrides `maxWorkers`.
- Documented all bundle URL query parameters and the transformer `transform`/`getCacheKey(options)` interface.

**Resolution and Package Exports**
- `#` subpath imports are supported (the docs said they throw).
- Corrected the Haste, directory, `"browser"` field and file variant resolution steps, the `unstable_conditionsByPlatform` field name, asset variant naming (`2x`), `getPackage`/`getPackageForModule`/`asyncType` types, resolver caching conditions, and documented missing context fields.
- Fixed the invalid custom resolver example and outdated warning text in Package Exports, and converted absolute links to relative ones.

**Other pages**
- Bundling: corrected the indexed RAM bundle header, offsets, lookup formulas and `UNBUNDLE` location; explained startup code and other unexplained terms.
- Caching: `HttpCache` doesn't exist; documented `HttpStore` options, `HttpGetStore` error handling and `AutoCleanFileStore(options)`.
- Module API, Source Map Format and Local Development: corrected `dynamicDepsInPackages` scope, the mappings grammar and the project scaffolding command.

Also adds a doc comment to `getMaxWorkers`.

Changelog: [Internal]

Differential Revision: D125674123
Summary:
Pull Request resolved: #2077

Audits every page under `docs/` against the current source and fixes statements that are wrong or out of date, and documents current options and APIs that were missing. This change only corrects content; readability changes follow separately.

**Configuration**
- Config file lookup order: `.json` is tried before TypeScript files.
- `maxWorkers`: configured values are not capped at the core count; the default is 50-75% of cores, not "about half".
- `unstable_perfLoggerFactory`: event type is `'START_UP'` (not `'STARTUP'`), `opts` is optional and `key` is a number.
- `hasteImplModulePath` modules must also export `getCacheKey()`.
- `dynamicDepsInPackages` only applies to files in `node_modules`; dynamic requires elsewhere are always rejected.
- Fixed defaults/types of `getPolyfills` (`[]`), `processModuleFilter` (one module), `getRunModuleStatement`, `schemeResolvers` (not nullable), `enhanceMiddleware`, `getTransformOptions` (`hot: true`).
- Fixed descriptions of `assetRegistryPath`, `enableBabelRuntime` (plugin name), `rewriteRequestUrl` (order relative to middleware), `useGlobalHotkey` (has no effect), `blockList` (default hides `__tests__`), `mergeConfig` (one level deep; first argument can't be a promise), `tls`/`secureServerOptions` precedence.
- Documented missing options: the `symbolicator` section, `resolver.dependencyExtractor`, `transformer.globalPrefix`/`allowOptionalDependencies`/`publicPath`, `serializer.polyfillModuleNames`/`customSerializer`/`experimentalSerializerHook` and extra `getTransformOptions` fields. `unstable_*` options not documented before follow in the next change.

**API, CLI, Getting Started**
- `runServer` and `createConnectMiddleware` have no `port` option; `runBuild`'s `out` is optional; corrected how source maps are written and inlined.
- `runServer` calls `runMetro`, not the other way around; fixed an example using an undefined `httpServer`.
- `dev` sets `__DEV__`; production builds inline `process.env.NODE_ENV` as `'production'`.
- Documented missing options of `loadConfig`, `runMetro`, `runBuild` (including `output`), `runServer`, `createConnectMiddleware`, and the `buildGraph` and `attachMetroCli` exports.
- CLI: documented `serve` options and the `start` alias, deprecated and ignored flags, `get-dependencies [entryFile]` and corrected defaults; every `--max-workers` overrides `maxWorkers`.
- Documented all bundle URL query parameters and the transformer `transform`/`getCacheKey(options)` interface.

**Resolution and Package Exports**
- `#` subpath imports are supported (the docs said they throw).
- Corrected the Haste, directory, `"browser"` field and file variant resolution steps, the `unstable_conditionsByPlatform` field name, asset variant naming (`2x`), `getPackage`/`getPackageForModule`/`asyncType` types, resolver caching conditions, and documented missing context fields.
- Fixed the invalid custom resolver example and outdated warning text in Package Exports, and converted absolute links to relative ones.

**Other pages**
- Bundling: corrected the indexed RAM bundle header, offsets, lookup formulas and `UNBUNDLE` location; explained startup code and other unexplained terms.
- Caching: `HttpCache` doesn't exist; documented `HttpStore` options, `HttpGetStore` error handling and `AutoCleanFileStore(options)`.
- Module API, Source Map Format and Local Development: corrected `dynamicDepsInPackages` scope, the mappings grammar and the project scaffolding command.

Also adds a doc comment to `getMaxWorkers`.

Changelog: [Internal]

Differential Revision: D125674123

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants