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 is-promise to the latest version 🚀 #697

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Apr 26, 2020


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The dependency is-promise was updated from 2.2.2 to 3.0.0.

This version is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


Publisher: then-bot
License: MIT

Release Notes for 3.0.0

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.

Commits

The new version differs by 8 commits.

  • 1fc71a4 feat: use exports to expose an ES Module as well as CJS (#30)
  • e5e834a test: add tests for .then on the prototype (#35)
  • 19c6d89 feat: add typescript definitions (#31)
  • 3af13e9 chore: remove .npmignore (#28)
  • 2384dee ci: remove common-env context (#27)
  • 8e7187d ci: setup circleci (#25)
  • 34dc9f8 Test on Node 12 & 14 (#21)
  • ca22483 Release 2.2.2

See the full diff


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 🌴

greenkeeper bot added a commit that referenced this pull request Apr 27, 2020
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Apr 27, 2020

  • The dependency is-promise was updated from 2.2.2 to 4.0.0.

Update to this version instead 🚀

Release Notes for 4.0.0

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.

Commits

The new version differs by 1 commits.

  • 5a240f6 Use PromiseLike intead of Promise. Fixes #39 (#40)

See the full diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants