Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/suppress-cli-warnings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@hyperlane-xyz/cli': patch
'@hyperlane-xyz/rebalancer': patch
'@hyperlane-xyz/warp-monitor': patch
---

Suppressed harmless startup warnings via pnpm patches instead of runtime suppression. The bigint-buffer native bindings warning and node-fetch .data deprecation warning are now patched at the source, avoiding the need for --no-warnings flags or console.warn overrides.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
"patchedDependencies": {
"typechain@8.3.2": "patches/typechain@8.3.2.patch",
"node-fetch@2.7.0": "patches/node-fetch@2.7.0.patch",
"@provablehq/sdk@0.9.14": "patches/@provablehq__sdk@0.9.14.patch"
"@provablehq/sdk@0.9.14": "patches/@provablehq__sdk@0.9.14.patch",
"bigint-buffer@1.1.5": "patches/bigint-buffer@1.1.5.patch",
"node-fetch@3.3.2": "patches/node-fetch@3.3.2.patch"
}
}
}
13 changes: 13 additions & 0 deletions patches/bigint-buffer@1.1.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/node.js b/dist/node.js
index 513168c89e387668a79b6beb109587b3eb41a7d0..613db0461be415b8256e5ada06701da887dd5b5c 100644
--- a/dist/node.js
+++ b/dist/node.js
@@ -7,7 +7,7 @@ let converter;
converter = require('bindings')('bigint_buffer');
}
catch (e) {
- console.warn('bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)');
+ // Silently fall back to pure JS implementation
}
}
/**
24 changes: 24 additions & 0 deletions patches/node-fetch@3.3.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/request.js b/src/request.js
index af2ebc8e9b6f11783435d3c951eaef500fabbfdc..1872aaa6736392db85ce4d631fcb22ee89153f4d 100644
--- a/src/request.js
+++ b/src/request.js
@@ -7,7 +7,6 @@
*/

import {format as formatUrl} from 'node:url';
-import {deprecate} from 'node:util';
import Headers from './headers.js';
import Body, {clone, extractContentType, getTotalBytes} from './body.js';
import {isAbortSignal} from './utils/is.js';
@@ -31,9 +30,8 @@ const isRequest = object => {
);
};

-const doBadDataWarn = deprecate(() => {},
- '.data is not a valid RequestInit property, use .body instead',
- 'https://github.com/node-fetch/node-fetch/issues/1000 (request)');
+// Silenced: .data deprecation warning (gaxios compatibility)
+const doBadDataWarn = () => {};

/**
* Request class
14 changes: 10 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 9 additions & 13 deletions typescript/cli/env.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// This file isn't in the src dir so it it's imported before others
// This file isn't in the src dir so it's imported before others
// See https://github.com/trivago/prettier-plugin-sort-imports/issues/112

// Workaround for bug in bigint-buffer which solana-web3.js depends on
// https://github.com/no2chem/bigint-buffer/issues/31#issuecomment-1752134062
const defaultWarn = console.warn;
console.warn = (...args) => {
if (
args &&
typeof args[0] === 'string' &&
args[0]?.includes('bigint: Failed to load bindings')
)
return;
defaultWarn(...args);
};
// Note: Warning suppression for bigint-buffer and node-fetch deprecation warnings
// is now handled in scripts/ncc.post-bundle.mjs which injects code at the very
// start of the bundle (before any modules are loaded). This ensures the warnings
// are suppressed even during the initial module loading phase.
//
// References:
// - bigint-buffer: https://github.com/no2chem/bigint-buffer/issues/31
// - node-fetch: https://github.com/node-fetch/node-fetch/issues/1000
1 change: 1 addition & 0 deletions typescript/cli/scripts/ncc.post-bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const __dirname = path.dirname(__filename);
const OUTPUT_FILE = path.join(__dirname, '..', 'cli-bundle', 'index.js');
const SHEBANG = '#!/usr/bin/env node';

// This shim runs before any other code and adds __dirname/__filename support for ESM
const DIRNAME_SHIM = `
import { fileURLToPath, pathToFileURL } from 'url';
import path from 'path';
Expand Down
1 change: 1 addition & 0 deletions typescript/rebalancer/scripts/ncc.post-bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const __dirname = path.dirname(__filename);
const OUTPUT_FILE = path.join(__dirname, '..', 'bundle', 'index.js');
const SHEBANG = '#!/usr/bin/env node';

// This shim runs before any other code and adds __dirname/__filename support for ESM
const DIRNAME_SHIM = `
import { fileURLToPath, pathToFileURL } from 'url';
import path from 'path';
Expand Down
1 change: 1 addition & 0 deletions typescript/warp-monitor/scripts/ncc.post-bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const __dirname = path.dirname(__filename);
const OUTPUT_FILE = path.join(__dirname, '..', 'bundle', 'index.js');
const SHEBANG = '#!/usr/bin/env node';

// This shim runs before any other code and adds __dirname/__filename support for ESM
const DIRNAME_SHIM = `
import { fileURLToPath, pathToFileURL } from 'url';
import path from 'path';
Expand Down
Loading