Skip to content

Commit

Permalink
feat: drop support for browsers without promises (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
wKovacs64 committed May 6, 2023
1 parent 9d9ddad commit 6711b59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-cameras-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hibp': major
---

Drop support for browsers without native Promise implementations. In reality, this likely didn't change anything.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ happen).

#### Using in the browser

**Prerequisite:** This module requires a Promise implementation to exist in the
global namespace prior to being loaded. Therefore, to facilitate usage in
[browsers without native Promise support][caniuse-promise], you are responsible
for providing a polyfill. I recommend [es6-promise][es6-promise].

You have several options for using this library in a browser environment:

1. Bundled
Expand Down Expand Up @@ -216,8 +211,6 @@ This module is distributed under the [MIT License][license].
[caniuse-esm]: https://caniuse.com/#feat=es6-module
[js-modules]: https://v8.dev/features/modules#browser
[webpack]: https://webpack.js.org
[caniuse-promise]: https://caniuse.com/#search=promise
[es6-promise]: https://github.com/stefanpenner/es6-promise
[runkit]: https://runkit.com/npm/hibp
[pwned]: https://github.com/wKovacs64/pwned
[pulls]: https://github.com/wKovacs64/hibp/pulls
Expand Down
6 changes: 0 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ happen).

#### Using in the browser

**Prerequisite:** This module requires a Promise implementation to exist in the
global namespace prior to being loaded. Therefore, to facilitate usage in
[browsers without native Promise support](https://caniuse.com/#search=promise),
you are responsible for providing a polyfill. I recommend
[es6-promise](https://github.com/stefanpenner/es6-promise).

You have several options for using this library in a browser environment:

1. Bundled
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default [
{
modules: 'umd',
targets: {
browsers: ['> 1%', 'last 2 versions'],
browsers: ['defaults', 'supports promises'],
},
},
],
Expand Down

0 comments on commit 6711b59

Please sign in to comment.