@atlaskit/adf-schema 36.9.1 → 36.9.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,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 36.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 6e9e5d6: migrated uuid function to use uuid npm package instead of custom random logic
8
+
3
9
  ## 36.9.1
4
10
 
5
11
  ### Patch Changes
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.uuid = exports.generateUuid = void 0;
7
- /* eslint-disable no-bitwise */
7
+ var _uuid = require("uuid");
8
8
  var generateUuid = exports.generateUuid = function generateUuid() {
9
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
10
- var r = Math.random() * 16 | 0;
11
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
12
- });
9
+ return (0, _uuid.v4)();
13
10
  };
14
- /* eslint-enable no-bitwise */
15
-
16
11
  var staticValue = false;
17
12
  var uuid = exports.uuid = {
18
13
  setStatic: function setStatic(value) {
@@ -1,10 +1,7 @@
1
- /* eslint-disable no-bitwise */
2
- export const generateUuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
3
- const r = Math.random() * 16 | 0;
4
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
5
- });
6
- /* eslint-enable no-bitwise */
7
-
1
+ import { v4 as uuidGen } from 'uuid';
2
+ export const generateUuid = () => {
3
+ return uuidGen();
4
+ };
8
5
  let staticValue = false;
9
6
  export const uuid = {
10
7
  setStatic(value) {
@@ -1,12 +1,7 @@
1
- /* eslint-disable no-bitwise */
1
+ import { v4 as uuidGen } from 'uuid';
2
2
  export var generateUuid = function generateUuid() {
3
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
4
- var r = Math.random() * 16 | 0;
5
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
6
- });
3
+ return uuidGen();
7
4
  };
8
- /* eslint-enable no-bitwise */
9
-
10
5
  var staticValue = false;
11
6
  export var uuid = {
12
7
  setStatic: function setStatic(value) {
@@ -1,5 +1,5 @@
1
- export declare const generateUuid: () => string;
1
+ export declare const generateUuid: () => any;
2
2
  export declare const uuid: {
3
3
  setStatic(value: string | false): void;
4
- generate(): string;
4
+ generate(): any;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.9.1",
3
+ "version": "36.9.2",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -40,7 +40,8 @@
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "css-color-names": "0.0.4",
42
42
  "linkify-it": "^2.0.3",
43
- "memoize-one": "^6.0.0"
43
+ "memoize-one": "^6.0.0",
44
+ "uuid": "^9.0.1"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@atlassian/adf-schema-json": "^1.15.0",