@ton/sandbox 0.37.0 → 0.37.2

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 CHANGED
@@ -5,6 +5,19 @@ 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.2] - 2025-09-23
9
+
10
+ ### Fixed
11
+
12
+ - Fixed coverage by updating `ton-assembly`
13
+ - Fixed `requireOptional` typing
14
+
15
+ ## [0.37.1] - 2025-09-03
16
+
17
+ ### Fixed
18
+
19
+ - Made `@ton/test-utils` import optional, preventing errors in environments where it's not installed.
20
+
8
21
  ## [0.37.0] - 2025-08-18
9
22
 
10
23
  ### 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
- // eslint-disable-next-line @typescript-eslint/no-require-imports
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): any | undefined;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requireOptional = requireOptional;
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ function requireOptional(id) {
6
+ try {
7
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
8
+ return require(id);
9
+ }
10
+ catch (error) {
11
+ if (String(error).includes('Cannot find module')) {
12
+ return undefined;
13
+ }
14
+ throw error;
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton/sandbox",
3
- "version": "0.37.0",
3
+ "version": "0.37.2",
4
4
  "description": "TON transaction emulator",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -64,6 +64,6 @@
64
64
  "chalk": "^4.1.2",
65
65
  "fflate": "^0.8.2",
66
66
  "table": "^6.9.0",
67
- "ton-assembly": "0.1.0"
67
+ "ton-assembly": "0.1.2"
68
68
  }
69
69
  }