Skip to content

javascript.operators.import_meta - Missing import.meta.dirname / import.meta.filename support for node #26066

@0xdevalias

Description

@0xdevalias

What type of issue is this?

Missing compatibility data

What information was incorrect, unhelpful, or incomplete?

There are no entries for import.meta.filename / import.meta.dirname support in node (and I think also bun and similar possibly?)

What browsers does this problem apply to, if applicable?

Node.js

What did you expect to see?

I expected to be able to see what version of node started supporting import.meta.filename / import.meta.dirname

Did you test this? If so, how?

I looked at the data:

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

We can see more about when import.meta was introduced here:

We can confirm that in the node docs, seeing that only import.meta.url / import.meta.resolve are available in node 19.x:

But from node 20.x+, import.meta.dirname / import.meta.filename are also available:

Originally posted by @0xdevalias in jehna/humanify#343 (comment)

See also:

Originally posted by @0xdevalias in compat-table/node-compat-table#92

Do you have anything more you want to share?

No response

MDN URL

No response

MDN metadata

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:jsCompat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions