mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Notable changes: build: * (SEMVER-MAJOR) remove the bundled FIPS provider build (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) require OpenSSL 3 or later (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) downgrade Intel macOS support to experimental (Antoine du Hamel) https://github.com/nodejs/node/pull/65427 crypto: * (SEMVER-MAJOR) move DEP0093 to End-of-Life (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) remove legacy OpenSSL code paths (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) validate digest output encodings (Filip Skokan) https://github.com/nodejs/node/pull/66247 * (SEMVER-MAJOR) validate update input encodings (Filip Skokan) https://github.com/nodejs/node/pull/66247 * (SEMVER-MAJOR) validate inputEncoding in Cipher/Decipher update (Maruthan G) https://github.com/nodejs/node/pull/66247 * (SEMVER-MAJOR) move DEP0198 to End-of-Life (Filip Skokan) https://github.com/nodejs/node/pull/64000 * (SEMVER-MAJOR) move DEP0203 and DEP0204 to End-of-Life (Filip Skokan) https://github.com/nodejs/node/pull/63188 * (SEMVER-MAJOR) reject resizable backing stores in Web Crypto buffer parameters (Filip Skokan) https://github.com/nodejs/node/pull/63925 * (SEMVER-MAJOR) throw on uninitialized DH computeSecret (Filip Skokan) https://github.com/nodejs/node/pull/63922 * (SEMVER-MAJOR) runtime-deprecate calling Hmac.digest() more than once (Madelyn) https://github.com/nodejs/node/pull/63624 crypto,https,tls: * (SEMVER-MAJOR) end OpenSSL engine support (Filip Skokan) https://github.com/nodejs/node/pull/64777 deps: * (SEMVER-MAJOR) update archs files for openssl-4.1.0 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/66971 * (SEMVER-MAJOR) upgrade openssl sources to openssl-4.1.0 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/66971 * (SEMVER-MAJOR) remove ncrypto legacy OpenSSL backend (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) update V8 to 15.6.75.13 (Joyee Cheung) https://github.com/nodejs/node/pull/66601 * (SEMVER-MAJOR) upgrade npm to 12.1.0 (npm team) https://github.com/nodejs/node/pull/66212 dgram: * (SEMVER-MAJOR) skip the custom lookup for literal IP addresses (Ruben Bridgewater) https://github.com/nodejs/node/pull/64131 dns: * (SEMVER-MAJOR) do not consult hosts file in reverse lookups (Archkon) https://github.com/nodejs/node/pull/64268 * (SEMVER-MAJOR) stop using deprecated functions in `SetServers` (Antoine du Hamel) https://github.com/nodejs/node/pull/64356 doc: * (SEMVER-MAJOR) remove OpenSSL 1.x references (Filip Skokan) https://github.com/nodejs/node/pull/64777 * (SEMVER-MAJOR) update Node.js 27 official binary toolchains (Richard Lau) https://github.com/nodejs/node/pull/66377 domain: * (SEMVER-MAJOR) runtime-deprecate the module (Matteo Collina) https://github.com/nodejs/node/pull/65074 * (SEMVER-MAJOR) port to AsyncLocalStorage (Matteo Collina) https://github.com/nodejs/node/pull/61095 fs: * (SEMVER-MAJOR) implement glob natively (Aviv Keller) https://github.com/nodejs/node/pull/65392 * (SEMVER-MAJOR) return Buffer from mkdtemp when prefix is a Buffer (Hamid Reza Ghavami) https://github.com/nodejs/node/pull/64397 http: * (SEMVER-MAJOR) reject responses exceeding header limit (Matteo Collina) https://github.com/nodejs/node/pull/65010 * (SEMVER-MAJOR) runtime deprecate instantiating without new (Yagiz Nizipli) https://github.com/nodejs/node/pull/64853 * (SEMVER-MAJOR) increase keepAliveTimeout default to 65 seconds (Tim Perry) https://github.com/nodejs/node/pull/62782 * (SEMVER-MAJOR) make req.headers have a null prototype (Matteo Collina) https://github.com/nodejs/node/pull/62900 * (SEMVER-MAJOR) reject addTrailers after finish (Ryuhei Shima) https://github.com/nodejs/node/pull/62832 http2: * (SEMVER-MAJOR) increase default window sizes (Matteo Collina) https://github.com/nodejs/node/pull/64623 lib: * (SEMVER-MAJOR) deprecate _http_* (Sebastian Beltran) https://github.com/nodejs/node/pull/58535 * (SEMVER-MAJOR) insert argv[0] at argv[1] in setDeserializeMainFunction (Daijiro Wachi) https://github.com/nodejs/node/pull/62928 * (SEMVER-MAJOR) use `Object.freeze` to avoid defensive cloning in `SourceMap` (Daijiro Wachi) https://github.com/nodejs/node/pull/62830 * (SEMVER-MAJOR) reject SharedArrayBuffer in Blob constructor per spec (Ali Hassan) https://github.com/nodejs/node/pull/63046 lib,src: * (SEMVER-MAJOR) remove `--no-experimental-websocket` CLI flag (Antoine du Hamel) https://github.com/nodejs/node/pull/65284 net: * (SEMVER-MAJOR) race family autoselection attempts (Matteo Collina) https://github.com/nodejs/node/pull/66229 * (SEMVER-MAJOR) throw on multiple listen calls (Matteo Collina) https://github.com/nodejs/node/pull/64871 * (SEMVER-MAJOR) runtime-deprecate Server.prototype._listen2 (Guilherme Araújo) https://github.com/nodejs/node/pull/64794 * (SEMVER-MAJOR) add experimental net/promises API (Ethan Arrowood) https://github.com/nodejs/node/pull/63965 repl: * (SEMVER-MAJOR) use inspector over vm (Aviv Keller) https://github.com/nodejs/node/pull/64034 src: * (SEMVER-MAJOR) officially deprecate `node::ObjectWrap` (Anna Henningsen) https://github.com/nodejs/node/pull/63756 * (SEMVER-MAJOR) merge `CreateEnvironment()` overloads (Anna Henningsen) https://github.com/nodejs/node/pull/63596 src,lib: * (SEMVER-MAJOR) add --allow-env permission (James M Snell) https://github.com/nodejs/node/pull/66132 stream: * (SEMVER-MAJOR) destroy source when map iterator closes early (Y1D7NG) https://github.com/nodejs/node/pull/64264 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) https://github.com/nodejs/node/pull/66795 tls: * (SEMVER-MAJOR) move _tls_* to end-of-life (Sebastian Beltran) https://github.com/nodejs/node/pull/60658 zlib: * (SEMVER-MAJOR) convert classes to modern syntax and eol DEP0184 (Yagiz Nizipli) https://github.com/nodejs/node/pull/64849 PR-URL: https://github.com/nodejs/node/pull/67062 Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Node.js documentation style guide
This guide provides clear and concise instructions to help you create well-organized and readable documentation for the Node.js community. It covers organization, spelling, formatting, and more to ensure consistency and professionalism across all documents.
Table of contents
- General Guidelines
- Writing Style
- Punctuation
- Document Structure
- API Documentation
- Code Blocks
- Formatting
- Product and Project Naming
General guidelines
File naming
- Markdown Files: Use
lowercase-with-dashes.md.- Use underscores only if they are part of the topic name (e.g.,
child_process). - Some files, like top-level Markdown files, may be exceptions.
- Use underscores only if they are part of the topic name (e.g.,
Text wrapping
- Wrap documents at 120 characters per line to enhance readability and version control.
Editor configuration
- Follow the formatting rules specified in
.editorconfig.- A plugin is available for some editors to enforce these rules.
Testing documentation
- Validate documentation changes using
make test-doc -jorvcbuild test-doc.
Writing style
Spelling and grammar
- Spelling: Use US spelling.
- Grammar: Use clear, concise language. Avoid unnecessary jargon.
Commas
- Serial Commas: Use serial commas for clarity.
- Example: apples, oranges, and bananas
Pronouns
- Avoid first-person pronouns (I, we).
- Exception: Use we recommend foo instead of foo is recommended.
Gender-neutral language
- Use gender-neutral pronouns and plural nouns.
- OK: they, their, them, folks, people, developers
- NOT OK: his, hers, him, her, guys, dudes
Terminology
- Use precise technical terms and avoid colloquialisms.
- Define any specialized terms or acronyms at first use.
Punctuation
Terminal punctuation
- Place inside parentheses or quotes if the content is a complete clause.
- Place outside if the content is a fragment of a clause.
Quotation marks
- Use double quotation marks for direct quotes.
- Use single quotation marks for quotes within quotes.
Colons and semicolons
- Use colons to introduce lists or explanations.
- Use semicolons to link closely related independent clauses.
Document structure
Headings
- Start documents with a level-one heading (
#). - Use subsequent headings (
##,###, etc.) to organize content hierarchically.
Links
- Prefer reference-style links (
[a link][]) over inline links ([a link](http://example.com)).
Lists
- Use bullet points for unordered lists and numbers for ordered lists.
- Keep list items parallel in structure.
Tables
- Use tables to present structured information clearly. Ensure they are readable in plain text.
API documentation
YAML comments
- Update the YAML comments associated with the API, especially when introducing or deprecating an API.
Usage examples
- Provide a usage example or a link to an example for every function.
Parameter descriptions
- Clearly describe parameters and return values, including types and defaults.
- Example:
* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.
- Example:
Code blocks
Language-aware fences
-
Use language-aware fences (e.g.,
```js) for code blocks.-
Info String: Use the appropriate info string from the following list:
Language Info String Bash bashC cCommonJS cjsCoffeeScript coffeeTerminal Session consoleC++ cppDiff diffHTTP httpJavaScript jsJSON jsonMarkdown markdownEcmaScript mjsPowershell powershellR rPlaintext textTypeScript typescript -
Use
textfor languages not listed until their grammar is added toremark-preset-lint-node.
-
Code comments
- Use comments to explain complex logic within code examples.
- Follow the standard commenting style of the respective language.
Formatting
Escaping characters
- Use backslash-escaping for underscores, asterisks, and backticks:
\_,\*,\`.
Naming conventions
- Constructors: Use PascalCase.
- Instances: Use camelCase.
- Methods: Indicate methods with parentheses:
socket.end()instead ofsocket.end.
Function arguments and returns
- Arguments:
Example:
* `name` {type|type2} Optional description. **Default:** `value`.* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`. - Returns:
Example:
* Returns: {type|type2} Optional description.* Returns: {AsyncHook} A reference to `asyncHook`.
Product and project naming
Official styling
- Use official capitalization for products and projects.
- OK: JavaScript, Google's V8
- NOT OK: Javascript, Google's v8
Node.js references
- Use Node.js instead of Node, NodeJS, or similar variants.
- For the executable,
nodeis acceptable.
- For the executable,
Version references
- Use Node.js and the version number in prose. Do not prefix the version number with v.
- OK: Node.js 14.x, Node.js 14.3.1
- NOT OK: Node.js v14
For topics not addressed here, please consult the Microsoft Writing Style Guide.