Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json modules #85

Open
MylesBorins opened this issue Jan 6, 2021 · 4 comments
Open

json modules #85

MylesBorins opened this issue Jan 6, 2021 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MylesBorins
Copy link
Member

There is a proposal -> https://github.com/tc39/proposal-json-modules
It build on top of import assertions -> https://github.com/tc39/proposal-import-assertions

V8 does not yet support import assertions though AFAIK... but I also think that an embedder can choose if they need to require the import assertion or not, need to review the spec.

@MylesBorins MylesBorins added enhancement New feature or request help wanted Extra attention is needed labels Jan 6, 2021
@bartlomieju
Copy link

V8 8.9 does support import assertions and should be available in the next release of rusty_v8 (denoland/rusty_v8#567)

@MylesBorins
Copy link
Member Author

OH WOW! That is absolutely incredible, I had no idea V8 moved so quickly on it.

Is it behind a flag? Is the deno team working on implementing standard JSON modules?

@bartlomieju
Copy link

bartlomieju commented Jan 6, 2021

Is it behind a flag?

I don't think so, users configure supported assertions using a field on CreateParams. Import assertions are later available on ModuleRequest in module resolve callback.

Is the deno team working on implementing standard JSON modules?

Yep! Once we upgrade rusty_v8 we will look into implementing that and WASM modules (we were waiting on v8 to implement import assertions for this purpose 😅 )

@MylesBorins
Copy link
Member Author

/cc @littledan about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants