docs: propagate recent develop fixes to sibling packages (2026-06-29)#13198
Open
Planeshifter wants to merge 4 commits into
Open
docs: propagate recent develop fixes to sibling packages (2026-06-29)#13198Planeshifter wants to merge 4 commits into
Planeshifter wants to merge 4 commits into
Conversation
Propagates fix from 285b781 ("chore: fix JavaScript lint errors") to sibling `fs/*` packages whose JSDoc `@example` blocks rethrow the error parameter from the callback or sync return path. Re-throwing inside an example breaks the snippet when copied to a script; logging the error message keeps the example illustrative without crashing.
…main.js` Propagates fix from f29ec0b ("docs: add source section header") to the sibling identity packages under `number/{float32,int8,int16,int32,uint8, uint16}/base/identity`, which lacked the `// MAIN //` section comment between `'use strict';` and the first JSDoc block. Aligns each sibling with the canonical layout already present in `number/float64/base/identity`.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
The propagation in ffd5803 touched the JSDoc `@example` block at the top of this file, which triggers lint of the full file. The file has a pre-existing `stdlib/no-new-array` violation at line 96 (`new Array( len )`) unrelated to this propagation. Reverting this site to keep the run unblocked; the underlying `new Array` issue is left for a separate cleanup.
CI lint of the full file flagged a pre-existing stale eslint-disable directive at line 95 (uses bare `handle-callback-err` instead of the plugin-prefixed `n/handle-callback-err` that the current config requires). The sibling `resolve-parent-path-by/lib/async.js` already uses the prefixed form; this file was missed during the rule migration. Reverting this propagation site to keep the run unblocked; the stale directive is left for a separate cleanup.
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.
Description
Propagating fixes merged to
developbetween285b78193(2026-06-28 15:08 -0700) and7cdcb0a4d(2026-06-29 02:09 -0700) to sibling packages with the same underlying defect.Pattern: replace
throwwithconsole.errorinfs/*JSDoc@exampleblocksSource commit
285b78193rewrote two@exampleblocks infs/unlink/lib/{index,sync}.jsso that the callback-styleif ( error ) { throw error; }and sync-styleif ( err instanceof Error ) { throw err; }guards log viaconsole.error( <ident>.message )instead of rethrowing — copy-pasted snippets no longer crash the file. The identical pattern was present across the rest offs/*. The source commit's intent was incomplete:fs/unlink/lib/main.jsitself still carried the unfixed callback example. This patch applies the source commit's exact line shape to every confirmed sibling, preserving each call site's variable name (errvserror) and indentation.285b78193(chore: fix JavaScript lint errors)@stdlib/fs/append-file@stdlib/fs/close@stdlib/fs/open@stdlib/fs/read-file@stdlib/fs/read-file-list@stdlib/fs/read-json@stdlib/fs/read-ndjson@stdlib/fs/read-wasm@stdlib/fs/rename@stdlib/fs/resolve-parent-path@stdlib/fs/resolve-parent-path-by@stdlib/fs/resolve-parent-paths@stdlib/fs/unlink(thelib/main.jscallback example that the source commit didn't reach)@stdlib/fs/write-filePattern: add
// MAIN //section header tonumber/*/base/identity/lib/main.jsSource commit
f29ec0b8einserted the// MAIN //section comment between'use strict';and the first JSDoc innumber/uint32/base/identity/lib/main.js. The six sibling integer/float-32 identity packages had the same omission;float64's identity already carries the header and was used as the structural reference. None of the targets import anything, so only// MAIN //is needed — no// MODULES //block.f29ec0b8e(docs: add source section header)@stdlib/number/float32/base/identity@stdlib/number/int8/base/identity@stdlib/number/int16/base/identity@stdlib/number/int32/base/identity@stdlib/number/uint8/base/identity@stdlib/number/uint16/base/identityRelated Issues
None.
Questions
No.
Other
Validation
fs/*/lib/*.jsfor the JSDoc throw replacement;number/*/base/identity/lib/main.jsfor the section header) and confined there — both patterns are intrinsically namespace-local.fs/*sites and 6 of 6 identity-header sites.( x )spacing convention, indentation prefix, and section-header capitalization match the canonical form set by the source commits.Deliberately excluded:
validate.jsexample blocks infs/resolve-parent-path,fs/resolve-parent-path-by, andfs/resolve-parent-paths: thethrow err;line in those files uses a 3-space indent that diverges from the source commit's 5-space indent. One validator flagged the mismatch asneeds-human; per the two-validator-must-agree rule, the sites drop. Logged for a follow-up routine pass.chore: fix JavaScript lint errors(7cdcb0a4d) — single-siteObject.keys→@stdlib/utils/keysswap in_tools/makie/makie/lib/main.js. A full sweep of_tools/**/lib/**/*.jsand_tools/**/bin/**/*.jsreturned zero additional sites.docs: add examples(ce4edb122) — included a shadow-name bug fix (function BigInt→function isBigIntinassert/is-bigint/lib/object.js). A sweep of everyassert/is-*/lib/{object,primitive,generic}.jsfile (72 files across 32 packages) returned zero additional sites with a function name shadowing a global JS type.e9f75542,82e402213,26d85f803,591dea2e): generator-owned files; the fix belongs in the generator.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code on behalf of @Planeshifter as an automated propagation of fixes merged to
developover the prior 24 hours. Candidate source commits were filtered for generalisable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents (two opus validation passes plus a sonnet style-consistency pass) before commits were applied in the primary worktree. A human will audit and promote the PR out of draft.@stdlib-js/reviewers
Generated by Claude Code