Skip to content

Commit 4ca7ace

Browse files
authored
Merge pull request #361 from jakerella/test-and-doc-updates
Update dependencies; change license to MIT, remove support for lower versions of jQuery, add GH templates
2 parents 2a143bc + f010143 commit 4ca7ace

Some content is hidden

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

55 files changed

+1360
-156499
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Tell us about a problem you have
4+
title: ''
5+
labels: Bug
6+
assignees: ''
7+
8+
---
9+
10+
## Problem Description
11+
12+
_Clear, concise description of the problem._
13+
14+
_**TODO**_
15+
16+
## Reproduction Steps
17+
18+
_Detailed steps to reproduce the problem.
19+
20+
_**TODO**_
21+
22+
* Browser / Environment:
23+
- [ ] chrome version: xxx
24+
- [ ] firefox version: xxx
25+
- [ ] edge version: xxx
26+
- [ ] safari version: xxx
27+
- [ ] node version: xxx
28+
- [ ] other: ...
29+
30+
## Expected Behavior
31+
32+
_What did you **expect** to happen, what does "good" look like?._
33+
34+
_**TODO**_
35+
36+
## Additional Information
37+
38+
_Fill in as necessary._
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: Feature/Enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Problem Description
11+
12+
[ A clear and concise description of what the problem is. For example, _I am frustrated when ..._, or _I would like to be able to ..._ ]
13+
14+
## Possible Workarounds
15+
16+
Do you have a way of working around this problem already? Please tell us!
17+
18+
## Possible Solutions
19+
20+
Do you have an idea of how this problem could be solved? Feel free to suggest it here!
21+
22+
## Additional Context
23+
24+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Question
3+
about: Ask a question about the project!
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
## Topic
11+
12+
Please let us know if your question relates to one of these topics!
13+
14+
- [ ] Something wrong with the library (should this be a Bug Report??)
15+
- [ ] Something I want the library to do (should this be a Feature Request??)
16+
- [ ] Help using the library (check the docs first!)
17+
- [ ] Author, license, copyright, etc
18+
- [ ] Contributing to the project
19+
- [ ] Documentation
20+
- [ ] Other
21+
22+
## Question
23+
24+
Please add your question here, if this is regarding a specific piece of functionality, please be sure to mention it. Include as much detail in your request as possible!
25+

.github/SECURITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Security Policy
2+
3+
## Supported plugin Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 2.x | yes |
8+
| 1.x | yes |
9+
10+
## Supported jQuery Versions
11+
12+
| Version | Supported |
13+
| ------- | ------------------ |
14+
| 3.x | yes |
15+
| 2.x | yes |
16+
| 1.x | yes |
17+
18+
_Note that only the latest patch of each jQuery version is supported_
19+
20+
## Reporting a Vulnerability
21+
22+
You can report a non-sensitive vulnerability or issue is the GitHub issues. Otherwise, please use the GitHub security reporting feature.

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## What is the problem being solved?
2+
3+
_Please describe the problem being solved. You can reference an existing [Issue](https://github.com/jakerella/jquery-mockjax/issues) versus rewriting it here!_
4+
5+
_**TODO: describe it...**_
6+
7+
## How have you solved the problem?
8+
9+
_Please describe your approach to solving the problem. Don't repeat the changes in the file diff, just focus on the high-level approach!_
10+
11+
_**TODO: describe it...**_
12+
13+
## How can someone test that the problem was solved?
14+
15+
_**TODO: describe specific testing that a reviewer should perform...**_
16+
17+
- [ ] I have run the unit tests locally
18+
- [ ] I have tested this change with all supported versions of jQuery
19+
- [ ] I have tested this change on at least 2 browsers
20+

.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"browser": true,
5757
"jquery": true,
5858
"node": true,
59+
"esversion": 6,
5960
"globals": {
6061
"define": true,
6162
"ActiveXObject": true

.travis.yml

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

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 2024-02-17 v2.6.1
2+
* Changed license from dual (MIT & GPL) to only be MIT
3+
* Updated authorship to myself (creator of all v2 changes) and moved JD Sharp to contributor
4+
* Massive (long needed) update to dev dependencies, and thus most of the test and build infrastructure
5+
* NO source code changes, but the minified version will change due to dependency updates
6+
* Remove support for IE 11 and requirejs
7+
* Remove support for older versions of jQuery (supporting latest on each major branch)
8+
19
## 2020-08-22 v2.6.0
210
* Removed support for IE 9 & 10
311
* Removed unused config for code climate

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ just run `grunt build`
137137
## Submit Your PR
138138

139139
This is the last step! First, be sure you're merging with the correct branch! Version
140-
2.0 of Mockjax will be the `master` branch very soon (hopefully we remember to update
141-
this message), but if you're submitting a bug fix, it should be submitted to the `v1.x`
142-
branch as well as `master` (if the bug exists in both).
140+
2.x of Mockjax is on the `master` branch, but if you're submitting a bug fix for v1.x,
141+
make sure it is submitted to the `v1.x` branch as well as `master` (if the bug exists in both).
143142

144143
You should also write a good PR message with information on why this feature or fix is
145144
necessary or a good idea. For features, be sure to include information on _how to use_

Gruntfile.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11

22
/* jshint ignore:start */
3-
var testRunner = require('./qunit-puppeteer.js');
3+
const testRunner = require('./lib/qunit-puppeteer.js');
44
/* jshint ignore:end */
55

66
module.exports = function(grunt) {
77
'use strict';
88

99
/* jshint ignore:start */
1010
/* This is used in an await statement, which apaprently JSHint doesn't like */
11-
var PORT = 4000;
11+
const PORT = 4000;
1212
/* jshint ignore:end */
1313

1414
// Project configuration
15-
var config = require('./grunt-config-options');
15+
const config = require('./grunt-config-options');
1616
config.pkg = grunt.file.readJSON('package.json');
1717

1818
grunt.initConfig(config);
1919

2020
require('load-grunt-tasks')(grunt);
2121

22-
grunt.registerTask('dev', ['jshint', 'test:all', 'test:requirejs', 'browserify', 'test:browserify', 'mochaTest']);
22+
grunt.registerTask('dev', ['jshint', 'test:all', 'browserify', 'test:browserify', 'mochaTest']);
2323
grunt.registerTask('build', ['dev', 'concat', 'uglify', 'test:dist']);
2424
grunt.registerTask('default', ['dev']);
2525

2626
/* jshint ignore:start */
2727
grunt.registerTask('test', 'Executes QUnit tests with all supported jQuery versions', async function() {
2828
/* jshint ignore:end */
29-
var done = this.async();
30-
var i;
31-
32-
var versionUrls = require('./test/build-version-urls')(grunt.config, arguments[0], arguments[1], arguments[2]);
29+
const done = this.async();
30+
const versionUrls = require('./test/build-version-urls')(grunt.config, arguments[0], arguments[1], arguments[2]);
3331

3432
console.log(versionUrls);
35-
for (i=0; i<versionUrls.length; ++i) {
33+
for (let i=0; i<versionUrls.length; ++i) {
3634
try {
3735
console.log('LOADING', versionUrls[i]);
3836
/* jshint ignore:start */

LICENSE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Copyright (c) 2014-2018 Jordan Kasper, formerly appendTo
1+
Copyright (c) 2014-2024 Jordan Kasper, formerly appendTo
22

33
NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
44

5-
Dual licensed under the MIT or GPLv2 licenses (your choice):
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

7-
* [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
88

9-
* [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
9+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# jQuery Mockjax: Ajax request mocking #
22
[http://github.com/jakerella/jquery-mockjax/](http://github.com/jakerella/jquery-mockjax/)
33

4-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/72d5f8c1c29ee60f6282d7d3fa9cb52c)](https://www.codacy.com/app/mikehostetler_1249/jquery-mockjax)
54
[![Travis CI Badge](https://travis-ci.com/jakerella/jquery-mockjax.svg?branch=master)](https://travis-ci.com/jakerella/jquery-mockjax)
6-
[![BrowserStack Status](https://automate.browserstack.com/badge.svg?badge_key=VTdsNjQzSDZvSXA2ZDhsamFkaG5pWWVFTmUwWDdmRmltTkFoY2VVR01COD0tLWVrSXY0YTJwWXNiZ2tlbmxBNTBpUmc9PQ==--e3dabee1a4e801501ff510bef8292859e10cb008)](https://automate.browserstack.com/public-build/VTdsNjQzSDZvSXA2ZDhsamFkaG5pWWVFTmUwWDdmRmltTkFoY2VVR01COD0tLWVrSXY0YTJwWXNiZ2tlbmxBNTBpUmc9PQ==--e3dabee1a4e801501ff510bef8292859e10cb008)
75

86
There are some minor breaking changes in v2, so if you need an older version, please check the [v1.x](https://github.com/jakerella/jquery-mockjax/tree/v1.x) branch or the list of [releases](https://github.com/jakerella/jquery-mockjax/tags) in Github.
97

@@ -39,7 +37,7 @@ You may report any issues you may find [in the github issue tracking](https://gi
3937
* [Miscellaneous Information](#miscellaneous-information)
4038
* [jQuery Version Support](#jquery-version-support)
4139
* [Browsers Tested](#browsers-tested)
42-
* [Using Mockjax in Other Ways (Node, require, browserify, etc)](#using-mockjax-in-other-ways)
40+
* [Using Mockjax in Other Ways (Node, browserify, etc)](#using-mockjax-in-other-ways)
4341
* [Logging](#logging)
4442
* [Release History](#release-history)
4543
* [License](#license)
@@ -805,10 +803,10 @@ $.mockjax.clear(/foo/);
805803
### jQuery Version Support ###
806804

807805
We strive to ensure that Mockjax is tested on the furthest patch version of all
808-
minor (and major) versions of jQuery beginning with 1.5.2 going all the way
809-
through 3.x. In other words, we don't test 1.6.1, but rather 1.6.4 (the furthest
810-
patch version on the 1.6.x line). The QUnit tests in the `/test` directory include
811-
links to each version of jQuery tested in the header.
806+
minor versions of jQuery (1.x.y through 3.x.y). In other words, we don't test
807+
1.12.1, but rather 1.12.4 (the furthest patch version on the 1.x line). The QUnit
808+
tests in the `/test` directory include links to each version of jQuery tested in
809+
the header.
812810

813811
### Browsers Tested ###
814812

@@ -821,15 +819,14 @@ the specific versions of Internet Explorer specified.
821819
* Firefox
822820
* Chrome
823821
* Safari
824-
* Internet Explorer 11 (although it may work on IE 9 & 10)
825822

826823
Each PR will run these tests using TravisCI for continuous integration before
827824
code is merged into master to ensure we do not introduce regressions.
828825

829826

830827
### Using Mockjax in Other Ways ###
831828

832-
You can use Mockjax as a Node module, with require.js, or with Browserify... and
829+
You can use Mockjax as a Node module or with Browserify... and
833830
presumably in other ways as well. We have tests for each of the methods above.
834831

835832
When using Mockjax as a Node module (including with Browserify), **you must
@@ -925,13 +922,11 @@ should *not* be considered a stable release!
925922

926923
### License ###
927924

928-
Copyright (c) 2014 Jordan Kasper, formerly appendTo
925+
Copyright (c) 2014-2024 Jordan Kasper, formerly appendTo
929926

930927
NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
931928

932-
Dual licensed under the MIT or GPL licenses:
933-
[http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)
934-
[http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
929+
Licensed under the MIT license: [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)
935930

936931
### Troubleshooting ###
937932

bower.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22
"name": "jquery-mockjax",
33
"main": "dist/jquery.mockjax.js",
44
"dependencies": {
5-
"jquery": ">=1.5.0"
5+
"jquery": ">=1.12.4"
66
},
77
"ignore": [
88
".editorconfig",
9+
".github",
910
".gitignore",
1011
".jshintrc",
11-
"*.md",
12-
"*.json",
12+
".jshintrc",
13+
"browserstack-config.js",
14+
"browserstack.js",
15+
"grunt-config-options.js",
16+
"Gruntfile.js",
1317
"lib",
14-
"test"
18+
"package.json",
19+
"qunit-puppeteer.js",
20+
"test",
21+
"*.json",
22+
"*.md"
1523
]
1624
}

browserstack-config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
var config = require('./grunt-config-options');
33
config.onlyPaths = true;
4-
var urls = require('./test/build-version-urls')(config, 'latestInBranch', 'all', 'logging');
4+
var urls = require('./test/build-version-urls')(config, 'all', 'all', 'logging');
55

66
module.exports = {
77
"username": "jordankasper2",
@@ -13,7 +13,6 @@ module.exports = {
1313
"chrome_latest",
1414
"firefox_latest",
1515
"safari_latest",
16-
"edge_latest",
17-
"ie_11"
16+
"edge_latest"
1817
]
1918
};

dist/jquery.mockjax.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
*
44
* Version: 2.6.0
55
* Home: https://github.com/jakerella/jquery-mockjax
6-
* Copyright (c) 2020 Jordan Kasper, formerly appendTo;
6+
* Copyright (c) 2024 Jordan Kasper, formerly appendTo;
77
* NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
88
*
9-
* Dual licensed under the MIT or GPL licenses.
10-
* http://opensource.org/licenses/MIT OR http://www.gnu.org/licenses/gpl-2.0.html
9+
* Licensed under the MIT license: http://opensource.org/licenses/MIT
1110
*/
1211
(function(root, factory) {
1312
'use strict';

0 commit comments

Comments
 (0)