tonysamperi / ts-luxon

Typescript based Luxon: ⏱ A library for working with dates and times in TS and JS (immutable)
https://tonysamperi.github.io/ts-luxon
MIT License
13 stars 3 forks source link

[REQUEST] Deno Support #10

Closed btd1337 closed 9 months ago

btd1337 commented 10 months ago

Hi @tonysamperi,

Firstly, congratulations on this great work; ts-luxon is truly amazing.

I feel that a date library like ts-luxon is missing in the Deno ecosystem. It would be great if you could consider sharing your library on Deno Land.

Deno + TS-Luxon is the perfect combination, and you could make this possible.

Thanks in advance!

tonysamperi commented 10 months ago

Hi @btd1337

Done, but I don't know if it'll ever get updates, cause it says to create tags from the repo to push updates. I only tag the releases from git.

btd1337 commented 10 months ago

@tonysamperi Where's the link to your library on the Deno Land? Is It already published?

Reference: https://deno.com/add_module

tonysamperi commented 10 months ago

@btd1337 tsluxon

btd1337 commented 10 months ago

@tonysamperi I really don't see your library in Deno Land. Can you share the link with me?

Another thing, I think it would be interesting to maintain consistency with the library name, following the pattern of other libraries: ts_luxon

Captura de Tela 2024-01-28 às 18 19 56
Captura de Tela 2024-01-28 às 18 25 52
Captura de Tela 2024-01-28 às 18 20 11
Captura de Tela 2024-01-28 às 18 20 23
tonysamperi commented 10 months ago

I created it and set the webhook. For the name, since I couldn't insert the dash and noticed they were all lowercase I opted for the umd name in lowercase, which is tsLuxon, hence tsluxon. I'll check what happened on deno because I couldn't find the link either... And I would expect it to be https://deno.land/x/tsluxon I'll let you know in the next few days... Cheers

tonysamperi commented 9 months ago

Hi @btd1337 sorry it took a while...hard times... It needed at least a tag to trigger the webhook... I tagged v 4.5.2, now the link above works!

RawmanGrey commented 9 months ago

Maybe I'm doing something wrong, but when trying import as below import * as tsluxon from "https://deno.land/x/tsluxon@4.5.2/src/index.ts"; error Module not found "https://deno.land/x/tsluxon@4.5.2/src/datetime" occurres

Apparently, it fails to resolve "./datetime" as datetime.ts in index.ts

btd1337 commented 9 months ago

@tonysamperi the way that handles exports is still not working.

How to reproduce:

// test.ts
import * as tsluxon from "https://deno.land/x/tsluxon@4.5.2/src/index.ts"

console.log(tsluxon);
deno run test.ts
error: Module not found "https://deno.land/x/tsluxon@4.5.2/src/datetime".
    at https://deno.land/x/tsluxon@4.5.2/src/index.ts:1:26
tonysamperi commented 9 months ago

@btd1337 man I don’t know how to tell you. I don't know anything about Deno and I don't have time to follow this. And for sure I won't change the architecture of this library to make it working in Deno. If you want it to work, you should find the solution and I can evaluate to integrate a PR, if it's not breaking, if it's conservative enough and if I like it. Sorry.