@natlibfi/melinda-record-matching 4.3.4 → 4.3.5-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.
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [
|
|
14
|
+
node-version: [18.x, 20.x, 21.x, 22.x, 23.x]
|
|
15
15
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
16
16
|
|
|
17
17
|
steps:
|
|
@@ -62,7 +62,7 @@ jobs:
|
|
|
62
62
|
# Setup .npmrc file to publish to npm
|
|
63
63
|
- uses: actions/setup-node@v4
|
|
64
64
|
with:
|
|
65
|
-
node-version: '
|
|
65
|
+
node-version: '20.x'
|
|
66
66
|
registry-url: 'https://registry.npmjs.org'
|
|
67
67
|
- run: npm ci
|
|
68
68
|
- run: npm publish
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
## License and copyright
|
|
4
4
|
|
|
5
|
-
Copyright (c) 2020-
|
|
5
|
+
Copyright (c) 2020-2025 **University Of Helsinki (The National Library Of Finland)**
|
|
6
6
|
|
|
7
7
|
This project's source code is licensed under the terms of **MIT** or any later version.
|
|
@@ -9,6 +9,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
9
9
|
function toQueries(identifiers, queryString) {
|
|
10
10
|
const debug = (0, _debug.default)('@natlibfi/melinda-record-matching:toQueries');
|
|
11
11
|
const debugData = debug.extend('data');
|
|
12
|
+
|
|
13
|
+
// We quote the identifier, if it contains a slash! (Slash in non-quoted SRU-search breaks search.)
|
|
12
14
|
const quotedIdentifiers = identifiers.map(identifier => identifier.match(/\//u) ? `"${identifier}"` : `${identifier}`);
|
|
13
15
|
|
|
14
16
|
// Aleph supports only two queries with or -operator (This is not actually true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-search-utils.js","names":["_debug","_interopRequireDefault","require","e","__esModule","default","toQueries","identifiers","queryString","debug","createDebugLogger","debugData","extend","quotedIdentifiers","map","identifier","match","pairs","toPairs","queries","a","b","length","JSON","stringify","array","slice","concat"],"sources":["../../src/candidate-search/candidate-search-utils.js"],"sourcesContent":["import createDebugLogger from 'debug';\n\nexport function toQueries(identifiers, queryString) {\n\n const debug = createDebugLogger('@natlibfi/melinda-record-matching:toQueries');\n const debugData = debug.extend('data');\n\n const quotedIdentifiers = identifiers.map(identifier => identifier.match(/\\//u) ? `\"${identifier}\"` : `${identifier}`);\n\n // Aleph supports only two queries with or -operator (This is not actually true)\n const pairs = toPairs(quotedIdentifiers);\n const queries = pairs.map(([a, b]) => b ? `${queryString}=${a} or ${queryString}=${b}` : `${queryString}=${a}`);\n\n debugData(`Pairs (${pairs.length}): ${JSON.stringify(pairs)}`);\n debugData(`Queries (${queries.length}): ${JSON.stringify(queries)}`);\n\n return queries;\n}\n\nfunction toPairs(array) {\n if (array.length === 0) {\n return [];\n }\n return [array.slice(0, 2)].concat(toPairs(array.slice(2), 2));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/B,SAASG,SAASA,CAACC,WAAW,EAAEC,WAAW,EAAE;EAElD,MAAMC,KAAK,GAAG,IAAAC,cAAiB,EAAC,6CAA6C,CAAC;EAC9E,MAAMC,SAAS,GAAGF,KAAK,CAACG,MAAM,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"candidate-search-utils.js","names":["_debug","_interopRequireDefault","require","e","__esModule","default","toQueries","identifiers","queryString","debug","createDebugLogger","debugData","extend","quotedIdentifiers","map","identifier","match","pairs","toPairs","queries","a","b","length","JSON","stringify","array","slice","concat"],"sources":["../../src/candidate-search/candidate-search-utils.js"],"sourcesContent":["import createDebugLogger from 'debug';\n\nexport function toQueries(identifiers, queryString) {\n\n const debug = createDebugLogger('@natlibfi/melinda-record-matching:toQueries');\n const debugData = debug.extend('data');\n\n // We quote the identifier, if it contains a slash! (Slash in non-quoted SRU-search breaks search.)\n const quotedIdentifiers = identifiers.map(identifier => identifier.match(/\\//u) ? `\"${identifier}\"` : `${identifier}`);\n\n // Aleph supports only two queries with or -operator (This is not actually true)\n const pairs = toPairs(quotedIdentifiers);\n const queries = pairs.map(([a, b]) => b ? `${queryString}=${a} or ${queryString}=${b}` : `${queryString}=${a}`);\n\n debugData(`Pairs (${pairs.length}): ${JSON.stringify(pairs)}`);\n debugData(`Queries (${queries.length}): ${JSON.stringify(queries)}`);\n\n return queries;\n}\n\nfunction toPairs(array) {\n if (array.length === 0) {\n return [];\n }\n return [array.slice(0, 2)].concat(toPairs(array.slice(2), 2));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/B,SAASG,SAASA,CAACC,WAAW,EAAEC,WAAW,EAAE;EAElD,MAAMC,KAAK,GAAG,IAAAC,cAAiB,EAAC,6CAA6C,CAAC;EAC9E,MAAMC,SAAS,GAAGF,KAAK,CAACG,MAAM,CAAC,MAAM,CAAC;;EAEtC;EACA,MAAMC,iBAAiB,GAAGN,WAAW,CAACO,GAAG,CAACC,UAAU,IAAIA,UAAU,CAACC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAID,UAAU,GAAG,GAAG,GAAGA,UAAU,EAAE,CAAC;;EAEtH;EACA,MAAME,KAAK,GAAGC,OAAO,CAACL,iBAAiB,CAAC;EACxC,MAAMM,OAAO,GAAGF,KAAK,CAACH,GAAG,CAAC,CAAC,CAACM,CAAC,EAAEC,CAAC,CAAC,KAAKA,CAAC,GAAG,GAAGb,WAAW,IAAIY,CAAC,OAAOZ,WAAW,IAAIa,CAAC,EAAE,GAAG,GAAGb,WAAW,IAAIY,CAAC,EAAE,CAAC;EAE/GT,SAAS,CAAC,UAAUM,KAAK,CAACK,MAAM,MAAMC,IAAI,CAACC,SAAS,CAACP,KAAK,CAAC,EAAE,CAAC;EAC9DN,SAAS,CAAC,YAAYQ,OAAO,CAACG,MAAM,MAAMC,IAAI,CAACC,SAAS,CAACL,OAAO,CAAC,EAAE,CAAC;EAEpE,OAAOA,OAAO;AAChB;AAEA,SAASD,OAAOA,CAACO,KAAK,EAAE;EACtB,IAAIA,KAAK,CAACH,MAAM,KAAK,CAAC,EAAE;IACtB,OAAO,EAAE;EACX;EACA,OAAO,CAACG,KAAK,CAACC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,MAAM,CAACT,OAAO,CAACO,KAAK,CAACC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/D","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "git@github.com:natlibfi/melinda-record-matching-js.git"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"version": "4.3.
|
|
17
|
+
"version": "4.3.5-alpha.2",
|
|
18
18
|
"main": "./dist/index.js",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=18"
|
|
@@ -38,35 +38,35 @@
|
|
|
38
38
|
"watch:test": "cross-env DEBUG=1 NODE_ENV=test nodemon -w src -w test-fixtures --exec 'npm run test:dev'"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@natlibfi/marc-record": "^9.1.
|
|
42
|
-
"@natlibfi/marc-record-serializers": "^10.1.
|
|
43
|
-
"@natlibfi/melinda-commons": "^13.0.
|
|
44
|
-
"@natlibfi/sru-client": "^6.0.
|
|
45
|
-
"debug": "^4.
|
|
46
|
-
"isbn3": "^1.2.
|
|
41
|
+
"@natlibfi/marc-record": "^9.1.4",
|
|
42
|
+
"@natlibfi/marc-record-serializers": "^10.1.5",
|
|
43
|
+
"@natlibfi/melinda-commons": "^13.0.19",
|
|
44
|
+
"@natlibfi/sru-client": "^6.0.18",
|
|
45
|
+
"debug": "^4.4.0",
|
|
46
|
+
"isbn3": "^1.2.9",
|
|
47
47
|
"moment": "^2.30.1",
|
|
48
48
|
"natural": "^8.0.1",
|
|
49
|
-
"uuid": "^11.0
|
|
49
|
+
"uuid": "^11.1.0",
|
|
50
50
|
"winston": "^3.17.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/cli": "^7.
|
|
54
|
-
"@babel/core": "^7.26.
|
|
53
|
+
"@babel/cli": "^7.27.0",
|
|
54
|
+
"@babel/core": "^7.26.10",
|
|
55
55
|
"@babel/node": "^7.26.0",
|
|
56
|
-
"@babel/preset-env": "^7.26.
|
|
56
|
+
"@babel/preset-env": "^7.26.9",
|
|
57
57
|
"@babel/register": "^7.25.9",
|
|
58
58
|
"@natlibfi/eslint-config-melinda-backend": "^3.0.5",
|
|
59
|
-
"@natlibfi/fixugen": "^2.0.
|
|
59
|
+
"@natlibfi/fixugen": "^2.0.13",
|
|
60
60
|
"@natlibfi/fixugen-http-client": "^3.0.10",
|
|
61
|
-
"@natlibfi/fixura": "^3.0.
|
|
61
|
+
"@natlibfi/fixura": "^3.0.12",
|
|
62
62
|
"babel-plugin-istanbul": "^6.1.1",
|
|
63
63
|
"babel-plugin-rewire": "^1.2.0",
|
|
64
64
|
"chai": "^4.5.0",
|
|
65
65
|
"chai-as-promised": "^7.1.2",
|
|
66
66
|
"cross-env": "^7.0.3",
|
|
67
67
|
"eslint": "^8.57.1",
|
|
68
|
-
"mocha": "^11.0
|
|
69
|
-
"nodemon": "^3.1.
|
|
68
|
+
"mocha": "^11.1.0",
|
|
69
|
+
"nodemon": "^3.1.9",
|
|
70
70
|
"nyc": "^17.1.0"
|
|
71
71
|
},
|
|
72
72
|
"eslintConfig": {
|
|
@@ -5,6 +5,7 @@ export function toQueries(identifiers, queryString) {
|
|
|
5
5
|
const debug = createDebugLogger('@natlibfi/melinda-record-matching:toQueries');
|
|
6
6
|
const debugData = debug.extend('data');
|
|
7
7
|
|
|
8
|
+
// We quote the identifier, if it contains a slash! (Slash in non-quoted SRU-search breaks search.)
|
|
8
9
|
const quotedIdentifiers = identifiers.map(identifier => identifier.match(/\//u) ? `"${identifier}"` : `${identifier}`);
|
|
9
10
|
|
|
10
11
|
// Aleph supports only two queries with or -operator (This is not actually true)
|