Commit Graph

132 Commits

Author SHA1 Message Date
Tim Reichen
83fe26f36d
refactor(async): format test names (#3985)
* initial commit

* Update async/pool_test.ts

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* update test names

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-19 09:29:13 +11:00
Simon Holloway
f712403cb1
feat(testing): enable the using keyword on FakeTime() (#3961)
* feat(testing): enable the "using" keyword on FakeTime

* chore(testing): update all tests with using FakeTime

* chore(testing): formatting fix
2023-12-15 07:47:50 +11:00
YieldRay
bcc6f3b679
perf(async): remove event listener ASAP in abortablePromise() and abortableAsyncIterable() (#3909)
perf(async): improve abortablePromise() and abortableAsyncIterable()
2023-12-08 08:36:52 +11:00
Asher Gomez
fb40a35b13
chore(async): exponentialBackoffWithJitter() tweaks (#3891) 2023-12-04 15:42:01 +11:00
Asher Gomez
e9b2ea321a
chore(async): complete documentation (#3887)
* chore(async): complete documentation

* Update mux_async_iterator.ts

Co-authored-by: Luca Casonato <hello@lcas.dev>

* Update mux_async_iterator.ts

Co-authored-by: Luca Casonato <hello@lcas.dev>

* Update mux_async_iterator.ts

Co-authored-by: Luca Casonato <hello@lcas.dev>

* tweaks

---------

Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-12-01 13:19:22 +11:00
Asher Gomez
d7f3d8cc2c
BREAKING(async): remove deprecated deferred() (#3852) 2023-11-24 19:11:32 +11:00
Asher Gomez
56e2bc10e0
chore: use Array.fromAsync() where possible (#3788) 2023-11-11 06:00:28 +11:00
Asher Gomez
88477d1117
refactor: remove use of deferred() (#3786)
* refactor: remove use of `deferred()`

* fix

* fix
2023-11-10 14:31:16 +11:00
Lino Le Van
7e6a91f012
BREAKING(async): deprecate deferred() in favor of Promise.withResolvers() (#3758)
* BREAKING(async): Deprecate deferred in favor of Promise.withResolvers

* address luca's comment

* Apply suggestions from code review

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* Apply suggestions from code review

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* Apply suggestions from code review

* correction

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-10 11:29:11 +11:00
Lino Le Van
a3ddd3546b
chore(async): remove _exponentialBackoffWithJitter from public file (#3720) 2023-10-25 14:06:35 +09:00
Yoshiya Hinosawa
dcae889194
chore(async): remove unused file (#3592) 2023-09-01 16:40:10 +09:00
Lino Le Van
2b5d71224f
refactor: cleanup usage of double equals (#3566)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-08-25 18:04:43 +09:00
Jesse Jackson
82c63fc1f6
fix(async/delay): reject with existing AbortSignal reason (#3479) 2023-07-14 14:03:05 +09:00
Asher Gomez
239e85ad6a
BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
Martin Fischer
a5b1d80736
chore: fix typos (#3458)
The typos were found with the typos[1] spell checker.  That spell
checker will be incorporated into the CI in a followup PR.

[1]: https://github.com/crate-ci/typos
2023-06-22 01:27:37 +09:00
Bodo Graumann
3a17ebde3c
docs(async/retry): consistently talk about attempts (#3434) 2023-06-10 19:01:46 +09:00
Bodo Graumann
edf2e5498f
feat(async/retry): introduce jitter option and fix retry bugs (#3427) 2023-06-07 19:46:00 +09:00
lionel-rowe
9daac3277a
feat(async): add jitter to retry exponential backoff (#3379) 2023-05-20 21:14:18 +09:00
Λlisue (Ali sue・ありすえ)
264c7144b1
feat(async): support signal on deadline() (#3347) 2023-05-02 15:04:26 +09:00
Jesse Jackson
c5dbe0747b
feat(async/pool): use browser compatible APIs (#3350)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-05-02 14:48:33 +09:00
Asher Gomez
cf14c9b212
chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
Kenta Moriuchi
74fd287286
docs(async): add note to deadline (#3148) 2023-02-03 12:30:37 +09:00
ayame113
b4239898d6
chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
Lino Le Van
13a38ecc20
feat(async): retry (#2929) 2022-11-30 13:45:25 -05:00
Leo Kettmeir
aba5017d43
docs: reorganize docs (#2658) 2022-11-25 12:40:23 +01:00
ayame113
e6189c08e9
docs: Using absolute paths in jsdoc import statements (#2762) 2022-10-10 10:05:56 -04:00
Asher Gomez
27d470532e
fix(async): restore delay browser compatibility (#2625) 2022-09-07 20:19:59 +09:00
Asher Gomez
e0e851053a
chore: remove _deno_unstable.ts (#2600) 2022-09-05 13:55:53 +09:00
Asher Gomez
3b9fb39ddd
chore: remove void and Promise<void> return types (#2550) 2022-08-24 10:21:57 +09:00
Asher Gomez
d7cd0080b8
feat(async/delay): add persistent option (#2527) 2022-08-22 22:09:53 +09:00
Kitson Kelly
e83306672e
docs: improve module documentation (#2511) 2022-08-11 21:51:20 +10:00
Bartek Iwańczuk
a06298b0b5
chore: Update top level module JSDocs (#2343)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-06-14 11:20:56 +02:00
Matthew Leon
3c129122f1
test(async): use generic assertRejects in pool_test.ts (#2287)
Fixes a deprecation warning. Resolves https://github.com/denoland/deno_std/issues/2283
2022-05-30 19:21:28 +09:00
Matthew Leon
87883364ab
docs(async): use top-level await in tee docs (#2280) 2022-05-28 21:05:03 +09:00
Mark Ladyshau
1bba810b48
refactor: replace TS private with private identifiers (#2272) 2022-05-27 21:27:13 +09:00
Tim Reichen
6dcb19b003
chore: replace console.log with array and assertEquals (#2261) 2022-05-22 16:18:10 +02:00
Thomas Cruveilher
215139c170
fix(async/pooledMap): return ordered result (#2239)
closes #2236
2022-05-19 14:05:49 +09:00
Kitson Kelly
00463cba18
docs: improve module JSDoc for archive, async, bytes (#2162) 2022-04-28 14:08:08 +10:00
Yoshiya Hinosawa
a158cbbde4
feat(async): expose asyncPromise and asyncAsyncIterable (#2034) 2022-03-17 14:09:32 +09:00
Yoshiya Hinosawa
2ec5e07a49
docs: fix doc testing errors (#2012) 2022-03-09 01:13:45 +09:00
Yoshiya Hinosawa
b81ff8e06a
fix(async): re-export abortable in mod.ts (#1959) 2022-03-08 14:46:45 +09:00
Jesse Jackson
4e8f0e7bb8
feat(testing/asserts): use assertion signature for "assertStrictEquals" (#1984) 2022-03-04 14:31:19 +09:00
Jesse Jackson
58204e6f56
refactor: mark modules as browser compatible (#1972) 2022-03-01 13:25:50 +09:00
Alisue
5e8adcbfc4
feat(async): add abortable to async module. (#1939) 2022-02-21 13:51:39 +09:00
Yoshiya Hinosawa
808fe203e0
chore: update copyright header (#1871) 2022-02-02 23:21:39 +09:00
Zheyu Zhang
d417d20876
fix(std/async): fix async/tee concurent .next calls error (#1425) 2021-10-20 14:18:58 +09:00
ud2
78752af5e4
fix(async/delay): reject if signal is already aborted (#1363) 2021-10-08 13:38:20 +09:00
Nayeem Rahman
159e2aeffc
feat(testing/asserts): add assertThrows() overload to receive error (#1219) 2021-09-16 00:35:21 +09:00
Yuki Tanaka
76d8c0159b
chore: wrap examples in fenced code blocks (#1222) 2021-09-13 00:14:54 +09:00
Craig Morten
c4600fbd75
docs: correct typos (#1207) 2021-09-07 16:40:05 +09:00
Kitson Kelly
b7c61a27a7
chore: updates related to TypeScript 4.4 (#1171)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-08-31 14:39:04 +10:00
Justin Chase
396445052d
feat(async): add abort signal to delay (#1130) 2021-08-17 14:04:21 +09:00
Yasser A.Idrissi
eb69dbd380
feat(testing): add assertRejects, deprecate assertThrowsSync (#1101) 2021-08-09 14:59:52 +09:00
迷渡
2edb58be58
fix(async): make it so exception of deadline can be caught (#1105) 2021-08-07 01:13:25 -07:00
Simon Lecoq
5606a10728
fix(testing): change assertThrows and assertThrowsAsync return type to void and Promise<void> (#1052) 2021-07-28 14:54:58 +09:00
Yoshiya Hinosawa
186354327c
chore: enable doc type checking (#1050) 2021-07-23 19:09:38 +09:00
Yoshiya Hinosawa
bf73521428
fix(async/deferred): rename .status -> .state (#1055) 2021-07-22 19:22:51 +09:00
Simon Lecoq
3ea49398a2
feat(async): add status to deferred promises (#1047) 2021-07-22 17:28:27 +09:00
Alisue
717e9760c7
feat(async): add deadline to async module (#1022) 2021-07-12 08:44:57 -04:00
Benjamin Fischer
09ce13cb56
feat(async): add debounce method to async module (#1006)
* feat(async): add debounce method to async module

* docs

* add export to mod.ts

* fmt

* simplify flush method

* use assertStrictEquals

* rename Debounce to DebouncedFunction

* remove default delay
2021-07-10 08:30:34 -04:00
Yoshiya Hinosawa
5c0a0df3ba
feat(async): add async/tee (#919) 2021-05-18 22:39:12 +09:00
Yoshiya Hinosawa
81f0675545
feat(async/mux): take AsyncIterable as source iterator (#923) 2021-05-18 22:38:53 +09:00
William Perron
69f3d67cb2
chore: remove Promise<void> return type annotation (#819)
There's a couple of instances where `Promise<void>` is still there,
those are the exceptions, for example functions that explicitely return
a `Promise` object or functions that return the promise from another
function call without any `await` statement.

used this one-liner to automatically remove everything:

```bash
grep -rli 'promise<void>' | xargs sed -i 's/: Promise<void>//g
```
2021-04-05 07:49:05 -04:00
nurmohammed840
f65be15455
property into method (converted type) (#778)
Now vscode will infer methods correctly.
2021-03-17 00:41:12 -04:00
Nayeem Rahman
3978c86d66 fix(async): make pooledMap() errors catchable (denoland/deno#9217) 2021-02-01 10:46:59 +00:00
Kitson Kelly
9597b333b8 refactor(op_crate/fetch): align streams to spec (denoland/deno#9103)
Fixes denoland/deno#8814
2021-02-01 10:46:59 +00:00
Ryan Dahl
48a2496dbe update copyright to 2021 (denoland/deno#9081) 2021-02-01 10:46:59 +00:00
Elisée Maurer
15370d35dd docs(async): fix a couple typos in async/README.md (denoland/deno#8388) 2021-02-01 10:46:58 +00:00
Yusuke Tanaka
2d7871bb17 build: update dlint to v0.2.10 (denoland/deno#8284)
Update prebuilt "dlint" binary to v0.2.10 and fix diagnostics
for "require-await" rule.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-02-01 10:46:58 +00:00
Bartek Iwańczuk
57d903a06b build: migrate to dlint (denoland/deno#8176)
This commit migrates repository from using "eslint" 
to "dlint" for linting JavaScript code.
2021-02-01 10:46:58 +00:00
Trivikram Kamat
eb1c38cfbf docs: end sentences with a period in markdown (denoland/deno#7813) 2021-02-01 10:46:58 +00:00
KNnut
ed54610ca7 Fix typos (denoland/deno#7687) 2021-02-01 10:46:58 +00:00
Andrew Mitchell
184394d40f docs: add async and signal readme (denoland/deno#7683)
Resolves denoland/deno#7608
2021-02-01 10:46:58 +00:00
Casper Beyer
831ab8427e test(async): remove redundant export in test (denoland/deno#7682) 2021-02-01 10:46:58 +00:00
Csaba Okrona
435095d188 test: unit test for async/delay (denoland/deno#7671) 2021-02-01 10:46:58 +00:00
tokiedokie
d3fa1bbf5d chore: add copyright (denoland/deno#7593) 2021-02-01 10:46:58 +00:00
Casper Beyer
5a34e26c91 test: ensure mod.ts modules have a test coverage (denoland/deno#7264) 2021-02-01 10:46:58 +00:00
Luca Casonato
023bfa9c38 feat(async): add pooledMap utility (denoland/deno#6898) 2021-02-01 10:46:58 +00:00
David Sherret
1425960509 Use dprint for internal formatting (denoland/deno#6682) 2021-02-01 10:46:58 +00:00
Kitson Kelly
595bc0066c fix: MuxAsyncIterator throws muxed errors (denoland/deno#6295)
Fixes denoland/deno#5260
2021-02-01 10:46:58 +00:00
Henry Zhuang
eec6ed601e improve deferred test (denoland/deno#5459) 2021-02-01 10:46:57 +00:00
Nayeem Rahman
1eecc5c7d0 BREAKING: reorganization (denoland/deno#5087)
* Prepend underscores to private modules
* Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result.
* Move _util/async.ts to async
* Move util/sha*.ts to hash
2021-02-01 10:46:57 +00:00