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

feat(std/node/process): request for stdin, stdout, stderr [$20 bounty] #656

Closed
2 of 8 tasks
balupton opened this issue Aug 18, 2020 · 11 comments
Closed
2 of 8 tasks

Comments

@balupton
Copy link
Contributor

currently they are missing from https://github.com/denoland/deno/blob/master/std/node/process.ts

My use case is running make-deno-edition on assert-helpers which is failing on https://github.com/bevry/assert-helpers/blob/3f4a9ea8a6c6d606f5cecc3cce96755e1ead3357/source/index.ts#L27-L36 because they are missing, and don't have .isTTY() added for them

Relevant node docs:

Relevant deno docs:

Just to make it explicit, these Node.js methods are needed for any substantial compat.

  • *.fd
  • *.isTTY
  • *.on
  • stdout.pipe
  • stderr.pipe
  • stdout.write
  • stderr.write
  • stdin.read
balupton referenced this issue in bevry/assert-helpers Aug 18, 2020
	Check file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts
	error: TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denoland/deno/30052aa6d43378cb28dd92cd62f5f5b4e0ac4351/std/node/assert"' has no exported member 'deepStrictEqual'.
	 deepStrictEqual as _deepStrictEqual,
	 ~~~~~~~~~~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:6:2

	TS2614 [ERROR]: Module '"https://deno.land/std@0.65.0/node/process"' has no exported member 'stdout'. Did you mean to use 'import stdout from "https://deno.land/std@0.65.0/node/process"' instead?
	import { argv, env, stdout, stderr, versions } from 'https://deno.land/std/node/process.ts'
	                    ~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:11:21

	TS2614 [ERROR]: Module '"https://deno.land/std@0.65.0/node/process"' has no exported member 'stderr'. Did you mean to use 'import stderr from "https://deno.land/std@0.65.0/node/process"' instead?
	import { argv, env, stdout, stderr, versions } from 'https://deno.land/std/node/process.ts'
	                            ~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:11:29

	TS2304 [ERROR]: Cannot find name 'assert'.
	 	assert.ok(actual.indexOf(expected) !== -1, testName)
	 	~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:308:3

	Found 4 errors.

https://github.com/denoland/deno/issues/7101

denoland/deno#7102
balupton referenced this issue in bevry/assert-helpers Aug 18, 2020
	Check file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts
	error: TS2305 [ERROR]: Module '"https://raw.githubusercontent.com/denoland/deno/30052aa6d43378cb28dd92cd62f5f5b4e0ac4351/std/node/assert"' has no exported member 'deepStrictEqual'.
	 deepStrictEqual as _deepStrictEqual,
	 ~~~~~~~~~~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:6:2

	TS2614 [ERROR]: Module '"https://deno.land/std@0.65.0/node/process"' has no exported member 'stdout'. Did you mean to use 'import stdout from "https://deno.land/std@0.65.0/node/process"' instead?
	import { argv, env, stdout, stderr, versions } from 'https://deno.land/std/node/process.ts'
	                    ~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:11:21

	TS2614 [ERROR]: Module '"https://deno.land/std@0.65.0/node/process"' has no exported member 'stderr'. Did you mean to use 'import stderr from "https://deno.land/std@0.65.0/node/process"' instead?
	import { argv, env, stdout, stderr, versions } from 'https://deno.land/std/node/process.ts'
	                            ~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:11:29

	TS2304 [ERROR]: Cannot find name 'assert'.
	 	assert.ok(actual.indexOf(expected) !== -1, testName)
	 	~~~~~~
	    at file:///Users/balupton/Projects/active/assert-helpers/edition-deno/index.ts:308:3

	Found 4 errors.

https://github.com/denoland/deno/issues/7101

denoland/deno#7102
@balupton
Copy link
Contributor Author

balupton commented Aug 20, 2020

Placed a $20 bounty on this (it's not much, but it's what I can afford):
https://www.bountysource.com/issues/92348869-feat-std-node-process-request-for-stdin-stdout-stderr

@balupton balupton changed the title feat(std/node/process): request for stdin, stdout, stderr feat(std/node/process): request for stdin, stdout, stderr [$20 bounty] Aug 20, 2020
@JayHelton
Copy link
Contributor

For some reason I thought this issue was taken. I will take a stab at this, no bounty needed. I will do my research due diligence this weekend and follow up asap.

@jkomyno
Copy link

jkomyno commented Sep 26, 2020

@balupton @ry PR denoland/deno#7184 was merged, so I guess this issue can be closed now.

@balupton
Copy link
Contributor Author

This issue can be closed when on, write, and pipe are implemented.

@jopemachine
Copy link
Contributor

Is someone working on this issue?
Otherwise, could I try to work on this?

@ry ry closed this as completed Nov 7, 2020
@ry
Copy link
Member

ry commented Nov 7, 2020

oops - closed in error. TODO list not complete.

@ry ry reopened this Nov 7, 2020
@fabiante
Copy link

fabiante commented Dec 6, 2020

Hey, I took a quick look at this, wondering if I could maybe help out right here.

I guess the changes of denoland/deno#7569 (adds readable and writable streams, even with the various function definitions) migh come in handy right here, right?

As far as I understand the _streams module is a replication of the Node.js API for backwards compatibility. Instead of rewriting all write, on, read and pipe functions from scratch to work with Deno.stdin, wouldn't it be less hastle to depend on the _streams module? I admit I am unsure if and how exactly that would even work though.

@guybedford
Copy link
Contributor

@fabiante yes exactly, these could just be implemented now on top of the streams API via import { Readable, Writeable } from '../node/stream.ts' as per the Node.js documentation.

@fabiante
Copy link

fabiante commented Dec 9, 2020

Haven't yet looked deeper into this. Could they simply be used or would we still have to add some adapter-like stuff when using Readable and Writable?

@bartlomieju bartlomieju transferred this issue from denoland/deno Feb 1, 2021
@bartlomieju
Copy link
Member

These APIs are now available in std/node.

@balupton
Copy link
Contributor Author

balupton commented Aug 16, 2023

Seems the repo migration has caused bountysource to forget to solve this issue, for whoever solved this, you should be able to claim the $20USD bounty I placed via https://app.bountysource.com/issues/92348869-feat-std-node-process-request-for-stdin-stdout-stderr-20-bounty

Actually seems the issue is that bountysource has collapsed:
bountysource/core#1586

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

8 participants