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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/node): tty streams extends net socket #21026

Merged
merged 2 commits into from Oct 31, 2023

Conversation

littledivy
Copy link
Member

Workaround the circular references issue by using a initializer function to give tty stream class to initStdin.

Fixes #21024
Fixes #20611
Fixes #20890
Fixes #20336

create-svelte works now:

divy@mini /t/a> ~/gh/deno/target/debug/deno run -A --unstable --reload npm:create-svelte@latest sveltekit-deno

create-svelte version 5.1.1

┌  Welcome to SvelteKit!
│
◇  Which Svelte app template?
│  Skeleton project
│
◇  Add type checking with TypeScript?
│  Yes, using JavaScript with JSDoc comments
│
◇  Select additional options (use arrow keys/space bar)
│  none
│
└  Your project is ready!

✔ Type-checked JavaScript
  https://www.typescriptlang.org/tsconfig#checkJs

Install community-maintained integrations:
  https://github.com/svelte-add/svelte-add

Next steps:
  1: cd sveltekit-deno
  2: npm install
  3: git init && git add -A && git commit -m "Initial commit" (optional)
  4: npm run dev -- --open

To close the dev server, hit Ctrl-C

Stuck? Visit us at https://svelte.dev/chat

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bit unfortunate, but a good workaround. Maybe add a comment when setReadStream() is called that it's to prevent circular deps.

@lucacasonato
Copy link
Member

There is a nicer fix by breaking out some things across more files, but that seemed like a lot of effort.

@littledivy littledivy merged commit f62e22a into denoland:main Oct 31, 2023
13 checks passed
@bartlomieju bartlomieju deleted the node_tty_fix branch October 31, 2023 11:56
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

Successfully merging this pull request may close these issues.

Support for create-svelte Support @clack/core Support Qwik City (create-qwik) Support Nuxt/Nuxi
3 participants