Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

v1.0.0

Choose a tag to compare

@ofrobots ofrobots released this 10 Nov 02:24

This is a semver major release that includes breaking changes in addition to better support for promises and async/await.

  • The module has been converted to typescript and ships with type definitions.
  • BREAKING CHANGE The module API has been changed to be more compatible with ES6 modules. We export getPem as a named export. Users using require can use const {getPem} = require('google-p12-pem')
  • BREAKING CHANGE We no longer perform the file-system operation synchronously if the callback is omitted. Instead we return a promise, which can be awaited or thened.

Migration should be straight forward. Example:

// before
var gp12 = require('google-p12-pem');
gp12('/path/to/key.p12', function(err, pem) {
  console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
})

// now
const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12', function(err, pem) {
  console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
});
// See README for example of using with async/await and promises.