summaryrefslogtreecommitdiff
path: root/std/node
AgeCommit message (Collapse)Author
2020-05-22std/node: fs.writeFile/sync path can now be an URL (#5652)Marcos Casagrande
2020-05-22re-enable symlink tests on windows (#5746)Ali Hasani
2020-05-20Remove duplicate test (#5687)Marcos Casagrande
2020-05-20feat(std/node): first pass at url module (#4700)Ali Hasani
2020-05-20feat(std/node) Export TextDecoder and TextEncoder from util (#5663)Garrone Joseph
2020-05-20std/node: add util.callbackify (#5415)Evan Hahn
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]: https://github.com/nodejs/node/blob/47804933012841f2dc90626bdcc161adf34569a5/lib/util.js#L183-L226 [2]: https://github.com/nodejs/node/blob/47804933012841f2dc90626bdcc161adf34569a5/test/parallel/test-util-callbackify.js [3]: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7d24857ddb07ab637dfa8c477d13352f8a8206fc/types/node/util.d.ts#L61-L84 [4]: https://github.com/denoland/deno/issues/5366
2020-05-20feat(std/node): Add fs.promises.readFile (#5656)Marcos Casagrande
2020-05-19fix(std/node) improve fs.close compatibility (#5649)Marcos Casagrande
2020-05-16Fix a bunch of spelling errors (#5314)Bert Belder
2020-05-15fix: setTimeout and friends have too strict types (#5412)Tomasz Gałkowski
2020-05-15feat(std/node): fs.writeFileSync polyfill (#5414)Marcos Casagrande
2020-05-14[std/node]: remove execute permissions from fs.ts (#5363)Evan Hahn
2020-05-14std/node fs.readFile should take string as option (#5316)Marcos Casagrande
2020-05-14Fix typos across the repo (#5295)Dante Calderón
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-11doc: fix typo in std/node/README.md (#4819)Edward Elric
2020-05-09BREAKING(std): reorganization (#5087)Nayeem Rahman
* 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-06Remove flaky and useless tests (#5116)Ryan Dahl
2020-05-04feat(std/node): fs.writefile / fs.promises.writeFile (#5054)Marcos Casagrande
2020-05-03[std/node] add the ability to path argument to be URL type (#5055)Ali Hasani
2020-04-30std/node: toString for globals (#5013)Nikolai Vavilov
2020-04-30std/node: make process global (#4985)Nikolai Vavilov
2020-04-29Cleanup std/node/fs functions (#5000)Marcos Casagrande
2020-04-29make camel case readDir, readLink, realPath (#4995)Ryan Dahl
2020-04-29BREAKING: Include limited metadata in 'DirEntry' objects (#4941)Bert Belder
This change is to prevent needed a separate stat syscall for each file when using readdir. For consistency, this PR also modifies std's `WalkEntry` interface to extend `DirEntry` with an additional `path` field.
2020-04-29BREAKING: Map-like interface for Deno.env (#4942)Valentin Anger
2020-04-28BREAKING: Use LLVM target triple for Deno.build (#4948)Ryan Dahl
Deno.build.os values have changed to correspond to standard LLVM target triples "win" -> "windows" "mac" -> "darwin"
2020-04-28BREAKING: remove overload of Deno.test() (#4951)Bartek Iwańczuk
This commit removes overload of Deno.test() that accepted named function.
2020-04-27Rename FileInfo time fields and represent them as Date objects (#4932)Bert Belder
This patch also increases the resolution of reported file times to sub-millisecond precision.
2020-04-27bug fix and tests for std/node/fs/mkdir (#4917)Ali Hasani
2020-04-20std/node: require_ -> require (#4828)Nikolai Vavilov
2020-04-20Add no-async-promise-executor lint rule (#4809)Ali Hasani
2020-04-18fix(std): existsFile testBartek Iwańczuk
2020-04-16refactor: proper Node polyfill directory iteration now that Deno supports ↵Chris Knight
this (#4783)
2020-04-16refactor(cli/js/ops/fs): Improve readdir() and FileInfo interfaces (#4763)Nayeem Rahman
2020-04-12add copyFile & copyFileSync to std/node/fs (#4726)Ali Hasani
2020-04-09Fix build - 2becae broke CI (#4686)Ryan Dahl
2020-04-08feat(std/node): add isPrimitive (#4673)Ali Hasani
2020-04-08feat(std/node): add fs.mkdir functions and fs.exists tests (#4660)Ali Hasani
2020-04-06Add exists and existsSync to std/node (#4655)Ali Hasani
2020-03-28Update to Prettier 2 and use ES Private Fields (#4498)Kitson Kelly
2020-03-20Add require-await lint rule (#4401)Samrith Shankar
2020-03-19fix: stack traces for modules imported via std/node's require (#4035)Nikolai Vavilov
2020-03-19refactor: rename Deno.TestDefinition.skip to ignore (#4400)Bartek Iwańczuk
2020-03-18feat: Deno.test() sanitizes ops and resources (#4399)Bartek Iwańczuk
This PR brings assertOps and assertResources sanitizers to Deno.test() API. assertOps checks that test doesn't leak async ops, ie. there are no unresolved promises originating from Deno APIs. Enabled by default, can be disabled using Deno.TestDefinition.disableOpSanitizer. assertResources checks that test doesn't leak resources, ie. all resources used in test are closed. For example; if a file is opened during a test case it must be explicitly closed before test case finishes. It's most useful for asynchronous generators. Enabled by default, can be disabled using Deno.TestDefinition.disableResourceSanitizer. We've used those sanitizers in internal runtime tests and it proved very useful in surfacing incorrect tests which resulted in interference between the tests. All tests have been sanitized. Closes #4208
2020-03-16test: Fix broken test and remove redundant test file (#4390)Chris Knight
2020-03-15refactor: move existing fs implementation to internal _fs directory (#4381)Chris Knight
2020-03-15refactor(std): Uncomment disabled tests, use skip option (#4378)Nayeem Rahman
2020-03-14Node polyfill for fs.chown and fs.close (#4377)Chris Knight
2020-03-14BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338)dubiousjim
2020-03-14feat: add chmod Node polyfill and related file system constants (#4358)Chris Knight