Skip to content

tools: strange workaround in doctools #20685

Description

@vsemozhetbyt
  1. tools/doc/package.json requires "js-yaml": "^3.5.2":

"js-yaml": "^3.5.2"

  1. tools/doc/node_modules/js-yaml contains only dummy index.js with reexport of js-yaml from ESLint dependency (so the version from the above-mentioned requirement cannot be checked anyway?):

const realJSYaml = path.resolve(
__dirname, '..', '..', '..', // tools/
'node_modules',
'eslint',
'node_modules',
'js-yaml'
);

Why not delete js-yaml from tools/doc/package.json, then delete tools/doc/node_modules/js-yaml and then require js-yaml straight from the ESLint dependency? It is only required here:

const yaml = require('js-yaml');

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.questionIssues asking questions about Node.js.toolsIssues and PRs related to the tools directory.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions