@interop/bnid 6.0.1 → 6.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,5 +1,12 @@
1
1
  # @interop/bnid ChangeLog
2
2
 
3
+ ## 6.0.2 - 2026-06-25
4
+
5
+ ### Changed
6
+
7
+ - Use the `node:` import prefix for Node.js builtins (`node:crypto`,
8
+ `node:util`) in `src/util.ts`.
9
+
3
10
  ## 6.0.0-6.0.1 - 2026-06-08
4
11
 
5
12
  ### Changed
package/README.md CHANGED
@@ -47,8 +47,8 @@ This library is isomorphic and runs on React Native, with one environment
47
47
  requirement: it uses the Web Crypto `crypto.getRandomValues()` API to generate
48
48
  random id material, which React Native does not provide natively. Consumers must
49
49
  install the [`react-native-get-random-values`][] polyfill and import it
50
- **once**, before any `@interop/bnid` code runs (typically at the very
51
- top of your app entry, e.g. `index.js`):
50
+ **once**, before any `@interop/bnid` code runs (typically at the very top of
51
+ your app entry, e.g. `index.js`):
52
52
 
53
53
  ```sh
54
54
  npm install react-native-get-random-values
package/dist/util.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Node.js support
2
- import * as crypto from 'crypto';
3
- import { promisify } from 'util';
2
+ import * as crypto from 'node:crypto';
3
+ import { promisify } from 'node:util';
4
4
  const randomFill = promisify(crypto.randomFill);
5
5
  export async function getRandomBytes(buf) {
6
6
  return await randomFill(buf);
package/dist/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEhC,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAE/C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAe;IAClD,OAAO,MAAM,UAAU,CAAC,GAAG,CAAC,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;AAChD,CAAC"}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAE/C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAe;IAClD,OAAO,MAAM,UAAU,CAAC,GAAG,CAAC,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;AAChD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interop/bnid",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Base-N Id Generator",
5
5
  "license": "BSD-3-Clause",
6
6
  "scripts": {
package/src/util.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Node.js support
2
- import * as crypto from 'crypto'
3
- import { promisify } from 'util'
2
+ import * as crypto from 'node:crypto'
3
+ import { promisify } from 'node:util'
4
4
 
5
5
  const randomFill = promisify(crypto.randomFill)
6
6