0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

111 commits

Author SHA1 Message Date
Marcos Casagrande
91767501e1
feat(std/node): add buf.equals method (#6640) 2020-07-05 18:01:36 -04:00
WJH
538504f57c
improve(std/asserts): allow assert functions to specify type parameter (#6413) 2020-07-02 18:03:15 +02:00
Ryan Dahl
f5242f333e
fix(std/node): do not use absolute urls (#6562) 2020-06-29 15:09:59 -04:00
Marcos Casagrande
0374eadcf7
feat(std/node): Add Buffer.isEncoding (#6521) 2020-06-28 12:27:02 -04:00
Marcos Casagrande
d779053dc6
feat(std/node): Add Buffer.allocUnsafe (#6533) 2020-06-28 10:16:54 -04:00
Marcos Casagrande
a216bd06fc
feat(std/node): support hex/base64 encoding in fs.readFile/fs.writeFile (#6512) 2020-06-27 16:52:49 -04:00
Marcos Casagrande
f0093a9d8b
test(std/node): Add Buffer tests (#6524) 2020-06-27 15:57:32 -04:00
Marcos Casagrande
4302941b06
fix(std/node): add fill & encoding args to Buffer.alloc (#6526) 2020-06-27 15:56:39 -04:00
Benjamin Lupton
16038b8f82
fix(std/node/process): env, argv exports (#6455)
The promise approach still required permissions to be specified
at initialisation, rather than at request.

Using a Proxy instance solves this permission issue.

The Proxy instance approach also eliminates the need for the
await. Achieving direct compatibility with Node.js.

/ref pr #6392
/ref commit d16337cc9c
2020-06-25 07:18:01 -04:00
Benjamin Lupton
49c54c0805
fix(std/node): fix readFile types, add encoding types (#6451) 2020-06-23 22:32:43 -04:00
Benjamin Lupton
d16337cc9c
fix(std/node): global process should usable (#6392) 2020-06-23 16:00:47 -04:00
Marcos Casagrande
86448fd9aa
feat(std/node): support hex / base64 encoding in Buffer (#6414) 2020-06-21 09:47:03 -04:00
Ryan Dahl
0a81ec6b1e
Remove Deno.dir and dirs dependency (#6385) 2020-06-20 23:49:27 -04:00
David Gonzalez
0bc70b89c0
fix(std/node): added tests for static methods of Buffer (#6276) 2020-06-13 10:00:02 -04:00
Michael Yuan
d3aa37dd9c
Doc: Node buffer is now supported (#6274) 2020-06-13 09:58:08 -04:00
Nayeem Rahman
1fff6f55c3
refactor: Don't destructure the Deno namespace (#6268) 2020-06-12 15:23:38 -04:00
Ryan Dahl
e9424bf6b5
Revert "feat: add Deno.osName()" (#6261)
Deno.build.os provides the same functionality

This reverts commit 6ccf9037a6.
2020-06-12 09:53:53 -04:00
Ryan Dahl
d0970daacd
make std deno-lint clean (#6240)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-06-12 09:19:29 -04:00
Rubin Bhandari
6ccf9037a6
feat: add Deno.osName() (#5714) 2020-06-11 13:11:26 -04:00
blairzhao111
6c21ba0575
fix(std/node): emitter.removeAllListeners (#5583)
When given a non-registered eventName to 
emitter.removeAllListeners(eventName), current code 
would remove all listeners instead of silently skip, 
which is not ideal.
2020-06-09 15:07:25 +02:00
Marcos Casagrande
0bf952bb49
feat(std/node) - Add util.promisify (#5540) 2020-06-08 19:26:52 +02:00
Peter Evers
7b597c82fc
feat(std/node) add util.types (#6159) 2020-06-07 09:21:49 -04:00
Chris Knight
3ef94c5473
refactor(std): remove testing dependencies from non-test code (#5838) 2020-06-07 09:20:33 -04:00
Nikolai Vavilov
09ee9a8280
feat(std/node): Buffer (#5925) 2020-06-06 15:56:49 -04:00
Marcos Casagrande
26287ef87b
fix: use queueMicrotask instead of setTimeout (#6112) 2020-06-06 15:32:17 -04:00
Casper Beyer
ed5aedc6b4
Rename abbreviated assertions in std/testing (#6118) 2020-06-05 23:43:00 -04:00
Kitson Kelly
3fe6bc1b82
fix: Better use of @ts-expect-error (#6038) 2020-06-02 00:24:44 -04:00
Peter Evers
6b0d286a3d
feat(std/node): add util.type.isDate (#6029) 2020-06-01 18:43:43 -04:00
Chris Knight
fadd93b454
feat(std/node): add link/linkSync polyfill (#5930) 2020-05-28 19:39:02 -04:00
Kitson Kelly
228f9c207f
Use ts-expect-error instead of ts-ignore. (#5869) 2020-05-26 10:02:16 -04:00
Rares Folea
aef9f22462
Fix typo (#5834) 2020-05-25 09:35:11 -04:00
Ali Hasani
3b86552d66
refactor: remove duplicated code in std/node/module (#5778) 2020-05-23 12:55:15 +02:00
Marcos Casagrande
7f81f02ce7
std/node: fs.writeFile/sync path can now be an URL (#5652) 2020-05-22 22:11:10 -04:00
Ali Hasani
1a6c541327
re-enable symlink tests on windows (#5746) 2020-05-22 13:37:25 -04:00
Marcos Casagrande
11e3d70c85
Remove duplicate test (#5687) 2020-05-20 21:40:43 -04:00
Ali Hasani
22da75b8e5
feat(std/node): first pass at url module (#4700) 2020-05-20 10:37:30 -04:00
Garrone Joseph
7630326b4c
feat(std/node) Export TextDecoder and TextEncoder from util (#5663) 2020-05-20 10:35:51 -04:00
Evan Hahn
f5c0188b5e
std/node: add util.callbackify (#5415)
This adds [Node's `util.callbackify`][0] to `std/node/util.ts`.

I lifted most of this from the [original Node source code][1] (and [its
tests][2]). I tried to make minimal modifications to the source.

I made a few arbitrary decisions:

- I was unable to do the function's types elegantly. I made overloads
  for functions that have 0 to 5 (inclusive) arguments, excluding the
  callback. I would love to know a better way to do this. (It seems that
  the folks at DefinitelyTyped [were also stumped][3], though maybe
  their solution is deliberate.)
- There are a few edge cases that cause custom Node errors to be
  produced. Instead of re-implementing those errors completely, I
  created simplified classes. These are mostly correct but are not
  identical to the real Node errors.
- The tests implement a possibly-arcane `TestQueue` class. I originally
  used a lot of inline promises but found it too repetitive.

Closes [#5366][4].

[0]: https://nodejs.org/api/util.html#util_util_callbackify_original
[1]: 4780493301/lib/util.js (L183-L226)
[2]: 4780493301/test/parallel/test-util-callbackify.js
[3]: 7d24857ddb/types/node/util.d.ts (L61-L84)
[4]: https://github.com/denoland/deno/issues/5366
2020-05-20 10:29:05 -04:00
Marcos Casagrande
eb5acb39d5
feat(std/node): Add fs.promises.readFile (#5656) 2020-05-20 02:50:48 -04:00
Marcos Casagrande
62c34bc21e
fix(std/node) improve fs.close compatibility (#5649) 2020-05-19 19:01:06 -04:00
Bert Belder
76a6a1ff46
Fix a bunch of spelling errors (#5314) 2020-05-16 00:36:49 +02:00
Tomasz Gałkowski
8440d765d5
fix: setTimeout and friends have too strict types (#5412) 2020-05-15 09:51:49 -04:00
Marcos Casagrande
ce57a1824d
feat(std/node): fs.writeFileSync polyfill (#5414) 2020-05-15 09:50:27 -04:00
Evan Hahn
6f7e74d694
[std/node]: remove execute permissions from fs.ts (#5363) 2020-05-14 11:57:12 -04:00
Marcos Casagrande
524b1547b7
std/node fs.readFile should take string as option (#5316) 2020-05-14 07:04:07 -04:00
Dante Calderón
c3a205bae8
Fix typos across the repo (#5295)
Corrections made:
* cli/js/tests/README.md:44:7: corrected "discoveres" to "discovers"
* cli/js/tests/chown_test.ts:111:37: corrected "priviledge" to "privilege"
* cli/worker.rs:231:56: corrected "decendants" to "descendants"
* deno_typescript/lib.rs:136:50: corrected "emmited" to "emitted"
* core/es_isolate.rs:492:67: corrected "registerd" to "registered"
* core/isolate.rs:103:28: corrected "initalize" to "initialize"
* docs/runtime.md:29:14: corrected "ect" to "etc"
* docs/tools/debugger.md:122:16: corrected "implementes" to "implements"
* std/encoding/_yaml/dumper/dumper_state.ts:57:63: corrected "everwhere" to "everywhere"
* std/encoding/csv.ts:37:43: corrected "referal" to "referral"
* std/fmt/sprintf.ts:209:20: corrected "unusuable" to "unusable"
* std/fmt/README.md:21:40: corrected "Alternativly" to "Alternatively"
* std/fmt/README.md:35:68: corrected "seperated" to "separated"
* std/fmt/README.md:179:59: corrected "provded" to "provided"
* std/mime/multipart.ts:581:46: corrected "writen" to "written"
* std/path/_globrex.ts:19:52: corrected "equivelant" to "equivalent"
* std/node/events_test.ts:447:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:475:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:500:29: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:530:40: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:555:9: corrected "asyncronous" to "asynchronous"
* tools/deno_tcp_proxy.ts:1:42: corrected "perfromance" to "performance"
* std/node/module.ts:1003:18: corrected "existend" to "existed"
2020-05-14 06:38:42 +02:00
Edward Elric
b2da8f3d4e
doc: fix typo in std/node/README.md (#4819) 2020-05-11 15:13:06 +02:00
Nayeem Rahman
f184332c09
BREAKING(std): reorganization (#5087)
* Prepend underscores to private modules
* Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result.
* Move std/_util/async.ts to std/async
* Move std/util/sha*.ts to std/hash
2020-05-09 08:34:47 -04:00
Ryan Dahl
846c049c9b
Remove flaky and useless tests (#5116) 2020-05-06 17:04:52 -04:00
Marcos Casagrande
f0aea98c85
feat(std/node): fs.writefile / fs.promises.writeFile (#5054) 2020-05-04 18:59:37 -04:00