Releases: evrythng/epcis2.js
v2.7.1
Breaking change
The hashing algorithm has been changed to fix an issue with rule 20 of the standard. It has also been changed for exception canonical expression in sensorReports. Finally, nested custom arrays and objects are handled differently in the pre-hash string and useless zeros are truncated from numbers given as strings.
How are you impacted?
generateHashID() might return a different hash from the earlier versions. You will only be affected if you have multiple custom extensions in a bizStep or bizLocation, if you have an extension in a sensor-related element, or if you have some specific custom extensions.
2.7.0
Breaking changes
bizRules
is not supported insensorReport
PersistentDisposition
is only authorized inObjectEvent
andTransformationEvent
- The hashing algorithm has been changed to reflect the latest changes in the standard. The CBV context in the pre-hashed string was using
ns.gs1.org
and is now usingref.gs1.org
. The canonical property order used in the algorithm has also been modified.
How are you impacted?
generateHashID()
will probably return a different hash from the earlier versions.
New features
- the errors given when validating a document/event are now more explicit
We decided not to increment the major version to follow the current version of the EPCIS standard.
v2.6.1
Bug fix
The ID generation now accepts having default namespaces not mentioned in the context, to match the isValid method.
v2.6.0
Breaking change
The validator now accepts by default extensions with namespaces defined in the default context. (e.g cbvmda, rdfs, ...)
We chose not to increment the major version because this change is unlikely to impact anyone.
v2.5.0
New features
- Developers can now convert epcs to digital links using the SDK
- Added a new class: CaptureResponse. This class has some helpers that let developers know what happened with the EPCISDocument they captured.
Bug fixes
- Fixed react fallback problems.
Changes
- Improved documentation
- The npm package size has been divided by 2.
v2.4.1
v2.4.0
New feature
- Now, we ensure that the default context is always present in each context of each EPCISDocument. If it is not present, we automatically add it.
Other Change
- Update the context used in all the examples
v2.3.0
Breaking change
The default context is now https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld
v2.2.0
Breaking Changes
persistentDisposition
- persistentDisposition is now not permitted within AggregationEvent, AssociationEvent or TransactionEvent
- The default context is now https://ref.gs1.org/standards/epcis/2.0/epcis-context.jsonld
Other changes
quantityElement
- the quantity field of an QuantityElement is now optional
schemas
- the EPCISDocument schema has been updated to reflect the latest changes in this repository. It is also the same thing for the schemas of the events
v2.1.0
New Features
New settings
checkExtensions
if true, the extension of the EPCISDocument will be checked against the EPCIS Document context. Otherwise, the extensions check will be ignored.
Schema(s) validation
- If you set the settings
checkExtensions
totrue
the validation function EPCISDocument.isValid() will check if all the extensions are in the context before validating - add the possibility not to throw errors in validateEpcisDocument()
Custom vocabulary
- add
vtype
invtype.js
for the field type of aVocabularyElement
EPCISDocument.id
- The SDK handles the use of the id field for an EPCIS Document
Bug Fixes
- You can now validate an Event with a '@context' field
Other Changes
Schema(s) validation
- updated definitions.json file for validation against schemas and for cleanup
Examples
- add missing fields in the example with a full combination of fields