Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSR #343

Open
sant123 opened this issue Jun 19, 2024 · 2 comments
Open

Support JSR #343

sant123 opened this issue Jun 19, 2024 · 2 comments

Comments

@sant123
Copy link

sant123 commented Jun 19, 2024

Hi, taking a look on https://vanjs.org/minivan#server-side-deno-integration I see useful to support VanJS on JSR.

Please see https://jsr.io/

Thanks 馃檹馃徏

@sant123
Copy link
Author

sant123 commented Jun 19, 2024

For naming it could be:

  • @vanjs/core -> Client-Side
  • @vanjs/core-lite -> Client-Side without state and no Document
  • @vanjs/ssr -> Server-Side

I know there is a good reason for the current names mini-van-plate/van-plate and mini-van-plate however the names above could be more explanatory?

@Tao-VanJS
Copy link
Member

Tao-VanJS commented Jun 19, 2024

I tried to publish Mini-Van to JSR. It seems that there isn't an easy way to do that. This is the error message that I got:

Check file:///Users/xintao/org/mini-van/src/mini-van.js
Check file:///Users/xintao/org/mini-van/src/van-plate.js
Check file:///Users/xintao/org/mini-van/src/shared.js
error: TS2304 [ERROR]: Cannot find name 'Element'.
type BrowserTags = Tags<Element, Text> & {
                        ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:46:25

TS2304 [ERROR]: Cannot find name 'Text'.
type BrowserTags = Tags<Element, Text> & {
                                 ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:46:34

TS2304 [ERROR]: Cannot find name 'HTMLElementTagNameMap'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
              ~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:15

TS2304 [ERROR]: Cannot find name 'Element'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                              ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:47

TS2304 [ERROR]: Cannot find name 'Text'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                                       ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:56

TS2304 [ERROR]: Cannot find name 'HTMLElementTagNameMap'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                                             ~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:62

TS2304 [ERROR]: Cannot find name 'Element'.
export interface Van extends VanObj<Element, Text> {
                                    ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:64:37

TS2304 [ERROR]: Cannot find name 'Text'.
export interface Van extends VanObj<Element, Text> {
                                             ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:64:46

TS2304 [ERROR]: Cannot find name 'Element'.
  readonly tags: BrowserTags & ((namespaceURI: string) => Tags<Element, Text>)
                                                               ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:69:64

TS2304 [ERROR]: Cannot find name 'Text'.
  readonly tags: BrowserTags & ((namespaceURI: string) => Tags<Element, Text>)
                                                                        ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:69:73

Found 10 errors.

It looks like DOM types can't be used for packages published to JSR.

I love Deno, but to be honest I'm not really a big fan of keeping reinventing the wheel for marginal improvement.

I will revert the partial changes that I made. I can revisit the issue if an easy way to publish to JSR is discovered.

I know there is a good reason for the current names mini-van-plate/van-plate and mini-van-plate however the names above could be more explanatory?

I didn't think too much while picking the name for NPM. I chose the name because this is the one that was available for me to use at that time. Later packages published to NPM follow the convention of vanjs-* because names like that are always available to use. Once packages are published their names are really hard to change.

Tao-VanJS added a commit to vanjs-org/mini-van that referenced this issue Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants