Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(deps): update dependency is-promise to v4 #18

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 1, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
is-promise ^2.2.2 -> ^4.0.0 age adoption passing confidence

Release Notes

then/is-promise

v4.0.0

Compare Source

Breaking Changes

  • Use PromiseLike instead of Promise in TypeScript (#​40)

    This is only a breaking change for TypeScript users.

    In the following code:

    function foo(x: PromiseLike<string> | string) {
      if (isPromise(x)) {
        return x;
      } else {
        return Promise.resolve(x);
      }
    }

    TypeScript would previously have incorrectly inferred foo as returning Promisestring>when in fact it returnsPromiseLikestring>. The latest version fixes this. If you instead had the following code, it should work exactly the same as before:

    function foo(x: Promise<string> | string) {
      if (isPromise(x)) {
        return x;
      } else {
        return Promise.resolve(x);
      }
    }

    This update is to reflect the fact that is-promise does "duck" typing, rather than an instanceof check.

v3.0.0

Compare Source

Breaking Changes

  • Restricted "exports" in package.json (for node 14+) (#​30)

    The only ways to import this are now:

    import isPromise from 'is-promise';

    or

    const isPromise = require('is-promise');

    If you were requiring things like the package.json file within the package, these are not part of the public API, and will no longer be accessible.

  • is-promise now uses "default" exports in ES Modules environments (#​30)

    If you were using ES6 style imports via

    import * as isPromise from 'is-promise';

    you will need to update this to

    import isPromise from 'is-promise';

    If you were using CommonJS style require, no change is needed.

  • This package now comes bundled with TypeScript definitions (#​31)

    This means you may get new errors that you didn't see before if you are using TypeScript. If you are not using TypeScript, this change will not impact you.


Renovate configuration

📅 Schedule: "before 3am on Monday" (UTC).

🚦 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.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Mar 1, 2021
@renovate renovate bot force-pushed the renovate/is-promise-4.x branch from bcce624 to f4241c8 Compare March 1, 2021 08:36
Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eduardoboucas I don't think this is a breaking change for us as we're using CommonJS

@erezrokah erezrokah merged commit 6a92e72 into main Mar 1, 2021
@erezrokah erezrokah deleted the renovate/is-promise-4.x branch March 1, 2021 08:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants