Visitar URL original
HTML Depends on TypeScript · Issue #253 · cloudinary/frontend-frameworks · GitHub
Skip to content

HTML Depends on TypeScript #253

Open

Description

@lishaduck

Latest versions.

For which package is this issue?

HTML

Describe the issue in a sentence or two.

The HTML package depends on TypeScript, despite only using as a Dev Dep

Issue Type (Can be multiple)

  • Build - Can’t install or import the SDK
  • Performance - Performance issues
  • Behaviour - Functions aren’t working as expected
  • Documentation - Inconsistency between the docs and behaviour
  • Incorrect Types
  • Other (Install)

Steps to reproduce

https://www.npmjs.com/package/@cloudinary/html?activeTab=dependencies

Error screenshots

n/a

Browsers (if issue relates to UI, else ignore)

n/a

Versions and Libraries (fill in the version numbers)

package SDK version
Node - n/a (Deno)
NPM - n/a (Deno)

Config Files (Please paste the following files if possible)

package.json (n/a)

deno.json (trimmed for brevity):

{
  "nodeModulesDir": "auto",
  "imports": {
    "@biomejs/biome": "npm:@biomejs/biome@^1.9.4",
    "@cloudinary/react": "https://esm.sh/@cloudinary/react@1.14.0?external=*",
    "@cloudinary/url-gen": "npm:@cloudinary/url-gen@^1.21.0",
    "@fresh/plugin-tailwind": "jsr:@fresh/plugin-tailwind@^0.0.1-alpha.7",
    "@preact/signals": "npm:@preact/signals@^1.3.2",
    "fresh": "jsr:@fresh/core@^2.0.0-alpha.29",
    "preact": "npm:preact@^10.26.2",
    "tailwindcss": "npm:tailwindcss@^3.4.17"
  },
  "scopes": {
    "https://esm.sh/": {
      "@cloudinary/hrml": "npm:@cloudinary/html@",
      "@types/react": "npm:preact@10.26.2/compat",
      "client-only": "npm:client-only@0.0.1",
      "react": "npm:preact@10.26.2/compat",
      "react/jsx-runtime": "npm:preact@10.26.2/jsx-runtime",
      "react-dom": "npm:preact@10.26.2/compat",
      "react-dom/test-utils": "npm:preact@10.26.2/test-utils"
    }
  }
}

Repository

n/a

Activity

  1. lishaduck commented on Feb 27, 2025

    @lishaduck
    Author

    Also, isBrowser is based on window instead of document, which means it's incorrect while running on Deno (and other modern runtimes).

    export function isBrowser(): boolean{
    return typeof window !== 'undefined';
    }

  2. lishaduck commented on Feb 27, 2025

    @lishaduck
    Author

    And there's no exports field, so it can't get consumed as ESM and it doesn't use .mjs extension for ESM so it probably can't be imported even with an exports field.

    I'd be happy to help clean it up in a month (project I'm using cloudinary for is very far behind).

  3. dannyv-cloudinary commented on Feb 28, 2025

    @dannyv-cloudinary
    Contributor

    Hi @lishaduck.
    Thanks for your comments. We will review this internally and get back to you.

  4. lishaduck commented on Apr 3, 2025

    @lishaduck
    Author

    It's been a month! Would y'all be open to a PR(s) to clean up the repo?

    (Also, to double check, y'all don't have a CLA, do you?)

  5. tommyg-cld commented on Apr 8, 2025

    @tommyg-cld

    @lishaduck sorry for the delay, we have opened an internal ticket to work on this further, however there is no ETA currently but we will post again when we complete it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions