Skip to content

Commit a97497d

Browse files
committed
v1.0.0
1 parent 9eb632f commit a97497d

File tree

3 files changed

+1
-116
lines changed

3 files changed

+1
-116
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## v1.0.0 - 2025-01-03
44

5-
- Removed the `raceN` functions from the `promise` module.
5+
- Removed the `raceN` and `awaitN` functions from the `promise` module.
66
- Removed the `map` module.
77

88
## v0.13.0 - 2024-08-30

src/gleam/javascript/promise.gleam

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -120,68 +120,6 @@ pub fn try_await(
120120
})
121121
}
122122

123-
/// Chain an asynchronous operation onto 2 promises, so it runs after the
124-
/// promises have resolved.
125-
///
126-
/// This is the equivilent of the `Promise.all` JavaScript static method.
127-
///
128-
@external(javascript, "../../gleam_javascript_ffi.mjs", "all_promises")
129-
pub fn await2(a: Promise(a), b: Promise(b)) -> Promise(#(a, b))
130-
131-
/// Chain an asynchronous operation onto 3 promises, so it runs after the
132-
/// promises have resolved.
133-
///
134-
/// This is the equivilent of the `Promise.all` JavaScript static method.
135-
///
136-
@external(javascript, "../../gleam_javascript_ffi.mjs", "all_promises")
137-
pub fn await3(
138-
a: Promise(a),
139-
b: Promise(b),
140-
c: Promise(c),
141-
) -> Promise(#(a, b, c))
142-
143-
/// Chain an asynchronous operation onto 4 promises, so it runs after the
144-
/// promises have resolved.
145-
///
146-
/// This is the equivilent of the `Promise.all` JavaScript static method.
147-
///
148-
@external(javascript, "../../gleam_javascript_ffi.mjs", "all_promises")
149-
pub fn await4(
150-
a: Promise(a),
151-
b: Promise(b),
152-
c: Promise(c),
153-
d: Promise(d),
154-
) -> Promise(#(a, b, c, d))
155-
156-
/// Chain an asynchronous operation onto 5 promises, so it runs after the
157-
/// promises have resolved.
158-
///
159-
/// This is the equivilent of the `Promise.all` JavaScript static method.
160-
///
161-
@external(javascript, "../../gleam_javascript_ffi.mjs", "all_promises")
162-
pub fn await5(
163-
a: Promise(a),
164-
b: Promise(b),
165-
c: Promise(c),
166-
d: Promise(d),
167-
e: Promise(e),
168-
) -> Promise(#(a, b, c, d, e))
169-
170-
/// Chain an asynchronous operation onto 6 promises, so it runs after the
171-
/// promises have resolved.
172-
///
173-
/// This is the equivilent of the `Promise.all` JavaScript static method.
174-
///
175-
@external(javascript, "../../gleam_javascript_ffi.mjs", "all_promises")
176-
pub fn await6(
177-
a: Promise(a),
178-
b: Promise(b),
179-
c: Promise(c),
180-
d: Promise(d),
181-
e: Promise(e),
182-
f: Promise(f),
183-
) -> Promise(#(a, b, c, d, e, f))
184-
185123
/// Chain an asynchronous operation onto an array of promises, so it runs after the
186124
/// promises have resolved.
187125
///

test/gleam/javascript/promise_test.gleam

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -148,59 +148,6 @@ pub fn rescue_poisoned_test() {
148148
})
149149
}
150150

151-
pub fn await2_test() {
152-
promise.await2(promise.resolve(1), promise.resolve(3))
153-
|> promise.tap(fn(x) {
154-
let assert #(1, 3) = x
155-
})
156-
}
157-
158-
pub fn await3_test() {
159-
promise.await3(promise.resolve(1), promise.resolve(3), promise.resolve(4))
160-
|> promise.tap(fn(x) {
161-
let assert #(1, 3, 4) = x
162-
})
163-
}
164-
165-
pub fn await4_test() {
166-
promise.await4(
167-
promise.resolve(1),
168-
promise.resolve(3),
169-
promise.resolve(4),
170-
promise.resolve(6),
171-
)
172-
|> promise.tap(fn(x) {
173-
let assert #(1, 3, 4, 6) = x
174-
})
175-
}
176-
177-
pub fn await5_test() {
178-
promise.await5(
179-
promise.resolve(1),
180-
promise.resolve(3),
181-
promise.resolve(4),
182-
promise.resolve(6),
183-
promise.resolve(10),
184-
)
185-
|> promise.tap(fn(x) {
186-
let assert #(1, 3, 4, 6, 10) = x
187-
})
188-
}
189-
190-
pub fn await6_test() {
191-
promise.await6(
192-
promise.resolve(1),
193-
promise.resolve(3),
194-
promise.resolve(4),
195-
promise.resolve(6),
196-
promise.resolve(10),
197-
promise.resolve(13),
198-
)
199-
|> promise.tap(fn(x) {
200-
let assert #(1, 3, 4, 6, 10, 13) = x
201-
})
202-
}
203-
204151
pub fn await_array_test() {
205152
promise.await_array(
206153
array.from_list([

0 commit comments

Comments
 (0)