Skip to content

chore: use format for error messages in datasets/* build scripts#12157

Draft
Planeshifter wants to merge 1 commit into
developfrom
claude/wonderful-planck-Sjx1o
Draft

chore: use format for error messages in datasets/* build scripts#12157
Planeshifter wants to merge 1 commit into
developfrom
claude/wonderful-planck-Sjx1o

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-05-15 and 2026-05-16 to sibling packages.

format for error-message construction (stdlib/no-error-string-concat)

Commit 0205e0ada ("chore: fix JavaScript lint errors", #12138) replaced string concatenation in a throw new Error message with @stdlib/string/format to resolve the stdlib/no-error-string-concat ESLint rule. Seven sibling dataset build scripts carry the identical violation. This pull request applies the same conversion at each site: it imports @stdlib/string/format and rewrites the error messages with %d/%s placeholders.

Source: 0205e0ada

Target packages:

  • datasets/cdc-nchs-us-births-1969-1988
  • datasets/cdc-nchs-us-births-1994-2003
  • datasets/fivethirtyeight-ffq
  • datasets/frb-sf-wage-rigidity
  • datasets/berndt-cps-wages-1985
  • datasets/emoji-code-picto
  • datasets/moby-dick (four occurrences)

Related Issues

This pull request does not have any related issues.

Questions

No.

Other

Validation

Search scope: all scripts/*.js build scripts under lib/node_modules/@stdlib/datasets/*, scanned for throw new Error messages constructed via string concatenation.

  • Two independent reviews confirmed each site presents a genuine stdlib/no-error-string-concat violation and that placeholder types are correct (%d for integer array lengths and loop indices, %s for string values).
  • An adaptation pass produced per-site rewrites for the five scripts whose message text differs from the source; the two cdc-nchs-us-births-* scripts are byte-identical to the source's pre-fix line and take the fix verbatim.
  • A style pass confirmed require placement and format call formatting match each package and the source commit.
  • datasets/cdc-nchs-us-infant-mortality-bw-1915-2013 already imports @stdlib/string/format and was excluded.

No sites required cross-package changes, new tests, or interpretation, and none were flagged for human review.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance.

This pull request was prepared by Claude Code running an automated routine that propagates recently merged fixes to sibling packages. The routine identified the source commit, located the affected sibling scripts, validated each site with independent review passes, and applied the patches.


@stdlib-js/reviewers


Generated by Claude Code

Propagates the fix from 0205e0a ("chore: fix JavaScript lint
errors") to sibling dataset build scripts that construct error
messages via string concatenation. Replaces concatenation with
`@stdlib/string/format` to satisfy the `stdlib/no-error-string-concat`
ESLint rule.
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
datasets/berndt-cps-wages-1985 $\color{green}147/147$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}147/147$
$\color{green}+100.00%$
datasets/cdc-nchs-us-births-1969-1988 $\color{green}146/146$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}146/146$
$\color{green}+100.00%$
datasets/cdc-nchs-us-births-1994-2003 $\color{green}146/146$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}146/146$
$\color{green}+100.00%$
datasets/emoji-code-picto $\color{green}146/146$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}146/146$
$\color{green}+100.00%$
datasets/fivethirtyeight-ffq $\color{green}146/146$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}146/146$
$\color{green}+100.00%$
datasets/frb-sf-wage-rigidity $\color{green}147/147$
$\color{green}+100.00%$
$\color{green}7/7$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}147/147$
$\color{green}+100.00%$
datasets/moby-dick $\color{green}327/327$
$\color{green}+100.00%$
$\color{green}10/10$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}327/327$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants