Skip to content

Commit 176846a

Browse files
committed
build: bump viem
build: move decorator settings in tsconfig chore: ignore node_modules in biome config chore: ignore empty message logs in winston refactor: refactor "logInfo" and "logVerbose" into "log"
1 parent bfba93d commit 176846a

File tree

9 files changed

+30
-28
lines changed

9 files changed

+30
-28
lines changed

biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"extends": ["@sablier/devkit/biome"],
44
"files": {
5-
"includes": ["**/*.{js,json,jsonc,ts}"]
5+
"includes": ["**/*.{js,json,jsonc,ts}", "!node_modules/**/*"]
66
},
77
"overrides": [
88
{

bun.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "@sablier/deployments",
66
"dependencies": {
77
"lodash": "^4.17",
8-
"viem": "^2.30",
8+
"viem": "^2.31",
99
},
1010
"devDependencies": {
1111
"@biomejs/biome": "2.0.0-beta.5",
@@ -28,7 +28,7 @@
2828
"winston": "^3.17",
2929
},
3030
"peerDependencies": {
31-
"viem": "^2.30",
31+
"viem": "^2.31",
3232
},
3333
},
3434
},
@@ -571,7 +571,7 @@
571571

572572
"util-deprecate": ["[email protected]", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
573573

574-
"viem": ["viem@2.30.1", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.0.8", "isows": "1.0.7", "ox": "0.7.1", "ws": "8.18.2" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-CkoS5Vv6kiRGmRF2xO2z275Gu90vTrKZHf/ckYXxP2J94UvCnFvUcbRdfit6uebj1I8nFwkGlkkOMuOZDHyO4w=="],
574+
"viem": ["viem@2.31.0", "", { "dependencies": { "@noble/curves": "1.9.1", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.0.8", "isows": "1.0.7", "ox": "0.7.1", "ws": "8.18.2" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-U7OMQ6yqK+bRbEIarf2vqxL7unSEQvNxvML/1zG7suAmKuJmipqdVTVJGKBCJiYsm/EremyO2FS4dHIPpGv+eA=="],
575575

576576
"vite": ["[email protected]", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.3", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.12" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-ZSvGOXKGceizRQIZSz7TGJ0pS3QLlVY/9hwxVh17W3re67je1RKYzFHivZ/t0tubU78Vkyb9WnHPENSBCzbckg=="],
577577

cli/print/chains.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ if (require.main === module) {
55
console.log("🌐 Mainnets:");
66
console.log(
77
_.values(mainnets)
8-
.map((c) => `- ${c.slug}`)
8+
.map((c) => ` ${c.slug}`)
99
.join("\n"),
1010
);
1111

1212
console.log("\n🧪 Testnets:");
1313
console.log(
1414
_.values(testnets)
15-
.map((c) => `- ${c.slug}`)
15+
.map((c) => ` ${c.slug}`)
1616
.join("\n"),
1717
);
1818
}

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@sablier/deployments",
33
"description": "Deployment data for the Sablier Protocol",
4-
"version": "1.0.0-alpha.48",
4+
"version": "1.0.0-alpha.49",
55
"author": {
66
"name": "Sablier Labs Ltd",
77
"url": "https://sablier.com"
88
},
99
"dependencies": {
1010
"lodash": "^4.17",
11-
"viem": "^2.30"
11+
"viem": "^2.31"
1212
},
1313
"devDependencies": {
1414
"@biomejs/biome": "2.0.0-beta.5",
@@ -42,17 +42,23 @@
4242
"deployments",
4343
"ethereum",
4444
"evm",
45+
"foundry",
46+
"hardhat",
4547
"sablier",
48+
"sablier-airdrops",
49+
"sablier-flow",
50+
"sablier-lockup",
4651
"smart-contracts",
4752
"solidity",
4853
"token-streaming",
4954
"token-vesting",
55+
"vesting",
5056
"web3"
5157
],
5258
"license": "GPL-3.0-or-later",
5359
"main": "dist/index.js",
5460
"peerDependencies": {
55-
"viem": "^2.30"
61+
"viem": "^2.31"
5662
},
5763
"publishConfig": {
5864
"access": "public"

src/internal/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as path from "node:path";
22
import type { Sablier } from "@src/types";
33
import * as fs from "fs-extra";
4-
import { logInfo } from "./logger";
4+
import { log } from "./logger";
55

66
const ROOT_DIR = path.join(__dirname, "..");
77
const DATA_DIR = path.join(ROOT_DIR, "data");
@@ -35,7 +35,7 @@ export function checkBroadcast(release: Sablier.Release, chain: Sablier.Chain, i
3535

3636
if (!fs.existsSync(pathToCheck)) {
3737
const relativePath = path.relative(ROOT_DIR, pathToCheck);
38-
logInfo({
38+
log("info", {
3939
msg: `No broadcasts for ${chain.slug} at ${relativePath}`,
4040
release,
4141
});

src/internal/logger.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ const transports: winston.transport[] = [
3838
format: format.combine(
3939
format.colorize(),
4040
format.printf(({ level, message }) => {
41+
if (!message) {
42+
return "";
43+
}
4144
return `${level}: ${message}`;
4245
}),
4346
),
@@ -66,21 +69,12 @@ export const logger = winston.createLogger({
6669
transports,
6770
});
6871

69-
export function logInfo(params: { msg: string; release?: Sablier.Release }): void {
72+
export function log(level: "info" | "verbose", params: { msg: string; release?: Sablier.Release }): void {
7073
const { msg, release } = params;
7174
if (release) {
72-
logger.info(`${formatRelease(release)}\t${msg}`);
75+
logger[level](`${formatRelease(release)}\t${msg}`);
7376
} else {
74-
logger.info(msg);
75-
}
76-
}
77-
78-
export function logVerbose(params: { msg: string; release?: Sablier.Release }): void {
79-
const { msg, release } = params;
80-
if (release) {
81-
logger.verbose(`${formatRelease(release)}\t${msg}`);
82-
} else {
83-
logger.verbose(msg);
77+
logger[level](msg);
8478
}
8579
}
8680

tests/deployments/lockup.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { releases } from "@src/releases";
22
import { createTestSuite } from "./utils/generators";
33

4-
// Note: it's important to run the tests in this order because the contracts in some releases have been
5-
// deployed in a previous release.
4+
/**
5+
* IMPORTANT: the tests have to be run in this order because the contracts in some releases
6+
* are found in the broadcast files of previous releases.
7+
*/
68
createTestSuite(releases.lockup["v1.0"]);
79
createTestSuite(releases.lockup["v1.1"]);
810
createTestSuite(releases.lockup["v1.2"]);

tsconfig.build.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"declaration": true,
66
"declarationDir": "dist",
77
"declarationMap": true,
8+
"emitDecoratorMetadata": true,
9+
"experimentalDecorators": true,
810
"noEmit": false,
911
"outDir": "dist",
1012
"paths": {

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
2-
"$schema": "https://json.schemastore.org/tsconfig",
2+
"$schema": "https://json.schemastore.org/tsconfig.json",
33
"compilerOptions": {
44
"baseUrl": ".",
5-
"emitDecoratorMetadata": true,
65
"esModuleInterop": true,
7-
"experimentalDecorators": true,
86
"forceConsistentCasingInFileNames": true,
97
"lib": ["ESNext"],
108
"module": "NodeNext",

0 commit comments

Comments
 (0)