@dynamic-labs/utils 4.6.3 → 4.7.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 +21 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +4 -4
- package/src/index.cjs +0 -2
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -1
- package/src/formatVersion/formatVersion.cjs +0 -29
- package/src/formatVersion/formatVersion.d.ts +0 -16
- package/src/formatVersion/formatVersion.js +0 -25
- package/src/formatVersion/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.7.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.0...v4.7.1) (2025-02-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* remove user logout when sdk version change ([#8112](https://github.com/dynamic-labs/dynamic-auth/issues/8112)) ([b1a321f](https://github.com/dynamic-labs/dynamic-auth/commit/b1a321f18231f083aeb365d4dc92e992897a7e1b))
|
|
8
|
+
|
|
9
|
+
## [4.7.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.3...v4.7.0) (2025-02-20)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* 7702 support ([14ee3cd](https://github.com/dynamic-labs/dynamic-auth/commit/14ee3cd3513ac8b3e8e866cc2026b042c706b7e6))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* fallback to empty array when token balances is called with an invalid chain ID ([#8108](https://github.com/dynamic-labs/dynamic-auth/issues/8108)) ([7d14ded](https://github.com/dynamic-labs/dynamic-auth/commit/7d14ded6afa0de604901bbc8bc13620d03dc2e8c))
|
|
20
|
+
* improve global connectivity sign typed data reliability ([#8103](https://github.com/dynamic-labs/dynamic-auth/issues/8103)) ([8b0d2dd](https://github.com/dynamic-labs/dynamic-auth/commit/8b0d2ddbeb62a11732a9d59bc6cd4b72d82b9855))
|
|
21
|
+
* **QNTM-2902:** ensure react updates icons ([#8105](https://github.com/dynamic-labs/dynamic-auth/issues/8105)) ([1182c4c](https://github.com/dynamic-labs/dynamic-auth/commit/1182c4cc103c599e6bbff89af9b1312fb96b6d05))
|
|
22
|
+
|
|
2
23
|
### [4.6.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.2...v4.6.3) (2025-02-14)
|
|
3
24
|
|
|
4
25
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.628",
|
|
22
22
|
"tldts": "6.0.16",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/logger": "4.
|
|
25
|
-
"@dynamic-labs/types": "4.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.7.1",
|
|
24
|
+
"@dynamic-labs/logger": "4.7.1",
|
|
25
|
+
"@dynamic-labs/types": "4.7.1",
|
|
26
26
|
"buffer": "6.0.3",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
package/src/index.cjs
CHANGED
|
@@ -77,7 +77,6 @@ var decryptMessage = require('./encryption/decryptMessage/decryptMessage.cjs');
|
|
|
77
77
|
var encryptMessage = require('./encryption/encryptMessage/encryptMessage.cjs');
|
|
78
78
|
var isEncryptedMessage = require('./encryption/isEncryptedMessage/isEncryptedMessage.cjs');
|
|
79
79
|
var uint8ArrayToBase64 = require('./uint8ArrayToBase64/uint8ArrayToBase64.cjs');
|
|
80
|
-
var formatVersion = require('./formatVersion/formatVersion.cjs');
|
|
81
80
|
var assertDefined = require('./assertDefined/assertDefined.cjs');
|
|
82
81
|
var cloneObjectWithOverrides = require('./cloneObjectWithOverrides/cloneObjectWithOverrides.cjs');
|
|
83
82
|
var get = require('./get/get.cjs');
|
|
@@ -192,7 +191,6 @@ exports.encryptMessage = encryptMessage.encryptMessage;
|
|
|
192
191
|
exports.isEncryptedMessage = isEncryptedMessage.isEncryptedMessage;
|
|
193
192
|
exports.uint8ArrayFromBase64 = uint8ArrayToBase64.uint8ArrayFromBase64;
|
|
194
193
|
exports.uint8ArrayToBase64 = uint8ArrayToBase64.uint8ArrayToBase64;
|
|
195
|
-
exports.formatVersion = formatVersion.formatVersion;
|
|
196
194
|
exports.assertDefined = assertDefined.assertDefined;
|
|
197
195
|
exports.cloneObjectWithOverrides = cloneObjectWithOverrides.cloneObjectWithOverrides;
|
|
198
196
|
exports.get = get.get;
|
package/src/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export * from './uniq';
|
|
|
27
27
|
export * from './wrapMethodWithCallback';
|
|
28
28
|
export * from './encryption';
|
|
29
29
|
export * from './uint8ArrayToBase64';
|
|
30
|
-
export * from './formatVersion';
|
|
31
30
|
export * from './assertDefined';
|
|
32
31
|
export { cloneObjectWithOverrides } from './cloneObjectWithOverrides';
|
|
33
32
|
export { get } from './get';
|
package/src/index.js
CHANGED
|
@@ -73,7 +73,6 @@ export { decryptMessage } from './encryption/decryptMessage/decryptMessage.js';
|
|
|
73
73
|
export { encryptMessage } from './encryption/encryptMessage/encryptMessage.js';
|
|
74
74
|
export { isEncryptedMessage } from './encryption/isEncryptedMessage/isEncryptedMessage.js';
|
|
75
75
|
export { uint8ArrayFromBase64, uint8ArrayToBase64 } from './uint8ArrayToBase64/uint8ArrayToBase64.js';
|
|
76
|
-
export { formatVersion } from './formatVersion/formatVersion.js';
|
|
77
76
|
export { assertDefined } from './assertDefined/assertDefined.js';
|
|
78
77
|
export { cloneObjectWithOverrides } from './cloneObjectWithOverrides/cloneObjectWithOverrides.js';
|
|
79
78
|
export { get } from './get/get.js';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Formats a version string according to the specified format pattern.
|
|
8
|
-
*
|
|
9
|
-
* @param version - The version string in the format "x.y.z" (e.g., "1.2.3")
|
|
10
|
-
* @param format - The desired output format using combinations of "major", "minor", and "patch"
|
|
11
|
-
* @returns The formatted version string
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* formatVersion("1.2.3", "major.minor") // returns "1.2"
|
|
15
|
-
* formatVersion("1.2.3", "major") // returns "1"
|
|
16
|
-
* formatVersion("1.2.3", "major.minor.patch") // returns "1.2.3"
|
|
17
|
-
*/
|
|
18
|
-
const formatVersion = (version, format) => {
|
|
19
|
-
const versionMap = Object.fromEntries(['major', 'minor', 'patch'].map((unit, index) => [
|
|
20
|
-
unit,
|
|
21
|
-
version.split('.')[index],
|
|
22
|
-
]));
|
|
23
|
-
return format
|
|
24
|
-
.split('.')
|
|
25
|
-
.map((unit) => versionMap[unit])
|
|
26
|
-
.join('.');
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.formatVersion = formatVersion;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type VersionFormatUnit = 'major' | 'minor' | 'patch';
|
|
2
|
-
type Format = `${VersionFormatUnit}.${VersionFormatUnit}.${VersionFormatUnit}` | `${VersionFormatUnit}.${VersionFormatUnit}` | `${VersionFormatUnit}`;
|
|
3
|
-
/**
|
|
4
|
-
* Formats a version string according to the specified format pattern.
|
|
5
|
-
*
|
|
6
|
-
* @param version - The version string in the format "x.y.z" (e.g., "1.2.3")
|
|
7
|
-
* @param format - The desired output format using combinations of "major", "minor", and "patch"
|
|
8
|
-
* @returns The formatted version string
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* formatVersion("1.2.3", "major.minor") // returns "1.2"
|
|
12
|
-
* formatVersion("1.2.3", "major") // returns "1"
|
|
13
|
-
* formatVersion("1.2.3", "major.minor.patch") // returns "1.2.3"
|
|
14
|
-
*/
|
|
15
|
-
export declare const formatVersion: (version: string, format: Format) => string;
|
|
16
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
/**
|
|
3
|
-
* Formats a version string according to the specified format pattern.
|
|
4
|
-
*
|
|
5
|
-
* @param version - The version string in the format "x.y.z" (e.g., "1.2.3")
|
|
6
|
-
* @param format - The desired output format using combinations of "major", "minor", and "patch"
|
|
7
|
-
* @returns The formatted version string
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* formatVersion("1.2.3", "major.minor") // returns "1.2"
|
|
11
|
-
* formatVersion("1.2.3", "major") // returns "1"
|
|
12
|
-
* formatVersion("1.2.3", "major.minor.patch") // returns "1.2.3"
|
|
13
|
-
*/
|
|
14
|
-
const formatVersion = (version, format) => {
|
|
15
|
-
const versionMap = Object.fromEntries(['major', 'minor', 'patch'].map((unit, index) => [
|
|
16
|
-
unit,
|
|
17
|
-
version.split('.')[index],
|
|
18
|
-
]));
|
|
19
|
-
return format
|
|
20
|
-
.split('.')
|
|
21
|
-
.map((unit) => versionMap[unit])
|
|
22
|
-
.join('.');
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { formatVersion };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatVersion } from './formatVersion';
|