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

Update dependency unsplash-js to v7 #243

Closed
wants to merge 1 commit into from
Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 5, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
unsplash-js ^6.3.0 -> ^7.0.13 age adoption passing confidence

Release Notes

unsplash/unsplash-js

v7.0.13

Compare Source

v7.0.12

Compare Source

v7.0.11

Compare Source

v7.0.10

Compare Source

v7.0.9

Compare Source

  • getRandom: add contentFilter param 4141ca3

v7.0.8

Compare Source

v7.0.7

Compare Source

  • Export and convert to interface to preserve type name in declarations cb743fb
  • Consistent naming c33ad9c
  • Use OmitStrict f89f6c0
  • Upgrade TS from 4.0.5 to 4.2.3 4bfa823

v7.0.6

Compare Source

v7.0.5

Compare Source

v7.0.4

Compare Source

v7.0.3

Compare Source

  • Adds response types to all endpoints.

v7.0.2

Compare Source

v7.0.1

Compare Source

v7.0.0

Compare Source

This version includes a total TypeScript rewrite of the library, with many breaking changes. If upgrading from a previous version, read carefully. You will not be able to upgrade to v7 without making the necessary adjustments.

Breaking Changes
  • Replaces the Unsplash class with a named createApi function:
// before
import Unsplash from 'unsplash-js';
const unsplash = new Unsplash({ accessKey: 'MY_ACCESS_KEY' });

// after
import { createApi } from 'unsplash-js';
const unsplash = createApi({ accessKey: 'MY_ACCESS_KEY' });
// or
import Unsplash from 'unsplash-js';
const unsplash = Unsplash.createApi({ accessKey: 'MY_ACCESS_KEY' });
  • Removes user authentication features from the library. This means that the createApi function does not recieve secret, callbackUrl or bearerToken.
  • Removes the following API methods (primarily due to removal of user authentication):

    • photos:
      • likePhoto
      • unlikePhoto
      • downloadPhoto (deprecated in 6.3, replaced with trackDownload)
    • users:
      • statistics
    • collections:
      • createCollection
      • updateCollection
      • deleteCollection
      • addPhotoToCollection
      • removePhotoFromCollection
    • auth:
      • getAuthenticationUrl
      • userAuthentication
      • setBearerToken
    • currentUser:
      • profile
      • updateProfile
    • stats:
      • total
    • toJson (the library now takes care of converting the response to JSON).
  • Renames all of the remaining API methods:

    • search:
      • ⚠️ photos --> getPhotos
      • ⚠️ users --> getUsers
      • ⚠️ collections --> getCollections
    • photos:
      • ⚠️ listPhotos --> list
      • ⚠️ getPhoto --> get
      • ⚠️ getRandomPhoto --> getRandom
      • ⚠️ getPhotoStats --> getStats
    • users:
      • ⚠️ profile --> get
      • ⚠️ photos --> getPhotos
      • ⚠️ likes --> getLikes
      • ⚠️ collections --> getCollections
    • collections:
      • ⚠️ listCollections --> list
      • ⚠️ getCollection --> get
      • ⚠️ getCollectionPhotos --> getPhotos
      • ⚠️ listRelatedCollections --> listRelated
  • Changes the format of the parameters for all API methods. They are now all named parameters within the first argument, instead of multiple arguments. Check the TypeScript types and the Arguments section of the docs for the new parameters format.
  • Changes the format of the responses for all API methods. The JSON is now parsed and returned, removing the need for the toJson helper. Feeds have the "x-total" header added to the response. The library now also performs error-handling: expected errors are returned instead of thrown, along with a description of their source. Check the TypeScript types and the Response section of the docs for the new response format.
Changes
  • TypeScript support! Everything is now accurately typed (except responses which we plan to add types for soon).
  • You can now provide fetch options on a per-call basis using the second parameter. See Arguments.

Configuration

📅 Schedule: "before 7am on Tuesday" in timezone Australia/Sydney.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@changeset-bot
Copy link

changeset-bot bot commented Jul 5, 2021

⚠️ No Changeset found

Latest commit: a6589c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bladey bladey self-assigned this Jul 7, 2021
@bladey bladey closed this Jul 7, 2021
@renovate
Copy link
Contributor Author

renovate bot commented Jul 7, 2021

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 7.x releases. However, if you upgrade to 7.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

@renovate renovate bot deleted the renovate/unsplash-js-7.x branch July 7, 2021 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants