Use @vercel/fetch for run-tests requests (#27815)

* Use @vercel/fetch for run-tests requests

* update precompileld
This commit is contained in:
JJ Kasper 2021-08-06 10:20:05 -05:00 committed by GitHub
parent d2f43b718f
commit b24cd1eaba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 3 deletions

View file

@ -57,6 +57,7 @@
"@types/string-hash": "1.1.1",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"@vercel/fetch": "6.1.1",
"@zeit/next-css": "1.0.2-canary.2",
"@zeit/next-sass": "1.0.2-canary.2",
"@zeit/next-typescript": "1.1.2-canary.0",

View file

@ -1 +1 @@
module.exports=(()=>{var t={454:(t,r,e)=>{t.exports=e(839)},839:(t,r,e)=>{var i=e(730);r.operation=function(t){var e=r.timeouts(t);return new i(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var e in t){r[e]=t[e]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var i=[];for(var o=0;o<r.retries;o++){i.push(this.createTimeout(o,r))}if(t&&t.forever&&!i.length){i.push(this.createTimeout(o,r))}i.sort(function(t,r){return t-r});return i};r.createTimeout=function(t,r){var e=r.randomize?Math.random()+1:1;var i=Math.round(e*r.minTimeout*Math.pow(r.factor,t));i=Math.min(i,r.maxTimeout);return i};r.wrap=function(t,e,i){if(e instanceof Array){i=e;e=null}if(!i){i=[];for(var o in t){if(typeof t[o]==="function"){i.push(o)}}}for(var n=0;n<i.length;n++){var a=i[n];var s=t[a];t[a]=function retryWrapper(i){var o=r.operation(e);var n=Array.prototype.slice.call(arguments,1);var a=n.pop();n.push(function(t){if(o.retry(t)){return}if(t){arguments[0]=o.mainError()}a.apply(this,arguments)});o.attempt(function(){i.apply(t,n)})}.bind(t,s);t[a].options=e}}},730:t=>{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var e=this._timeouts.shift();if(e===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);e=this._timeouts.shift()}else{return false}}var i=this;var o=setTimeout(function(){i._attempts++;if(i._operationTimeoutCb){i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout);if(i._options.unref){i._timeout.unref()}}i._fn(i._attempts)},e);if(this._options.unref){o.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var e=this;if(this._operationTimeoutCb){this._timeout=setTimeout(function(){e._operationTimeoutCb()},e._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var e=0;for(var i=0;i<this._errors.length;i++){var o=this._errors[i];var n=o.message;var a=(t[n]||0)+1;t[n]=a;if(a>=e){r=o;e=a}}return r}},415:(t,r,e)=>{var i=e(454);function retry(t,r){function run(e,o){var n=r||{};var a=i.operation(n);function bail(t){o(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!a.retry(t)){o(a.mainError())}else if(n.onRetry){n.onRetry(t,r)}}function runAttempt(r){var i;try{i=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(i).then(e).catch(function catchIt(t){onError(t,r)})}a.attempt(runAttempt)}return new Promise(run)}t.exports=retry}};var r={};function __nccwpck_require__(e){if(r[e]){return r[e].exports}var i=r[e]={exports:{}};var o=true;try{t[e](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete r[e]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(415)})();
module.exports=(()=>{var t={338:(t,r,e)=>{var i=e(454);function retry(t,r){function run(e,o){var n=r||{};var a=i.operation(n);function bail(t){o(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!a.retry(t)){o(a.mainError())}else if(n.onRetry){n.onRetry(t,r)}}function runAttempt(r){var i;try{i=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(i).then(e).catch(function catchIt(t){onError(t,r)})}a.attempt(runAttempt)}return new Promise(run)}t.exports=retry},454:(t,r,e)=>{t.exports=e(839)},839:(t,r,e)=>{var i=e(730);r.operation=function(t){var e=r.timeouts(t);return new i(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var e in t){r[e]=t[e]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var i=[];for(var o=0;o<r.retries;o++){i.push(this.createTimeout(o,r))}if(t&&t.forever&&!i.length){i.push(this.createTimeout(o,r))}i.sort(function(t,r){return t-r});return i};r.createTimeout=function(t,r){var e=r.randomize?Math.random()+1:1;var i=Math.round(e*r.minTimeout*Math.pow(r.factor,t));i=Math.min(i,r.maxTimeout);return i};r.wrap=function(t,e,i){if(e instanceof Array){i=e;e=null}if(!i){i=[];for(var o in t){if(typeof t[o]==="function"){i.push(o)}}}for(var n=0;n<i.length;n++){var a=i[n];var s=t[a];t[a]=function retryWrapper(i){var o=r.operation(e);var n=Array.prototype.slice.call(arguments,1);var a=n.pop();n.push(function(t){if(o.retry(t)){return}if(t){arguments[0]=o.mainError()}a.apply(this,arguments)});o.attempt(function(){i.apply(t,n)})}.bind(t,s);t[a].options=e}}},730:t=>{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var e=this._timeouts.shift();if(e===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);e=this._timeouts.shift()}else{return false}}var i=this;var o=setTimeout(function(){i._attempts++;if(i._operationTimeoutCb){i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout);if(i._options.unref){i._timeout.unref()}}i._fn(i._attempts)},e);if(this._options.unref){o.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var e=this;if(this._operationTimeoutCb){this._timeout=setTimeout(function(){e._operationTimeoutCb()},e._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var e=0;for(var i=0;i<this._errors.length;i++){var o=this._errors[i];var n=o.message;var a=(t[n]||0)+1;t[n]=a;if(a>=e){r=o;e=a}}return r}}};var r={};function __nccwpck_require__(e){if(r[e]){return r[e].exports}var i=r[e]={exports:{}};var o=true;try{t[e](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete r[e]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(338)})();

View file

@ -1,7 +1,9 @@
const path = require('path')
const _glob = require('glob')
const fs = require('fs').promises
const fetch = require('node-fetch')
const nodeFetch = require('node-fetch')
const vercelFetch = require('@vercel/fetch')
const fetch = vercelFetch(nodeFetch)
const { promisify } = require('util')
const { Sema } = require('async-sema')
const { spawn, exec: execOrig } = require('child_process')

View file

@ -4000,6 +4000,11 @@
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.1.tgz#78b5433344e2f92e8b306c06a5622c50c245bf6b"
integrity sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg==
"@types/async-retry@1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@types/async-retry/-/async-retry-1.2.1.tgz#fa9ac165907a8ee78f4924f4e393b656c65b5bb4"
integrity sha512-yMQ6CVgICWtyFNBqJT3zqOc+TnqqEPLo4nKJNPFwcialiylil38Ie6q1ENeFTjvaLOkVim9K5LisHgAKJWidGQ==
"@types/async-retry@1.4.2":
version "1.4.2"
resolved "https://registry.yarnpkg.com/@types/async-retry/-/async-retry-1.4.2.tgz#7f910188cd3893b51e32df51765ee8d5646053e3"
@ -4311,6 +4316,11 @@
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef"
"@types/lru-cache@4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-4.1.1.tgz#b2d87a5e3df8d4b18ca426c5105cd701c2306d40"
integrity sha512-8mNEUG6diOrI6pMqOHrHPDBB1JsrpedeMK9AWGzVCQ7StRRribiT9BRvUmF8aUws9iBbVlgVekOT5Sgzc1MTKw==
"@types/lru-cache@5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03"
@ -4335,6 +4345,13 @@
dependencies:
"@types/node" "*"
"@types/node-fetch@2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.3.2.tgz#e01893b176c6fa1367743726380d65bce5d6576b"
integrity sha512-yW0EOebSsQme9yKu09XbdDfle4/SmWZMK4dfteWcSLCYNQQcF+YOv0kIrvm+9pO11/ghA4E6A+RNQqvYj4Nr3A==
dependencies:
"@types/node" "*"
"@types/node-fetch@2.3.4":
version "2.3.4"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.3.4.tgz#a46fc4fe9f94b491bf551b6bb7f0f493b9bacd1a"
@ -4345,6 +4362,11 @@
version "13.1.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e"
"@types/node@10.12.18":
version "10.12.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
"@types/node@^10.1.0":
version "10.17.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c"
@ -4624,6 +4646,33 @@
"@typescript-eslint/types" "4.22.0"
eslint-visitor-keys "^2.0.0"
"@vercel/fetch-cached-dns@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@vercel/fetch-cached-dns/-/fetch-cached-dns-2.0.2.tgz#975c395cf53f188fa618fad57f27af6b5ffc5bab"
integrity sha512-gDqKEV8CeY2YmCdZpP1rn3tFK1L07Vw2+HYkCK8zpRHOVGr/sP8yhBsW+C/yqGVj0i9z/rIvqIHe5emvRvxwgw==
dependencies:
"@types/node-fetch" "2.3.2"
"@zeit/dns-cached-resolve" "2.1.2"
"@vercel/fetch-retry@^5.0.2":
version "5.0.3"
resolved "https://registry.yarnpkg.com/@vercel/fetch-retry/-/fetch-retry-5.0.3.tgz#cce5d23f6e64f6f525c24e2ac7c78f65d6c5b1f4"
integrity sha512-DIIoBY92r+sQ6iHSf5WjKiYvkdsDIMPWKYATlE0KcUAj2RV6SZK9UWpUzBRKsofXqedOqpVjrI0IE6AWL7JRtg==
dependencies:
async-retry "^1.3.1"
debug "^3.1.0"
"@vercel/fetch@6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@vercel/fetch/-/fetch-6.1.1.tgz#6564bfe9050f871842cf4834bb0117eaafd3915e"
integrity sha512-nddCkgpA0aVIqOlzh+qVlzDNcQq0cSnqefM+x6SciGI4GCvVZeaZ7WEowgX8I/HwBAq8Uj5Bdnd+r0+sYsJsig==
dependencies:
"@types/async-retry" "1.2.1"
"@vercel/fetch-cached-dns" "^2.0.2"
"@vercel/fetch-retry" "^5.0.2"
agentkeepalive "3.4.1"
debug "3.1.0"
"@vercel/ncc@0.25.1":
version "0.25.1"
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.25.1.tgz#a4aacdb508ac496fc0c63a3c3203d700a619cc0e"
@ -4890,6 +4939,17 @@
version "4.2.2"
resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
"@zeit/dns-cached-resolve@2.1.2":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@zeit/dns-cached-resolve/-/dns-cached-resolve-2.1.2.tgz#2c2e33d682d67f94341c9a06ac0e2a8f14ff035f"
integrity sha512-A/5gbBskKPETTBqHwvlaW1Ri2orO62yqoFoXdxna1SQ7A/lXjpWgpJ1wdY3IQEcz5LydpS4sJ8SzI2gFyyLEhg==
dependencies:
"@types/async-retry" "1.2.1"
"@types/lru-cache" "4.1.1"
"@types/node" "10.12.18"
async-retry "1.2.3"
lru-cache "5.1.1"
"@zeit/ncc@0.20.4":
version "0.20.4"
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.20.4.tgz#00f0a25a88cac3712af4ba66561d9e281c6f05c9"
@ -5032,6 +5092,13 @@ agent-base@6:
dependencies:
debug "4"
agentkeepalive@3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.4.1.tgz#aa95aebc3a749bca5ed53e3880a09f5235b48f0c"
integrity sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==
dependencies:
humanize-ms "^1.2.1"
agentkeepalive@^4.1.3:
version "4.1.4"
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b"
@ -5463,7 +5530,7 @@ async-retry@1.2.3:
dependencies:
retry "0.12.0"
async-retry@1.3.1:
async-retry@1.3.1, async-retry@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.1.tgz#139f31f8ddce50c0870b0ba558a6079684aaed55"
integrity sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA==