Skip to content

v4.0.0

Compare
Choose a tag to compare
@JasonBoy JasonBoy released this 06 Jan 07:19
· 54 commits to master since this release

🎉 v4.0.0

✨New Features

  • ✨ Add simple mini program support(see API), including getsessionkey from code, decrypt phone data...
  • ✨ Reset old FileStore data when major wechat config(e.g appId) change on initialization

💣Breaking Changes

  • ✂️ Drop node-v4 support, if you need node4 support, stick to wechat-jssdk@3
  • 🙏 Use Promise in client.js, which will change the init process, see browser-side-usage
  • ⬅️Export modules directly instead of module.exports in one big class, the {Wechat} here is like the old const Wechat = require('wechat-jssdk') to be backward compatible, which will compose all the sub modules together(like JSSDK, OAuth, MiniProgram)
    e.g const {Wechat, JSSDK} = require('wechat-jssdk')

🔧Improvements and Fixes

  • 🔧Many internal refactoring
  • ✂️Remove bluebird dependence
  • ✂️Remove crypto-js, use native crypto
  • ✂️Remove dist from repo, only build before publish
  • 📦Significantly Reduce the npm package size when publish
  • 💉Add mini program tests
  • 💅Prettify not only js in lib
  • 🐛Couple of MongoStore fixes
  • 🐛Couple of payment api fixes(#26 #25)
  • 🐛 Parse refund response to json (#29)
  • 🐛 Fix event-stream incident, see npm blog
  • 🚸 Migrate to npm package-lock from yarn.lock
  • 📦 Use specific versions for all packages
  • ✏️ Couple of doc updates
  • 🔁Use date-fns to format date
  • 🙈 Ignore some hard reached branches when doing the test coverage
  • 🆙Use webpack4 to bundle client js
  • 🆙Upgrade packages