docs: Update Client Requirements template for 3.0 release - #27802
docs: Update Client Requirements template for 3.0 release#27802Joshua Smithrud (Josmithr) wants to merge 12 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (35 lines, 1 files), I've queued these reviewers:
How this works
|
Jason Hartman (jason-ha)
left a comment
There was a problem hiding this comment.
I wonder if we should call out Jest+require-ESM issue in here.
NodeJS supports require-ESM fully as of 22.12.
Jest want's NodeJS 24.9 or later.
| Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here. | ||
|
|
||
| - Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648)) | ||
| CommonJs is no longer officially supported as of version 3.0. |
There was a problem hiding this comment.
We might want to explicitly support require(ESM) (see https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require ) and ensure our ESM modules are compatible with that (in our case that mainly means avoiding top level await, which we currently do not use).
| CommonJs is no longer officially supported as of version 3.0. | |
| We no longer publish CommonJs modules as of 3.0, however we do support loading our ES Modules from CommonJs using [require(ESM)](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) which is supported in NodeJS `>=22.12.0`. |
There was a problem hiding this comment.
Note that the change you made is stricter, which means we could do what you said for now, and then if customers need require(ESM) we could add support for it (as I suggested).
My suggestion would ban top level await in our code, where yours would not.
Thus maybe we want to do with your phrasing for now as that reserves our ability to do top level await, which is useful (like async loading wasm modules)
There was a problem hiding this comment.
Either way, eventually we want to allow us to use top level await, so if we support require(ESM) in 3.0, we likely want to drop it in 4.0.
There was a problem hiding this comment.
Note that the change you made is stricter, which means we could do what you said for now, and then if customers need require(ESM) we could add support for it (as I suggested).
This was my thinking. I generally erred on the side of under-promising with the expectation that we may end up wanting or needing to actually deliver more.
I'd be fine applying your suggested changes if folks would prefer, but my inclination would be to err on the side of being stricter and coming back to this as needed.
There was a problem hiding this comment.
We can say not officially supported and then go on to note that conditionally (experimentally?) require-ESM may be used to use FF from CJS. We'll want to add a note about using tsconfig options required. I think those might be:
"compilerOptions": {
"module": "Node20", // or NodeNext
"customConditions": ["module-sync"]
}but I need to recheck. I will reply when I confirm.
| Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here. | ||
|
|
||
| - Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648)) | ||
| CommonJs is no longer officially supported as of version 3.0. |
There was a problem hiding this comment.
We can say not officially supported and then go on to note that conditionally (experimentally?) require-ESM may be used to use FF from CJS. We'll want to add a note about using tsconfig options required. I think those might be:
"compilerOptions": {
"module": "Node20", // or NodeNext
"customConditions": ["module-sync"]
}but I need to recheck. I will reply when I confirm.
Bundle size comparisonBase commit: Pending — |
There was a problem hiding this comment.
Pull request overview
Updates the shared “Client Requirements” Markdown template used by markdown-magic to reflect the intended runtime/tooling support policy for the upcoming 3.0 major version, so downstream package READMEs inherit the updated requirements text.
Changes:
- Refreshes supported runtimes to Node.js 22/24 and modern browsers targeting ES2022.
- Updates supported tooling guidance to TypeScript 6.0 and adds an explicit ES2022+ build-target requirement.
- Tightens module format guidance by making ES Modules required and marking CommonJs as unsupported starting in 3.0.
Suppressed comments (2)
tools/markdown-magic/src/templates/Client-Requirements-Template.md:23
- The TypeScript release-notes links point to
typescriptdocs.com, which appears to be a third-party mirror and is inconsistent with other repo docs that link totypescriptlang.org(e.g. common/build/build-common/README.md:40). Using the official release-notes URL reduces link-rot risk.
- [TypeScript 6.0](https://typescriptdocs.com/release-notes/TypeScript%206.0):
- All [`strict`](https://www.typescriptlang.org/tsconfig) options are supported.
- Build targets (`lib`, `target`) must specify `ES2022` or later.
- [`strictNullChecks`](https://www.typescriptlang.org/tsconfig) is required.
- [Configuration options deprecated in 6.0](https://typescriptdocs.com/release-notes/TypeScript%206.0#breaking-changes-and-deprecations-in-typescript-6-0) are not supported.
tools/markdown-magic/src/templates/Client-Requirements-Template.md:39
- This sentence uses "NodeJs" while earlier bullets use "Node.js". Using one spelling consistently avoids confusion in a template that is embedded across many READMEs.
ES Modules are the required way to consume our client packages (including in NodeJs).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| These requirements err on the side of being too strict since within a major version they can be relaxed over time, but not made stricter. | ||
| For Long Term Support (LTS) versions this can require supporting these platforms for several years. | ||
| The following are the platform requirements for using Fluid Framework client libraries. | ||
| These requirements err on the side of being conservative, policies may be relaxed within a major version series, but not made stricter. |
| - Support for version 22 will be dropped [when it loses upstream support on 2027-04-30](https://github.com/nodejs/release#release-schedule). | ||
| - Running Fluid in a Node.js environment with the `--no-experimental-fetch` flag is not supported. | ||
| - Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards). | ||
| - Modern browsers supporting the es2022 standard library. |
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See Checking for Broken Links for more information. linkcheck output |
Bundle size comparisonBase commit: unresolved The PR's CI build failed — fix the build and the comment will update once the next run succeeds. |
Updates the Client Requirements template with updates for 3.0. This content is embedded in the majority of our library package READMEs.
Note
This won't be merged until we are ready to begin checking in breaking changes for 3.0.
AB#78964