@natlibfi/marc-record-validators-melinda 12.0.1 → 12.0.2-alpha.1

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.
@@ -1,6 +1,7 @@
1
1
  const defaultNonMergableFields = [
2
2
  "066",
3
3
  // 066 - Character sets present (NR)
4
+ "361",
4
5
  "382",
5
6
  // 382: merging would be madness due to $n position etc...
6
7
  // However, this will miss cases, where only $5 or $9 differs... Such is!
@@ -47,6 +48,7 @@ const defaultNonMergableFields = [
47
48
  "854",
48
49
  "855",
49
50
  // '856' is mergable, but a pain in the ass
51
+ "857",
50
52
  "863",
51
53
  "864",
52
54
  "865",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/merge-fields/mergableTag.js"],
4
- "sourcesContent": ["//import createDebugLogger from 'debug';\n//import {nvdebug} from './utils';\n//const debug = createDebugLogger('@natlibfi/melinda-marc-record-merge-reducers');\n\n// Actually I hope that 066. 842-845, 852-855. 863-868, 876-878 and HLI are already removed\n\n\nconst defaultNonMergableFields = [\n '066', // 066 - Character sets present (NR)\n '382', // 382: merging would be madness due to $n position etc...\n // However, this will miss cases, where only $5 or $9 differs... Such is!\n // 59X: always copy, never merge. NB! No specs exist!\n '590',\n '591',\n '592',\n '593',\n '594',\n '595',\n '596',\n '597',\n '598',\n '599',\n '654',\n '657',\n '658',\n '662',\n '668',\n '752',\n // '753', // NV: Commented because of MRA-465 (2023-08-20)\n '754',\n '758',\n '760',\n '762',\n '765',\n '767',\n '770',\n '772',\n '775',\n '777',\n '780',\n '785',\n '786',\n '787',\n // Them 8XX fields are holdings related fields:\n '841',\n '842',\n '843',\n '844',\n '845',\n '852',\n '853',\n '854',\n '855',\n // '856' is mergable, but a pain in the ass\n '863',\n '864',\n '865',\n '866',\n '867',\n '868',\n '876',\n '877',\n '878',\n '881',\n '882',\n '883',\n // '884',\n '885',\n '886',\n '887',\n '900',\n '901',\n '910',\n '940',\n '960',\n '995',\n 'CAT',\n 'HLI',\n 'LOW',\n 'SID'\n];\n\n\nexport function mergableTag(tag, config) {\n // Use either configured non-mergable tags or default non-mergable tags\n const nonMergableFields = config.skipMergeTags && Array.isArray(config.skipMergeTags) ? config.skipMergeTags : defaultNonMergableFields;\n\n return !nonMergableFields.includes(tag);\n}\n"],
5
- "mappings": "AAOA,MAAM,2BAA2B;AAAA,EAC/B;AAAA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,gBAAS,YAAY,KAAK,QAAQ;AAEvC,QAAM,oBAAoB,OAAO,iBAAiB,MAAM,QAAQ,OAAO,aAAa,IAAI,OAAO,gBAAgB;AAE/G,SAAO,CAAC,kBAAkB,SAAS,GAAG;AACxC;",
4
+ "sourcesContent": ["//import createDebugLogger from 'debug';\n//import {nvdebug} from './utils';\n//const debug = createDebugLogger('@natlibfi/melinda-marc-record-merge-reducers');\n\n// Actually I hope that 066. 842-845, 852-855. 863-868, 876-878 and HLI are already removed\n\n\nconst defaultNonMergableFields = [\n '066', // 066 - Character sets present (NR)\n '361',\n '382', // 382: merging would be madness due to $n position etc...\n // However, this will miss cases, where only $5 or $9 differs... Such is!\n // 59X: always copy, never merge. NB! No specs exist!\n '590',\n '591',\n '592',\n '593',\n '594',\n '595',\n '596',\n '597',\n '598',\n '599',\n '654',\n '657',\n '658',\n '662',\n '668',\n '752',\n // '753', // NV: Commented because of MRA-465 (2023-08-20)\n '754',\n '758',\n '760',\n '762',\n '765',\n '767',\n '770',\n '772',\n '775',\n '777',\n '780',\n '785',\n '786',\n '787',\n // Them 8XX fields are holdings related fields:\n '841',\n '842',\n '843',\n '844',\n '845',\n '852',\n '853',\n '854',\n '855',\n // '856' is mergable, but a pain in the ass\n '857',\n '863',\n '864',\n '865',\n '866',\n '867',\n '868',\n '876',\n '877',\n '878',\n '881',\n '882',\n '883',\n // '884',\n '885',\n '886',\n '887',\n '900',\n '901',\n '910',\n '940',\n '960',\n '995',\n 'CAT',\n 'HLI',\n 'LOW',\n 'SID'\n];\n\n\nexport function mergableTag(tag, config) {\n // Use either configured non-mergable tags or default non-mergable tags\n const nonMergableFields = config.skipMergeTags && Array.isArray(config.skipMergeTags) ? config.skipMergeTags : defaultNonMergableFields;\n\n return !nonMergableFields.includes(tag);\n}\n"],
5
+ "mappings": "AAOA,MAAM,2BAA2B;AAAA,EAC/B;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,gBAAS,YAAY,KAAK,QAAQ;AAEvC,QAAM,oBAAoB,OAAO,iBAAiB,MAAM,QAAQ,OAAO,aAAa,IAAI,OAAO,gBAAgB;AAE/G,SAAO,CAAC,kBAAkB,SAAS,GAAG;AACxC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/NatLibFi/marc-record-validators-melinda"
15
15
  },
16
16
  "license": "MIT",
17
- "version": "12.0.1",
17
+ "version": "12.0.2-alpha.1",
18
18
  "main": "./dist/index.js",
19
19
  "publishConfig": {
20
20
  "access": "public"
@@ -4336,6 +4336,37 @@ export const melindaFieldSpecs = {'fields':
4336
4336
  {'code': '7', 'repeatable': false},
4337
4337
  {'code': '8', 'repeatable': true}
4338
4338
  ]
4339
+ },
4340
+ {
4341
+ 'tag': '857',
4342
+ 'repeatable': true,
4343
+ 'fieldType': 'dataField',
4344
+ 'indicators': {'ind1': [' ', '1', '4', '7'], 'ind2': [' ', '0', '1', '2', '3', '4', '8']},
4345
+ 'subfields': [
4346
+ {'code': 'b', 'repeatable': false},
4347
+ {'code': 'c', 'repeatable': false},
4348
+ {'code': 'd', 'repeatable': false},
4349
+ {'code': 'e', 'repeatable': true},
4350
+ {'code': 'f', 'repeatable': false},
4351
+ {'code': 'g', 'repeatable': true},
4352
+ {'code': 'h', 'repeatable': true},
4353
+ {'code': 'l', 'repeatable': true},
4354
+ {'code': 'm', 'repeatable': true},
4355
+ {'code': 'n', 'repeatable': true},
4356
+ {'code': 'q', 'repeatable': true},
4357
+ {'code': 'r', 'repeatable': true},
4358
+ {'code': 's', 'repeatable': true},
4359
+ {'code': 't', 'repeatable': true},
4360
+ {'code': 'u', 'repeatable': true},
4361
+ {'code': 'x', 'repeatable': true},
4362
+ {'code': 'y', 'repeatable': true},
4363
+ {'code': 'z', 'repeatable': true},
4364
+ {'code': '2', 'repeatable': false},
4365
+ {'code': '3', 'repeatable': false},
4366
+ {'code': '6', 'repeatable': false},
4367
+ {'code': '7', 'repeatable': false},
4368
+ {'code': '8', 'repeatable': true}
4369
+ ]
4339
4370
  },
4340
4371
  {
4341
4372
  'tag': '863',
@@ -7,6 +7,7 @@
7
7
 
8
8
  const defaultNonMergableFields = [
9
9
  '066', // 066 - Character sets present (NR)
10
+ '361',
10
11
  '382', // 382: merging would be madness due to $n position etc...
11
12
  // However, this will miss cases, where only $5 or $9 differs... Such is!
12
13
  // 59X: always copy, never merge. NB! No specs exist!
@@ -52,6 +53,7 @@ const defaultNonMergableFields = [
52
53
  '854',
53
54
  '855',
54
55
  // '856' is mergable, but a pain in the ass
56
+ '857',
55
57
  '863',
56
58
  '864',
57
59
  '865',