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

[Snyk] Upgrade is-promise from 2.2.2 to 4.0.0 #3

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

Conversation

InfiniteLove2020
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade is-promise from 2.2.2 to 4.0.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 2 versions ahead of your current version.
  • The recommended version was released 3 years ago, on 2020-04-27.
Release notes
Package name: is-promise
  • 4.0.0 - 2020-04-27

    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.

  • 3.0.0 - 2020-04-26

    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.

  • 2.2.2 - 2020-04-25

    Removed ESM support that was added in 2.2.0 as it turns out to be a breaking change (see #20)

from is-promise GitHub release notes
Commit messages
Package name: is-promise

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

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