03:55 | <jschoi> | Probably not, but just in case… Is there a way for ecmarkup to become aware of definitions from Ecma262 pull requests? I want a proposal spec to refer to the Decorator productions from #2417—and I want to prevent the grammar-shape errors resulting from the spec referring to those productions. |
04:15 | <bakkot> | jschoi: check out the pr, run ecmarkup --verbose --write-biblio whatever.json spec.html > /dev/null ; this will produce a whatever.json biblio file. in your proposal, do ecmarkup --load-biblio ./whatever.json your-proposal.html . |
04:16 | <bakkot> | that said I am halfway through making a breaking change to the biblio format so you might want to wait a couple days |
04:16 | <bakkot> | (the ./ is import because otherwise ecmarkup will attempt to load a node module named whatever.json which is not the thing you want) |
04:17 | <bakkot> | this requires a recent (v10/v11) version of ecmarkup, I should mention |
04:17 | <bakkot> | uh, but that might not actually fix your problem |
04:18 | <bakkot> | because some of the checks are from grammarkdown, which doesn't really know about the biblio |
04:20 | <jschoi> | Thank you very much! I think the PR’s biblio file will be sufficient. Looking forward to the biblio-format upgrade. |
04:20 | <bakkot> | it is just a small tweak to make it better for other tooling: https://github.com/tc39/ecmarkup/pull/425 |
04:21 | <jschoi> | This will be a v12? |
04:21 | <bakkot> | https://github.com/tc39/ecmarkup/releases/tag/v12.0.0 |
04:21 | <bakkot> | but there's a bug to do with https://github.com/tc39/ecmarkup/pull/426 that I gotta fix before this is actually usable |
04:21 | <bakkot> | so stick with 11 for now |
14:20 | <ryzokuken> | https://twitter.com/DasSurma/status/1509835337295609865 |
14:25 | <Ashley Claymore> | The different between imports and destructuring seems to come up more |
14:25 | <nicolo-ribaudo> | That's not imports and destructuring, but imports vs exports! |
14:28 | <Ashley Claymore> | yes, I mean how default is treated different here:
compared to here:
|
14:28 | <guybedford> | This was also discussed via https://github.com/tc39/notes/blob/main/meetings/2016-11/nov-29.md#12iid-proposal-to-reform-the-spec-to-include-default-export-in-export--from-module around creating an aliasing pattern (since redirects have instancing issues) |
14:28 | <Ashley Claymore> | I find more people get confused about that, vs using export * |
14:29 | <guybedford> | it could be worth considering an export ** in future, bradleymeck previously suggested that alternative |
14:30 | <Ashley Claymore> | the default export can always be chosen explicitly right; just requires a second import |
14:30 | <nicolo-ribaudo> | Yes |
14:30 | <Ashley Claymore> | Or am I missing something? |
14:42 | <jschoi> | There’s no formal specification yet for function decorators, right? Are there plans to allow arrow functions to be decorated? |
14:44 | <nicolo-ribaudo> | I don't think there is even a proposal yet, it's mostly a desire |
14:44 | <nicolo-ribaudo> | (btw, we created a decorators room if you are interested) |
15:35 | <ljharb> | There’s a proposal for export default from, so you could do export default, * from ‘f’ - still stage 1 |
15:46 | <Rob Palmer> | I'm assuming you need to know if the target has a default, else that will early error. |
16:38 | <ljharb> | ah true, that's a good point |
16:38 | <ljharb> | altho tbf i'd hope you do always know what you're re-exporting :-) |
17:03 | <Rob Palmer> | I tripped up on this when trying to create a monorepo build tool using ES modules as redirects for inter-package links. It was annoying that those link modules could not be stable, and instead needed to be regenerated based on the target's content. |
17:05 | <bakkot> | yeah, I generally feel like export * is only useful for glue code, and the glue code should not need to be updated when the thing it's re-exporting is updated; that's the whole point of it |
17:33 | <Ashley Claymore> |
|
17:33 | <rbuckton (OOF thru Apr. 1st)> | export { default } from "./mod.js"; ? |
17:35 | <Ashley Claymore> | that throws if mod doesn't have a default export. Going for agnostic glue code with a cryptic error when you use it wrong |
17:43 | <Ashley Claymore> |
|
17:46 | <Ashley Claymore> | And this is also enough April 1st things from me |
18:09 | <Mathieu Hofman> | Problem with using any expression is that you'd not be able to have default be re-exported live binding |
19:14 | <ljharb> | Defaults don’t have live bindings anyways, i thought |
19:16 | <nicolo-ribaudo> | They do, if you use { x as default } both to import and to export |
19:17 | <Mathieu Hofman> | Yeah that one is a pesky little corner case |
19:18 | <nicolo-ribaudo> | Also I think `export default function a() {}` is live? |
19:47 | <Mathieu Hofman> | and export default class A {} |
19:48 | <Mathieu Hofman> | but arguably most people don't re-assign these ;) |
23:52 | <jschoi> | I saw that you released 12.0.1; thanks for your hard work. That is: I tried upgrading ecmarkup to 12.0.1, running The biblio file is definitely doing something; without it I also get a bunch of extra “can't find clause, production, note or example with id” warnings. |