Skip to content

Commit

Permalink
Merge pull request #191 from zazuko/ckan-tests
Browse files Browse the repository at this point in the history
Add tests for CKAN + various improvements
  • Loading branch information
ludovicm67 authored Nov 14, 2023
2 parents 620fdfd + 9ea9653 commit a5d0c08
Show file tree
Hide file tree
Showing 75 changed files with 2,807 additions and 2,189 deletions.
7 changes: 7 additions & 0 deletions .changeset/four-rabbits-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@zazuko/trifid-plugin-ckan": patch
---

Generated XML documents have a blank line at the end.

This Trifid plugin will be more robust, as we created a set of tests.
8 changes: 8 additions & 0 deletions .changeset/honest-cows-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"trifid-core": minor
---

Improve types in general.

`trifid.start` now returns a `Promise<import('http').Server>` instead of `void`.
This allows to wait for the server to be ready before doing anything else.
5 changes: 5 additions & 0 deletions .changeset/smooth-beans-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trifid-core": minor
---

The errors middleware is now returning the description of the status code in the body.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
},
"ignorePatterns": ["**/*.ts", "**/*.d.ts", "**/*.d.ts.map"],
"rules": {
"space-before-function-paren": "off"
"space-before-function-paren": "off",
"indent": ["error", 2, { "SwitchCase": 1 }]
}
}
212 changes: 212 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion packages/ckan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.js",
"type": "module",
"scripts": {
"test": "true"
"test": "c8 --reporter=lcov --reporter=text mocha"
},
"repository": {
"type": "git",
Expand All @@ -25,5 +25,10 @@
"dotenv": "^16.3.1",
"sparql-http-client": "^2.4.2",
"xmlbuilder2": "^3.1.1"
},
"devDependencies": {
"c8": "^8.0.1",
"mocha": "^10.2.0",
"oxigraph": "^0.3.20"
}
}
2 changes: 1 addition & 1 deletion packages/ckan/src/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function toXML (dataset) {
}).filter(Boolean),
},
},
}).doc().end({ prettyPrint: true })
}).doc().end({ prettyPrint: true }).concat('\n')
}

function serializeTerm (pointer) {
Expand Down
Loading

0 comments on commit a5d0c08

Please sign in to comment.