Skip to content

Commit b8abfa9

Browse files
0237hYaroShkvorets
andcommitted
Update all projects dependencies
`yaml-ts` - Replace `safe*` variants with `load`/`loadall`/`dump` -> https://github.com/nodeca/js-yaml/blob/0d3ca7a27b03a6c974790a30a89e456007d62976/migrate_v3_to_v4.md#safeload-safeloadall-safedump--load-loadall-dump `immutable` - `Map([ [ 'k', 'v' ] ])` or `Map({ k: 'v' })` instead of `Map.of` -> https://github.com/immutable-js/immutable-js/blob/b3a1c9f13880048d744366ae561c39a34b26190a/CHANGELOG.md#breaking-changes - Replace `immutable.Collection<ProtocolName, string[]>` with `immutable.Collection<ProtocolName, immutable.List<string>>` `oclif/core` - Use `gluegun.prompt` instead of `ux.prompt` -> oclif/core#999 - Fix `prompt` variable assignments from object destructuring (thanks @YaroShkvorets) - Migrate to ESM -> https://oclif.io/docs/esm/ `assemblyscript/asc` - Use `assemblyscript/asc` as import - `asc.main` no longer as callback for error, uses stderr and is async -> https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.20.0 - Remove `asc.ready` -> https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.20.0 - Remove `ascMain` in `package.json` -> https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.20.0 - Replace `Promise.allSettled` with for loop in tests for resolving WASM generation promises in sequence (prevent WASM file corruption since they use same file `outputWasmPath`). `yaml` - Remove `strOptions` -> eemeli/yaml#235 `chokidar` - Import type `FSWatcher` as namespace no longer available - Remove `await` for `onTrigger` as it's no longer async `http-ipfs-client` - Migrate from `http-ipfs-client` to `kubo-rpc-client` with dynamic import as it's ESM only -> ipfs/helia#157 - Make `createCompiler` async due to dynamic import `cli/package.json` - Upgrade `moduleResolution` to `bundler`, `module` to `ESNext` and `target` to `ESNext` making it an ESM module `eslint` - Move `.eslintignore` inside config -> - Use `ESLINT_USE_FLAT_CONFIG=false` in pnpm scripts - Update config annotations `sync-request` - Deprecated, replace with async `fetch` call -> https://www.npmjs.com/package/sync-request - Make `generateTypes` async and update NEAR test snapshot `web3-eth-abi` - Import `decodeLogs` method directly as there is no more default export `vitest` - Remove `concurrent` for tests using filesystem `dockerode` - Remove dependency `tern` - Remove dependency `binary-install-raw` - Replace with `binary-install` --------- Co-authored-by: YaroShkvorets <[email protected]>
1 parent 2050bf6 commit b8abfa9

File tree

122 files changed

+9384
-12864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+9384
-12864
lines changed

.eslintignore

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

.eslintrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
module.exports = {
22
extends: ['@theguild'],
3+
ignorePatterns: [
4+
'node_modules',
5+
'dist',
6+
'build',
7+
'generated',
8+
'packages/cli/tests/cli/init',
9+
'packages/cli/tests/cli/validation',
10+
'packages/ts/test/',
11+
'examples',
12+
'cf-pages/*',
13+
'vitest.config.ts',
14+
],
315
rules: {
416
// not necessary here, we dont build with bob
517
'import/extensions': 'off',
@@ -16,6 +28,7 @@ module.exports = {
1628
'@typescript-eslint/ban-types': 'off',
1729
// AssemblyScript `===` is a reference equality check, not a value equality check. We are trying to do a value check. Learn more: https://github.com/AssemblyScript/assemblyscript/issues/621#issuecomment-497973428
1830
eqeqeq: 'off',
31+
'@typescript-eslint/no-unused-vars': 'off',
1932
},
2033
overrides: [
2134
{
@@ -29,6 +42,7 @@ module.exports = {
2942
'sonarjs/no-inverted-boolean-check': 'warn',
3043
// TODO: warning for now, clean up
3144
'@typescript-eslint/no-loss-of-precision': 'warn',
45+
'no-loss-of-precision': 'warn',
3246
// AssemblyScript types are different from TS and in cases we want to use what TS may think we should not,
3347
},
3448
},

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ tmp
8282

8383
*.wasm
8484

85-
.idea
85+
.idea

.prettierrc.cjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@theguild/prettier-config"

examples/aggregations/check-data.sh

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,54 +20,50 @@ sgd=$1
2020
# Note that these substitutions are done for all possible combinations of
2121
# INTV/DUR and TBL
2222
expand() {
23-
query=${1//SGD/$sgd}
24-
if [[ "$query" =~ "INTV" ]]
25-
then
26-
for pair in hour:3600 day:86400
27-
do
28-
intv=${pair%:*}
29-
duration=${pair#*:}
30-
q=${query//INTV/$intv}
31-
q=${q//DUR/$duration}
32-
if [[ "$q" =~ "TBL" ]]
33-
then
34-
for tbl in stats group_1 group_2 group_3 groups
35-
do
36-
echo "${q//TBL/$tbl};"
37-
done
38-
else
39-
echo "$q;"
40-
fi
23+
query=${1//SGD/$sgd}
24+
if [[ "$query" =~ "INTV" ]]; then
25+
for pair in hour:3600 day:86400; do
26+
intv=${pair%:*}
27+
duration=${pair#*:}
28+
q=${query//INTV/$intv}
29+
q=${q//DUR/$duration}
30+
if [[ "$q" =~ "TBL" ]]; then
31+
for tbl in stats group_1 group_2 group_3 groups; do
32+
echo "${q//TBL/$tbl};"
4133
done
42-
else
43-
echo "$query;"
44-
fi
34+
else
35+
echo "$q;"
36+
fi
37+
done
38+
else
39+
echo "$query;"
40+
fi
4541
}
4642

4743
# Max and last must be the same
48-
read -d '' -r max_last <<'EOF'
44+
read -d '' -r max_last << 'EOF'
4945
select count(*) = 0 as TBL_INTV_max_eq_last
5046
from SGD.TBL_INTV
5147
where max != last
5248
EOF
5349

5450
# Min and first must be the same
55-
read -d '' -r min_first <<'EOF'
51+
read -d '' -r min_first << 'EOF'
5652
select count(*) = 0 as TBL_INTV_min_eq_first
5753
from SGD.TBL_INTV
5854
where min != first
5955
EOF
6056

6157
# The sum over block numbers must be correct
62-
read -d '' -r sum_check <<'EOF'
58+
read -d '' -r sum_check << 'EOF'
6359
select count(*) = 0 as stats_INTV_sum_correct
6460
from SGD.stats_INTV
6561
where sum != (last - first + 1)::numeric*(last + first)::numeric/2
6662
and first > 1
6763
EOF
6864

6965
# The timestamps of all buckets are rounded to the beginning of the period
70-
read -d '' -r bucket_timestamp <<'EOF'
66+
read -d '' -r bucket_timestamp << 'EOF'
7167
select count(*) = 0 as TBL_INTV_bucket_timestamp
7268
from SGD.TBL_INTV
7369
where to_timestamp(timestamp)
@@ -76,7 +72,7 @@ EOF
7672

7773
# The timestamp of the min and max block for all buckets must be between
7874
# the bucket's timestamp plus the bucket's duration
79-
read -d '' -r block_timestamp <<'EOF'
75+
read -d '' -r block_timestamp << 'EOF'
8076
select count(*) = 0 as TBL_INTV_timestamp
8177
from SGD.TBL_INTV s,
8278
SGD.block_time b
@@ -87,7 +83,7 @@ EOF
8783
# For group_3_hour, since we split the aggregations into 1000 buckets,
8884
# there can only be one or two blocks in each bucket; if there are two,
8985
# they must differ by 1000 blocks
90-
read -d '' -r group3_count_min_max <<'EOF'
86+
read -d '' -r group3_count_min_max << 'EOF'
9187
select count(*) = 0 as count_min_max
9288
from SGD.group_3_hour
9389
where (count = 1 and min != max)
@@ -96,15 +92,15 @@ select count(*) = 0 as count_min_max
9692
EOF
9793

9894
# Same as previous for 'groups' instead of 'group_3'
99-
read -d '' -r groups_count_min_max <<'EOF'
95+
read -d '' -r groups_count_min_max << 'EOF'
10096
select count(*) = 0 as count_min_max
10197
from SGD.groups_hour
10298
where (count = 1 and min != max)
10399
or (count = 2 and min + 1000 != max)
104100
or count > 2
105101
EOF
106102

107-
read -d '' -r groups_total_min_max <<'EOF'
103+
read -d '' -r groups_total_min_max << 'EOF'
108104
select count(*) = 0 as total_min_max
109105
from SGD.groups_hour
110106
where total_min != group_3
@@ -118,14 +114,14 @@ EOF
118114
# is g + (g+1000) + (g+2000) + .. + (g + (tc-1)*1000)
119115
# We don't know what the total count should be since each group can contain
120116
# 1 or 2 blocks, but we can at least relate total_count and total_sum
121-
read -d '' -r groups_total_count_sum <<'EOF'
117+
read -d '' -r groups_total_count_sum << 'EOF'
122118
select count(*) = 0 as total_count_sum
123119
from SGD.groups_hour
124120
where total_sum != total_count * (group_3 + 1000 * (total_count::numeric - 1) / 2)
125121
EOF
126122

127123
# Recalculate total count and sum with a window query
128-
read -d '' -r groups_window_totals <<'EOF'
124+
read -d '' -r groups_window_totals << 'EOF'
129125
select count(*) = 0 as window_totals from
130126
(select group_3, total_count, total_sum,
131127
sum(count) over (partition by group_3 order by timestamp) as new_total_count,
@@ -144,4 +140,4 @@ expand "$block_timestamp"
144140
expand "$group3_count_min_max"
145141
expand "$groups_total_min_max"
146142
expand "$groups_total_count_sum"
147-
expand "$groups_window_totals"
143+
expand "$groups_window_totals"

examples/aggregations/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"test": "graph test"
1818
},
1919
"dependencies": {
20-
"@graphprotocol/graph-cli": "0.71.2",
21-
"@graphprotocol/graph-ts": "^0.32.0"
20+
"@graphprotocol/graph-cli": "0.90.1",
21+
"@graphprotocol/graph-ts": "^0.35.1"
2222
},
2323
"devDependencies": {
24-
"matchstick-as": "0.5.0"
24+
"matchstick-as": "0.6.0"
2525
}
2626
}

examples/arweave-blocks-transactions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"remove-local": "graph remove arweave-example --node http://localhost:8020"
2020
},
2121
"devDependencies": {
22-
"@graphprotocol/graph-cli": "0.71.2",
22+
"@graphprotocol/graph-cli": "0.90.1",
2323
"@graphprotocol/graph-ts": "0.35.1"
2424
}
2525
}

examples/cosmos-block-filtering/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"babel-register": "^6.26.0"
2525
},
2626
"devDependencies": {
27-
"@graphprotocol/graph-cli": "0.71.2",
27+
"@graphprotocol/graph-cli": "0.90.1",
2828
"@graphprotocol/graph-ts": "0.35.1",
2929
"mustache": "^4.2.0"
3030
}

examples/cosmos-osmosis-token-swaps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"babel-register": "^6.26.0"
2323
},
2424
"devDependencies": {
25-
"@graphprotocol/graph-cli": "0.71.2",
25+
"@graphprotocol/graph-cli": "0.90.1",
2626
"@graphprotocol/graph-ts": "0.35.1"
2727
}
2828
}

0 commit comments

Comments
 (0)