Releases: tinovyatkin/pass-js
Releases · tinovyatkin/pass-js
Use yazl 📦
- Switched from using in-house Zip implementation to
yazl
and refactoredPass.pipe
for simpler form usingasync
function.
Use native HTTP2 support from Node 8.8 🥂
- switched from our fork of
node-apn
to native HTTP2 implementation from Node 8.8 LTS. - don't compress any file, just store inside of Zip, so, it suppose to be faster and more compatible
v4.1.0
- added
textDirection
to constants - added
associatedStoreIdentifiers
into templatable fields (thanks to @antoniomika)
node-forge 🤝
- Replaced
openssl
spawning for native JavaScriptnode-forge
implementation of manifest signing.
Template.pushUpdates(pushToken)
- Implemented
Template.pushUpdates(pushToken)
that sends APN update request for a given pass type to a pushToken (get pushToken at PassKit Web Service)
v3.7.0
- Implemented
Fields.setDateTime(key, label, date, formatOptions = {})
to set date/time style values to a structure fields. Example:pass.auxiliaryFields.setDateTime('arrival', 'ARRIVAL TIME', arrivalDateObj, { dateStyle: constants.dateTimeFormat.NONE, timeStyle: constants.dateTimeFormat.SHORT })
v3.6.0
- Added
setValue(key, value)
method for structure fields to make templating easier. Example:pass.headerFields.setValue('port', 'New Port')
- Added tests for
Fields
class to increase test coverage
v3.5.0
- Implemented
Pass.stream
that returnsPass
as a readable stream. Useful forKoa
responses, etc.
Use CSS colors and names
- Color values setters at
Template
(backgroundColor
,foregroundColor
andlabelColor
) now can accept any valid CSS color string (like 'purple', '#fff', etc) and converts them intorgb(...)
format that is only acceptable by Apple Wallet pass Pass.validate
enforcesrgb()
style values for color fieldsPass.validate
enforceswebServiceURL
andauthenticationToken
to be either both present or both missing- Exporting
PASS_MIME_TYPE
fromconstants
- Added
expirationDate
andrelevantDate
setters and getter to thePass
class that accepts both,Date
or astring
and converts that to correct W3C date string (or throws if it's impossible) - Added
Pass.addLocation
that accepts point value either as GeoJSON array,{lat, lng}
or{ longitude: number, latitude: number, altitude?: number }
v3.3.0
- implemented
Pass.transitType()
to set/get transit type for board passes (with values validation and constants) Template
now loads/stores structure level values and passes them to Passes