@xylabs/buffer 5.0.83 → 5.0.86

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
@@ -15,6 +15,8 @@
15
15
 
16
16
  Base functionality used throughout XY Labs TypeScript/JavaScript libraries
17
17
 
18
+
19
+
18
20
  ## Reference
19
21
 
20
22
  **@xylabs/buffer**
@@ -23,8 +25,10 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
23
25
 
24
26
  ## Modules
25
27
 
26
- - [index-browser](#index-browser/README)
27
- - [index-node](#index-node/README)
28
+ | Module | Description |
29
+ | ------ | ------ |
30
+ | [index-browser](#index-browser/README) | - |
31
+ | [index-node](#index-node/README) | - |
28
32
 
29
33
  ### index-browser
30
34
 
@@ -50,6 +54,8 @@ const Buffer: typeof Buffer;
50
54
  const bufferPolyfill: () => void;
51
55
  ```
52
56
 
57
+ Polyfills `globalThis.Buffer` with the browser-compatible Buffer implementation if not already defined.
58
+
53
59
  ## Returns
54
60
 
55
61
  `void`
@@ -78,6 +84,8 @@ const Buffer: BufferConstructor;
78
84
  const bufferPolyfill: () => void;
79
85
  ```
80
86
 
87
+ No-op polyfill for Node.js, where Buffer is already available globally.
88
+
81
89
  ## Returns
82
90
 
83
91
  `void`
@@ -1,2 +1,3 @@
1
+ /** Polyfills `globalThis.Buffer` with the browser-compatible Buffer implementation if not already defined. */
1
2
  export declare const bufferPolyfill: () => void;
2
3
  //# sourceMappingURL=bufferPolyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/bufferPolyfill.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,YAI1B,CAAA"}
1
+ {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/bufferPolyfill.ts"],"names":[],"mappings":"AAEA,8GAA8G;AAC9G,eAAO,MAAM,cAAc,YAI1B,CAAA"}
@@ -1 +1 @@
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
+ {"version":3,"sources":["../../src/browser/bufferPolyfill.ts","../../src/browser/index.ts","../../src/index-browser.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\n/** Polyfills `globalThis.Buffer` with the browser-compatible Buffer implementation if not already defined. */\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;AAGhB,IAAM,iBAAiB,MAAM;AAClC,MAAI,WAAW,WAAW,QAAW;AACnC,eAAW,SAAS,WAAW,UAAU;AAAA,EAC3C;AACF;;;ACNA,SAAS,UAAAA,eAAc;;;ACCvB,IAAM,gBAAgBC;AACtB,IAAM,wBAAwB;","names":["Buffer","Buffer"]}
@@ -1,2 +1,3 @@
1
+ /** No-op polyfill for Node.js, where Buffer is already available globally. */
1
2
  export declare const bufferPolyfill: () => void;
2
3
  //# sourceMappingURL=bufferPolyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/bufferPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YAE1B,CAAA"}
1
+ {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/bufferPolyfill.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,cAAc,YAE1B,CAAA"}
@@ -1,2 +1,3 @@
1
+ /** Polyfills `globalThis.Buffer` with the browser-compatible Buffer implementation if not already defined. */
1
2
  export declare const bufferPolyfill: () => void;
2
3
  //# sourceMappingURL=bufferPolyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/bufferPolyfill.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,YAI1B,CAAA"}
1
+ {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/browser/bufferPolyfill.ts"],"names":[],"mappings":"AAEA,8GAA8G;AAC9G,eAAO,MAAM,cAAc,YAI1B,CAAA"}
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"sources":["../../src/node/bufferPolyfill.ts","../../src/node/index.ts","../../src/index-node.ts"],"sourcesContent":["/** No-op polyfill for Node.js, where Buffer is already available globally. */\nexport 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":";AACO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ACFA,SAAS,cAAc;;;ACCvB,IAAM,aAAa;AACnB,IAAM,qBAAqB;","names":[]}
@@ -1,2 +1,3 @@
1
+ /** No-op polyfill for Node.js, where Buffer is already available globally. */
1
2
  export declare const bufferPolyfill: () => void;
2
3
  //# sourceMappingURL=bufferPolyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/bufferPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,YAE1B,CAAA"}
1
+ {"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../../src/node/bufferPolyfill.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,cAAc,YAE1B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/buffer",
3
- "version": "5.0.83",
3
+ "version": "5.0.86",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "buffer",
@@ -49,8 +49,8 @@
49
49
  "buffer": "~6.0.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@xylabs/ts-scripts-yarn3": "~7.4.11",
53
- "@xylabs/tsconfig": "~7.4.11",
52
+ "@xylabs/ts-scripts-yarn3": "~7.4.16",
53
+ "@xylabs/tsconfig": "~7.4.16",
54
54
  "typescript": "~5.9.3",
55
55
  "vitest": "~4.0.18"
56
56
  },