Repository navigation
docs: remove inapplicable callback @throws tags from _tools/pkgs/{browser-deps,browser-entry-points,deps} sync APIs - #16471
Draft
Planeshifter wants to merge 5 commits into
Draft
Planeshifter wants to merge 5 commits into
Planeshifter wants to merge 5 commits into
Conversation
…ser-deps`
The synchronous API accepts `( pkgs[, options] )` and never validates a callback. Removed the `@throws {TypeError} callback argument must be a function` JSDoc tag copied from `lib/async.js` (absent from 80% of sibling `lib/sync.js` files, 16/20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx
…ser-entry-points`
The synchronous API accepts `( pkgs[, options] )` and never validates a callback. Removed the `@throws {TypeError} callback argument must be a function` JSDoc tag copied from `lib/async.js` (absent from 80% of sibling `lib/sync.js` files, 16/20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx
The synchronous API accepts `( pkgs[, options] )` and never validates a callback. Removed the `@throws {TypeError} callback argument must be a function` JSDoc tag copied from `lib/async.js` (absent from 80% of sibling `lib/sync.js` files, 16/20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx
…y-points`
The synchronous API accepts `( pkgs[, options] )` and never validates a callback. Removed the `@throws {TypeError} callback argument must be a function` JSDoc tag copied from `lib/async.js` (absent from 80% of sibling `lib/sync.js` files, 16/20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx
…kgs/entry-points`" This reverts the `entry-points` change. Touching `entry-points/lib/sync.js` surfaces a pre-existing `stdlib/jsdoc-doctest` failure in its `@example` block, which is addressed separately in #11672. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx
@throws tags from _tools/pkgs/{browser-deps,browser-entry-points,deps,entry-points} sync APIs@throws tags from _tools/pkgs/{browser-deps,browser-entry-points,deps} sync APIs
This branch has not been deployed
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
This pull request:
@throws {TypeError} callback argument must be a functionJSDoc tag from threelib/sync.jsfiles in_tools/pkgs. The synchronous APIs never accept or validate a callback; the tag was copied from the siblinglib/async.js.Namespace summary.
_tools/pkgshas 25 members, none autogenerated. The analysis covered the file tree,package.jsonkey sets and values, README section lists and order,test//examples/naming, public signatures, return kinds, validation prologues, error construction, JSDoc shape, andrequire()dependencies. Features with a clear majority (≥75%) were the file tree core, allpackage.jsonkeys (100%), the README section list, error construction viaformat(100%),@examplepresence (100%), validation viaisPlainObjectinlib/validate.js(100%), and thelib/sync.js@throwsset. Features without a clear majority were left out:binnaming,## Notesplacement (64%), public signature shape, return kind (value vs. callback), and the@throwssets inlib/async.js/lib/main.js._tools/pkgs/browser-depspkgDeps.sync( pkgs[, options] )documented a callbackTypeErrorthat it never throws. Removed the tag fromlib/sync.js. 16 of 20 siblinglib/sync.jsfiles (80%) carry no callback@throwstag._tools/pkgs/browser-entry-pointsentryPoints.sync( pkgs[, options] )documented a callbackTypeErrorthat it never throws. Removed the tag fromlib/sync.js(80% conformance among siblinglib/sync.jsfiles)._tools/pkgs/depspkgDeps.sync( pkgs[, options] )documented a callbackTypeErrorthat it never throws. Removed the tag fromlib/sync.js(80% conformance among siblinglib/sync.jsfiles).Related Issues
None.
Reference Packages
This pull request followed these packages:
_tools/pkgs/names,_tools/pkgs/namespaces,_tools/pkgs/standalones(and the otherlib/sync.jssiblings in_tools/pkgs).@throwstag set on the synchronous entry point, which documents only the argument and option errors.Questions
No.
Other
Validation. Features were extracted structurally (filesystem and strings) and semantically (one extraction agent per package). Each candidate then went through three-agent drift validation: semantic review, cross-reference of tests, examples, and docs, and structural review. No test, example, README, or
docs/usage.txtrefers to a sync-API callback error. The@throwstag stays in eachlib/async.js, where it is correct._tools/pkgs/entry-points. It has the same stray tag. The change was reverted from this PR because touchinglib/sync.jsmakes CI lint the file, and that surfaces a pre-existingstdlib/jsdoc-doctestfailure in its@example, which #11672 addresses. The tag can be removed once #11672 lands.Deliberately excluded.
lib/sync.jsindep-list,namespace-deps,name2bucket,name2standalone: these are sync-only or pure APIs.lib/validate.jsinname2bucket/name2standalone: they take no options object.test/ininstalled: it needs new tests written for that package.### Notesindep-list/namespace-deps: it needs content specific to each package.Observations not addressed here (need human review).
deps/lib/sync.jsdeclares@returns {ObjectArray}but can return anError.name2bucket/lib/main.jschecksisPositiveInteger( buckets )twice.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code. It was produced by an automated drift-detection routine that compares packages within a namespace.
🤖 Generated with Claude Code
https://claude.ai/code/session_017wWD77JrT2EefRqpDUb1Cx