@dynamic-labs/utils 2.0.1 → 2.0.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
@@ -1,4 +1,11 @@
1
1
 
2
+ ### [2.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.1...v2.0.2) (2024-04-19)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([#5405](https://github.com/dynamic-labs/DynamicAuth/issues/5405)) ([679c197](https://github.com/dynamic-labs/DynamicAuth/commit/679c197a52969a0db614ed280d7b9a0bf172bf72))
8
+
2
9
  ### [2.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0...v2.0.1) (2024-04-18)
3
10
 
4
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "tldts": "6.0.16",
30
- "@dynamic-labs/logger": "2.0.1",
31
- "@dynamic-labs/types": "2.0.1",
30
+ "@dynamic-labs/logger": "2.0.2",
31
+ "@dynamic-labs/types": "2.0.2",
32
32
  "buffer": "6.0.3"
33
33
  },
34
34
  "peerDependencies": {
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var _ = require('buffer/');
4
+
5
+ /* eslint-disable */
6
+ /**
7
+ * This is needed for the browser to work with buffer
8
+ */
9
+ if (typeof window !== 'undefined') {
10
+ window.global = globalThis;
11
+ if (!window.Buffer && typeof window.Buffer === 'undefined') {
12
+ Object.assign(window, { Buffer: _.Buffer });
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ import { Buffer } from 'buffer/index.js';
2
+
3
+ /* eslint-disable */
4
+ /**
5
+ * This is needed for the browser to work with buffer
6
+ */
7
+ if (typeof window !== 'undefined') {
8
+ window.global = globalThis;
9
+ if (!window.Buffer && typeof window.Buffer === 'undefined') {
10
+ Object.assign(window, { Buffer });
11
+ }
12
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./bufferPollyfill.cjs');
5
+ require('./bufferPolyfill.cjs');
6
6
 
7
7
  const bufferToBase64 = (buf) => {
8
8
  const binstr = Array.prototype.map
@@ -1,2 +1,2 @@
1
- import './bufferPollyfill';
1
+ import './bufferPolyfill';
2
2
  export declare const bufferToBase64: (buf: Uint8Array) => string;
@@ -1,4 +1,4 @@
1
- import './bufferPollyfill.js';
1
+ import './bufferPolyfill.js';
2
2
 
3
3
  const bufferToBase64 = (buf) => {
4
4
  const binstr = Array.prototype.map
@@ -7,7 +7,7 @@ require('../errors/TransactionGasCannotBeSponsoredError.cjs');
7
7
  require('../logger/logger.cjs');
8
8
  var isMobile = require('../isMobile.cjs');
9
9
  require('../../_virtual/_tslib.cjs');
10
- require('../bufferPollyfill.cjs');
10
+ require('../bufferPolyfill.cjs');
11
11
  require('viem/chains');
12
12
  require('tldts');
13
13
 
@@ -3,7 +3,7 @@ import '../errors/TransactionGasCannotBeSponsoredError.js';
3
3
  import '../logger/logger.js';
4
4
  import { isSamsungBrowser } from '../isMobile.js';
5
5
  import '../../_virtual/_tslib.js';
6
- import '../bufferPollyfill.js';
6
+ import '../bufferPolyfill.js';
7
7
  import 'viem/chains';
8
8
  import 'tldts';
9
9
 
@@ -6,7 +6,7 @@ var _tslib = require('../_virtual/_tslib.cjs');
6
6
  require('./errors/InsufficientFundsError.cjs');
7
7
  require('./errors/TransactionGasCannotBeSponsoredError.cjs');
8
8
  require('./logger/logger.cjs');
9
- require('./bufferPollyfill.cjs');
9
+ require('./bufferPolyfill.cjs');
10
10
  var sleep = require('./sleep/sleep.cjs');
11
11
  require('viem/chains');
12
12
  require('tldts');
@@ -2,7 +2,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import './errors/InsufficientFundsError.js';
3
3
  import './errors/TransactionGasCannotBeSponsoredError.js';
4
4
  import './logger/logger.js';
5
- import './bufferPollyfill.js';
5
+ import './bufferPolyfill.js';
6
6
  import { sleep } from './sleep/sleep.js';
7
7
  import 'viem/chains';
8
8
  import 'tldts';
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- var _ = require('buffer/');
4
-
5
- /* eslint-disable */
6
- /**
7
- * @walletconnect/client and @walletconnect/qrcode-modal use `global` and `Buffer`, respectively.
8
- * This issue is captured here: https://github.com/WalletConnect/walletconnect-monorepo/issues/341
9
- * Here are some GH issues of others facing the same problem:
10
- * * https://github.com/WalletConnect/walletconnect-monorepo/issues/734
11
- * * https://github.com/WalletConnect/walletconnect-monorepo/issues/748
12
- */
13
- if (typeof window !== 'undefined') {
14
- window.global = globalThis;
15
- if (!window.Buffer && typeof _.Buffer === 'undefined') {
16
- Object.assign(window, { Buffer: _.Buffer });
17
- }
18
- }
@@ -1,16 +0,0 @@
1
- import { Buffer } from 'buffer/index.js';
2
-
3
- /* eslint-disable */
4
- /**
5
- * @walletconnect/client and @walletconnect/qrcode-modal use `global` and `Buffer`, respectively.
6
- * This issue is captured here: https://github.com/WalletConnect/walletconnect-monorepo/issues/341
7
- * Here are some GH issues of others facing the same problem:
8
- * * https://github.com/WalletConnect/walletconnect-monorepo/issues/734
9
- * * https://github.com/WalletConnect/walletconnect-monorepo/issues/748
10
- */
11
- if (typeof window !== 'undefined') {
12
- window.global = globalThis;
13
- if (!window.Buffer && typeof Buffer === 'undefined') {
14
- Object.assign(window, { Buffer });
15
- }
16
- }