import.meta extends, importer and main module meta datas

Can it be useful to add importer informations on import.meta for better logs (and errors) ? For instance, a multiple times imported module can log contextualized messages (eg.: in version checker to indicate which module require a specific version ).

import.meta.importer = {
    url: 'importer/url',
}

Maybe it can be recursive to get imports chain in some usage

import.meta.importer = {
   url: '...',
   importer: { ... }
}

It can also be useful to provide a key that refers to the main module (at the top of the imports chain). It allow for instance to execute specific code if current module is the main entry point (eg.: Deno use import.meta.main boolean to execute specific code if the module is not an import)

import.meta.mainModule = {
   url: '..',
   importer: null //maybe undefined or refers to itself
}

And perhaps add a shorthand for main module test

import.meta.isMain: boolean
//or
import.meta.main: boolean

A module might be imported zero, or a thousand, times. There is no guarantee that any consumer/importer will cause code to be evaluated - since it could have already been evaluated by a previous import.

Separately, there's a reason that node opted not to provide a way to distinguish between whether an ESM module is the "main entry point" or not - it has proven to be a bug farm in CJS to provide this facility, and the best practice is overwhelmingly to make a separate module for library vs application usage.

Either way, import.meta is almost entirely host-defined, and the language spec has no say over its content.