chore: convert to ESM - #315
Open
damusix wants to merge 1 commit into
Open
Conversation
Adopts the toolchain the other conversions use: src/ layout, conditional exports, vitest + @hapi/oxc-plugin, Node 22 baseline. @hapi/hoek moves to ^12.0.0-rc.0 and @hapi/bourne to ^4.0.1; @hapi/boom stays at ^10.0.1 until its own conversion lands. src/index.d.ts changes export = to export default -- the former is a TS1203 error under NodeNext in a type: module package, and the runtime has always default-exported. The entry keeps its default export so consumers are unaffected. API.md is added to files and its examples converted from require(), which would throw ERR_REQUIRE_ESM against the published package. One added test covers a payload.js branch that Node 22's raised default stream highWaterMark left unreachable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the package onto the toolchain the recent conversions established:
src/layout, conditional exports, vitest +@hapi/oxc-plugin, Node 22baseline.
@hapi/hoekis pinned to^12.0.0-rc.0to match #74 in topo and hapijs/boom#309 inboom;
@hapi/bournemoves to^4.0.1.@hapi/boomstays at^10.0.1until its own conversion lands.
src/index.d.tschangesexport =toexport default— the former is aTS1203error under NodeNext in atype: modulepackage, and the runtimehas always default-exported.
API.mdis added tofilesand its examples converted fromrequire(),which would throw
ERR_REQUIRE_ESMagainst the published package.One added test covers a
payload.jsbranch that Node 22's raised defaultstream
highWaterMarkleft unreachable.