get-random-values 4.0.0 → 4.1.1

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/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014–2025 Kenan Yildirim <https://kenany.me/>
1
+ Copyright 2014–2026 Kenan Yildirim <https://kenany.me/>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
- const window = require('global/window');
2
1
  const nodeCrypto = require('node:crypto');
3
2
 
3
+ const window = require('window-or-global');
4
+
4
5
  /**
5
6
  * @template {ArrayBufferView<ArrayBufferLike>} T
6
7
  * @param {T} buf
package/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "get-random-values",
3
- "version": "4.0.0",
3
+ "version": "4.1.1",
4
4
  "description": "`window.crypto.getRandomValues` with fallback to Node.js crypto",
5
5
  "keywords": [
6
6
  "crypto"
7
7
  ],
8
- "repository": "github:kenany/get-random-values",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kenany/get-random-values.git"
11
+ },
9
12
  "license": "MIT",
10
13
  "author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
11
14
  "main": "index.js",
12
15
  "types": "index.d.ts",
13
16
  "files": [
14
- "CHANGELOG.md",
15
17
  "index.d.ts",
16
18
  "index.js",
17
19
  "LICENSE.txt"
@@ -22,39 +24,37 @@
22
24
  "engines": {
23
25
  "node": "20 || 22 || >=24"
24
26
  },
25
- "scripts": {
26
- "clean": "rimraf --glob test/**/*.d.ts *.d.ts",
27
- "lint": "biome check .",
28
- "release": "semantic-release",
29
- "type-coverage": "type-coverage --at-least 100 --detail --strict",
30
- "prebuild": "npm run clean",
31
- "build": "tsc",
32
- "pretest": "npm run build",
33
- "test": "tape test/*.js",
34
- "posttest": "npm run lint && npm run type-coverage",
35
- "prepack": "npm run build"
36
- },
37
27
  "dependencies": {
38
- "global": "^4.4.0"
28
+ "window-or-global": "^1.0.1"
39
29
  },
40
30
  "devDependencies": {
41
- "@biomejs/biome": "2.1.4",
42
- "@semantic-release/changelog": "^6.0.3",
43
- "@semantic-release/git": "^10.0.1",
44
- "@tsconfig/node20": "20.1.6",
45
- "@types/lodash.isfunction": "^3.0.9",
46
- "@types/tape": "^5.8.1",
47
- "conventional-changelog-conventionalcommits": "^9.1.0",
48
- "is-browser": "^2.1.0",
49
- "lodash.isfunction": "^3.0.9",
50
- "rimraf": "^6.0.1",
51
- "semantic-release": "^24.2.7",
52
- "tape": "^5.9.0",
53
- "type-coverage": "^2.29.7",
54
- "typescript": "^5.8.3",
55
- "ultracite": "5.1.2"
31
+ "@biomejs/biome": "2.3.11",
32
+ "@containerbase/semantic-release-pnpm": "1.3.15",
33
+ "@kenan/biome-config": "1.0.6",
34
+ "@tsconfig/node20": "20.1.8",
35
+ "@types/lodash.isfunction": "3.0.9",
36
+ "@types/tape": "5.8.1",
37
+ "conventional-changelog-conventionalcommits": "9.1.0",
38
+ "is-browser": "2.1.0",
39
+ "lodash.isfunction": "3.0.9",
40
+ "rimraf": "6.1.2",
41
+ "semantic-release": "25.0.2",
42
+ "tape": "5.9.0",
43
+ "type-coverage": "2.29.7",
44
+ "typescript": "5.9.3"
56
45
  },
57
46
  "browser": {
58
47
  "crypto": false
48
+ },
49
+ "scripts": {
50
+ "clean": "rimraf --glob test/**/*.d.ts *.d.ts || true",
51
+ "lint": "biome check .",
52
+ "release": "semantic-release",
53
+ "type-coverage": "type-coverage --at-least 100 --detail --strict",
54
+ "prebuild": "pnpm run clean",
55
+ "build": "tsc",
56
+ "pretest": "pnpm run build",
57
+ "test": "tape test/*.js",
58
+ "posttest": "pnpm run lint && pnpm run type-coverage"
59
59
  }
60
- }
60
+ }
package/CHANGELOG.md DELETED
@@ -1,52 +0,0 @@
1
- ## [4.0.0](https://github.com/kenany/get-random-values/compare/3.0.0...4.0.0) (2025-08-13)
2
-
3
- ### ⚠ BREAKING CHANGES
4
-
5
- * Node.js v18 is no longer supported.
6
-
7
- ### Features
8
-
9
- * drop Node.js v18 support ([ddef386](https://github.com/kenany/get-random-values/commit/ddef386fc0bc842f1e6eed6beac8dea6947f3655))
10
-
11
- ## [3.0.0](https://github.com/kenany/get-random-values/compare/2.1.0...3.0.0) (2023-09-21)
12
-
13
-
14
- ### ⚠ BREAKING CHANGES
15
-
16
- * Node.js v14 and v16 are no longer supported.
17
-
18
- ### Features
19
-
20
- * drop Node.js v14 and v16 ([329c91b](https://github.com/kenany/get-random-values/commit/329c91b1a7b3b2e937545bf0a9c37d7df6b4f3e7))
21
-
22
- ## [2.1.0](https://github.com/KenanY/get-random-values/compare/2.0.0...2.1.0) (2023-03-26)
23
-
24
-
25
- ### Features
26
-
27
- * add TypeScript declarations ([9a7f39f](https://github.com/KenanY/get-random-values/commit/9a7f39fbfca6b94699024619eccebeba83babc07))
28
-
29
- ## [2.0.0](https://github.com/KenanY/get-random-values/compare/1.2.2...2.0.0) (2022-06-25)
30
-
31
-
32
- ### ⚠ BREAKING CHANGES
33
-
34
- * Node.js v10 and v12 are no longer supported.
35
-
36
- ### Features
37
-
38
- * drop Node.js v10 and v12 support ([1e727b9](https://github.com/KenanY/get-random-values/commit/1e727b95bc162a7afbb6608687950101fae573ab))
39
-
40
- ### [1.2.2](https://github.com/KenanY/get-random-values/compare/1.2.1...1.2.2) (2020-08-25)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * update copyright year to 2020 ([4761fef](https://github.com/KenanY/get-random-values/commit/4761fef0e5513b84f0ab340d22ef31d97e50ab4c))
46
-
47
- ### [1.2.1](https://github.com/KenanY/get-random-values/compare/1.2.0...1.2.1) (2020-08-25)
48
-
49
-
50
- ### Bug Fixes
51
-
52
- * **deps:** global@4.4.0 ([18f7674](https://github.com/KenanY/get-random-values/commit/18f7674e87441f5d682b27390e992e18215456ab))