get-random-values 1.2.2 → 2.0.0

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–2020 Kenan Yildirim <https://kenany.me/>
1
+ Copyright 2014–2022 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,12 @@
1
+ /** @type {Window} */
1
2
  var window = require('global/window');
2
3
  var nodeCrypto = require('crypto');
3
4
 
5
+ /**
6
+ * @template {ArrayBufferView | null} T
7
+ * @param {T} buf
8
+ * @returns {T}
9
+ */
4
10
  function getRandomValues(buf) {
5
11
  if (window.crypto && window.crypto.getRandomValues) {
6
12
  return window.crypto.getRandomValues(buf);
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "get-random-values",
3
- "version": "1.2.2",
3
+ "version": "2.0.0",
4
4
  "description": "`window.crypto.getRandomValues` with fallback to Node.js crypto",
5
5
  "keywords": [
6
6
  "crypto"
7
7
  ],
8
8
  "repository": "KenanY/get-random-values",
9
9
  "license": "MIT",
10
- "author": "Kenan Yildirim <kenan@kenany.me> (http://kenany.me/)",
10
+ "author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
11
11
  "main": "index.js",
12
12
  "files": [
13
13
  "index.js",
@@ -17,7 +17,7 @@
17
17
  "test": "test"
18
18
  },
19
19
  "engines": {
20
- "node": "10 || 12 || >=14"
20
+ "node": "14 || 16 || >=18"
21
21
  },
22
22
  "scripts": {
23
23
  "release": "semantic-release",
@@ -27,15 +27,14 @@
27
27
  "global": "^4.4.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@kenan/renovate-config": "1.4.0",
31
- "@semantic-release/changelog": "5.0.1",
32
- "@semantic-release/git": "9.0.0",
33
- "conventional-changelog-conventionalcommits": "4.4.0",
30
+ "@semantic-release/changelog": "6.0.1",
31
+ "@semantic-release/git": "10.0.1",
32
+ "conventional-changelog-conventionalcommits": "^5.0.0",
34
33
  "is-browser": "2.1.0",
35
34
  "lodash.foreach": "4.5.0",
36
35
  "lodash.isfunction": "3.0.9",
37
- "semantic-release": "17.1.1",
38
- "tape": "5.0.1"
36
+ "semantic-release": "^19.0.3",
37
+ "tape": "5.5.3"
39
38
  },
40
39
  "browser": {
41
40
  "crypto": false
package/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- ### [1.2.2](https://github.com/KenanY/get-random-values/compare/1.2.1...1.2.2) (2020-08-25)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * update copyright year to 2020 ([4761fef](https://github.com/KenanY/get-random-values/commit/4761fef0e5513b84f0ab340d22ef31d97e50ab4c))
7
-
8
- ### [1.2.1](https://github.com/KenanY/get-random-values/compare/1.2.0...1.2.1) (2020-08-25)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * **deps:** global@4.4.0 ([18f7674](https://github.com/KenanY/get-random-values/commit/18f7674e87441f5d682b27390e992e18215456ab))