Skip to content

Commit

Permalink
Merge pull request #361 from jakerella/test-and-doc-updates
Browse files Browse the repository at this point in the history
Update dependencies; change license to MIT, remove support for lower versions of jQuery, add GH templates
  • Loading branch information
jakerella committed Feb 17, 2024
2 parents 2a143bc + f010143 commit 4ca7ace
Show file tree
Hide file tree
Showing 55 changed files with 1,360 additions and 156,499 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Tell us about a problem you have
title: ''
labels: Bug
assignees: ''

---

## Problem Description

_Clear, concise description of the problem._

_**TODO**_

## Reproduction Steps

_Detailed steps to reproduce the problem.

_**TODO**_

* Browser / Environment:
- [ ] chrome version: xxx
- [ ] firefox version: xxx
- [ ] edge version: xxx
- [ ] safari version: xxx
- [ ] node version: xxx
- [ ] other: ...

## Expected Behavior

_What did you **expect** to happen, what does "good" look like?._

_**TODO**_

## Additional Information

_Fill in as necessary._
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature/Enhancement
assignees: ''

---

## Problem Description

[ A clear and concise description of what the problem is. For example, _I am frustrated when ..._, or _I would like to be able to ..._ ]

## Possible Workarounds

Do you have a way of working around this problem already? Please tell us!

## Possible Solutions

Do you have an idea of how this problem could be solved? Feel free to suggest it here!

## Additional Context

Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Question
about: Ask a question about the project!
title: ''
labels: question
assignees: ''

---

## Topic

Please let us know if your question relates to one of these topics!

- [ ] Something wrong with the library (should this be a Bug Report??)
- [ ] Something I want the library to do (should this be a Feature Request??)
- [ ] Help using the library (check the docs first!)
- [ ] Author, license, copyright, etc
- [ ] Contributing to the project
- [ ] Documentation
- [ ] Other

## Question

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!

22 changes: 22 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Security Policy

## Supported plugin Versions

| Version | Supported |
| ------- | ------------------ |
| 2.x | yes |
| 1.x | yes |

## Supported jQuery Versions

| Version | Supported |
| ------- | ------------------ |
| 3.x | yes |
| 2.x | yes |
| 1.x | yes |

_Note that only the latest patch of each jQuery version is supported_

## Reporting a Vulnerability

You can report a non-sensitive vulnerability or issue is the GitHub issues. Otherwise, please use the GitHub security reporting feature.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## What is the problem being solved?

_Please describe the problem being solved. You can reference an existing [Issue](https://github.com/jakerella/jquery-mockjax/issues) versus rewriting it here!_

_**TODO: describe it...**_

## How have you solved the problem?

_Please describe your approach to solving the problem. Don't repeat the changes in the file diff, just focus on the high-level approach!_

_**TODO: describe it...**_

## How can someone test that the problem was solved?

_**TODO: describe specific testing that a reviewer should perform...**_

- [ ] I have run the unit tests locally
- [ ] I have tested this change with all supported versions of jQuery
- [ ] I have tested this change on at least 2 browsers

1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"browser": true,
"jquery": true,
"node": true,
"esversion": 6,
"globals": {
"define": true,
"ActiveXObject": true
Expand Down
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2024-02-17 v2.6.1
* Changed license from dual (MIT & GPL) to only be MIT
* Updated authorship to myself (creator of all v2 changes) and moved JD Sharp to contributor
* Massive (long needed) update to dev dependencies, and thus most of the test and build infrastructure
* NO source code changes, but the minified version will change due to dependency updates
* Remove support for IE 11 and requirejs
* Remove support for older versions of jQuery (supporting latest on each major branch)

## 2020-08-22 v2.6.0
* Removed support for IE 9 & 10
* Removed unused config for code climate
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ just run `grunt build`
## Submit Your PR

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

You should also write a good PR message with information on why this feature or fix is
necessary or a good idea. For features, be sure to include information on _how to use_
Expand Down
16 changes: 7 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@

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

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

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

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

grunt.initConfig(config);

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

grunt.registerTask('dev', ['jshint', 'test:all', 'test:requirejs', 'browserify', 'test:browserify', 'mochaTest']);
grunt.registerTask('dev', ['jshint', 'test:all', 'browserify', 'test:browserify', 'mochaTest']);
grunt.registerTask('build', ['dev', 'concat', 'uglify', 'test:dist']);
grunt.registerTask('default', ['dev']);

/* jshint ignore:start */
grunt.registerTask('test', 'Executes QUnit tests with all supported jQuery versions', async function() {
/* jshint ignore:end */
var done = this.async();
var i;

var versionUrls = require('./test/build-version-urls')(grunt.config, arguments[0], arguments[1], arguments[2]);
const done = this.async();
const versionUrls = require('./test/build-version-urls')(grunt.config, arguments[0], arguments[1], arguments[2]);

console.log(versionUrls);
for (i=0; i<versionUrls.length; ++i) {
for (let i=0; i<versionUrls.length; ++i) {
try {
console.log('LOADING', versionUrls[i]);
/* jshint ignore:start */
Expand Down
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Copyright (c) 2014-2018 Jordan Kasper, formerly appendTo
Copyright (c) 2014-2024 Jordan Kasper, formerly appendTo

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

Dual licensed under the MIT or GPLv2 licenses (your choice):
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:

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

* [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
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.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# jQuery Mockjax: Ajax request mocking #
[http://github.com/jakerella/jquery-mockjax/](http://github.com/jakerella/jquery-mockjax/)

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

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.

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

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

### Browsers Tested ###

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

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


### Using Mockjax in Other Ways ###

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

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

### License ###

Copyright (c) 2014 Jordan Kasper, formerly appendTo
Copyright (c) 2014-2024 Jordan Kasper, formerly appendTo

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

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

### Troubleshooting ###

Expand Down
16 changes: 12 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
"name": "jquery-mockjax",
"main": "dist/jquery.mockjax.js",
"dependencies": {
"jquery": ">=1.5.0"
"jquery": ">=1.12.4"
},
"ignore": [
".editorconfig",
".github",
".gitignore",
".jshintrc",
"*.md",
"*.json",
".jshintrc",
"browserstack-config.js",
"browserstack.js",
"grunt-config-options.js",
"Gruntfile.js",
"lib",
"test"
"package.json",
"qunit-puppeteer.js",
"test",
"*.json",
"*.md"
]
}
5 changes: 2 additions & 3 deletions browserstack-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

module.exports = {
"username": "jordankasper2",
Expand All @@ -13,7 +13,6 @@ module.exports = {
"chrome_latest",
"firefox_latest",
"safari_latest",
"edge_latest",
"ie_11"
"edge_latest"
]
};
5 changes: 2 additions & 3 deletions dist/jquery.mockjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
*
* Version: 2.6.0
* Home: https://github.com/jakerella/jquery-mockjax
* Copyright (c) 2020 Jordan Kasper, formerly appendTo;
* Copyright (c) 2024 Jordan Kasper, formerly appendTo;
* NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
*
* Dual licensed under the MIT or GPL licenses.
* http://opensource.org/licenses/MIT OR http://www.gnu.org/licenses/gpl-2.0.html
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*/
(function(root, factory) {
'use strict';
Expand Down

0 comments on commit 4ca7ace

Please sign in to comment.