Skip to content

Commit d1fb088

Browse files
authored
Merge pull request #115 from Donaldcwl/dev
Release 1.0.15
2 parents 3c41eb9 + bd9c9d5 commit d1fb088

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4121
-7475
lines changed

.babelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"presets": [
33
["@babel/preset-env", {
4+
"useBuiltIns": "usage",
5+
"corejs": "3",
46
"targets": {
5-
"browsers": ["> 0.25%", "not dead"]
7+
"browsers": ["> 5%", "ie 10-11", "not dead"]
68
}
79
}]
810
],

.eslintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
},
5+
extends: [
6+
'airbnb-base',
7+
],
8+
parserOptions: {
9+
ecmaVersion: 12,
10+
sourceType: 'module',
11+
},
12+
rules: {
13+
'max-len': ['warn', { code: 150 }],
14+
},
15+
ignorePatterns: ['dist'],
16+
};

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v1.0.15 (12 Aug 2021)
2+
* fixed: Fixed black Images and type error by considering Canvas maximum size supported by different browsers [#84](https://github.com/Donaldcwl/browser-image-compression/issues/84), [#36](https://github.com/Donaldcwl/browser-image-compression/issues/36)
3+
* fixed: IE compatibility, include polyfill with core-js@3 e.g, globalThis, Promise [#108](https://github.com/Donaldcwl/browser-image-compression/issues/108), [#110](https://github.com/Donaldcwl/browser-image-compression/issues/110)
4+
* fixed: Test suites in few projects may have error, added extra checking on whether File and FileReader exist in the Window object [#92](https://github.com/Donaldcwl/browser-image-compression/issues/92)
5+
* fixed: issue with export causing compile error in typescript project [#63](https://github.com/Donaldcwl/browser-image-compression/issues/63)
6+
17
## v1.0.14 (6 Jan 2021)
28
* updated: use UZIP to compress PNG image instead of Canvas
39
* fixed: PNG transparent background become black after compression [#84](https://github.com/Donaldcwl/browser-image-compression/issues/84), [#76](https://github.com/Donaldcwl/browser-image-compression/issues/76)
@@ -8,7 +14,7 @@
814
* fixed: options object being altered by the compress func [#71](https://github.com/Donaldcwl/browser-image-compression/pull/71)
915
* fixed: issue with output size of png compression [#57](https://github.com/Donaldcwl/browser-image-compression/issues/57)
1016

11-
## v1.0.12 (4 June 2020)
17+
## v1.0.12 (4 Jun 2020)
1218
* fixed: issue with SSR [#58](https://github.com/Donaldcwl/browser-image-compression/issues/58)
1319

1420
## v1.0.11 (8 May 2020)
@@ -37,10 +43,10 @@
3743
* fixed: issue in IE browser
3844
* fixed: other issues
3945

40-
## v1.0.6 (5 July 2019)
46+
## v1.0.6 (5 Jul 2019)
4147
* fixed: exif orientation do not work in some situations
4248

43-
## v1.0.5 (1 June 2019)
49+
## v1.0.5 (1 Jun 2019)
4450
* added: support for cordova project that uses cordova-plugin-file
4551
* optimized: follow image exif orientation even though image do not required to compress or resize
4652
* fixed: error may throw on iPhone Safari because of OffscreenCanvas cannot get 2d context

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn add browser-image-compression
1818
```
1919
or use a CDN like [delivrjs]:
2020
```
21-
https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.14/dist/browser-image-compression.js
21+
https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.15/dist/browser-image-compression.js
2222
or
2323
https://cdn.jsdelivr.net/npm/browser-image-compression@latest/dist/browser-image-compression.js
2424
```
@@ -42,7 +42,7 @@ or
4242

4343
#### In html file ####
4444
```html
45-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.14/dist/browser-image-compression.js"></script>
45+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.15/dist/browser-image-compression.js"></script>
4646
```
4747

4848
## API ##
@@ -153,16 +153,6 @@ or check the "[example]" folder in this repo
153153
## Remarks for compression to work in Web Worker
154154
The browser need to support "OffscreenCanvas" API in order to take advantage of non-blocking compression. If browser do not support "OffscreenCanvas" API, main thread is used instead. See https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#browser_compatibility for browser compatibility of "OffscreenCanvas" API.
155155

156-
## IE support ##
157-
Promise API is being used in this library. If you need to support browser that do not support Promise like IE. You can include the Promise polyfill in your project.
158-
159-
See: https://github.com/taylorhakes/promise-polyfill
160-
161-
You can include the following script to load the Promise polyfill:
162-
```html
163-
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
164-
```
165-
166156
## Typescript type definitions ##
167157
Typescript definitions are included in the package & referenced in the `types` section of the `package.json`
168158

@@ -174,7 +164,7 @@ Typescript definitions are included in the package & referenced in the `types` s
174164
5. add/update test in test/ folder
175165
6. `npm run test`
176166
7. push to your forked repo on github
177-
8. make a pull request to this repo
167+
8. make a pull request to dev branch of this repo
178168

179169
[dist]: https://github.com/Donaldcwl/browser-image-compression/tree/master/dist
180170
[example]: https://github.com/Donaldcwl/browser-image-compression/tree/master/example

coverage/badge.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)