Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
a4fc71c
Merge remote-tracking branch 'pheyvaer/master'
eddieantonio Jun 13, 2015
71c5c88
Use Jasmine specs for existing DBpedia tests.
eddieantonio Jun 14, 2015
9a035cd
Remove old, non-automated tests.
eddieantonio Jun 14, 2015
23aaa6e
Remove temporary file.
eddieantonio Jun 14, 2015
0ca244b
Add dummy HTTP server.
eddieantonio Jun 14, 2015
dd4cfd7
Add specs for new API.
eddieantonio Jun 14, 2015
ae5a629
Use Mock for testing fixed issues.
eddieantonio Jun 14, 2015
79d9d71
Use Nock for DBpedia tests.
eddieantonio Jun 14, 2015
66cd568
Get nock'd up.
eddieantonio Jun 14, 2015
e8a39b5
Fix JSHint warnings.
eddieantonio Jun 14, 2015
fb79ccc
Create and use `toHavePrefix` matcher.
eddieantonio Jun 14, 2015
7c93d80
Implement SparqlClient#register()
eddieantonio Jun 14, 2015
c7828a4
Implement SparqlClient#registerCommon().
eddieantonio Jun 14, 2015
7f221fb
Add specs for SparqlQuery#register(); remove temporary specs.
eddieantonio Jun 14, 2015
b43811f
Flesh out #bind() specs a bit more.
eddieantonio Jun 15, 2015
313ab4e
Start to implement Query class.
eddieantonio Jun 15, 2015
c4e00d4
Use a rough parse to determine if statement is an update.
eddieantonio Jun 15, 2015
a446acb
Miscellaneous clean up.
eddieantonio Jun 15, 2015
f546934
Refactor concatenation of preamble.
eddieantonio Jun 15, 2015
f5caad0
Start to implement new bind mechanism.
eddieantonio Jun 15, 2015
53e08eb
Update some string escape tests; ensure nock does not crash after fai…
eddieantonio Jun 17, 2015
713b7a2
Minor request clean up.
eddieantonio Jun 17, 2015
376f916
Fix some regexes...
eddieantonio Jun 17, 2015
879126a
Create new query formatting algorithm.
eddieantonio Jun 17, 2015
0c824c8
Touch up bind tests.
eddieantonio Jun 19, 2015
9b5da8e
Add major binding functionality.
eddieantonio Jun 19, 2015
33896a9
Flesh out numeric literal tests.
eddieantonio Jun 19, 2015
cb63684
Format numeric literals.
eddieantonio Jun 19, 2015
93b54fa
Implement promises for #execute().
eddieantonio Jun 20, 2015
eb0813d
Add Travis-CI.
eddieantonio Jun 20, 2015
3997026
Drop support for Node 0.8.
eddieantonio Jun 20, 2015
4ca6c55
Update DBPedia spec to new API.
eddieantonio Jun 20, 2015
fdebc8f
Support options in promises; change promise API.
eddieantonio Jun 20, 2015
6cc1446
Update HISTORY and README for v0.3.0.
eddieantonio Jun 20, 2015
fb424bd
Fixed result formatting specs.
eddieantonio Jun 22, 2015
dffb7d9
Reenable formatting.
eddieantonio Jun 22, 2015
edce29a
Bump v0.3.1
eddieantonio Jun 22, 2015
ab32535
Remove dummy-server (long obsoleted by Nock).
eddieantonio Jun 23, 2015
3b92851
Use fail() helper.
eddieantonio Jun 23, 2015
4752234
Merge remote-tracking branch 'upstream/master' into v0.3.0
eddieantonio Jun 23, 2015
8a42ed6
Add README spec.
eddieantonio Jun 27, 2015
cf8b188
Refactor: Create class Registerable; Make file for class Query.
eddieantonio Jun 28, 2015
5bd537e
Add line break in copyright.
eddieantonio Jun 28, 2015
b7af7e4
Tidy registerable.
eddieantonio Jun 28, 2015
e08780b
Refactor: remove this.base from registerable objects.
eddieantonio Jun 28, 2015
0cfbc53
Tidy comments.
eddieantonio Jun 28, 2015
1c42f18
Create Term class.
eddieantonio Jun 28, 2015
6ed4856
Start query refactor.
eddieantonio Jun 28, 2015
ab78efe
Reimplement binding literal+datatype.
eddieantonio Jun 29, 2015
d17b3fb
Reimplement binding xsd datatypes.
eddieantonio Jun 29, 2015
fc35ccb
Support more kinds of double literals.
eddieantonio Jun 29, 2015
7c42917
Reimplement null check.
eddieantonio Jun 29, 2015
fde5b6f
Try to make errors more informative.
eddieantonio Jun 29, 2015
1ba8bf3
Tidy up term.js.
eddieantonio Jun 29, 2015
6758b9c
Remove sprintf-js dependency.
eddieantonio Jun 29, 2015
19ffe6a
Move term.js to its own directory.
eddieantonio Jun 29, 2015
0afe8e8
Split Term subclasses into their own files.
eddieantonio Jun 29, 2015
79525e4
Decide its better for users to percent-encode than to magically do it…
eddieantonio Jun 29, 2015
ecc1bcf
Implement naïve IRI validation.
eddieantonio Jun 29, 2015
42b97f7
Refactor how Literals are instantiated for better encapsulation.
eddieantonio Jun 29, 2015
206b273
Fix IRI inheritance; define Term#toString().
eddieantonio Jun 29, 2015
3f0a2c5
Format in query so that all errors occur before execute.
eddieantonio Jun 30, 2015
45d2245
Refactor: Move query formatting to Query#execute.
eddieantonio Jun 30, 2015
f6e2be3
Throw unsafe URI error in bind instead of execute.
eddieantonio Jun 30, 2015
f867dc1
Test throw in register.
eddieantonio Jun 30, 2015
d70cb96
Add tests for better number handling.
eddieantonio Jul 1, 2015
5c6e2f0
Add support for double INF values and negative literals.
eddieantonio Jul 1, 2015
6558bdc
Add support for SPARQL template tag (ES6).
eddieantonio Jul 1, 2015
07a956e
Remove object destructuring (compatibility with iojs 2.3.1).
eddieantonio Jul 1, 2015
fdb3ce5
Update README for 0.4.0.
eddieantonio Jul 1, 2015
0d7155e
Add JSHint rc for ES6 support.
eddieantonio Jul 1, 2015
4985633
Write more API usage in README, TOC.
eddieantonio Jul 1, 2015
0907746
Fix table in README
eddieantonio Jul 1, 2015
c1c55bc
Change development branch to master.
eddieantonio Jul 1, 2015
6375c02
Become primary publisher...
eddieantonio Oct 3, 2015
37084b1
Update package info.
eddieantonio Oct 3, 2015
0569ce6
0.4.1
eddieantonio Oct 3, 2015
ad017c8
Add basic nicer errors.
eddieantonio Feb 24, 2016
0b19717
Fix throwing new error when should be throwing original; reimplement …
eddieantonio Feb 25, 2016
5abc642
Ensure Error#httpStatus exists in broken Promise.
eddieantonio Feb 25, 2016
852bd95
Document HTTP status errors.
eddieantonio Feb 25, 2016
4d83049
Update HISTORY.md
eddieantonio Feb 25, 2016
75b180a
0.4.2
eddieantonio Feb 25, 2016
e4c5de4
Add NPM version badge.
eddieantonio Feb 25, 2016
c2929a6
Remove accidental formatting...
eddieantonio Feb 25, 2016
f1a74a0
Allow alternative endpoint for updates.
JorgenEvens Apr 24, 2016
b587185
Merge pull request #3 from JorgenEvens/feature/update-endpoint
eddieantonio Apr 24, 2016
d168b99
Support alternate query and update endpoints.
eddieantonio Apr 24, 2016
adb0543
Update history before minor version bump.
eddieantonio Apr 24, 2016
b1846af
0.5.0
eddieantonio Apr 24, 2016
db5540f
Get rid of forgotten debug timeout extension.
eddieantonio Apr 24, 2016
2dc1858
Allow Sparql endpoint to return no body.
JorgenEvens Apr 24, 2016
468ed07
Merge pull request #4 from JorgenEvens/bug/update-response-body
eddieantonio Apr 25, 2016
5a942cd
Minor update.
eddieantonio Apr 25, 2016
1fa4506
Update HISTORY.md
eddieantonio Apr 25, 2016
016d145
0.5.1
eddieantonio Apr 25, 2016
e243f0f
Allow override of request defaults and params
CarlQLange Apr 28, 2016
462d892
Update README.md
CarlQLange Apr 28, 2016
b6e2cdc
Merge pull request #6 from CarlQLange/patch-1
eddieantonio Apr 28, 2016
6a7c6e5
0.6.0
eddieantonio Apr 28, 2016
930d56c
Update lodash dependency and depend on functions explicitly.
eddieantonio May 7, 2016
b325494
Remove claim of 'simple' -- it's not anymore...
eddieantonio May 7, 2016
3842d60
Depend on promise-nodeify (step 1/2 of dependency slimming).
eddieantonio May 7, 2016
d78aff0
Depend on denodeify (step 2/2 package slimming).
eddieantonio May 7, 2016
1b8f23c
Update documentation.
eddieantonio May 7, 2016
953b571
Fix readme spec weirdness.
eddieantonio Nov 26, 2016
96190b7
Use ESLint instead of JSHint.
eddieantonio Nov 26, 2016
934b28b
Bring regression spec up to eslint standards.
eddieantonio Nov 26, 2016
c7f6b74
Amend my style guide...
eddieantonio Nov 26, 2016
33b445b
Fix IRIREF regex; resolves #8. (#9)
eddieantonio Nov 26, 2016
5d9000f
Update HISTORY.md.
eddieantonio Nov 26, 2016
1e310a1
0.6.1
eddieantonio Nov 26, 2016
9ed879d
Fixed module name (#13)
grubersjoe Sep 6, 2017
7fc9bfe
0.6.2
eddieantonio Sep 6, 2017
d4ca66f
Escaping fix (#17)
futpib Oct 16, 2018
521e881
Support more Node versions.
eddieantonio Oct 16, 2018
60d4bcd
Correct the README example. Closes #16.
eddieantonio Oct 16, 2018
3495426
Correct 'requestsDefault' in README. Closes #15.
eddieantonio Oct 16, 2018
04f0a28
Add unmaintained notice :c
eddieantonio Oct 16, 2018
98125a7
0.6.3
eddieantonio Oct 16, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
"extends": "standard",
"installedESLint": true,
"plugins": [
"standard",
"promise"
],
'rules': {
'linebreak-style': [
'error',
'unix'
],
'no-unused-vars': [
'error', {
'vars': 'all',
"argsIgnorePattern": '^_',
}
],
'semi': [
'error',
'always'
],
'space-before-function-paren': [
'error', {
'named': 'never',
'anonymous': 'always',
'asyncArrow': 'always'
}
],
},
'globals': {
describe: false,
it: false,
beforeEach: false,
afterEach: false,
expect: false,
fail: false,
}
};
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
node_js:
- "0.12"
- "0.11"
- "0.10"
- "6"
- "8"
- "10"
- "iojs"
52 changes: 52 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
0.6.1 / 2016-11-16
==================

* Fixed erroneous IRIREF production [#8](https://github.com/thomasfr/node-sparql-client/issues/6)—thanks [paulwilton](https://github.com/paulwilton)!

0.6.0 / 2016-04-25
==================

* Add `defaultParams` and `requestDefaults` options

0.5.1 / 2016-04-24
==================

* Fixed crash when response contains empty body.

0.5.0 / 2016-04-24
==================

* Added support for alternate query and update endpoints
(specified on the client as `{ updateEndpoint: '...' }`

0.4.2 / 2016-02-24
==================

* Added explicit support for HTTP Error messages. Errors are patched
with `.httpStatus` to indicate status code.

0.4.0 / 2015-07-01 🍁
====================

* Query mechanism refactored.
* `Query#bind()` is very exception happy method; the opinion of this module is anything that _looks_ unsafe should be dealt with immediately.
* Tried darnedest not to throw weird errors on `execute()` from within the module.
* Better mapping of JavaScript numbers to SPARQL doubles (or `xsd:double`).
* Added `SPARQL` template tag (ECMAScript 2015).

0.3.0 / 2015-06-20
==================

* Fixed [#6](https://github.com/thomasfr/node-sparql-client/issues/6)—thanks [pheyvaer](https://github.com/pheyvaer)!
* Fixed [#11](https://github.com/thomasfr/node-sparql-client/issues/11)—thanks [dkrantsberg](https://github.com/dkrantsberg)!
* Fixed erroneously turning a query (`ASK`, `SELECT`, `CONSTRUCT`, `DESCRIBE`) into an update if `DELETE` or `INSERT DATA` is present _anywhere_ in the query.
* Updated API (breaks backwards-compatibility):
- Add URI prefixes: both globally and per query using `#register()` and `#registerCommon()`
- Escape bindings to _attempt_ to prevent SPARQL injection!
- Apply formatting with `{format: { resource: 'binding_name' } }` instead of `{format: 'resource', resource: 'binding_name'}`
- Multiple binds supported in one call to `#bind()`
- Support binding [SPARQL 1.1 literals](http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynLiterals); breaks backwards compatibility since this is dependent on the type of arguments, whereas before, everything would be silently coerced into a string.
- `#execute` supports Promises/A+ API.
- API has a "fail-fast" attitude and complains bitterly if given suspicious input.
* Added a whackload of Jasmine specs, though by no means does this constitute a comprehensive test suite.

0.2.0 / 2014-12-09
==================

Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Copyright (c) 2012 Thomas Fritz

Contributors
- Martin Franke (@MtnFranke)
- Eddie Antonio Santos (@eddieantonio)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -22,4 +23,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading