@ton/sandbox 0.37.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/blockchain/Blockchain.js +2 -2
- package/dist/utils/require.d.ts +1 -0
- package/dist/utils/require.js +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.37.1] - 2025-09-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Made `@ton/test-utils` import optional, preventing errors in environments where it's not installed.
|
|
13
|
+
|
|
8
14
|
## [0.37.0] - 2025-08-18
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -18,6 +18,7 @@ const deepcopy_1 = require("../utils/deepcopy");
|
|
|
18
18
|
const coverage_1 = require("../coverage");
|
|
19
19
|
const MessageQueueManager_1 = require("./MessageQueueManager");
|
|
20
20
|
const AsyncLock_1 = require("../utils/AsyncLock");
|
|
21
|
+
const require_1 = require("../utils/require");
|
|
21
22
|
const CREATE_WALLETS_PREFIX = 'CREATE_WALLETS';
|
|
22
23
|
function createWalletsSeed(idx) {
|
|
23
24
|
return `${CREATE_WALLETS_PREFIX}${idx}`;
|
|
@@ -693,8 +694,7 @@ class Blockchain {
|
|
|
693
694
|
return new Blockchain({
|
|
694
695
|
executor: opts?.executor ?? (await Executor_1.Executor.create()),
|
|
695
696
|
storage: opts?.storage ?? new BlockchainStorage_1.LocalBlockchainStorage(),
|
|
696
|
-
|
|
697
|
-
meta: opts?.meta ?? require('@ton/test-utils')?.contractsMeta,
|
|
697
|
+
meta: opts?.meta ?? (0, require_1.requireOptional)('@ton/test-utils')?.contractsMeta,
|
|
698
698
|
...opts,
|
|
699
699
|
});
|
|
700
700
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requireOptional(id: string): ReturnType<typeof require> | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.requireOptional = requireOptional;
|
|
4
|
+
function requireOptional(id) {
|
|
5
|
+
try {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
7
|
+
return require(id);
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
if (String(error).includes('Cannot find module')) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
throw error;
|
|
14
|
+
}
|
|
15
|
+
}
|