Skip to content

Commit 6711b59

Browse files
authored
feat: drop support for browsers without promises (#381)
1 parent 9d9ddad commit 6711b59

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

.changeset/nice-cameras-flash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hibp': major
3+
---
4+
5+
Drop support for browsers without native Promise implementations. In reality, this likely didn't change anything.

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ happen).
116116

117117
#### Using in the browser
118118

119-
**Prerequisite:** This module requires a Promise implementation to exist in the
120-
global namespace prior to being loaded. Therefore, to facilitate usage in
121-
[browsers without native Promise support][caniuse-promise], you are responsible
122-
for providing a polyfill. I recommend [es6-promise][es6-promise].
123-
124119
You have several options for using this library in a browser environment:
125120

126121
1. Bundled
@@ -216,8 +211,6 @@ This module is distributed under the [MIT License][license].
216211
[caniuse-esm]: https://caniuse.com/#feat=es6-module
217212
[js-modules]: https://v8.dev/features/modules#browser
218213
[webpack]: https://webpack.js.org
219-
[caniuse-promise]: https://caniuse.com/#search=promise
220-
[es6-promise]: https://github.com/stefanpenner/es6-promise
221214
[runkit]: https://runkit.com/npm/hibp
222215
[pwned]: https://github.com/wKovacs64/pwned
223216
[pulls]: https://github.com/wKovacs64/hibp/pulls

docs/index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ happen).
113113

114114
#### Using in the browser
115115

116-
**Prerequisite:** This module requires a Promise implementation to exist in the
117-
global namespace prior to being loaded. Therefore, to facilitate usage in
118-
[browsers without native Promise support](https://caniuse.com/#search=promise),
119-
you are responsible for providing a polyfill. I recommend
120-
[es6-promise](https://github.com/stefanpenner/es6-promise).
121-
122116
You have several options for using this library in a browser environment:
123117

124118
1. Bundled

rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default [
128128
{
129129
modules: 'umd',
130130
targets: {
131-
browsers: ['> 1%', 'last 2 versions'],
131+
browsers: ['defaults', 'supports promises'],
132132
},
133133
},
134134
],

0 commit comments

Comments
 (0)