@dynamic-labs/utils 3.0.2 → 4.0.0-alpha.0

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
@@ -1,18 +1,11 @@
1
1
 
2
- ### [3.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.1...v3.0.2) (2024-09-13)
2
+ ## [4.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0...v4.0.0-alpha.0) (2024-09-13)
3
3
 
4
4
 
5
5
  ### Bug Fixes
6
6
 
7
- * solana and cosmos signers not working properly ([#6897](https://github.com/dynamic-labs/DynamicAuth/issues/6897)) ([6e27c08](https://github.com/dynamic-labs/DynamicAuth/commit/6e27c0817f8f0a454eaa14ff56a430072f9730e3))
8
-
9
- ### [3.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0...v3.0.1) (2024-09-13)
10
-
11
-
12
- ### Bug Fixes
13
-
14
- * create v2 embedded wallet experience in manual mode ([#6887](https://github.com/dynamic-labs/DynamicAuth/issues/6887)) ([#6891](https://github.com/dynamic-labs/DynamicAuth/issues/6891)) ([64d027b](https://github.com/dynamic-labs/DynamicAuth/commit/64d027b4b5d877845551eae23c666d7863f7109d))
15
- * solana pk export format ([#6888](https://github.com/dynamic-labs/DynamicAuth/issues/6888)) ([#6890](https://github.com/dynamic-labs/DynamicAuth/issues/6890)) ([cb68997](https://github.com/dynamic-labs/DynamicAuth/commit/cb68997970ccf53734b7d296153185b4866c7f94))
7
+ * create v2 embedded wallet experience in manual mode ([#6887](https://github.com/dynamic-labs/DynamicAuth/issues/6887)) ([8b0953a](https://github.com/dynamic-labs/DynamicAuth/commit/8b0953ac6d511ca254e01da689beb46faa68cf02))
8
+ * solana pk export format ([#6888](https://github.com/dynamic-labs/DynamicAuth/issues/6888)) ([31a5fe2](https://github.com/dynamic-labs/DynamicAuth/commit/31a5fe272cbfabf8e5d90bc8f18dcf0fff504fd1))
16
9
 
17
10
  ## [3.0.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.68...v3.0.0) (2024-09-13)
18
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "3.0.2",
3
+ "version": "4.0.0-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "@dynamic-labs/sdk-api-core": "0.0.529",
30
30
  "tldts": "6.0.16",
31
- "@dynamic-labs/logger": "3.0.2",
32
- "@dynamic-labs/types": "3.0.2",
31
+ "@dynamic-labs/logger": "4.0.0-alpha.0",
32
+ "@dynamic-labs/types": "4.0.0-alpha.0",
33
33
  "buffer": "6.0.3",
34
34
  "eventemitter3": "5.0.1",
35
35
  "stream": "0.0.2"
@@ -18,7 +18,7 @@ const cloneObjectWithOverrides = (original, overrides = {}) => {
18
18
  // Get the property descriptors from the original object
19
19
  const descriptors = Object.getOwnPropertyDescriptors(original);
20
20
  // Create a new object using the same prototype as the original
21
- const clone = Object.create(Object.getPrototypeOf(original));
21
+ const clone = Object.create(Object.getPrototypeOf(original), descriptors);
22
22
  // // Loop through the overrides to redefine any read-only methods
23
23
  for (const [key, value] of Object.entries(overrides)) {
24
24
  // Redefine the method even if it was read-only on the original object
@@ -31,15 +31,6 @@ const cloneObjectWithOverrides = (original, overrides = {}) => {
31
31
  writable: true, // Preserve enumerability
32
32
  });
33
33
  }
34
- const overridesKeys = Object.keys(overrides);
35
- // add properties from original object if they're not in overrides
36
- // if we add all of them, read-only props/methods might not get properly overwritten
37
- for (const [key, descriptor] of Object.entries(descriptors)) {
38
- // if has not been overwritten, add original
39
- if (!overridesKeys.includes(key)) {
40
- Object.defineProperty(clone, key, descriptor);
41
- }
42
- }
43
34
  return clone;
44
35
  };
45
36
 
@@ -14,7 +14,7 @@ const cloneObjectWithOverrides = (original, overrides = {}) => {
14
14
  // Get the property descriptors from the original object
15
15
  const descriptors = Object.getOwnPropertyDescriptors(original);
16
16
  // Create a new object using the same prototype as the original
17
- const clone = Object.create(Object.getPrototypeOf(original));
17
+ const clone = Object.create(Object.getPrototypeOf(original), descriptors);
18
18
  // // Loop through the overrides to redefine any read-only methods
19
19
  for (const [key, value] of Object.entries(overrides)) {
20
20
  // Redefine the method even if it was read-only on the original object
@@ -27,15 +27,6 @@ const cloneObjectWithOverrides = (original, overrides = {}) => {
27
27
  writable: true, // Preserve enumerability
28
28
  });
29
29
  }
30
- const overridesKeys = Object.keys(overrides);
31
- // add properties from original object if they're not in overrides
32
- // if we add all of them, read-only props/methods might not get properly overwritten
33
- for (const [key, descriptor] of Object.entries(descriptors)) {
34
- // if has not been overwritten, add original
35
- if (!overridesKeys.includes(key)) {
36
- Object.defineProperty(clone, key, descriptor);
37
- }
38
- }
39
30
  return clone;
40
31
  };
41
32