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

simple-git package not working under target=deno #105

Closed
frodri opened this issue Aug 31, 2021 · 6 comments
Closed

simple-git package not working under target=deno #105

frodri opened this issue Aug 31, 2021 · 6 comments

Comments

@frodri
Copy link

frodri commented Aug 31, 2021

Reproducible on Deno version v1.13.2, using the following:

import git from "https://esm.sh/simple-git?target=deno";

I believe the polyfill for child_process is up on std/node. Would it be possible to use it for adding esm.sh support on the deno target?

@ije
Copy link
Member

ije commented Aug 31, 2021

@frodri i just added child_process polyfill using std/node/child_process.ts in v47, but i am not sure if it works, please try again, thanks!

@frodri
Copy link
Author

frodri commented Aug 31, 2021

I see the polyfill in the script now, so that's good. 👍 Would the changes to @types/node for child_process need to be updated on the CDN, if the @types/node repo made recent changes to the typings though?

@ije
Copy link
Member

ije commented Sep 1, 2021

no worries, we have a ployfll for @types/node, see https://github.com/postui/esm.sh/blob/master/embed/types/node.ns.d.ts

@frodri
Copy link
Author

frodri commented Sep 4, 2021

Got it. I think I can get you a PR with the new child_process typings into node.ns.d.ts. I do not know, though, which one of the 2 tsconfigs from deno-std (strict-ts44.tsconfig.json or browser-compat.tsconfig.json) would work best for esm.sh's 'deno' target. Some more help in that regard would be appreciated.

@ije
Copy link
Member

ije commented Sep 4, 2021

@frodri coool, but why we need this types for child_process module? since deno can not get the deps' types via esm.sh. a simple node types replacement can avoid deno download ton of DTS files via esm.sh. IMO the types is great for editor like vscode, but deno shouldn't take every types from npm. besides deno will disable types checking by default in the future.

@frodri
Copy link
Author

frodri commented Sep 4, 2021

@ije Oh. I didn't know about the incoming Deno type check default. In that case, we're all good. 👍

@frodri frodri closed this as completed Sep 4, 2021
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