-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
lib: add require('🦕') #35478
lib: add require('🦕') #35478
Conversation
Review requested:
|
* [bnoordhuis](https://github.com/bnoordhuis) - | ||
**Ben Noordhuis** <info@bnoordhuis.nl> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README changes/commit are unrelated and included in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I guess they're not "unrelated" exactly...
doc/api/🦕.md
Outdated
<!-- source_link=lib/🦕.js --> | ||
|
||
The `deno` module executes the [deno][] runtime, downloading it on demand | ||
if necessary. Currently only supported on Linux, macOS and Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if necessary. Currently only supported on Linux, macOS and Windows. | |
if necessary. Currently only supported on Linux, macOS, and Windows. |
doc/api/🦕.md
Outdated
* `args` {string[]} List of string arguments. | ||
* `options` Options passed to [`child_process.spawn()`][]. The optional `exe` | ||
option is the path to the `deno` binary. | ||
* `callback` {Function} called `deno` terminates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `callback` {Function} called `deno` terminates. | |
* `callback` {Function} Called `deno` terminates. |
doc/api/🦕.md
Outdated
[deno]: https://deno.land/ | ||
[`child_process.spawn()`]: #child_process_child_process_spawn_command_args_options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linter will want these two lines switched with each other.
Seems like there's nothing keeping this from being a userland module, other than maybe the module name? |
Come clean, Ben. You're only opening this PR so you can get a Hacktoberfest t-shirt, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
join Deno? Really?🤔🤔🤔
Provide an easy upgrade path to Node.js users that want to make the switch to Deno. To ease the transition, the 🦕 module will download the deno runtime on demand. Comes included with tests, documentation and minor tweaks to support non-ASCII filenames. Refs: https://deno.land/
It's been ten years and it's time for a change. September 30 was my last day at IBM and my last day as a full-time Node.js maintainer. I feel Deno is the future and that's why I'm joining that scrappy startup, Deno Land Inc., to make that future happen.
Feedback incorporated, PTAL.
Exactly. I don't think npm allows emoji module names.
Aw, was it that transparent? I deliberately left out "amazing project"! |
This made my day 😃 |
if (typeof cb !== 'function') cb = () => {}; | ||
|
||
const defaults = { | ||
download: './' + EXE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? Download deno
binary directly to cwd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make you days happy😂
this is too spooky, even for october |
The real question though: was this tested with |
|
||
const EXE = (process.platform === 'win32') ? 'deno.exe' : 'deno'; | ||
const TRIPLET = triplet(process.arch, process.platform); | ||
const VERSION = '1.4.3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make version dynamic?
|
||
function download(filename, cb) { | ||
const url = | ||
'https://github.com/denoland/deno' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why enforce https? Web standards allow the choice of it when importing modules.
Also, could this support mirrors too?
<!-- source_link=lib/🦕.js --> | ||
|
||
The `deno` module executes the [deno][] runtime, downloading it on demand | ||
if necessary. Currently only supported on Linux, macOS, and Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it work on Alpine too or only glibc linuxes?
|
||
<!--introduced_in=REPLACEME--> | ||
|
||
> Stability: 1 - Experimental |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there is clear path out of experimental for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally a hard -1 on this in core. This should be a userland module.
@bnoordhuis ... This PR included a commit to move you to emeritus status. Did you still want to do that? |
lmfao? cant stop laughing... it would be a great thing if this didnt downloaded exe stuffs and just could port deno to node lol |
lib: add require('🦕') 492291a
Provide an easy upgrade path to Node.js users that want to make the
switch to Deno.
To ease the transition, the 🦕 module will download the deno runtime
on demand.
Comes included with tests, documentation and minor tweaks to support
non-ASCII filenames.
Refs: https://deno.land/
doc: move bnoordhuis to emiritus 25d31a7
It's been ten years and it's time for a change. September 30 was my
last day at IBM and my last day as a full-time Node.js maintainer.
I feel Deno is the future and that's why I'm joining that scrappy
startup, Deno Land Inc., to make that future happen.
Stay safe and I hope to see you all around! 👋