CodeSnaporaz
CodeSnaporaz
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
One should launch in a few weeks.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Not open source ones, I'm afraid. Working on a couple of commercial products at the moment. They both use oak-decorators.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
I think they guy who first wrote oak-decorator bumped into the issue and found a workable strategy. I just stood on the shoulder of such giant and added some customisation that served me well.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
the issue with reflect_metadata I think was some dependency with microsoft stuff or dom, don't remember
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
It always worked once I replaced reflect_metadata with deno_reflect
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
I seem to remember that, when I looked into it, I noticed that it was keeping a custom hash of metadata. I might be wrong. Once it was working, I stopped looking 😄
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
might be in the config, doesn't mean it's relied upon.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Danet is a complete solution (framework as they describe it) I guess oak-decorators is a discrete library that works on top of Oak, so I guess that if someone is familiar with Oak, it's an easy addition.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
oak-decorator does DI via the @Injectable decorator. I don't use that much in my projects as I'm but it's there.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
oak-decorators doesn't rely on emitted metadata, as far as I can remember. At any rate it works with Deploy like a charm.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
lastly, a bit of shameless self-promotion, if you feel like using/supporting any of my npm packages... https://www.npmjs.com/package/http-request-factory (Deno compatible) https://www.npmjs.com/package/tiny-object-validator (Deno compatible) https://www.npmjs.com/package/signals.ts (Deno compatible) https://www.npmjs.com/package/vue3-routable (Vue3 -duh - if you use Vue and like decorators)
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Pleasure. If you need help, feel free to open a topic.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
I suspect the project was abandoned because reflect_metadata was a dud that prevented the whole thing from working. Luckily deno introduced the scopes configuration, which allowed me to add the drop-in replacement.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
As a side note, are you at the beginning of your project? I see that tsyringe is an node package. I'm successfully using Oak-decorators, which I updated myself, successfully. At the moment I'm importing it from a github fork as I yet have to find the time to do the pull request. https://github.com/cleverplatypus/oak-decorators
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
ok, I'd suggest you try to compile it and run the executable. If you get the same issue locally, you might be able to isolate the problem more easily.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
What I'm trying to say is that, if the runtime gets to dependency-container.js in relation to App, it seems to mean that the decorators are recognised as such. It looks like a red herring to me. Surely, if there's something that won't work in Deploy, that suggests that there are differences in the way the app is running. Have you tried running the app as a compiled bundle or are you only running it straight with deno run?
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
It look like a separate issue from the decorators one. The exception is complaining about the type of App , unless I'm mising something.
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Tested 1.41.0. Working now. Thanks a lot
72 replies
DDeno
Created by CodeSnaporaz on 2/17/2024 in #help
TC39 stage 3 decorators not working anymore in Deno Deploy
Marvellous! In the meantime I truly appreciate the fix in Deploy.
72 replies