Skip to content

Conversation

youzi-forge
Copy link

@youzi-forge youzi-forge commented Oct 8, 2025

Relates to #8140.

Description

This pull request:

  • Fixes the ESLint/import-resolver ENOENT caused by @example blocks referencing non-existent files ('./beep.js', './boop.js') in @stdlib/utils/async/map-values.

  • Updates the @example blocks in:

    • lib/node_modules/@stdlib/utils/async/map-values/lib/index.js
    • lib/node_modules/@stdlib/utils/async/map-values/lib/main.js
    • lib/node_modules/@stdlib/utils/async/map-values/lib/factory.js
  • Replaces placeholders with real, existing files and adds a cross-platform path join:

    var join = require('path').join;
    var files = [
      join( __dirname, '..', 'README.md' ),
      join( __dirname, '..', 'package.json' )
    ];
  • No runtime logic, public API, build tooling, or Make/workflow changes. This is an example-only adjustment to prevent the linter/import resolver from attempting to stat missing paths.

Related Issues

This pull request:

Questions

No.

Other

Scope & Intent

  • This PR intentionally fixes the issue only for @stdlib/utils/async/map-values (the three files listed above).
  • The CI failure in Fix JavaScript lint errors #8140 is triggered by random file sampling; similar placeholder paths may exist in other utils/async/* packages.
  • Therefore this PR uses Relates to (not Resolves) until the same pattern is addressed in other packages.

Why this approach (and not tooling changes)

  • Keep the fix minimal and source-focused: do not modify Makefiles, workflows, or eslint recipes.
  • Point examples at guaranteed-to-exist files within the package (README.md, package.json) to avoid import-resolver file-system lookups failing on non-existent placeholders.

Local Verification

  • Ran locally:

    make install-node-modules && make init
    make lint-javascript-files FILES="lib/node_modules/@stdlib/utils/async/map-values/lib/{index.js,main.js,factory.js}"
    # Optional: invoke the workflow helper script on a single file
    node .github/workflows/scripts/lint_javascript_files_error_log lib/node_modules/@stdlib/utils/async/map-values/lib/factory.js
  • ✅ No ENOENT occurred and no new lint errors/warnings were introduced.

Follow-up Plan

  • If this approach is accepted, I will submit small, per-package PRs applying the same example-path fix to other utils/async/* modules that still reference non-existent example files. Optionally open a tracking issue to audit and replace placeholder paths across affected packages.

Checklist

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


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Good First PR A pull request resolving a Good First Issue. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. labels Oct 8, 2025
@stdlib-bot
Copy link
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

2 similar comments
@stdlib-bot
Copy link
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot
Copy link
Contributor

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
utils/async/map-values $\color{green}561/561$
$\color{green}+100.00\%$
$\color{green}63/63$
$\color{green}+100.00\%$
$\color{green}9/9$
$\color{green}+100.00\%$
$\color{green}561/561$
$\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

First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants