@marinade.finance/web3js-1x 4.1.1 → 4.1.3

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/README.md CHANGED
@@ -40,31 +40,6 @@ pnpm add bs58@6.0.0
40
40
  pnpm add @marinade.finance/web3js-1x@latest
41
41
  ```
42
42
 
43
- ## Jest test equality testers
44
-
45
- When used with testing framework jest to use `equalityTesters`, also install
46
-
47
- ```sh
48
- pnpm add -D @jest/globals@^30.1.2
49
- ```
50
-
51
- add to `jest.config.js` something like this
52
-
53
- ```js
54
- /** @type {import('ts-jest').JestConfigWithTsJest} */
55
- module.exports = {
56
- preset: 'ts-jest',
57
- testEnvironment: 'node',
58
- testTimeout: 90000,
59
- detectOpenHandles: true,
60
- modulePathIgnorePatterns: ['<rootDir>/build/'],
61
- testPathIgnorePatterns: ['__tests__/.*.skip.ts', '__tests__/setup/*'],
62
- globalSetup:
63
- '<rootDir>/packages/marinade-ts-cli/__tests__/setup/globalSetup.ts',
64
- setupFilesAfterEnv: ['<rootDir>/<path-to-package>/node_modules/@marinade.finance/web3js-1x/dist/src/equalityTesters'],
65
- }
66
- ```
67
-
68
43
  ## History
69
44
 
70
45
  Before refactoring this library was named as `@marinade.finance/web3js-common`
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marinade.finance/web3js-1x",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "solana/web3.js 1.x library tooling for Marinade Finance",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,8 +35,7 @@
35
35
  "@solana/buffer-layout": "4.0.1",
36
36
  "bn.js": "5.2.2",
37
37
  "borsh": "0.7.0",
38
- "bs58": "6.0.0",
39
- "@jest/globals": "^30.1.2"
38
+ "bs58": "6.0.0"
40
39
  },
41
40
  "dependencies": {
42
41
  "yaml": "2.8.1"
@@ -50,8 +49,7 @@
50
49
  "bn.js": "^5.2.2",
51
50
  "@types/bn.js": "^5.2.0",
52
51
  "borsh": "~0.7.0",
53
- "bs58": "^6.0.0",
54
- "@jest/globals": "^29 || ^30"
52
+ "bs58": "^6.0.0"
55
53
  },
56
54
  "engines": {
57
55
  "node": ">=20"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marinade.finance/web3js-1x",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "solana/web3.js 1.x library tooling for Marinade Finance",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,8 +31,7 @@
31
31
  "bn.js": "5.2.2",
32
32
  "borsh": "0.7.0",
33
33
  "bs58": "6.0.0",
34
- "@jest/globals": "^30.1.2",
35
- "@marinade.finance/ts-common": "4.1.1"
34
+ "@marinade.finance/ts-common": "4.1.3"
36
35
  },
37
36
  "dependencies": {
38
37
  "yaml": "2.8.1"
@@ -46,8 +45,7 @@
46
45
  "@types/bn.js": "^5.2.0",
47
46
  "borsh": "~0.7.0",
48
47
  "bs58": "^6.0.0",
49
- "@jest/globals": "^29 || ^30",
50
- "@marinade.finance/ts-common": "4.1.1"
48
+ "@marinade.finance/ts-common": "4.1.3"
51
49
  },
52
50
  "engines": {
53
51
  "node": ">=20"
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=equalityTesters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equalityTesters.d.ts","sourceRoot":"","sources":["../../src/equalityTesters.ts"],"names":[],"mappings":""}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const globals_1 = require("@jest/globals");
7
- const web3_js_1 = require("@solana/web3.js");
8
- const bn_js_1 = __importDefault(require("bn.js"));
9
- globals_1.expect.addEqualityTesters([
10
- (a, b) => {
11
- const bnA = convertNumberToBN(a);
12
- const bnB = convertNumberToBN(b);
13
- if (bnA instanceof bn_js_1.default) {
14
- return bnA.eq(bnB);
15
- }
16
- return undefined;
17
- },
18
- (a, b) => {
19
- if (a instanceof web3_js_1.PublicKey) {
20
- return a.equals(b);
21
- }
22
- return undefined;
23
- },
24
- ]);
25
- function convertNumberToBN(value) {
26
- if (typeof value === 'bigint') {
27
- return new bn_js_1.default(value.toString());
28
- }
29
- if (typeof value === 'number') {
30
- return new bn_js_1.default(value);
31
- }
32
- return value;
33
- }
34
- //# sourceMappingURL=equalityTesters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equalityTesters.js","sourceRoot":"","sources":["../../src/equalityTesters.ts"],"names":[],"mappings":";;;;;AAAA,2CAAsC;AACtC,6CAA2C;AAC3C,kDAAsB;AAatB,gBAAM,CAAC,kBAAkB,CAAC;IAExB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACP,MAAM,GAAG,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;QAChC,MAAM,GAAG,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;QAChC,IAAI,GAAG,YAAY,eAAE,EAAE,CAAC;YACtB,OAAO,GAAG,CAAC,EAAE,CAAC,GAAS,CAAC,CAAA;QAC1B,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACP,IAAI,CAAC,YAAY,mBAAS,EAAE,CAAC;YAC3B,OAAO,CAAC,CAAC,MAAM,CAAC,CAAc,CAAC,CAAA;QACjC,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CAAC,CAAA;AAEF,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,eAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IACjC,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,eAAE,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}