You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LC: import.meta.resolve makes a lot of sense to standardize.
import.meta.url same.
import.meta.main also good
Everything else needs to be case by case
JS: import.meta is essentially a global scope
LC: Yes, but it's easier to avoid poluting, metadata specific to the module
JS: It would be a tragedy to have runtimes introduce the same metadata properties in different ways
JS: We need to start a document to discuss these
LC: Goal is interoperable/portable code.
Node.js ... all modules running off the file system, other runtimes it works differently
Other runtimes using network imports
Different semantics based on whether it is published or not
Prefer working on portable mechanisms
The use case for __filename, __dirname is largely loading resources relative to the module, but that assumes a specific model that always works in node.js but likely not anywhere else
Should always use import.meta.resolve() to deal with those use cases
JS: Should we provide guidance and recommend namespacing
LC: Yes
JS: The guidance right now is to standardize around meta.url, meta.resolve, meta.main. And to encourage namespacing for runtime specific extensions. Encourage using the runtime-keys spec for those namespaces. We need more discussion of use cases.
LC: Encourage relative asset resolution using import.meta.resolve, express everything in URLs
GB: Sounds like the right approach.
GB: The second argument for import.meta.resolve(...). In Node.js we're aligning with the standardized sync version of resolve. The second argument takes the parent URL context
JS: We need a module loading problem statement
GB: We're working through this on TC-39
Trailers on Fetch!
LC: Define the properly: it is not currently possible for outbound fetch to send trailers, nor is it possible to get access to trailers. There used to be a .trailers property in the fetch spec but that was removed.
JS: One of the issues is when are trailers values calculated? How does that impact performance, optimizations
AB: TPAC breakout session in September, do we want a session about wintercg
The text was updated successfully, but these errors were encountered:
Attendees
Agenda
import.meta
import.meta.resolve
makes a lot of sense to standardize.import.meta.url
same.import.meta.main
also goodimport.meta
is essentially a global scopeimport.meta.resolve()
to deal with those use casesimport.meta.resolve
, express everything in URLsimport.meta.resolve(...)
. In Node.js we're aligning with the standardized sync version of resolve. The second argument takes the parent URL contextThe text was updated successfully, but these errors were encountered: