Skip to content

Commit d80f8f0

Browse files
committed
Build: Modernize the build infrastructure
Replace Grunt with custom Node.js build scripts. Switch from JSHint to ESLint with a flat config. Replace TestSwarm with jQuery Test Runner (jtr) and update QUnit to 2.x. Add GitHub Actions CI and release-it for publishing to npm. Update tests to QUnit 2.x API: use `QUnit.test`/`QUnit.module`, `assert.*`, `assert.async()`. Use `.on()`/`.off()` instead of `.bind()`/`.unbind()`, and `jQuery` instead of `$`. Add `.editorconfig`, `.mailmap`, and npm "files" field to enable proper installation from npm. Bump version to `2.0.0-pre`. Ref gh-48
1 parent a68ce63 commit d80f8f0

65 files changed

Lines changed: 9151 additions & 153850 deletions

Some content is hidden

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

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = tab
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.{json,yml}]
14+
indent_style = space
15+
indent_size = 2

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
* text=auto
33

44
# JS files must always use LF for tools to work
5+
# JS files may have mjs or cjs extensions now as well
56
*.js eol=lf
7+
*.cjs eol=lf
8+
*.mjs eol=lf

.github/workflows/node.js.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Node
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches-ignore: "dependabot/**"
7+
# Once a week every Tuesday
8+
schedule:
9+
- cron: "42 1 * * 2"
10+
11+
permissions:
12+
contents: read
13+
14+
env:
15+
NODE_VERSION: 24.x
16+
17+
jobs:
18+
build-and-test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
24+
- name: Use Node.js ${{ env.NODE_VERSION }}
25+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
26+
with:
27+
node-version: ${{ env.NODE_VERSION }}
28+
cache: npm
29+
cache-dependency-path: '**/package-lock.json'
30+
31+
- name: Install npm dependencies
32+
run: npm ci
33+
34+
- name: Test
35+
run: npm run test:browser
36+
37+
edge:
38+
runs-on: windows-latest
39+
name: edge
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
44+
- name: Use Node.js ${{ env.NODE_VERSION }}
45+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
46+
with:
47+
node-version: ${{ env.NODE_VERSION }}
48+
cache: npm
49+
cache-dependency-path: '**/package-lock.json'
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Test
55+
run: npm run test:edge
56+
57+
safari:
58+
runs-on: macos-latest
59+
name: safari
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
63+
64+
- name: Use Node.js ${{ env.NODE_VERSION }}
65+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
66+
with:
67+
node-version: ${{ env.NODE_VERSION }}
68+
cache: npm
69+
cache-dependency-path: '**/package-lock.json'
70+
71+
- name: Install dependencies
72+
run: npm ci
73+
74+
- name: Test
75+
run: npm run test:safari

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
.sizecache.json
2-
/bower_components
1+
.eslintcache
32
/dist
3+
/external
44
/node_modules
5-
/package-lock.json
5+
/*.log
6+
/*.err

.jshintrc

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

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>

.release-it.cjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"use strict";
2+
3+
module.exports = {
4+
preReleaseBase: 1,
5+
hooks: {
6+
"before:init": "./build/release/pre-release.sh",
7+
"after:version:bump":
8+
"sed -i '' -e 's|main/AUTHORS.txt|${version}/AUTHORS.txt|' package.json",
9+
"after:bump": "cross-env VERSION=${version} npm run build",
10+
"before:git:release": "git add -f dist/",
11+
"after:release": "echo 'Run the following to complete the release:' && " +
12+
"echo './build/release/post-release.sh ${version}'"
13+
},
14+
git: {
15+
commitMessage: "Release: ${version}",
16+
getLatestTagFromAllRefs: true,
17+
pushRepo: "git@github.com:jquery/jquery-simulate.git",
18+
requireBranch: "main",
19+
requireCleanWorkingDir: true,
20+
commit: true,
21+
commitArgs: [ "-S" ],
22+
tag: true,
23+
tagName: "${version}",
24+
tagAnnotation: "Release: ${version}",
25+
tagArgs: [ "-s" ]
26+
},
27+
github: {
28+
pushRepo: "git@github.com:jquery/jquery-simulate.git",
29+
release: true,
30+
tokenRef: "JQUERY_GITHUB_TOKEN"
31+
},
32+
npm: {
33+
publish: true
34+
}
35+
};

AUTHORS.TXT renamed to AUTHORS.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Authors ordered by first contribution
1+
Authors ordered by first contribution.
22

33
Richard D. Worth <rdworth@gmail.com>
44
Eduardo Lundgren <eduardolundgren@gmail.com>
@@ -11,4 +11,4 @@ Anne-Gaelle Colom <coloma@westminster.ac.uk>
1111
Jörn Zaefferer <joern.zaefferer@gmail.com>
1212
Kai Cataldo <kaicataldo@gmail.com>
1313
Alexander Schmitz <arschmitz@gmail.com>
14-
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
14+
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Welcome! Thanks for your interest in contributing to the jQuery Simulate plugin.
22

33
You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla).
44

5-
You can find us on [IRC](http://irc.jquery.org), specifically in #jquery-dev should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/).
5+
You can find us in the [#jquery/dev](https://matrix.to/#/#jquery_dev:gitter.im) Matrix channel on gitter.im. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/).

Gruntfile.js

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

0 commit comments

Comments
 (0)