@xylabs/buffer 5.0.79 → 5.0.81

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
@@ -28,7 +28,17 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
28
28
 
29
29
  ### index-browser
30
30
 
31
- ### functions
31
+ ### variables
32
+
33
+ ### <a id="Buffer"></a>Buffer
34
+
35
+ [**@xylabs/buffer**](#../../README)
36
+
37
+ ***
38
+
39
+ ```ts
40
+ const Buffer: typeof Buffer;
41
+ ```
32
42
 
33
43
  ### <a id="bufferPolyfill"></a>bufferPolyfill
34
44
 
@@ -37,7 +47,7 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
37
47
  ***
38
48
 
39
49
  ```ts
40
- function bufferPolyfill(): void;
50
+ const bufferPolyfill: () => void;
41
51
  ```
42
52
 
43
53
  ## Returns
@@ -46,7 +56,17 @@ function bufferPolyfill(): void;
46
56
 
47
57
  ### index-node
48
58
 
49
- ### functions
59
+ ### variables
60
+
61
+ ### <a id="Buffer"></a>Buffer
62
+
63
+ [**@xylabs/buffer**](#../../README)
64
+
65
+ ***
66
+
67
+ ```ts
68
+ const Buffer: BufferConstructor;
69
+ ```
50
70
 
51
71
  ### <a id="bufferPolyfill"></a>bufferPolyfill
52
72
 
@@ -55,7 +75,7 @@ function bufferPolyfill(): void;
55
75
  ***
56
76
 
57
77
  ```ts
58
- function bufferPolyfill(): void;
78
+ const bufferPolyfill: () => void;
59
79
  ```
60
80
 
61
81
  ## Returns
@@ -1,2 +1,5 @@
1
- export * from './browser/index.ts';
1
+ import { Buffer } from './browser/index.ts';
2
+ declare const BrowserBuffer: typeof Buffer;
3
+ declare const BrowserBufferPolyfill: () => void;
4
+ export { BrowserBuffer as Buffer, BrowserBufferPolyfill as bufferPolyfill };
2
5
  //# sourceMappingURL=index-browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,oBAAoB,CAAA;AAE3D,QAAA,MAAM,aAAa,eAAS,CAAA;AAC5B,QAAA,MAAM,qBAAqB,YAAiB,CAAA;AAC5C,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,qBAAqB,IAAI,cAAc,EAAE,CAAA"}
@@ -8,8 +8,12 @@ var bufferPolyfill = () => {
8
8
 
9
9
  // src/browser/index.ts
10
10
  import { Buffer as Buffer2 } from "buffer/";
11
+
12
+ // src/index-browser.ts
13
+ var BrowserBuffer = Buffer2;
14
+ var BrowserBufferPolyfill = bufferPolyfill;
11
15
  export {
12
- Buffer2 as Buffer,
13
- bufferPolyfill
16
+ BrowserBuffer as Buffer,
17
+ BrowserBufferPolyfill as bufferPolyfill
14
18
  };
15
19
  //# sourceMappingURL=index-browser.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/browser/bufferPolyfill.ts","../../src/browser/index.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\nexport const bufferPolyfill = () => {\n if (globalThis.Buffer === undefined) {\n globalThis.Buffer = globalThis.Buffer ?? Buffer\n }\n}\n","export { bufferPolyfill } from './bufferPolyfill.ts'\nexport { Buffer } from 'buffer/'\n"],"mappings":";AAAA,SAAS,cAAc;AAEhB,IAAM,iBAAiB,MAAM;AAClC,MAAI,WAAW,WAAW,QAAW;AACnC,eAAW,SAAS,WAAW,UAAU;AAAA,EAC3C;AACF;;;ACLA,SAAS,UAAAA,eAAc;","names":["Buffer"]}
1
+ {"version":3,"sources":["../../src/browser/bufferPolyfill.ts","../../src/browser/index.ts","../../src/index-browser.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\nexport const bufferPolyfill = () => {\n if (globalThis.Buffer === undefined) {\n globalThis.Buffer = globalThis.Buffer ?? Buffer\n }\n}\n","export { bufferPolyfill } from './bufferPolyfill.ts'\nexport { Buffer } from 'buffer/'\n","import { Buffer, bufferPolyfill } from './browser/index.ts'\n\nconst BrowserBuffer = Buffer\nconst BrowserBufferPolyfill = bufferPolyfill\nexport { BrowserBuffer as Buffer, BrowserBufferPolyfill as bufferPolyfill }\n"],"mappings":";AAAA,SAAS,cAAc;AAEhB,IAAM,iBAAiB,MAAM;AAClC,MAAI,WAAW,WAAW,QAAW;AACnC,eAAW,SAAS,WAAW,UAAU;AAAA,EAC3C;AACF;;;ACLA,SAAS,UAAAA,eAAc;;;ACCvB,IAAM,gBAAgBC;AACtB,IAAM,wBAAwB;","names":["Buffer","Buffer"]}
@@ -1,2 +1,4 @@
1
- export * from './node/index.ts';
1
+ declare const NodeBuffer: BufferConstructor;
2
+ declare const NodeBufferPolyfill: () => void;
3
+ export { NodeBuffer as Buffer, NodeBufferPolyfill as bufferPolyfill };
2
4
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,UAAU,mBAAS,CAAA;AACzB,QAAA,MAAM,kBAAkB,YAAiB,CAAA;AACzC,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,kBAAkB,IAAI,cAAc,EAAE,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from './browser/index.ts';
1
+ import { Buffer } from './browser/index.ts';
2
+ declare const BrowserBuffer: typeof Buffer;
3
+ declare const BrowserBufferPolyfill: () => void;
4
+ export { BrowserBuffer as Buffer, BrowserBufferPolyfill as bufferPolyfill };
2
5
  //# sourceMappingURL=index-browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index-browser.d.ts","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,oBAAoB,CAAA;AAE3D,QAAA,MAAM,aAAa,eAAS,CAAA;AAC5B,QAAA,MAAM,qBAAqB,YAAiB,CAAA;AAC5C,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,qBAAqB,IAAI,cAAc,EAAE,CAAA"}
@@ -1,2 +1,4 @@
1
- export * from './node/index.ts';
1
+ declare const NodeBuffer: BufferConstructor;
2
+ declare const NodeBufferPolyfill: () => void;
3
+ export { NodeBuffer as Buffer, NodeBufferPolyfill as bufferPolyfill };
2
4
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,UAAU,mBAAS,CAAA;AACzB,QAAA,MAAM,kBAAkB,YAAiB,CAAA;AACzC,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,kBAAkB,IAAI,cAAc,EAAE,CAAA"}
@@ -5,8 +5,12 @@ var bufferPolyfill = () => {
5
5
 
6
6
  // src/node/index.ts
7
7
  import { Buffer } from "buffer";
8
+
9
+ // src/index-node.ts
10
+ var NodeBuffer = Buffer;
11
+ var NodeBufferPolyfill = bufferPolyfill;
8
12
  export {
9
- Buffer,
10
- bufferPolyfill
13
+ NodeBuffer as Buffer,
14
+ NodeBufferPolyfill as bufferPolyfill
11
15
  };
12
16
  //# sourceMappingURL=index-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/node/bufferPolyfill.ts","../../src/node/index.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n","export * from './bufferPolyfill.ts'\nexport { Buffer } from 'node:buffer'\n"],"mappings":";AAAO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ACDA,SAAS,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/node/bufferPolyfill.ts","../../src/node/index.ts","../../src/index-node.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n","export * from './bufferPolyfill.ts'\nexport { Buffer } from 'node:buffer'\n","import { Buffer, bufferPolyfill } from './node/index.ts'\n\nconst NodeBuffer = Buffer\nconst NodeBufferPolyfill = bufferPolyfill\nexport { NodeBuffer as Buffer, NodeBufferPolyfill as bufferPolyfill }\n"],"mappings":";AAAO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ACDA,SAAS,cAAc;;;ACCvB,IAAM,aAAa;AACnB,IAAM,qBAAqB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/buffer",
3
- "version": "5.0.79",
3
+ "version": "5.0.81",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "buffer",
@@ -31,20 +31,16 @@
31
31
  "types": "./dist/node/index-node.d.ts",
32
32
  "browser": {
33
33
  "types": "./dist/browser/index-browser.d.ts",
34
- "source": "./src/browser/index.ts",
35
34
  "default": "./dist/browser/index-browser.mjs"
36
35
  },
37
- "source": "./src/node/index.ts",
38
36
  "default": "./dist/node/index-node.mjs"
39
37
  },
40
38
  "./package.json": "./package.json"
41
39
  },
42
40
  "module": "./dist/node/index-node.mjs",
43
- "source": "./src/node/index.ts",
44
41
  "types": "./dist/node/index-node.d.ts",
45
42
  "files": [
46
43
  "dist",
47
- "src",
48
44
  "!**/*.bench.*",
49
45
  "!**/*.spec.*",
50
46
  "!**/*.test.*"
@@ -53,10 +49,10 @@
53
49
  "buffer": "~6.0.3"
54
50
  },
55
51
  "devDependencies": {
56
- "@types/node": "~25.2.3",
57
- "@xylabs/ts-scripts-yarn3": "~7.3.2",
58
- "@xylabs/tsconfig": "~7.3.2",
59
- "typescript": "~5.9.3"
52
+ "@xylabs/ts-scripts-yarn3": "~7.4.11",
53
+ "@xylabs/tsconfig": "~7.4.11",
54
+ "typescript": "~5.9.3",
55
+ "vitest": "~4.0.18"
60
56
  },
61
57
  "engines": {
62
58
  "node": ">=18"
@@ -1,7 +0,0 @@
1
- import { Buffer } from 'buffer/'
2
-
3
- export const bufferPolyfill = () => {
4
- if (globalThis.Buffer === undefined) {
5
- globalThis.Buffer = globalThis.Buffer ?? Buffer
6
- }
7
- }
@@ -1,2 +0,0 @@
1
- export { bufferPolyfill } from './bufferPolyfill.ts'
2
- export { Buffer } from 'buffer/'
@@ -1 +0,0 @@
1
- export * from './browser/index.ts'
package/src/index-node.ts DELETED
@@ -1 +0,0 @@
1
- export * from './node/index.ts'
@@ -1,3 +0,0 @@
1
- export const bufferPolyfill = () => {
2
- return
3
- }
package/src/node/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './bufferPolyfill.ts'
2
- export { Buffer } from 'node:buffer'