Skip to content

Commit 6ed331f

Browse files
authored
test pnpn cache (#16743)
1 parent 9d43a9e commit 6ed331f

File tree

15 files changed

+23
-58
lines changed

15 files changed

+23
-58
lines changed

.eslintrc.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,4 @@ jobs:
7272
7373
- name: Run ESLint
7474
run: |
75-
npm ci
7675
npm run lint

eslint.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = [
2+
{
3+
files: ["**/*.js"],
4+
ignores: ["projects/test/*"],
5+
languageOptions: {
6+
ecmaVersion: "latest",
7+
},
8+
rules: {
9+
"no-case-declarations": "off",
10+
"no-unused-vars": "off",
11+
"no-useless-escape": "warn",
12+
"no-prototype-builtins": "off",
13+
"no-unreachable": "off",
14+
}
15+
}
16+
];

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"weeklyChanges": "git pull && git diff $(git log -1 --before=@{7.days.ago} --format=%H) --stat | grep -E \"projects/\" | cut -d / -f 2 | cut -d \" \" -f 1 | uniq | wc -l",
99
"dev": "babel-watch curve.js",
1010
"build": "node scripts/buildImports.js",
11-
"lint": "eslint -c .eslintrc.js .",
12-
"eslint:github-action": "eslint -c .eslintrc.js .",
11+
"lint": "eslint -c eslint.config.js .",
12+
"eslint:github-action": "eslint -c eslint.config.js .",
1313
"test-interactive": "node utils/testInteractive",
1414
"tvl": "cd utils;npm i; cd ..; node utils/testInteractive",
1515
"treasury": "cd utils;npm i; cd ..; node utils/testInteractive treasury",

projects/blacksail/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const { getEnv } = require('../helper/env')
44
const { sumUnknownTokens } = require('../helper/unknownTokens')
55

66
async function fetcher() {
7-
const { data: { yield }} = await get('https://api.blacksail.finance/stats', {
7+
const { data} = await get('https://api.blacksail.finance/stats', {
88
headers: {
99
'x-api-key': getEnv('BLACKSAIL_API_KEY'),
1010
'Content-Type': 'application/json'
1111
}
1212
});
13-
return Object.values(yield).map((i) => i.strat_address).filter(i => i)
13+
return Object.values(data.yield).map((i) => i.strat_address).filter(i => i)
1414
}
1515

1616
async function tvl(api) {

projects/filliquid/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-async-promise-executor */
2-
const sdk = require('@defillama/sdk');
31
const ADDRESSES = require('../helper/coreAssets.json')
42
const static_contract = "0xA25F892cF2731ba89b88750423Fc618De0959C43";
53
const fil_fig_stake_contract = "0xD44bfE4523f1B2703DDE9C7dBc010Ad39EF668f7";
@@ -35,4 +33,3 @@ module.exports = {
3533
staking:(api) => getFigStake(api, bsc_fig_stake_contract, BSC_FIG_TOKEN)
3634
}
3735
};
38-
/* eslint-enable no-async-promise-executor */

projects/helper/balancer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ function v3Tvl(
119119
if (!tokenBalances.length) throw new Error("null value of tokens");
120120

121121
const blSet = new Set([...blacklistedTokens, ...pools].map((s) => s.toLowerCase()));
122-
// eslint-disable-next-line no-const-assign
123122
tokenBalances = tokenBalances.filter(([t]) => !blSet.has(String(t).toLowerCase()));
124123

125124
await api.addTokens(tokenBalances);

projects/helper/sumTokens.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ async function sumTokens(options) {
7979
const evmAddressExceptions = new Set(['tron', 'xdc'])
8080
const nonEvmOwnerFound = !evmAddressExceptions.has(chain) && owners.some(o => !o.startsWith('0x'))
8181
const isAltEvm = altEVMHelper[chain] && nonEvmOwnerFound
82-
console.log('chain:', chain, 'isAltEvm:', isAltEvm, 'nonEvmOwnerFound:', nonEvmOwnerFound)
8382

8483
if (!ibcChains.includes(chain) && !helpers[chain] && !specialChains.includes(chain) && !isAltEvm) {
8584
if (nonEvmOwnerFound) throw new Error('chain handler missing: ' + chain)

projects/helper/utils/pact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const b64url = (function () {
101101
// initialize result and counters
102102
var bc = 0, bs, buffer, idx = 0, output = '';
103103
// get next character
104-
buffer = str.charAt(idx++); // eslint-disable-line no-cond-assign
104+
buffer = str.charAt(idx++);
105105
// character found in table? initialize bit storage and add its ascii value;
106106
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
107107
// and if not first of each 4 characters,

projects/kpk/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ async function getGearboxV31Collateral(api, marketConfigurator, pageSize = 1e3)
4747
// page through credit accounts for each CM
4848
for (const cm of creditManagers) {
4949
let offset = 0
50-
// eslint-disable-next-line no-constant-condition
5150
while (true) {
5251
const accounts = await api.call({
5352
abi: GearboxCompressorABI.getCreditAccounts,

0 commit comments

Comments
 (0)