Summary
findChilds is a deprecated alias of findChildren that survives only as a published export. Remove it in 7.0.
/** @deprecated */
export function findChilds(node: Node | Document, localName: string, namespace?: string) {
return findChildren(node, localName, namespace);
}
It has no internal callers left. Its one remaining reference in src/ is the re-export in src/index.ts; everything internal already calls findChildren (16 call sites). No test references it either.
Why now
src/index.ts used to re-export it via export * from "./utils", which never named the symbol, so the deprecation/deprecation ESLint rule stayed quiet. Now that the wildcard has been replaced with an explicit list, naming it trips the rule and the export needs a suppression to build:
findChildren,
// Deprecated alias of `findChildren`, still published because `export *` did.
// eslint-disable-next-line deprecation/deprecation
findChilds,
That suppression is the only reason the name still compiles into the surface, and it should go away with the function.
Scope
- Delete
findChilds from src/utils.ts.
- Delete the entry and its
eslint-disable from the export list in src/index.ts.
- Note the removal in the changelog as a breaking change.
Migration
findChilds(node, localName, namespace) → findChildren(node, localName, namespace). The signature and behaviour are identical; the alias only ever forwarded.
Before removing
Consider whether this needs a runtime deprecation warning in a 6.x release first, so consumers see it before the name disappears. The house pattern is in src/signed-xml.ts:
import { deprecate } from "util";
const warnX = deprecate(() => {}, "`x()` is deprecated and will be removed in a future version. Use `y()` instead.", "XML_CRYPTO_X");
Today findChilds carries a bare /** @deprecated */ with no replacement named and no runtime warning, so a JavaScript consumer gets no signal at all. See the companion issue on auditing the rest of the public surface — this one is the clearest instance of the same problem.
Summary
findChildsis a deprecated alias offindChildrenthat survives only as a published export. Remove it in 7.0.It has no internal callers left. Its one remaining reference in
src/is the re-export insrc/index.ts; everything internal already callsfindChildren(16 call sites). No test references it either.Why now
src/index.tsused to re-export it viaexport * from "./utils", which never named the symbol, so thedeprecation/deprecationESLint rule stayed quiet. Now that the wildcard has been replaced with an explicit list, naming it trips the rule and the export needs a suppression to build:That suppression is the only reason the name still compiles into the surface, and it should go away with the function.
Scope
findChildsfromsrc/utils.ts.eslint-disablefrom the export list insrc/index.ts.Migration
findChilds(node, localName, namespace)→findChildren(node, localName, namespace). The signature and behaviour are identical; the alias only ever forwarded.Before removing
Consider whether this needs a runtime deprecation warning in a 6.x release first, so consumers see it before the name disappears. The house pattern is in
src/signed-xml.ts:Today
findChildscarries a bare/** @deprecated */with no replacement named and no runtime warning, so a JavaScript consumer gets no signal at all. See the companion issue on auditing the rest of the public surface — this one is the clearest instance of the same problem.