Skip to content

Commit

Permalink
ref(fetch): manual removal of unused request
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Oct 14, 2024
1 parent 5d28f73 commit f4ec7ca
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
5 changes: 2 additions & 3 deletions _common/gitea.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ var GitHubish = require('./githubish.js');
/**
* Lists Gitea Releases (w/ uploaded assets)
*
* @param {any} _request - deprecated
* @param {null} _ - deprecated
* @param {String} owner
* @param {String} repo
* @param {String} baseurl
* @param {String} [username]
* @param {String} [token]
*/
async function getDistributables(
_request,
_,
owner,
repo,
baseurl,
Expand Down Expand Up @@ -42,7 +42,6 @@ if (module === require.main) {
'',
'',
).then(
//getDistributables(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
function (all) {
console.info(JSON.stringify(all, null, 2));
},
Expand Down
4 changes: 2 additions & 2 deletions _common/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ let GitHubish = require('./githubish.js');
/**
* Lists GitHub Releases (w/ uploaded assets)
*
* @param {null} _request - deprecated
* @param {null} _ - deprecated
* @param {String} owner
* @param {String} repo
* @param {String} [baseurl]
* @param {String} [username]
* @param {String} [token]
*/
module.exports = async function (
_request,
_,
owner,
repo,
baseurl = 'https://api.github.com',
Expand Down
2 changes: 1 addition & 1 deletion _example/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Releases.latest = async function () {

Releases.sample = async function () {
let normalize = require('../_webi/normalize.js');
let all = await module.exports();
let all = await Releases.latest();
all = normalize(all);
// just select the first 5 for demonstration
all.releases = all.releases.slice(0, 5);
Expand Down
1 change: 0 additions & 1 deletion _npm/scripts/install-webi.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

//var pkg = require('../package.json');
var os = require('os');
//var request = require('@root/request');
//var promisify = require('util').promisify;
//var exec = promisify(require('child_process').exec);
var exec = require('child_process').exec;
Expand Down
4 changes: 2 additions & 2 deletions vim-commentary/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
var git = require('../_common/git-tag.js');
var gitUrl = 'https://github.com/tpope/vim-commentary.git';

module.exports = async function (request) {
module.exports = async function () {
let all = await git(gitUrl);

return all;
};

if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
module.exports().then(function (all) {
all = require('../_webi/normalize.js')(all);

let samples = JSON.stringify(all, null, 2);
Expand Down
4 changes: 2 additions & 2 deletions vim-zig/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
var git = require('../_common/git-tag.js');
var gitUrl = 'https://github.com/ziglang/zig.vim.git';

module.exports = async function (request) {
module.exports = async function () {
let all = await git(gitUrl);

all._names = ['zig.vim', 'vim-zig'];
return all;
};

if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
module.exports().then(function (all) {
all = require('../_webi/normalize.js')(all);

let samples = JSON.stringify(all, null, 2);
Expand Down
4 changes: 2 additions & 2 deletions zig.vim/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
var git = require('../_common/git-tag.js');
var gitUrl = 'https://github.com/ziglang/zig.vim.git';

module.exports = async function (request) {
module.exports = async function () {
let all = await git(gitUrl);

return all;
};

if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
module.exports().then(function (all) {
all = require('../_webi/normalize.js')(all);

let samples = JSON.stringify(all, null, 2);
Expand Down

0 comments on commit f4ec7ca

Please sign in to comment.