@manuscripts/transform 3.0.27-fix-migration3021.1 → 3.0.27
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/dist/cjs/schema/migration/migrate.js +1 -1
- package/dist/cjs/schema/migration/migration-scripts/3.0.21.js +9 -9
- package/dist/cjs/version.js +1 -1
- package/dist/es/schema/migration/migrate.js +1 -1
- package/dist/es/schema/migration/migration-scripts/3.0.21.js +9 -9
- package/dist/es/version.js +1 -1
- package/dist/types/schema/migration/migration-scripts/3.0.21.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ function migrateFor(oldDoc, baseVersion) {
|
|
|
28
28
|
continue;
|
|
29
29
|
}
|
|
30
30
|
console.log('Migrating doc with script to version ' + script.toVersion);
|
|
31
|
-
migratedDoc = migrate(migratedDoc, script.migrateNode
|
|
31
|
+
migratedDoc = migrate(migratedDoc, (node, oldDoc) => script.migrateNode(node, oldDoc));
|
|
32
32
|
}
|
|
33
33
|
return testDoc(migratedDoc, baseVersion);
|
|
34
34
|
}
|
|
@@ -11,15 +11,15 @@ class Migration3021 {
|
|
|
11
11
|
['materials-method', 'methods'],
|
|
12
12
|
['subsection', ''],
|
|
13
13
|
]);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
}
|
|
15
|
+
migrateNode(node) {
|
|
16
|
+
if (node.type === 'section' &&
|
|
17
|
+
node.attrs.category.startsWith('MPSectionCategory:')) {
|
|
18
|
+
const [, suffix] = node.attrs.category.split(':', 2);
|
|
19
|
+
const newCategory = this.suffixMap.get(suffix) || suffix;
|
|
20
|
+
return Object.assign(Object.assign({}, node), { attrs: Object.assign(Object.assign({}, node.attrs), { category: newCategory }) });
|
|
21
|
+
}
|
|
22
|
+
return node;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.default = Migration3021;
|
package/dist/cjs/version.js
CHANGED
|
@@ -21,7 +21,7 @@ export function migrateFor(oldDoc, baseVersion) {
|
|
|
21
21
|
continue;
|
|
22
22
|
}
|
|
23
23
|
console.log('Migrating doc with script to version ' + script.toVersion);
|
|
24
|
-
migratedDoc = migrate(migratedDoc, script.migrateNode
|
|
24
|
+
migratedDoc = migrate(migratedDoc, (node, oldDoc) => script.migrateNode(node, oldDoc));
|
|
25
25
|
}
|
|
26
26
|
return testDoc(migratedDoc, baseVersion);
|
|
27
27
|
}
|
|
@@ -9,15 +9,15 @@ class Migration3021 {
|
|
|
9
9
|
['materials-method', 'methods'],
|
|
10
10
|
['subsection', ''],
|
|
11
11
|
]);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
}
|
|
13
|
+
migrateNode(node) {
|
|
14
|
+
if (node.type === 'section' &&
|
|
15
|
+
node.attrs.category.startsWith('MPSectionCategory:')) {
|
|
16
|
+
const [, suffix] = node.attrs.category.split(':', 2);
|
|
17
|
+
const newCategory = this.suffixMap.get(suffix) || suffix;
|
|
18
|
+
return Object.assign(Object.assign({}, node), { attrs: Object.assign(Object.assign({}, node.attrs), { category: newCategory }) });
|
|
19
|
+
}
|
|
20
|
+
return node;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export default Migration3021;
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.27
|
|
1
|
+
export const VERSION = "3.0.27";
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.27
|
|
1
|
+
export declare const VERSION = "3.0.27";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "3.0.27
|
|
4
|
+
"version": "3.0.27",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|