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

Dev 1.0.15 #115

Merged
merged 29 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b645ae0
fixed: Test suites in few projects may have error, added extra checki…
Donaldcwl Jan 7, 2021
dbabe87
update
Donaldcwl Jan 7, 2021
4872343
Merge branch 'master' into dev
Donaldcwl Jun 14, 2021
bd1bb38
feat: add webpack example
Donaldcwl Jun 14, 2021
933898b
doc: add remarks for compression to work in web worker
Donaldcwl Jun 14, 2021
4dcf039
feat: add expressjs server as example for file upload server handling
Donaldcwl Jun 14, 2021
7bfd8fd
feat: update example html
Donaldcwl Jun 14, 2021
fa82891
doc: update readme
Donaldcwl Jun 14, 2021
aef768f
update .gitignore
Donaldcwl Jun 14, 2021
15ff298
doc: update readme
Donaldcwl Jun 14, 2021
0b8e545
fix: typo
Donaldcwl Aug 10, 2021
ced09eb
chore: make repo commitizen friendly
Donaldcwl Aug 10, 2021
44573af
Merge branch 'master' into dev
Donaldcwl Aug 10, 2021
38e911b
chore: update dependencies
Donaldcwl Aug 11, 2021
873dfd8
chore: update eslint config
Donaldcwl Aug 11, 2021
b41fbff
feat: iE compatibility, include polyfill with core-js@3
Donaldcwl Aug 11, 2021
0a91392
style: format code
Donaldcwl Aug 11, 2021
ecc8633
style: format code
Donaldcwl Aug 11, 2021
c545181
style: format code
Donaldcwl Aug 11, 2021
6f350cb
feat: use simple browser user agent string match to detect browser in…
Donaldcwl Aug 11, 2021
93ce771
chore: update example, remove using polyfill because this lib include…
Donaldcwl Aug 11, 2021
f171d80
fix: update code to make it work in webworker mode
Donaldcwl Aug 11, 2021
79c1286
style: format code
Donaldcwl Aug 11, 2021
4b31755
docs: update for new changes
Donaldcwl Aug 11, 2021
d63c882
build: update config
Donaldcwl Aug 11, 2021
7d5716f
chore: push coverage report and build dist
Donaldcwl Aug 11, 2021
dd802ad
Merge branch 'master' into dev
Donaldcwl Aug 11, 2021
61d0a8d
docs: update changelog
Donaldcwl Aug 11, 2021
bd9c9d5
chore: bump version to 1.0.15
Donaldcwl Aug 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"presets": [
["@babel/preset-env", {
"useBuiltIns": "usage",
"corejs": "3",
"targets": {
"browsers": ["> 0.25%", "not dead"]
"browsers": ["> 5%", "ie 10-11", "not dead"]
}
}]
],
Expand Down
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
env: {
browser: true,
},
extends: [
'airbnb-base',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {
'max-len': ['warn', { code: 150 }],
},
ignorePatterns: ['dist'],
};
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.0.15 (12 Aug 2021)
* 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)
* 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)
* 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)
* fixed: issue with export causing compile error in typescript project [#63](https://github.com/Donaldcwl/browser-image-compression/issues/63)

## v1.0.14 (6 Jan 2021)
* updated: use UZIP to compress PNG image instead of Canvas
* 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)
Expand All @@ -8,7 +14,7 @@
* fixed: options object being altered by the compress func [#71](https://github.com/Donaldcwl/browser-image-compression/pull/71)
* fixed: issue with output size of png compression [#57](https://github.com/Donaldcwl/browser-image-compression/issues/57)

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

## v1.0.11 (8 May 2020)
Expand Down Expand Up @@ -37,10 +43,10 @@
* fixed: issue in IE browser
* fixed: other issues

## v1.0.6 (5 July 2019)
## v1.0.6 (5 Jul 2019)
* fixed: exif orientation do not work in some situations

## v1.0.5 (1 June 2019)
## v1.0.5 (1 Jun 2019)
* added: support for cordova project that uses cordova-plugin-file
* optimized: follow image exif orientation even though image do not required to compress or resize
* fixed: error may throw on iPhone Safari because of OffscreenCanvas cannot get 2d context
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ yarn add browser-image-compression
```
or use a CDN like [delivrjs]:
```
https://cdn.jsdelivr.net/npm/[email protected].14/dist/browser-image-compression.js
https://cdn.jsdelivr.net/npm/[email protected].15/dist/browser-image-compression.js
or
https://cdn.jsdelivr.net/npm/browser-image-compression@latest/dist/browser-image-compression.js
```
Expand All @@ -42,7 +42,7 @@ or

#### In html file ####
```html
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/browser-image-compression.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].15/dist/browser-image-compression.js"></script>
```

## API ##
Expand Down Expand Up @@ -153,16 +153,6 @@ or check the "[example]" folder in this repo
## Remarks for compression to work in Web Worker
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.

## IE support ##
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.

See: https://github.com/taylorhakes/promise-polyfill

You can include the following script to load the Promise polyfill:
```html
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
```

## Typescript type definitions ##
Typescript definitions are included in the package & referenced in the `types` section of the `package.json`

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

[dist]: https://github.com/Donaldcwl/browser-image-compression/tree/master/dist
[example]: https://github.com/Donaldcwl/browser-image-compression/tree/master/example
Expand Down
2 changes: 1 addition & 1 deletion coverage/badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading