Skip to content

Commit

Permalink
full remove Q
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan1986 committed Mar 18, 2024
1 parent cc07e77 commit 3f182fe
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 33 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"opensubtitles-api": "^5.1.2",
"patch-package": "^8.0",
"postinstall-postinstall": "^2.1.0",
"q": "2.0.3",
"readdirp": "2.x.x",
"request": "2.88.x",
"rimraf": "^3.0.0",
Expand Down
5 changes: 2 additions & 3 deletions src/app/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
App.start();

/* load all the things ! */
var Q = require('q');
var fs = require('fs');

function loadLocalProviders() {
Expand Down Expand Up @@ -41,8 +40,8 @@
}

function loadFromNPM(name, fn) {
var P = require(name);
return Q(fn(P));
const P = require(name);
return Promise.resolve(fn(P));
}

function loadProvidersJSON(fn) {
Expand Down
1 change: 0 additions & 1 deletion src/app/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var _ = require('underscore'),
async = require('async'),
inherits = require('util').inherits,
Q = require('q'),
// Machine readable
os = require('os'),
dayjs = require('dayjs'),
Expand Down
2 changes: 1 addition & 1 deletion src/app/httpapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

var initServer = function () {
return Q.Promise(function (resolve, reject) {
return new Promise(function (resolve, reject) {
server = rpc.Server({
'headers': { // allow custom headers is empty by default
'Access-Control-Allow-Origin': '*'
Expand Down
5 changes: 3 additions & 2 deletions src/app/lib/models/favorite_collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
var torrent = this.providers.torrent;
var torrentPromise = torrent.fetch(this.filter);

return Q.all([torrentPromise])
.spread(function (movies) {
return Promise.all([torrentPromise])
.then(function (movies) {
movies = movies.flat();

// If a new request was started...
_.each(movies, function (movie) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ var AdvSettings = {
break;
}

return Q();
return Promise.resolve(true);
},

performUpgrade: function() {
Expand Down
24 changes: 0 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ array-unique@^0.3.2:
resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz"
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=

asap@^2.0.0:
version "2.0.6"
resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz"
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=

asn1@~0.2.3:
version "0.2.6"
resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz"
Expand Down Expand Up @@ -5780,11 +5775,6 @@ plur@^2.1.0:
dependencies:
irregular-plurals "^1.0.0"

pop-iterate@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/pop-iterate/-/pop-iterate-1.0.1.tgz"
integrity sha1-zqz9q0q/NT16DyqqLB/Hs/lBO6M=

posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz"
Expand Down Expand Up @@ -5900,15 +5890,6 @@ pupa@^2.1.1:
dependencies:
escape-goat "^2.0.0"

q@2.0.3:
version "2.0.3"
resolved "https://registry.npmjs.org/q/-/q-2.0.3.tgz"
integrity sha1-dbjbAlWhpa+C9Yw/Oqoe/sfQ0TQ=
dependencies:
asap "^2.0.0"
pop-iterate "^1.0.1"
weak-map "^1.0.5"

qs@~6.5.2:
version "6.5.3"
resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz"
Expand Down Expand Up @@ -8007,11 +7988,6 @@ w-json@^1.3.10:
resolved "https://registry.npmjs.org/w-json/-/w-json-1.3.10.tgz"
integrity sha512-XadVyw0xE+oZ5FGApXsdswv96rOhStzKqL53uSe5UaTadABGkWIg1+DTx8kiZ/VqTZTBneoL0l65RcPe4W3ecw==

weak-map@^1.0.5:
version "1.0.5"
resolved "https://registry.npmjs.org/weak-map/-/weak-map-1.0.5.tgz"
integrity sha1-eWkVhNmGB/UHC9O3CkDmuyLkAes=

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz"
Expand Down

0 comments on commit 3f182fe

Please sign in to comment.