parse-server-migration

1.5.3 • Public • Published

What do this package do?

This package is used to apply newer parse server (v.3.x or above) from v.2.x without changing current source code.

Including

In 3.0.0, Parse.Promise is deprecated/removed, those code using Parse.Promise would fail. Also, Cloud functions interface now is Promise, they don't use callback response.success or response.error anymore.

This package would override these deprecated/removed interfaces so old codes would work again

  • Parse.Promise => Promise
  • Parse.Cloud(request, response) => Parse.Cloud(request)
  • Backbone style callback of { success, error } (new)

Usage

First, be free to upgrade your parse-server from v.2.x to latest

npm i parse-server@latest
npm i parse@latest

install parse-server-migration package

npm i parse-server-migration

import the package anywhere is your code but make sure that you do it after init Parse server and before defining Cloud code

require('parse-server-migration');

I recommend that this package just help you deal with old legacy codes, for new code, please follow latest Parse.com guideline.

Some unsupported functions

  • Parse.Promise.is
  • Parse.Promise.alway

if these codes aboves appear in your source code, please update it, because there is no similar thing like this in current native Promise of JS.

Also, beware of Parse.Promise.when, because with this package, .when is an alias of .all, so in .catch, error is now an array content first Object.Error instead of array content all Array<Object.Error>

Package Sidebar

Install

npm i parse-server-migration

Weekly Downloads

2

Version

1.5.3

License

ISC

Unpacked Size

8.7 kB

Total Files

6

Last publish

Collaborators

  • neimadvn