summaryrefslogtreecommitdiff
path: root/deno_typescript/system_loader.js
AgeCommit message (Collapse)Author
2020-07-20Remove deno_typescript (#6813)Ryan Dahl
2020-06-18Deno.bundle supports targets < ES2017 (#6346)Ryan Dahl
This commit provides a "system_loader_es5.js" bundle loader which will be added to the bundle when the target is < ES2017, which is the minimum target syntax required for "system_loader.js". Supports #5913 (via Deno.bundle()) with a couple caveats: * Allowing "deno bundle" to take a different target is not supported, as we specifically ignore "target" when passed in a TypeScript config file. This is because deno bundle is really intended to generate bundles that work in Deno. It is an unintentional side effect that some bundles are loadable in browsers. * While a target of "es3" will be accepted, the module loader will still only be compatible with ES5 or later. Realistically no one should be expecting bundles generated by Deno to be used on IE8 and prior, and there is just too much "baggage" to support that at this point. This is a minor variation of 75bb9d, which exposed some sort of internal V8 bug. Ref #6358 This is 100% authored by Kitson Kelly. Github might change the author when landing so I'm leaving this in: Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-06-17Revert "Deno.bundle supports targets < ES2017. (#6328)" (#6342)Bartek IwaƄczuk
This reverts commit 75bb9dbdfc7f8b4e8d17978808ae575e61843aef.
2020-06-17Deno.bundle supports targets < ES2017. (#6328)Kitson Kelly
This commit provides a "system_loader_es5.js" bundle loader which will be added to the bundle when the target is < ES2017, which is the minimum target syntax required for "system_loader.js". Supports #5913 (via Deno.bundle()) with a couple caveats: * Allowing "deno bundle" to take a different target is not supported, as we specifically ignore "target" when passed in a TypeScript config file. This is because deno bundle is really intended to generate bundles that work in Deno. It is an unintentional side effect that some bundles are loadable in browsers. * While a target of "es3" will be accepted, the module loader will still only be compatible with ES5 or later. Realistically no one should be expecting bundles generated by Deno to be used on IE8 and prior, and there is just too much "baggage" to support that at this point.
2020-05-29fix: REPL evaluates in strict mode (#5565)Kitson Kelly
Since everything that Deno loads is treated as an ES Module, it means that all code is treated as "use strict" except for when using the REPL. This PR changes that so code in the REPL is also always evaluated with "use strict". There are also a couple other places where we load code as scripts which should also use "use strict" just in case.
2020-04-01Support dynamic import in bundles. (#4561)Kitson Kelly
2020-03-28Update to Prettier 2 and use ES Private Fields (#4498)Kitson Kelly
2020-03-04Migrate internal bundles to System (#4233)Kitson Kelly
2020-02-26Bundles can be sync or async based on top level await (#4124)Kitson Kelly
Previously, bundles always utilised top level await, even if the bundled modules didn't require top level await. Now, analysis of the bundle is done and if none of the bundled modules are asynchronously executed, then the bundle as a whole will be synchronously executed. Fixes #4055 Fixes #4123
2020-02-12Improvements to bundling. (#3965)Kitson Kelly
Moves to using a minimal System loader for bundles generated by Deno. TypeScript in 3.8 will be able to output TLA for modules, and the loader is written to take advantage of that as soon as we update Deno to TS 3.8. System also allows us to support `import.meta` and provide more ESM aligned assignment of exports, as well as there is better handling of circular imports. The loader is also very terse versus to try to save overhead. Also, fixed an issue where abstract classes were not being re-exported. Fixes #2553 Fixes #3559 Fixes #3751 Fixes #3825 Refs #3301