Skip to content

Commit

Permalink
Update changelog and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed Jun 23, 2023
1 parent 1938b42 commit 77bcc68
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
Any calling code that was passing in an incorrect value needs to be fixed.

### Changed
- **BREAKING**: Change "URDNA2015" to "RDFC-1.0" to match spec changes. Use of
"URDNA2015" as a named algorithm option is now deprecated and will cause a
warning.
- **BREAKING**: Change algorithm name from "URDNA2015" to "RDFC-1.0" to match
spec changes. Use of "URDNA2015" is now deprecated and an alias for
"RDFC-1.0". An API option `rejectURDNA2015` is available to disable
"URDNA2015" support. A global `RDF_CANONIZE_TRACE_URDNA2015` is available to
developers to trace calls that use "URDNA2015". See the README for important
compatibility notes and API details.
- **BREAKING**: Use `globalThis` to access `crypto` in browsers. Use a polyfill
if your environment doesn't support `globalThis`.
- Update tooling.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ URDNA2015 Migration
considered an edge case that will not be an issue in practice. See above for
details.
* Two tools are currently provided to help transition to "RDFC-1.0":
* If the "undocumented" API option `rejectURDNA2015` is truthy, it will cause
an error to be thrown if "URDNA2015" is used.
* If the global "RDF\_CANONIZE\_TRACE\_URDNA2015" is truthy, it will cause
* If the API option `rejectURDNA2015` is truthy, it will cause an error to be
thrown if "URDNA2015" is used.
* If the global `RDF_CANONIZE_TRACE_URDNA2015` is truthy, it will cause
`console.trace()` to be called when "URDNA2015" is used. This is designed
for *development use only* to find where "URDNA2015" is being used. It
could be *very* verbose.
Expand Down
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ exports._rdfCanonizeNative = function(api) {
* useful setting for preventing wasted CPU cycles or DoS when canonizing
* meaningless or potentially malicious datasets, a recommended value is
* `1`.
* {boolean} [rejectURDNA2015=false] - Reject the "URDNA2015" algorithm name
* instead of treating it as an alias for "RDFC-1.0".
*
* @returns {Promise<object>} - A Promise that resolves to the canonicalized
* RDF Dataset.
Expand Down Expand Up @@ -169,6 +171,8 @@ exports.canonize = async function(input, options) {
* useful setting for preventing wasted CPU cycles or DoS when canonizing
* meaningless or potentially malicious datasets, a recommended value is
* `1`.
* {boolean} [rejectURDNA2015=false] - Reject the "URDNA2015" algorithm name
* instead of treating it as an alias for "RDFC-1.0".
*
* @returns {Promise<object>} - A Promise that resolves to the canonicalized
* RDF Dataset.
Expand Down

0 comments on commit 77bcc68

Please sign in to comment.