Skip to content

Not available on jsr.io #839

Open
@shivajivarma

Description

@shivajivarma
No description provided.

Activity

sant123

sant123 commented on Mar 29, 2024

@sant123

Can this be published on jsr please? 🙏🏼

sant123

sant123 commented on Sep 18, 2024

@sant123

Bump on this, please 🙏🏼

uncomfyhalomacro

uncomfyhalomacro commented on Nov 14, 2024

@uncomfyhalomacro

Hi team. I would also love this package to be added in the JSR.

i18nsite

i18nsite commented on Feb 12, 2025

@i18nsite
i18nsite

i18nsite commented on Feb 12, 2025

@i18nsite

fix in #1034

deno add jsr:@y0/postgres

https://jsr.io/@y0/postgres

oscar6echo

oscar6echo commented on Mar 20, 2025

@oscar6echo

Correct me if I'm wrong but the types do not seem to be imported if you do:

// run ok but missing types
import postgres from "@y0/postgres"; 

But they are if you do:

// run and types ok
import postgres from "https://deno.land/x/postgresjs@v3.4.5/mod.js";

Cf. denoland/deno#28551 (comment)


Minor

Btw the import in jsr.io seem incorrect. I think it should be

import postgres from "@y0/postgres";

instead of:

Image

oscar6echo

oscar6echo commented on Mar 21, 2025

@oscar6echo

This is my first attempt to fix (and learn jsr.io): https://jsr.io/@oscar6echo/postgres@3.4.5-a

Cf. Fork | commit

In essence, I changed what deno publish --dry-run errors and warnings said until it did not complain:

  • replace https://denoland/x/.etc urls with node:, npm:, jsr: packages.
  • add @types/node to package.json
  • use new // @ts-self-types= syntax to reference .d.ts types
  • replace export = postgres by export default postgres

NOTE: I don't know how to fix the automatically generated import - image above.

Will test shortly.


EDIT:

versions -b and -c just exlude unecessary files and remove package.json in favor of deno.jsonc:
https://jsr.io/@oscar6echo/postgres@3.4.5-c

oscar6echo

oscar6echo commented on Mar 21, 2025

@oscar6echo

Cf. question about autogenerated imports: jsr-io/jsr#767 (comment)

oscar6echo

oscar6echo commented on Mar 25, 2025

@oscar6echo

Finally it works with version -d (previous ones yanked)
https://jsr.io/@oscar6echo/postgres@3.4.5-d

I realized that there was significant divergence between jsr:@y0/postegres and the repo master branch.
So I back ported those file onto repo oscar6echo/postegres and deployed to jsr.

Now it works fine - runtime and types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @shivajivarma@oscar6echo@sant123@uncomfyhalomacro@i18nsite

      Issue actions

        Not available on jsr.io · Issue #839 · porsager/postgres