@atlaskit/editor-synced-block-provider 12.2.0 → 12.2.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,50 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-provider
|
|
2
2
|
|
|
3
|
+
## 12.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0927c3666c010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0927c3666c010) -
|
|
8
|
+
Upgrade `uuid` from `3.x` to `11.1.1` to remediate GHSA-w5hq-g745-h8pq / SNYK-JS-UUID-16133035.
|
|
9
|
+
|
|
10
|
+
`uuid@11` removed the deep subpath exports (`uuid/v4`, `uuid/v1`, `uuid/v5`) and the default
|
|
11
|
+
export, so all internal call sites were migrated to named imports:
|
|
12
|
+
|
|
13
|
+
```diff
|
|
14
|
+
-import uuid from 'uuid/v4';
|
|
15
|
+
+import { v4 as uuid } from 'uuid';
|
|
16
|
+
|
|
17
|
+
-import uuid from 'uuid';
|
|
18
|
+
+import { v4 as uuid } from 'uuid';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
With the exception of `@atlassian/integrations` (below), this is an internal implementation change
|
|
22
|
+
only - no public API, export, or entrypoint changed. UUID generation behaviour is unchanged
|
|
23
|
+
(`uuid@3`'s default export was already `v4`).
|
|
24
|
+
|
|
25
|
+
`@atlassian/integrations` declares `uuid` as a peer dependency, so its declared range moved from
|
|
26
|
+
`^3.1.0` to `^11.1.1`. That is a peer dependency declaration change, hence `minor` rather than
|
|
27
|
+
`patch` for that package.
|
|
28
|
+
|
|
29
|
+
The following `platform/packages/ai-mate` packages were also touched, but are all `private: true`
|
|
30
|
+
and so are intentionally not listed in the frontmatter above:
|
|
31
|
+
- `@atlassian/csm-assistance-service` - bumped its explicit `uuid` dependency from `npm:^9.0.0` to
|
|
32
|
+
`npm:^11.1.1` (`9.0.1` is also within the advisory's affected range).
|
|
33
|
+
- `@atlassian/csm-guidance-config` - example helper only, migrated to the named `uuid` import.
|
|
34
|
+
- `@atlassian/csm-ui-components` - example helper only, migrated to the named `uuid` import.
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
38
|
+
## 12.2.1
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- [`c5bc5493c5486`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5bc5493c5486) -
|
|
43
|
+
Fix migrateSyncBlockIds mutating the caller's input ADF document. traverse() falls back to
|
|
44
|
+
mutating a node in place whenever its visitor returns undefined, so the transform now always
|
|
45
|
+
returns a copy instead.
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
|
|
3
48
|
## 12.2.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|
|
@@ -72,14 +72,19 @@ var migrateAttrs = function migrateAttrs(attrs, resolvers, unresolvedContentIds)
|
|
|
72
72
|
var migrateSyncBlockIds = exports.migrateSyncBlockIds = function migrateSyncBlockIds(adf, resolvers) {
|
|
73
73
|
var unresolvedContentIds = new Set();
|
|
74
74
|
var isTransformed = false;
|
|
75
|
+
|
|
76
|
+
// Always returns a copy, even when nothing changes: traverse() falls back to mutating
|
|
77
|
+
// the original node in place (its `content` array gets reassigned) whenever a visitor
|
|
78
|
+
// returns undefined, so returning undefined here would leak that mutation onto the
|
|
79
|
+
// caller's input document.
|
|
75
80
|
var migrateNode = function migrateNode(node) {
|
|
76
81
|
var syncBlockAttrs = node.attrs && parseSyncBlockAttrs(node.attrs);
|
|
77
82
|
if (!syncBlockAttrs) {
|
|
78
|
-
return
|
|
83
|
+
return _objectSpread({}, node);
|
|
79
84
|
}
|
|
80
85
|
var nextAttrs = migrateAttrs(syncBlockAttrs, resolvers, unresolvedContentIds);
|
|
81
86
|
if (!nextAttrs) {
|
|
82
|
-
return
|
|
87
|
+
return _objectSpread({}, node);
|
|
83
88
|
}
|
|
84
89
|
isTransformed = true;
|
|
85
90
|
return _objectSpread(_objectSpread({}, node), {}, {
|
|
@@ -67,14 +67,23 @@ const migrateAttrs = (attrs, resolvers, unresolvedContentIds) => {
|
|
|
67
67
|
export const migrateSyncBlockIds = (adf, resolvers) => {
|
|
68
68
|
const unresolvedContentIds = new Set();
|
|
69
69
|
let isTransformed = false;
|
|
70
|
+
|
|
71
|
+
// Always returns a copy, even when nothing changes: traverse() falls back to mutating
|
|
72
|
+
// the original node in place (its `content` array gets reassigned) whenever a visitor
|
|
73
|
+
// returns undefined, so returning undefined here would leak that mutation onto the
|
|
74
|
+
// caller's input document.
|
|
70
75
|
const migrateNode = node => {
|
|
71
76
|
const syncBlockAttrs = node.attrs && parseSyncBlockAttrs(node.attrs);
|
|
72
77
|
if (!syncBlockAttrs) {
|
|
73
|
-
return
|
|
78
|
+
return {
|
|
79
|
+
...node
|
|
80
|
+
};
|
|
74
81
|
}
|
|
75
82
|
const nextAttrs = migrateAttrs(syncBlockAttrs, resolvers, unresolvedContentIds);
|
|
76
83
|
if (!nextAttrs) {
|
|
77
|
-
return
|
|
84
|
+
return {
|
|
85
|
+
...node
|
|
86
|
+
};
|
|
78
87
|
}
|
|
79
88
|
isTransformed = true;
|
|
80
89
|
return {
|
|
@@ -66,14 +66,19 @@ var migrateAttrs = function migrateAttrs(attrs, resolvers, unresolvedContentIds)
|
|
|
66
66
|
export var migrateSyncBlockIds = function migrateSyncBlockIds(adf, resolvers) {
|
|
67
67
|
var unresolvedContentIds = new Set();
|
|
68
68
|
var isTransformed = false;
|
|
69
|
+
|
|
70
|
+
// Always returns a copy, even when nothing changes: traverse() falls back to mutating
|
|
71
|
+
// the original node in place (its `content` array gets reassigned) whenever a visitor
|
|
72
|
+
// returns undefined, so returning undefined here would leak that mutation onto the
|
|
73
|
+
// caller's input document.
|
|
69
74
|
var migrateNode = function migrateNode(node) {
|
|
70
75
|
var syncBlockAttrs = node.attrs && parseSyncBlockAttrs(node.attrs);
|
|
71
76
|
if (!syncBlockAttrs) {
|
|
72
|
-
return
|
|
77
|
+
return _objectSpread({}, node);
|
|
73
78
|
}
|
|
74
79
|
var nextAttrs = migrateAttrs(syncBlockAttrs, resolvers, unresolvedContentIds);
|
|
75
80
|
if (!nextAttrs) {
|
|
76
|
-
return
|
|
81
|
+
return _objectSpread({}, node);
|
|
77
82
|
}
|
|
78
83
|
isTransformed = true;
|
|
79
84
|
return _objectSpread(_objectSpread({}, node), {}, {
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"atlaskit:src": "src/index.ts",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaskit/adf-utils": "^20.
|
|
19
|
+
"@atlaskit/adf-utils": "^20.9.0",
|
|
20
20
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
21
21
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
22
22
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"graphql-ws": "^5.14.2",
|
|
31
31
|
"lodash": "^4.17.21",
|
|
32
32
|
"raf-schd": "^4.0.3",
|
|
33
|
-
"uuid": "^
|
|
33
|
+
"uuid": "^11.1.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^120.
|
|
36
|
+
"@atlaskit/editor-common": "^120.13.0",
|
|
37
37
|
"react": "^18.2.0 || ^19.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-dom": "^19.2.0"
|
|
43
43
|
},
|
|
44
44
|
"name": "@atlaskit/editor-synced-block-provider",
|
|
45
|
-
"version": "12.2.
|
|
45
|
+
"version": "12.2.2",
|
|
46
46
|
"description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
|
|
47
47
|
"author": "Atlassian Pty Ltd",
|
|
48
48
|
"license": "Apache-2.0",
|