Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation Notices #535

Open
ahansson89 opened this issue Jan 24, 2023 · 5 comments
Open

Deprecation Notices #535

ahansson89 opened this issue Jan 24, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ahansson89
Copy link

I just upgraded from v4 to v5. What a pain!
Next time you rename a bunch of functions, maybe add deprecation notices.

@ahansson89 ahansson89 added the enhancement New feature or request label Jan 24, 2023
@RCGitBot
Copy link
Contributor

RCGitBot commented Jan 24, 2023

👀 SDKONCALL-212 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@aboedo aboedo self-assigned this Jan 24, 2023
@aboedo
Copy link
Member

aboedo commented Jan 24, 2023

@ahansson89 I apologize, this should never be the experience for anyone migrating.

We're going to work on a proper migration guide for our hybrid SDKs (React-Native, Cordova, Flutter, Unity) and introducing deprecation notices. We couldn't find a way to provide obsoletion notices for typescript, but we can still find ways to do this better, and we will.

@omer921
Copy link

omer921 commented Apr 9, 2023

@aboedo does a v4 -> v5 migration guide exist?

We migrated the following functions:

const {purchaserInfo, productIdentifier} = await Purchases.purchasePackage(...) -> const purchaseMade = await Purchases.purchasePackage(packageObj);

const purchaserInfo = await Purchases.getPurchaserInfo(); -> const purchaserInfo = await Purchases.getCustomerInfo();

const restore = await Purchases.restoreTransactions(); -> const restore = await Purchases.restorePurchases();

Purchases.setDebugLogsEnabled(DEV); -> Purchases.setLogLevel(LOG_LEVEL.VERBOSE);

Purchases.setup(REVENUE_CAT_SDK_KEY) -> Purchases.configure({apiKey: REVENUE_CAT_SDK_KEY});

Is there any behavior change that we should be aware of?

@aboedo
Copy link
Member

aboedo commented Apr 11, 2023

@omer921 I added a migration guide in #601

The changes you outlined are correct, and there shouldn't be any behavior changes to be on the lookout for.

There are quite a few new features in v5, you can see them in the migration guide I added to the PR

@TowhidKashem
Copy link

TowhidKashem commented Sep 1, 2023

@ahansson89 I apologize, this should never be the experience for anyone migrating.

We're going to work on a proper migration guide for our hybrid SDKs (React-Native, Cordova, Flutter, Unity) and introducing deprecation notices. We couldn't find a way to provide obsoletion notices for typescript, but we can still find ways to do this better, and we will.

Typically what I've seen other library maintainers do is use JS doc's deprecated syntax:

https://jsdoc.app/tags-deprecated.html

this makes apis that are deprecated appear as crossed out in VScode and other editors that support jsdoc syntax. And the messaging tells users to use some other api going forward because this one will be removed soon. Then you remove the old one and keep the new after several versions of this giving everyone a fair notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants