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

Import Assertions/JSON Modules #7623

Closed
kitsonk opened this issue Sep 22, 2020 · 19 comments · Fixed by #12866
Closed

Import Assertions/JSON Modules #7623

kitsonk opened this issue Sep 22, 2020 · 19 comments · Fixed by #12866
Assignees
Labels
cli related to cli/ dir feat new feature (which has been agreed to/accepted)
Milestone

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Sep 22, 2020

Import Assertions has just been moved to Stage 3. JSON Modules is still at Stage 2 (and JSON Modules depends on Module Assertions).

I haven't found a tracking issue for v8.

TypeScript issue: microsoft/TypeScript#40694

cc/ @kdy1

@kitsonk kitsonk added feat new feature (which has been agreed to/accepted) cli related to cli/ dir labels Sep 22, 2020
@kdy1
Copy link

kdy1 commented Sep 22, 2020

I'll implement it soon.

@kitsonk kitsonk changed the title Module Assertions/JSON Modules Import Assertions/JSON Modules Sep 23, 2020
@kitsonk
Copy link
Contributor Author

kitsonk commented Sep 23, 2020

@kdy1 the TypeScript PR is open now for inspiration: microsoft/TypeScript#40698

kdy1 added a commit to kdy1/swc that referenced this issue Sep 23, 2020
@kdy1
Copy link

kdy1 commented Sep 23, 2020

I have a question. Will deno support json modules when it is in stage 2?

@kitsonk
Copy link
Contributor Author

kitsonk commented Sep 23, 2020

Personal opinion, it would be triggered by v8 supporting it, that might come in advance of Stage 3, but import assertions are a pre-req for support. Basically there are some runtime semantics that need to be resolved (if I am reading the slides properly).

I know there is a lot of desire from the community to have it, so we would want to go as fast as reasonably possible.

@kdy1
Copy link

kdy1 commented Sep 23, 2020

Got it, thanks for the clarification.

@kdy1
Copy link

kdy1 commented Sep 23, 2020

I added support for it within the parser.

@bartlomieju
Copy link
Member

Intent to Prototype and Ship: Import Assertions from Chromium

Tracking issue in V8 - Implement Import Assertions

@bartlomieju bartlomieju mentioned this issue Oct 10, 2020
22 tasks
@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 30, 2020

Updates:

@kitsonk
Copy link
Contributor Author

kitsonk commented Jan 27, 2021

JSON Modules has gone Stage 3 with TC39. Hopefully that will flush out TypeScript.

@kitsonk kitsonk mentioned this issue Jan 27, 2021
22 tasks
@probins
Copy link

probins commented Mar 8, 2021

Blink intent to ship both import assertions and JSON modules. I assume this is aimed at Chromium 91/v8 9.1

@lin7sh
Copy link

lin7sh commented Apr 30, 2021

Chrome just updated their chromestatus page, JSON module and import assertions are enabled by default on Chrome 91

@bartlomieju
Copy link
Member

I will try to get import assertions into 1.13

@bartlomieju bartlomieju added this to the 1.13.0 milestone Jul 13, 2021
@kitsonk
Copy link
Contributor Author

kitsonk commented Jul 13, 2021

@bartlomieju TypeScript is still working on it. The PR seems to be finally edging closer to reality to be merged.

@bartlomieju
Copy link
Member

bartlomieju commented Jul 13, 2021

Thanks for the heads up, I'll look into deno_core implementation anyway and we can wait on TS support before merging

@bartlomieju
Copy link
Member

Unfortunately bumping to Q4 because of missing TypeScript support.

@bartlomieju bartlomieju removed this from the 1.13.0 milestone Jul 15, 2021
@nnmrts
Copy link
Contributor

nnmrts commented Sep 30, 2021

Looks like TypeScript supports it now. 🚀

@kitsonk
Copy link
Contributor Author

kitsonk commented Oct 1, 2021

It supports it in a yet to be released version of TypeScript. The timelines coincide for the Deno 2.0 release, therefore that is why it is part of the release plan and tagged for Deno 2.0.

@nnmrts
Copy link
Contributor

nnmrts commented Oct 2, 2021

@kitsonk I know that, I really just wanted to point it out since no one here did yet. Sorry if it seemed like something else. 😕

@bartlomieju
Copy link
Member

TypeScript 4.5 is scheduled for release on November 16th, and Deno 1.16 is scheduled for November 9th. I think we will land this feature in Deno 1.17 on December 14th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir feat new feature (which has been agreed to/accepted)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants