Changelog v1.0.6 (2020-09-06)

Previously, app developers needed to install @shipengine/connect-cli globally and @shipengine/connect-sdk locally as an app dependency. They then had to keep them both up-to-date and in-sync with each other, which also required them to be aware of which SDK versions were compatible with which CLI versions.

To simplify things, we've combined the CLI and SDK into a single package called @shipengine/connect. So there's only one thing to install, one version number to know, and the CLI and SDK will always be in-sync.

Action Required

Uninstall the old CLI, and install the new one instead:

npm uninstall --global @shipengine/connect-cli
npm install --global @shipengine/connect

Also, in your app directory, uninstall the old SDK and install the new one instead:

npm uninstall @shipengine/connect-sdk
npm install --save-dev @shipengine/connect

CLI

  • Several changes to the connect init command:
    • It now scaffolds new apps with a dependency on @shipengine/connect instead of @shipengine/connect-sdk
    • The NPM scope no longer defaults to @shipengine, which was confusing
    • The version number defaults to 1.0.0 instead of 0.0.0, just like npm init
    • If TypeScript is selected, then it is also the default for app definitions
    • The package.json file now includes private: true to prevent accidentally publishing to NPM
    • The package-lock.json file is no longer included in the .gitignore, since it should be check-in to source control
    • The .editorconfig or LICENSE files are no longer generated
    • Fixed an error that occurred when running connect init in an existing app directory

SDK

  • Removed error codes that were only meant for internal use (ERR_FILESYSTEM, ERR_SYNTAX, ERR_INVALID_INPUT, ERR_CURRENCY_MISMATCH)

  • Removed error codes and error classes that were HTTP-specific (e.g. BadRequestError, NotFoundError, RateLimitError) and replaced them with a single ExternalError class and ERR_EXTERNAL code

  • See our Error Handling Guide for the latest documentation on how to use error codes and classes