Skip to content

Commit afd5af3

Browse files
committed
build: release 1.0.2
1 parent 6810305 commit afd5af3

11 files changed

Lines changed: 66 additions & 294 deletions

.github/CONTRIBUTING.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
# Contributing to jquery-cropper
22

3-
> Based on [Angular's contributing guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md).
3+
> Based on [Angular's contributing guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md).
44
55
We would love for you to contribute to jquery-cropper and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
66

7-
- [Code of Conduct](#code-of-conduct)
8-
- [Question or Problem](#question-or-problem)
9-
- [Issues and Bugs](#issues-and-bugs)
10-
- [Feature Requests](#feature-requests)
11-
- [Submission Guidelines](#submission-guidelines)
12-
- [Coding Rules](#coding-rules)
13-
- [Commit Message Guidelines](#commit-message-guidelines)
7+
- [Contributing to jquery-cropper](#contributing-to-jquery-cropper)
8+
- [Code of Conduct](#code-of-conduct)
9+
- [Question or Problem](#question-or-problem)
10+
- [Issues and Bugs](#issues-and-bugs)
11+
- [Feature Requests](#feature-requests)
12+
- [Submission Guidelines](#submission-guidelines)
13+
- [Submitting an Issue](#submitting-an-issue)
14+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
15+
- [After your pull request is merged](#after-your-pull-request-is-merged)
16+
- [Coding Rules](#coding-rules)
17+
- [Commit Message Guidelines](#commit-message-guidelines)
18+
- [Commit Message Format](#commit-message-format)
19+
- [Revert](#revert)
20+
- [Type](#type)
21+
- [Scope](#scope)
22+
- [Subject](#subject)
23+
- [Body](#body)
24+
- [Footer](#footer)
1425

1526
## Code of Conduct
1627

@@ -70,7 +81,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
7081
1. Make your changes in a new git branch:
7182

7283
```shell
73-
git checkout -b my-fix-branch master
84+
git checkout -b my-fix-branch main
7485
```
7586

7687
1. Create your patch, **including appropriate test cases**.
@@ -89,14 +100,14 @@ Before you submit your Pull Request (PR) consider the following guidelines:
89100
git push origin my-fix-branch
90101
```
91102

92-
1. In GitHub, send a pull request to `jquery-cropper:master`.
103+
1. In GitHub, send a pull request to `jquery-cropper:main`.
93104
1. If we suggest changes then:
94105
- Make the required updates.
95106
- Re-run the jquery-cropper test suites to ensure tests are still passing.
96107
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
97108

98109
```shell
99-
git rebase master -i
110+
git rebase main -i
100111
git push -f
101112
```
102113

@@ -112,10 +123,10 @@ After your pull request is merged, you can safely delete your branch and pull th
112123
git push origin --delete my-fix-branch
113124
```
114125
115-
1. Check out the master branch:
126+
1. Check out the main branch:
116127
117128
```shell
118-
git checkout master -f
129+
git checkout main -f
119130
```
120131
121132
1. Delete the local branch:
@@ -124,10 +135,10 @@ After your pull request is merged, you can safely delete your branch and pull th
124135
git branch -D my-fix-branch
125136
```
126137
127-
1. Update your master with the latest upstream version:
138+
1. Update your main with the latest upstream version:
128139
129140
```shell
130-
git pull --ff upstream master
141+
git pull --ff upstream main
131142
```
132143
133144
## Coding Rules
@@ -158,7 +169,7 @@ Any line of the commit message cannot be longer 100 characters! This allows the
158169

159170
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
160171

161-
Here are some [samples](https://github.com/fengyuanchen/lifecycle.js/commits/master).
172+
Here are some [samples](https://github.com/fengyuanchen/jquery-cropper/commits/main).
162173

163174
### Revert
164175

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Please check if your PR fulfills the following requirements:
44

5-
- [ ] The commit message follows our [guidelines](https://github.com/fengyuanchen/jquery-cropper/blob/master/.github/CONTRIBUTING.md#commit-message-guidelines).
5+
- [ ] The commit message follows our [guidelines](https://github.com/fengyuanchen/jquery-cropper/blob/main/.github/CONTRIBUTING.md#commit-message-guidelines).
66
- [ ] Tests for the changes have been added (for bug fixes / features)
77
- [ ] Docs have been added / updated (for bug fixes / features)
88

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.2 (Mar 8, 2025)
4+
5+
- Removed `$.isFunction` for compatibility with jQuery 4.
6+
37
## 1.0.1 (Oct 19, 2019)
48

59
- Register as a plugin only when both the jQuery and Cropper.js are existing.

dist/jquery-cropper.common.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* jQuery Cropper v1.0.1
2+
* jQuery Cropper v1.0.2
33
* https://fengyuanchen.github.io/jquery-cropper
44
*
55
* Copyright 2018-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2019-10-19T08:48:33.062Z
8+
* Date: 2025-03-08T08:35:16.178Z
99
*/
1010

1111
'use strict';
@@ -18,38 +18,30 @@ var Cropper = _interopDefault(require('cropperjs'));
1818
if ($ && $.fn && Cropper) {
1919
var AnotherCropper = $.fn.cropper;
2020
var NAMESPACE = 'cropper';
21-
2221
$.fn.cropper = function jQueryCropper(option) {
2322
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2423
args[_key - 1] = arguments[_key];
2524
}
26-
2725
var result;
2826
this.each(function (i, element) {
2927
var $element = $(element);
3028
var isDestroy = option === 'destroy';
3129
var cropper = $element.data(NAMESPACE);
32-
3330
if (!cropper) {
3431
if (isDestroy) {
3532
return;
3633
}
37-
3834
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
3935
cropper = new Cropper(element, options);
4036
$element.data(NAMESPACE, cropper);
4137
}
42-
4338
if (typeof option === 'string') {
4439
var fn = cropper[option];
45-
46-
if ($.isFunction(fn)) {
40+
if (typeof fn === 'function') {
4741
result = fn.apply(cropper, args);
48-
4942
if (result === cropper) {
5043
result = undefined;
5144
}
52-
5345
if (isDestroy) {
5446
$element.removeData(NAMESPACE);
5547
}
@@ -58,10 +50,8 @@ if ($ && $.fn && Cropper) {
5850
});
5951
return result !== undefined ? result : this;
6052
};
61-
6253
$.fn.cropper.Constructor = Cropper;
6354
$.fn.cropper.setDefaults = Cropper.setDefaults;
64-
6555
$.fn.cropper.noConflict = function noConflict() {
6656
$.fn.cropper = AnotherCropper;
6757
return this;

dist/jquery-cropper.esm.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* jQuery Cropper v1.0.1
2+
* jQuery Cropper v1.0.2
33
* https://fengyuanchen.github.io/jquery-cropper
44
*
55
* Copyright 2018-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2019-10-19T08:48:33.062Z
8+
* Date: 2025-03-08T08:35:16.178Z
99
*/
1010

1111
import $ from 'jquery';
@@ -14,38 +14,30 @@ import Cropper from 'cropperjs';
1414
if ($ && $.fn && Cropper) {
1515
var AnotherCropper = $.fn.cropper;
1616
var NAMESPACE = 'cropper';
17-
1817
$.fn.cropper = function jQueryCropper(option) {
1918
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2019
args[_key - 1] = arguments[_key];
2120
}
22-
2321
var result;
2422
this.each(function (i, element) {
2523
var $element = $(element);
2624
var isDestroy = option === 'destroy';
2725
var cropper = $element.data(NAMESPACE);
28-
2926
if (!cropper) {
3027
if (isDestroy) {
3128
return;
3229
}
33-
3430
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
3531
cropper = new Cropper(element, options);
3632
$element.data(NAMESPACE, cropper);
3733
}
38-
3934
if (typeof option === 'string') {
4035
var fn = cropper[option];
41-
42-
if ($.isFunction(fn)) {
36+
if (typeof fn === 'function') {
4337
result = fn.apply(cropper, args);
44-
4538
if (result === cropper) {
4639
result = undefined;
4740
}
48-
4941
if (isDestroy) {
5042
$element.removeData(NAMESPACE);
5143
}
@@ -54,10 +46,8 @@ if ($ && $.fn && Cropper) {
5446
});
5547
return result !== undefined ? result : this;
5648
};
57-
5849
$.fn.cropper.Constructor = Cropper;
5950
$.fn.cropper.setDefaults = Cropper.setDefaults;
60-
6151
$.fn.cropper.noConflict = function noConflict() {
6252
$.fn.cropper = AnotherCropper;
6353
return this;

dist/jquery-cropper.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,49 @@
11
/*!
2-
* jQuery Cropper v1.0.1
2+
* jQuery Cropper v1.0.2
33
* https://fengyuanchen.github.io/jquery-cropper
44
*
55
* Copyright 2018-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2019-10-19T08:48:33.062Z
8+
* Date: 2025-03-08T08:35:16.178Z
99
*/
1010

1111
(function (global, factory) {
1212
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
1313
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
1414
(global = global || self, factory(global.jQuery, global.Cropper));
15-
}(this, function ($, Cropper) { 'use strict';
15+
}(this, (function ($, Cropper) { 'use strict';
1616

17-
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18-
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
17+
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
18+
Cropper = Cropper && Object.prototype.hasOwnProperty.call(Cropper, 'default') ? Cropper['default'] : Cropper;
1919

2020
if ($ && $.fn && Cropper) {
2121
var AnotherCropper = $.fn.cropper;
2222
var NAMESPACE = 'cropper';
23-
2423
$.fn.cropper = function jQueryCropper(option) {
2524
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2625
args[_key - 1] = arguments[_key];
2726
}
28-
2927
var result;
3028
this.each(function (i, element) {
3129
var $element = $(element);
3230
var isDestroy = option === 'destroy';
3331
var cropper = $element.data(NAMESPACE);
34-
3532
if (!cropper) {
3633
if (isDestroy) {
3734
return;
3835
}
39-
4036
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
4137
cropper = new Cropper(element, options);
4238
$element.data(NAMESPACE, cropper);
4339
}
44-
4540
if (typeof option === 'string') {
4641
var fn = cropper[option];
47-
48-
if ($.isFunction(fn)) {
42+
if (typeof fn === 'function') {
4943
result = fn.apply(cropper, args);
50-
5144
if (result === cropper) {
5245
result = undefined;
5346
}
54-
5547
if (isDestroy) {
5648
$element.removeData(NAMESPACE);
5749
}
@@ -60,14 +52,12 @@
6052
});
6153
return result !== undefined ? result : this;
6254
};
63-
6455
$.fn.cropper.Constructor = Cropper;
6556
$.fn.cropper.setDefaults = Cropper.setDefaults;
66-
6757
$.fn.cropper.noConflict = function noConflict() {
6858
$.fn.cropper = AnotherCropper;
6959
return this;
7060
};
7161
}
7262

73-
}));
63+
})));

dist/jquery-cropper.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)