Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rsvp.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
rsvp.js
Commits
69c6d7c9
Commit
69c6d7c9
authored
Dec 14, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Publish build version of rsvp.
parent
08ff89d4
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
40 deletions
+40
-40
dist/commonjs/rsvp/all.js
dist/commonjs/rsvp/all.js
+2
-2
dist/commonjs/rsvp/hash.js
dist/commonjs/rsvp/hash.js
+2
-2
dist/commonjs/rsvp/promise.js
dist/commonjs/rsvp/promise.js
+3
-3
dist/commonjs/rsvp/queue.js
dist/commonjs/rsvp/queue.js
+4
-4
dist/commonjs/rsvp/resolve.js
dist/commonjs/rsvp/resolve.js
+2
-2
dist/rsvp-2.0.4.amd.js
dist/rsvp-2.0.4.amd.js
+13
-13
dist/rsvp-2.0.4.js
dist/rsvp-2.0.4.js
+13
-13
dist/rsvp-2.0.4.min.js
dist/rsvp-2.0.4.min.js
+1
-1
No files found.
dist/commonjs/rsvp/all.js
View file @
69c6d7c9
...
...
@@ -8,14 +8,14 @@ function promiseAtLeast(expected_count, promises) {
throw
new
TypeError
(
'
You must pass an array to all.
'
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
;
for
(
var
i
=
0
;
i
<
promises
.
length
;
i
++
)
{
promise
=
promises
[
i
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
dist/commonjs/rsvp/hash.js
View file @
69c6d7c9
...
...
@@ -13,7 +13,7 @@ function size(object) {
function
hash
(
promises
)
{
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
,
key
;
for
(
key
in
promises
)
{
...
...
@@ -22,7 +22,7 @@ function hash(promises) {
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
dist/commonjs/rsvp/promise.js
View file @
69c6d7c9
...
...
@@ -46,21 +46,21 @@ var Promise = function(resolver, canceller) {
this
.
on
(
'
error
'
,
onerror
);
this
.
cancel
=
function
()
{
this
.
cancel
=
function
(
msg
)
{
// For now, simply reject the promise and does not propagate the cancel
// to parent or children
if
(
resolved
)
{
return
;
}
promise
.
isCancelled
=
true
;
if
(
canceller
!==
undefined
)
{
try
{
canceller
();
canceller
(
msg
);
}
catch
(
e
)
{
rejectPromise
(
e
);
return
;
}
}
// Trigger cancel?
rejectPromise
(
new
CancellationError
());
rejectPromise
(
new
CancellationError
(
msg
));
};
try
{
...
...
dist/commonjs/rsvp/queue.js
View file @
69c6d7c9
...
...
@@ -25,9 +25,9 @@ var Queue = function(thenable) {
return
new
Queue
(
thenable
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
for
(
var
i
=
promise_list
.
length
;
i
>
0
;
i
--
)
{
promise_list
[
i
-
1
].
cancel
();
promise_list
[
i
-
1
].
cancel
(
msg
);
}
}
...
...
@@ -70,10 +70,10 @@ var Queue = function(thenable) {
checkPromise
(
resolve
(
thenable
));
queue
.
cancel
=
function
()
{
queue
.
cancel
=
function
(
msg
)
{
if
(
resolved
)
{
return
;}
resolved
=
true
;
promise
.
cancel
();
promise
.
cancel
(
msg
);
promise
.
fail
(
function
(
rejectedReason
)
{
queue
.
isRejected
=
true
;
queue
.
rejectedReason
=
rejectedReason
;
...
...
dist/commonjs/rsvp/resolve.js
View file @
69c6d7c9
...
...
@@ -10,9 +10,9 @@ function resolve(thenable) {
}
}
return
resolve
(
thenable
);
},
function
()
{
},
function
(
msg
)
{
if
((
thenable
!==
undefined
)
&&
(
thenable
.
cancel
!==
undefined
))
{
thenable
.
cancel
();
thenable
.
cancel
(
msg
);
}
});
}
...
...
dist/rsvp-2.0.4.amd.js
View file @
69c6d7c9
...
...
@@ -11,14 +11,14 @@ define("rsvp/all",
throw
new
TypeError
(
'
You must pass an array to all.
'
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
;
for
(
var
i
=
0
;
i
<
promises
.
length
;
i
++
)
{
promise
=
promises
[
i
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
@@ -359,7 +359,7 @@ define("rsvp/hash",
function
hash
(
promises
)
{
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
,
key
;
for
(
key
in
promises
)
{
...
...
@@ -368,7 +368,7 @@ define("rsvp/hash",
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
@@ -515,21 +515,21 @@ define("rsvp/promise",
this
.
on
(
'
error
'
,
onerror
);
this
.
cancel
=
function
()
{
this
.
cancel
=
function
(
msg
)
{
// For now, simply reject the promise and does not propagate the cancel
// to parent or children
if
(
resolved
)
{
return
;
}
promise
.
isCancelled
=
true
;
if
(
canceller
!==
undefined
)
{
try
{
canceller
();
canceller
(
msg
);
}
catch
(
e
)
{
rejectPromise
(
e
);
return
;
}
}
// Trigger cancel?
rejectPromise
(
new
CancellationError
());
rejectPromise
(
new
CancellationError
(
msg
));
};
try
{
...
...
@@ -736,9 +736,9 @@ define("rsvp/queue",
return
new
Queue
(
thenable
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
for
(
var
i
=
promise_list
.
length
;
i
>
0
;
i
--
)
{
promise_list
[
i
-
1
].
cancel
();
promise_list
[
i
-
1
].
cancel
(
msg
);
}
}
...
...
@@ -781,10 +781,10 @@ define("rsvp/queue",
checkPromise
(
resolve
(
thenable
));
queue
.
cancel
=
function
()
{
queue
.
cancel
=
function
(
msg
)
{
if
(
resolved
)
{
return
;}
resolved
=
true
;
promise
.
cancel
();
promise
.
cancel
(
msg
);
promise
.
fail
(
function
(
rejectedReason
)
{
queue
.
isRejected
=
true
;
queue
.
rejectedReason
=
rejectedReason
;
...
...
@@ -847,9 +847,9 @@ define("rsvp/resolve",
}
}
return
resolve
(
thenable
);
},
function
()
{
},
function
(
msg
)
{
if
((
thenable
!==
undefined
)
&&
(
thenable
.
cancel
!==
undefined
))
{
thenable
.
cancel
();
thenable
.
cancel
(
msg
);
}
});
}
...
...
dist/rsvp-2.0.4.js
View file @
69c6d7c9
...
...
@@ -48,14 +48,14 @@ define("rsvp/all",
throw
new
TypeError
(
'
You must pass an array to all.
'
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
;
for
(
var
i
=
0
;
i
<
promises
.
length
;
i
++
)
{
promise
=
promises
[
i
];
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
@@ -396,7 +396,7 @@ define("rsvp/hash",
function
hash
(
promises
)
{
function
canceller
()
{
function
canceller
(
msg
)
{
var
promise
,
key
;
for
(
key
in
promises
)
{
...
...
@@ -405,7 +405,7 @@ define("rsvp/hash",
if
(
promise
&&
typeof
promise
.
then
===
'
function
'
&&
typeof
promise
.
cancel
===
'
function
'
)
{
promise
.
cancel
();
promise
.
cancel
(
msg
);
}
}
}
...
...
@@ -552,21 +552,21 @@ define("rsvp/promise",
this
.
on
(
'
error
'
,
onerror
);
this
.
cancel
=
function
()
{
this
.
cancel
=
function
(
msg
)
{
// For now, simply reject the promise and does not propagate the cancel
// to parent or children
if
(
resolved
)
{
return
;
}
promise
.
isCancelled
=
true
;
if
(
canceller
!==
undefined
)
{
try
{
canceller
();
canceller
(
msg
);
}
catch
(
e
)
{
rejectPromise
(
e
);
return
;
}
}
// Trigger cancel?
rejectPromise
(
new
CancellationError
());
rejectPromise
(
new
CancellationError
(
msg
));
};
try
{
...
...
@@ -773,9 +773,9 @@ define("rsvp/queue",
return
new
Queue
(
thenable
);
}
function
canceller
()
{
function
canceller
(
msg
)
{
for
(
var
i
=
promise_list
.
length
;
i
>
0
;
i
--
)
{
promise_list
[
i
-
1
].
cancel
();
promise_list
[
i
-
1
].
cancel
(
msg
);
}
}
...
...
@@ -818,10 +818,10 @@ define("rsvp/queue",
checkPromise
(
resolve
(
thenable
));
queue
.
cancel
=
function
()
{
queue
.
cancel
=
function
(
msg
)
{
if
(
resolved
)
{
return
;}
resolved
=
true
;
promise
.
cancel
();
promise
.
cancel
(
msg
);
promise
.
fail
(
function
(
rejectedReason
)
{
queue
.
isRejected
=
true
;
queue
.
rejectedReason
=
rejectedReason
;
...
...
@@ -884,9 +884,9 @@ define("rsvp/resolve",
}
}
return
resolve
(
thenable
);
},
function
()
{
},
function
(
msg
)
{
if
((
thenable
!==
undefined
)
&&
(
thenable
.
cancel
!==
undefined
))
{
thenable
.
cancel
();
thenable
.
cancel
(
msg
);
}
});
}
...
...
dist/rsvp-2.0.4.min.js
View file @
69c6d7c9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment