Skip to content

Concerns about DOC_TYPES_MAPPING_GLOBALS #319

Open
@avivkeller

Description

@avivkeller

I see a few issues with DOC_TYPES_MAPPING_GLOBALS:

  1. As https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects grows over time, our DOC_TYPES_MAPPING_GLOBALS variable will be out-of-date. We should probably do one of:
    • (a) fetch the globals at runtime, or
    • (b) have a update:globals script that's run once a month to check the globals for updates, whose source of truth is:
      • (i) MDN
      • (ii) The globals.md file of Node.js's head branch1
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects is, as far as I can tell, incomplete. It doesn't include things that are a part of Web APIs, like fetch, Crypto, and localStorage. It's also, expectedly, missing Node.js-specific globals like Buffer, __dirname, exports, etc. (See 1.b.ii)

Footnotes

  1. When generating docs for older versions, this won't conflict, since they simply won't have the headers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions