@xylabs/buffer 5.1.2 → 5.1.4

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.
@@ -16,4 +16,4 @@ export {
16
16
  BrowserBuffer as Buffer,
17
17
  BrowserBufferPolyfill as bufferPolyfill
18
18
  };
19
- //# sourceMappingURL=index-browser.mjs.map
19
+ //# sourceMappingURL=index-browser.mjs.map
@@ -1 +1,7 @@
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
+ "version": 3,
3
+ "sources": ["../../src/browser/bufferPolyfill.ts", "../../src/browser/index.ts", "../../src/index-browser.ts"],
4
+ "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"],
5
+ "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;",
6
+ "names": ["Buffer", "Buffer"]
7
+ }
@@ -4,7 +4,7 @@ var bufferPolyfill = () => {
4
4
  };
5
5
 
6
6
  // src/node/index.ts
7
- import { Buffer } from "buffer";
7
+ import { Buffer } from "node:buffer";
8
8
 
9
9
  // src/index-node.ts
10
10
  var NodeBuffer = Buffer;
@@ -13,4 +13,4 @@ export {
13
13
  NodeBuffer as Buffer,
14
14
  NodeBufferPolyfill as bufferPolyfill
15
15
  };
16
- //# sourceMappingURL=index-node.mjs.map
16
+ //# sourceMappingURL=index-node.mjs.map
@@ -1 +1,7 @@
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
+ "version": 3,
3
+ "sources": ["../../src/node/bufferPolyfill.ts", "../../src/node/index.ts", "../../src/index-node.ts"],
4
+ "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"],
5
+ "mappings": ";AACO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ACFA,SAAS,cAAc;;;ACCvB,IAAM,aAAa;AACnB,IAAM,qBAAqB;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/buffer",
3
- "version": "5.1.2",
3
+ "version": "5.1.4",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "buffer",
@@ -45,17 +45,17 @@
45
45
  "README.md"
46
46
  ],
47
47
  "devDependencies": {
48
- "@types/node": "^25.6.0",
49
- "@xylabs/toolchain": "~7.13.15",
50
- "@xylabs/tsconfig": "~7.13.15",
51
- "buffer": "~6.0.3",
52
- "eslint": "^10.3.0",
53
- "typescript": "^5.9.3",
54
- "vite": "^8.0.10",
55
- "vitest": "^4.1.5"
48
+ "@types/node": "^25.9.0",
49
+ "@xylabs/toolchain": "~8.0.8",
50
+ "@xylabs/tsconfig": "~8.0.8",
51
+ "buffer": "^6.0.3",
52
+ "eslint": "^10.4.0",
53
+ "typescript": "^6.0.3",
54
+ "vite": "^8.0.13",
55
+ "vitest": "^4.1.6"
56
56
  },
57
57
  "peerDependencies": {
58
- "buffer": "~6.0"
58
+ "buffer": "^6.0"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=18"