$ cd jquery
```
-Add the jQuery master as a remote. I label mine "upstream"
+Add the jQuery main as a remote. I label mine "upstream"
```bash
$ git remote add upstream git://github.com/jquery/jquery.git
```
-Get in the habit of pulling in the "upstream" master to stay up to date as jQuery receives new commits
+Get in the habit of pulling in the "upstream" main to stay up to date as jQuery receives new commits
```bash
-$ git pull upstream master
+$ git pull upstream main
```
Run the build script
If you want to purge your working directory back to the status of upstream, the following commands can be used (remember everything you've worked on is gone after these):
```bash
-git reset --hard upstream/master
+git reset --hard upstream/main
git clean -fdx
```
```
-Test Suite Convenience Methods Reference (See [test/data/testinit.js](https://github.com/jquery/jquery/blob/master/test/data/testinit.js))
+Test Suite Convenience Methods Reference (See [test/data/testinit.js](https://github.com/jquery/jquery/blob/main/test/data/testinit.js))
------------------------------
### Returns an array of elements with the given IDs ###
Release.exec( `git clone ${ distRemote } ${ Release.dir.dist }`,
"Error cloning repo." );
- // Distribution always works on master
+ // Distribution always works on main
Release.chdir( Release.dir.dist );
- Release.exec( "git checkout master", "Error checking out branch." );
+ Release.exec( "git checkout main", "Error checking out branch." );
console.log();
}
Release.exec(
`git push ${
Release.isTest ? " --dry-run" : ""
- } ${ distRemote } master --tags`,
- "Error pushing master and tags to git repo."
+ } ${ distRemote } main --tags`,
+ "Error pushing main and tags to git repo."
);
// Set repo for npm publish
"homepage": "https://jquery.com",
"author": {
"name": "OpenJS Foundation and other contributors",
- "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt"
+ "url": "https://github.com/jquery/jquery/blob/main/AUTHORS.txt"
},
"repository": {
"type": "git",
var result = jQuery( document.createElement( "div" ) ).offset();
- // These tests are solely for master/compat consistency
+ // These tests are solely for main/compat consistency
// Retrieving offset on disconnected/hidden elements is not officially
// valid input, but will return zeros for back-compat
assert.equal( result.top, 0, "Retrieving offset on disconnected elements returns zeros (gh-2310)" );
node.remove();
- // These tests are solely for master/compat consistency
+ // These tests are solely for main/compat consistency
// Retrieving offset on disconnected/hidden elements is not officially
// valid input, but will return zeros for back-compat
assert.equal( result.top, 0, "Retrieving offset on hidden elements returns zeros (gh-2310)" );
assert.equal( $( "#scroll-1-1" ).offset().top, 11, "jQuery('#scroll-1-1').offset().top" );
assert.equal( $( "#scroll-1-1" ).offset().left, 11, "jQuery('#scroll-1-1').offset().left" );
- // These tests are solely for master/compat consistency
+ // These tests are solely for main/compat consistency
// Retrieving offset on disconnected/hidden elements is not officially
// valid input, but will return zeros for back-compat
assert.equal( $( "#hidden" ).offset().top, 0, "Hidden elements do not subtract scroll" );