@natlibfi/marc-record-merge 6.0.0-beta.9 → 7.0.0-alpha.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/.github/CODEOWNERS +2 -9
- package/.github/dependabot.yml +2 -3
- package/.github/workflows/melinda-node-tests.yml +2 -2
- package/dist/index.js +49 -4
- package/dist/index.js.map +1 -1
- package/dist/index.spec.js +59 -0
- package/dist/index.spec.js.map +1 -0
- package/dist/reducers/copy.js +52 -62
- package/dist/reducers/copy.js.map +1 -1
- package/dist/reducers/copy.spec.js +6 -8
- package/dist/reducers/copy.spec.js.map +1 -1
- package/dist/reducers/copy2.spec.js +66 -0
- package/dist/reducers/copy2.spec.js.map +1 -0
- package/dist/reducers/index.js +0 -6
- package/dist/reducers/index.js.map +1 -1
- package/dist/reducers/select.js +43 -40
- package/dist/reducers/select.js.map +1 -1
- package/dist/reducers/select.spec.js +4 -15
- package/dist/reducers/select.spec.js.map +1 -1
- package/dist/reducers/select2.spec.js +58 -0
- package/dist/reducers/select2.spec.js.map +1 -0
- package/package.json +18 -18
- package/src/index.js +51 -1
- package/src/index.spec.js +45 -0
- package/src/reducers/copy.js +34 -8
- package/src/reducers/copy.spec.js +3 -1
- package/src/reducers/copy2.spec.js +55 -0
- package/src/reducers/select.js +31 -10
- package/src/reducers/select2.spec.js +49 -0
- package/test-fixtures/index/01/base.json +24 -0
- package/test-fixtures/index/01/merged.json +24 -0
- package/test-fixtures/index/01/metadata.json +8 -0
- package/test-fixtures/index/01/source.json +40 -0
- package/test-fixtures/index/02/base.json +24 -0
- package/test-fixtures/index/02/merged.json +24 -0
- package/test-fixtures/index/02/metadata.json +7 -0
- package/test-fixtures/index/02/source.json +40 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/03/metadata.json +6 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/base.json +20 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/merged.json +31 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/metadata.json +5 -0
- package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/source.json +20 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/base.json +11 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/metadata.json +1 -2
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/source.json +0 -11
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/merged.json +11 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/metadata.json +1 -2
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/source.json +6 -3
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/base.json +17 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/metadata.json +7 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/source.json +31 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/base.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/merged.json +28 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/metadata.json +7 -0
- package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/source.json +28 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "730",
|
|
10
|
+
"ind1": "4",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{
|
|
14
|
+
"code": "a",
|
|
15
|
+
"value": "The End"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "730",
|
|
10
|
+
"ind1": "4",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{
|
|
14
|
+
"code": "a",
|
|
15
|
+
"value": "The End"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"tag": "730",
|
|
21
|
+
"ind1": "0",
|
|
22
|
+
"ind2": " ",
|
|
23
|
+
"subfields": [
|
|
24
|
+
{
|
|
25
|
+
"code": "a",
|
|
26
|
+
"value": "The End"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "730",
|
|
10
|
+
"ind1": "0",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{
|
|
14
|
+
"code": "a",
|
|
15
|
+
"value": "The End"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "compare fields 100 and 700, compareWithoutTag,
|
|
2
|
+
"description": "compare fields 100 and 700, compareWithoutTag, source 100 found as 700 in base: no copy",
|
|
3
3
|
"tagPatternRegExp": "^(?<tags>100|700)$",
|
|
4
4
|
"compareWithoutTag": true,
|
|
5
|
-
"swapTag": [{"from": "^100$", "to": "700"}],
|
|
6
5
|
"only": false
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "compare fields 100 and 700, compareWithoutTag,
|
|
2
|
+
"description": "compare fields 100 and 700, compareWithoutTag, adds missing 700 from source to base",
|
|
3
3
|
"tagPatternRegExp": "^(?<tags>100|700)$",
|
|
4
4
|
"compareWithoutTag": true,
|
|
5
|
-
"swapTag": [{"from": "^100$", "to": "700"}],
|
|
6
5
|
"only": false
|
|
7
6
|
}
|
|
@@ -10,17 +10,20 @@
|
|
|
10
10
|
"ind1": " ",
|
|
11
11
|
"ind2": " ",
|
|
12
12
|
"subfields": [
|
|
13
|
-
{
|
|
13
|
+
{
|
|
14
|
+
"code": "a",
|
|
15
|
+
"value": "test"
|
|
16
|
+
}
|
|
14
17
|
]
|
|
15
18
|
},
|
|
16
19
|
{
|
|
17
|
-
"tag": "
|
|
20
|
+
"tag": "700",
|
|
18
21
|
"ind1": " ",
|
|
19
22
|
"ind2": " ",
|
|
20
23
|
"subfields": [
|
|
21
24
|
{
|
|
22
25
|
"code": "a",
|
|
23
|
-
"value": "
|
|
26
|
+
"value": "test2"
|
|
24
27
|
}
|
|
25
28
|
]
|
|
26
29
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "100",
|
|
10
|
+
"ind1": " ",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{"code": "a", "value": "original"}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"tag": "700",
|
|
18
|
+
"ind1": " ",
|
|
19
|
+
"ind2": " ",
|
|
20
|
+
"subfields": [
|
|
21
|
+
{
|
|
22
|
+
"code": "a",
|
|
23
|
+
"value": "test"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "100",
|
|
10
|
+
"ind1": " ",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{
|
|
14
|
+
"code": "a",
|
|
15
|
+
"value": "test"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"tag": "700",
|
|
21
|
+
"ind1": " ",
|
|
22
|
+
"ind2": " ",
|
|
23
|
+
"subfields": [
|
|
24
|
+
{
|
|
25
|
+
"code": "a",
|
|
26
|
+
"value": "test"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "100",
|
|
10
|
+
"ind1": " ",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{"code": "a", "value": "original"}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"tag": "700",
|
|
18
|
+
"ind1": " ",
|
|
19
|
+
"ind2": " ",
|
|
20
|
+
"subfields": [
|
|
21
|
+
{
|
|
22
|
+
"code": "a",
|
|
23
|
+
"value": "test"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "100",
|
|
10
|
+
"ind1": " ",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{"code": "a", "value": "original"}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"tag": "700",
|
|
18
|
+
"ind1": " ",
|
|
19
|
+
"ind2": " ",
|
|
20
|
+
"subfields": [
|
|
21
|
+
{
|
|
22
|
+
"code": "a",
|
|
23
|
+
"value": "test"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"leader": "01331cam a22003494i 4500",
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"tag": "001",
|
|
6
|
+
"value": "007346734"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tag": "100",
|
|
10
|
+
"ind1": " ",
|
|
11
|
+
"ind2": " ",
|
|
12
|
+
"subfields": [
|
|
13
|
+
{"code": "a", "value": "original"}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"tag": "100",
|
|
18
|
+
"ind1": " ",
|
|
19
|
+
"ind2": " ",
|
|
20
|
+
"subfields": [
|
|
21
|
+
{
|
|
22
|
+
"code": "a",
|
|
23
|
+
"value": "test"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|