@xylabs/platform 5.1.2 → 5.1.3

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.
@@ -15,4 +15,4 @@ export {
15
15
  isWebworker,
16
16
  subtle
17
17
  };
18
- //# sourceMappingURL=index-browser.mjs.map
18
+ //# sourceMappingURL=index-browser.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["import type { subtle as subtleType } from 'node:crypto'\n\n/** Returns whether the current environment is a browser window (not a web worker). */\nexport const isBrowser = () => {\n return !isWebworker() && globalThis.constructor?.name === 'Window'\n}\n\n/** Returns whether the current environment is a dedicated web worker. */\nexport const isWebworker = () => {\n return typeof globalThis === 'object' && globalThis.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\n/** Returns whether the current environment is Node.js. Always returns false in the browser entry point. */\nexport const isNode = () => {\n return false\n}\n\n/** The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto. */\nexport const subtle = globalThis.crypto.subtle as typeof subtleType\n"],"mappings":";AAGO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,WAAW,aAAa,SAAS;AAC5D;AAGO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,eAAe,YAAY,WAAW,aAAa,SAAS;AAC5E;AAGO,IAAM,SAAS,MAAM;AAC1B,SAAO;AACT;AAGO,IAAM,SAAS,WAAW,OAAO;","names":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/browser/index.ts"],
4
+ "sourcesContent": ["import type { subtle as subtleType } from 'node:crypto'\n\n/** Returns whether the current environment is a browser window (not a web worker). */\nexport const isBrowser = () => {\n return !isWebworker() && globalThis.constructor?.name === 'Window'\n}\n\n/** Returns whether the current environment is a dedicated web worker. */\nexport const isWebworker = () => {\n return typeof globalThis === 'object' && globalThis.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\n/** Returns whether the current environment is Node.js. Always returns false in the browser entry point. */\nexport const isNode = () => {\n return false\n}\n\n/** The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto. */\nexport const subtle = globalThis.crypto.subtle as typeof subtleType\n"],
5
+ "mappings": ";AAGO,IAAM,YAAY,MAAM;AAC7B,SAAO,CAAC,YAAY,KAAK,WAAW,aAAa,SAAS;AAC5D;AAGO,IAAM,cAAc,MAAM;AAC/B,SAAO,OAAO,eAAe,YAAY,WAAW,aAAa,SAAS;AAC5E;AAGO,IAAM,SAAS,MAAM;AAC1B,SAAO;AACT;AAGO,IAAM,SAAS,WAAW,OAAO;",
6
+ "names": []
7
+ }
@@ -1,5 +1,5 @@
1
1
  // src/node/index.ts
2
- import { subtle } from "crypto";
2
+ import { subtle } from "node:crypto";
3
3
  var isBrowser = () => {
4
4
  return false;
5
5
  };
@@ -15,4 +15,4 @@ export {
15
15
  isWebworker,
16
16
  subtle
17
17
  };
18
- //# sourceMappingURL=index-node.mjs.map
18
+ //# sourceMappingURL=index-node.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["/** The Web Crypto API's SubtleCrypto interface, re-exported from Node.js crypto module. */\nexport { subtle } from 'node:crypto'\n\n/** Returns whether the current environment is a browser. Always returns false in Node.js. */\nexport const isBrowser = () => {\n return false\n}\n\n/** Returns whether the current environment is a web worker. Always returns false in Node.js. */\nexport const isWebworker = () => {\n return false\n}\n\n/** Returns whether the current environment is Node.js. Always returns true in this entry point. */\nexport const isNode = () => {\n return true\n}\n"],"mappings":";AACA,SAAS,cAAc;AAGhB,IAAM,YAAY,MAAM;AAC7B,SAAO;AACT;AAGO,IAAM,cAAc,MAAM;AAC/B,SAAO;AACT;AAGO,IAAM,SAAS,MAAM;AAC1B,SAAO;AACT;","names":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/node/index.ts"],
4
+ "sourcesContent": ["/** The Web Crypto API's SubtleCrypto interface, re-exported from Node.js crypto module. */\nexport { subtle } from 'node:crypto'\n\n/** Returns whether the current environment is a browser. Always returns false in Node.js. */\nexport const isBrowser = () => {\n return false\n}\n\n/** Returns whether the current environment is a web worker. Always returns false in Node.js. */\nexport const isWebworker = () => {\n return false\n}\n\n/** Returns whether the current environment is Node.js. Always returns true in this entry point. */\nexport const isNode = () => {\n return true\n}\n"],
5
+ "mappings": ";AACA,SAAS,cAAc;AAGhB,IAAM,YAAY,MAAM;AAC7B,SAAO;AACT;AAGO,IAAM,cAAc,MAAM;AAC/B,SAAO;AACT;AAGO,IAAM,SAAS,MAAM;AAC1B,SAAO;AACT;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/platform",
3
- "version": "5.1.2",
3
+ "version": "5.1.3",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "platform",
@@ -47,13 +47,13 @@
47
47
  "README.md"
48
48
  ],
49
49
  "devDependencies": {
50
- "@types/node": "^25.6.0",
51
- "@xylabs/toolchain": "~7.13.15",
52
- "@xylabs/tsconfig": "~7.13.15",
50
+ "@types/node": "^25.8.0",
51
+ "@xylabs/toolchain": "~8.0.4",
52
+ "@xylabs/tsconfig": "~8.0.4",
53
53
  "eslint": "^10.3.0",
54
- "typescript": "^5.9.3",
55
- "vite": "^8.0.10",
56
- "vitest": "^4.1.5"
54
+ "typescript": "^6.0.3",
55
+ "vite": "^8.0.13",
56
+ "vitest": "^4.1.6"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=18"