Skip to content

Commit 9287be4

Browse files
committed
Update for latest rdf-canon changes.
Update for latest W3C RDF Dataset Canonicalization "rdf-canon" changes: - test suite location - README - links - identifiers
1 parent d75b905 commit 9287be4

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# jsonld ChangeLog
22

3+
## 8.1.2 - 2023-03-xx
4+
5+
### Changed
6+
- Update for latest [rdf-canon][] changes: test suite location, README,
7+
links, and identifiers.
8+
39
## 8.1.1 - 2023-02-25
410

511
### Fixed
@@ -831,5 +837,6 @@
831837

832838
[jsonld-cli]: https://github.com/digitalbazaar/jsonld-cli
833839
[jsonld-request]: https://github.com/digitalbazaar/jsonld-request
840+
[rdf-canon]: https://w3c.github.io/rdf-canon/
834841
[rdf-canonize]: https://github.com/digitalbazaar/rdf-canonize
835842
[rdf-canonize-native]: https://github.com/digitalbazaar/rdf-canonize-native

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ const framed = await jsonld.frame(doc, frame);
259259
// output transformed into a particular tree structure per the given frame
260260
```
261261

262-
### <a name="canonize"></a>[canonize](http://json-ld.github.io/normalization/spec/) (normalize)
262+
### <a name="canonize"></a>[canonize](https://w3c.github.io/rdf-canon/spec/) (normalize)
263263

264264
```js
265-
// canonize (normalize) a document using the RDF Dataset Normalization Algorithm
266-
// (URDNA2015), see:
265+
// canonize (normalize) a document using the RDF Dataset Canonicalization Algorithm
266+
// (URDNA2015):
267267
const canonized = await jsonld.canonize(doc, {
268268
algorithm: 'URDNA2015',
269269
format: 'application/n-quads'
@@ -398,7 +398,7 @@ the following:
398398
https://github.com/w3c/json-ld-api
399399
https://github.com/w3c/json-ld-framing
400400
https://github.com/json-ld/json-ld.org
401-
https://github.com/json-ld/normalization
401+
https://github.com/w3c/rdf-canon
402402

403403
They should be sibling directories of the jsonld.js directory or in a
404404
`test-suites` dir. To clone shallow copies into the `test-suites` dir you can

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
"prepack": "npm run build",
9393
"build": "npm run build-webpack",
9494
"build-webpack": "webpack",
95-
"fetch-test-suites": "npm run fetch-json-ld-wg-test-suite && npm run fetch-json-ld-org-test-suite && npm run fetch-normalization-test-suite",
95+
"fetch-test-suites": "npm run fetch-json-ld-wg-test-suite && npm run fetch-json-ld-org-test-suite && npm run fetch-rdf-canon-test-suite",
9696
"fetch-json-ld-wg-test-suite": "npm run fetch-json-ld-api-test-suite && npm run fetch-json-ld-framing-test-suite",
9797
"fetch-json-ld-api-test-suite": "if [ ! -e test-suites/json-wg-api ]; then git clone --depth 1 https://github.com/w3c/json-ld-api.git test-suites/json-ld-api; fi",
9898
"fetch-json-ld-framing-test-suite": "if [ ! -e test-suites/json-wg-framing ]; then git clone --depth 1 https://github.com/w3c/json-ld-framing.git test-suites/json-ld-framing; fi",
9999
"fetch-json-ld-org-test-suite": "if [ ! -e test-suites/json-ld.org ]; then git clone --depth 1 https://github.com/json-ld/json-ld.org.git test-suites/json-ld.org; fi",
100-
"fetch-normalization-test-suite": "if [ ! -e test-suites/normalization ]; then git clone --depth 1 https://github.com/json-ld/normalization.git test-suites/normalization; fi",
100+
"fetch-rdf-canon-test-suite": "if [ ! -e test-suites/rdf-canon ]; then git clone --depth 1 https://github.com/w3c/rdf-canon.git test-suites/rdf-canon; fi",
101101
"test": "npm run test-node",
102102
"test-node": "cross-env NODE_ENV=test mocha --delay -t 30000 -A -R ${REPORTER:-spec} tests/test.js",
103103
"test-karma": "cross-env NODE_ENV=test karma start",

tests/test-common.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const TEST_TYPES = {
246246
],
247247
compare: compareCanonizedExpectedNQuads
248248
},
249-
'rdfn:Urgna2012EvalTest': {
249+
'rdfc:Urgna2012EvalTest': {
250250
fn: 'normalize',
251251
params: [
252252
readTestNQuads('action'),
@@ -258,7 +258,7 @@ const TEST_TYPES = {
258258
],
259259
compare: compareExpectedNQuads
260260
},
261-
'rdfn:Urdna2015EvalTest': {
261+
'rdfc:Urdna2015EvalTest': {
262262
fn: 'normalize',
263263
params: [
264264
readTestNQuads('action'),
@@ -593,8 +593,8 @@ function addTest(manifest, test, tests) {
593593
if(isJsonLdType(test, 'jld:NegativeEvaluationTest')) {
594594
await compareExpectedError(test, err);
595595
} else if(isJsonLdType(test, 'jld:PositiveEvaluationTest') ||
596-
isJsonLdType(test, 'rdfn:Urgna2012EvalTest') ||
597-
isJsonLdType(test, 'rdfn:Urdna2015EvalTest')) {
596+
isJsonLdType(test, 'rdfc:Urgna2012EvalTest') ||
597+
isJsonLdType(test, 'rdfc:Urdna2015EvalTest')) {
598598
if(err) {
599599
throw err;
600600
}

tests/test-karma.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ if(process.env.JSONLD_TESTS) {
8888
_top, '../json-ld.org/test-suite/tests/frame-manifests.jsonld'));
8989
*/
9090

91-
// json-ld.org normalization test suite
91+
// W3C RDF Dataset Canonicalization "rdf-canon" test suite
9292
// FIXME: add path detection
93-
entries.push(join(_top, 'test-suites/normalization/tests'));
94-
entries.push(join(_top, '../normalization/tests'));
93+
entries.push(join(_top, 'test-suites/rdf-canon/tests'));
94+
entries.push(join(_top, '../rdf-canon/tests'));
9595

9696
// other tests
9797
entries.push(join(_top, 'tests/misc.js'));

tests/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ if(process.env.JSONLD_TESTS) {
8989
}
9090
*/
9191

92-
// json-ld.org normalization test suite
93-
const normPath = path.resolve(_top, 'test-suites/normalization/tests');
94-
if(fs.existsSync(normPath)) {
95-
entries.push(normPath);
92+
// W3C RDF Dataset Canonicalization "rdf-canon" test suite
93+
const rdfCanonPath = path.resolve(_top, 'test-suites/rdf-canon/tests');
94+
if(fs.existsSync(rdfCanonPath)) {
95+
entries.push(rdfCanonPath);
9696
} else {
9797
// default up to sibling dir
98-
entries.push(path.resolve(_top, '../normalization/tests'));
98+
entries.push(path.resolve(_top, '../rdf-canon/tests'));
9999
}
100100

101101
// other tests

0 commit comments

Comments
 (0)