xataio / client-ts

Xata.io SDK for TypeScript and JavaScript
https://xata.io/docs/sdk/typescript/overview
Apache License 2.0
123 stars 8 forks source link

Shell is unusable #227

Closed TejasQ closed 2 years ago

TejasQ commented 2 years ago

Repro: https://xata.rewatch.com/video/ukvo8ck54tgq9hlw-vercel-integration-dx-journey?t=1338

The shell fails on invocation with the following error:

file:///Users/tejas/.npm/_npx/81ade39211532d57/node_modules/@xata.io/shell/dist/cli-run.js:2
import { generateFromContext } from '@xata.io/codegen';
         ^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@xata.io/codegen' does not provide an export named 'generateFromContext'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:61:12)
SferaDev commented 2 years ago

This should be fixed with @xata.io/shell@0.1.2.

I've just prompted the build and push to npm to happen

TejasQ commented 2 years ago

Is there a canary tag or similar that always has the latest main version of the package?

SferaDev commented 2 years ago

Yes there're, you can get the reference in the PRs. Normal PRs build canary releases, and Release Tracking build beta releases (state at main yet not included in the latest tag)

SferaDev commented 2 years ago

It should be available on latest by now. Please confirm it's fixed!

TejasQ commented 2 years ago

It's fixed! Though, I can't seen to npx @xata.io/shell@canary and get the latest hash from the latest merge. Happy to open a separate issue for that if it helps?

SferaDev commented 2 years ago

Have you tried alpha and beta?

Screenshot_20220522-161242.png

TejasQ commented 2 years ago

Given that they depend on the Short SHA, @xata.io/codegen@0.0.0-alpha would never work. I see canary published as a tag there. Weird that I didn't get the latest main when I ran @xata.io/shell@canary. Seems to work now.

TejasQ commented 2 years ago

Closing because the shell is usable :D