Skip to content

Commit

Permalink
Docs: Replace #NUMBER Trac issue references with trac-NUMBER
Browse files Browse the repository at this point in the history
This is a version of gh-4993 for the `3.x-stable` branch.

The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing
when in jQuery source it's usually referring to the old deprecated Trac instance
at https://bugs.jquery.com. This change replaces all such Trac references with
`trac-NUMBER`.

A few of the references came with the Sizzle integration and referred to the
Sizzle GitHub bug tracker. Those have been replaced with full links instead.

A new entry describing issue reference conventions has been added to README.

Closes gh-4994
Ref gh-4993
Ref 5d5ea01
  • Loading branch information
mgol committed Jan 12, 2022
1 parent fa70e8f commit 95e34b6
Show file tree
Hide file tree
Showing 56 changed files with 404 additions and 398 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ In the spirit of open source software development, jQuery always encourages comm
2. [Core Style Guide](https://contribute.jquery.org/style-guide/js/)
3. [Writing Code for jQuery Foundation Projects](https://contribute.jquery.org/code/)

### References to issues/PRs

GitHub issues/PRs are usually referenced via `gh-NUMBER`, where `NUMBER` is the numerical ID of the issue/PR. You can find such an issue/PR under `https://github.com/jquery/jquery/issues/NUMBER`.

jQuery has used a different bug tracker - based on Trac - in the past, available under [bugs.jquery.com](https://bugs.jquery.com/). It is being kept in read only mode so that referring to past discussions is possible. When jQuery source references one of those issues, it uses the pattern `trac-NUMBER`, where `NUMBER` is the numerical ID of the issue. You can find such an issue under `https://bugs.jquery.com/ticket/NUMBER`.


Environments in which to use jQuery
--------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var
rantiCache = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

// #7653, #8125, #8152: local protocol detection
// trac-7653, trac-8125, trac-8152: local protocol detection
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
Expand All @@ -45,7 +45,7 @@ var
*/
transports = {},

// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
allTypes = "*/".concat( "*" ),

// Anchor tag for parsing the document origin
Expand Down Expand Up @@ -116,7 +116,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
// Fixes trac-9887
function ajaxExtend( target, src ) {
var key, deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};
Expand Down Expand Up @@ -527,12 +527,12 @@ jQuery.extend( {
deferred.promise( jqXHR );

// Add protocol if not provided (prefilters might expect it)
// Handle falsy url in the settings object (#10093: consistency with old signature)
// Handle falsy url in the settings object (trac-10093: consistency with old signature)
// We also use the url parameter if available
s.url = ( ( url || s.url || location.href ) + "" )
.replace( rprotocol, location.protocol + "//" );

// Alias method option to type as per ticket #12004
// Alias method option to type as per ticket trac-12004
s.type = options.method || options.type || s.method || s.type;

// Extract dataTypes list
Expand Down Expand Up @@ -575,7 +575,7 @@ jQuery.extend( {
}

// We can fire global events as of now if asked to
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
fireGlobals = jQuery.event && s.global;

// Watch for a new set of requests
Expand Down Expand Up @@ -604,7 +604,7 @@ jQuery.extend( {
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

// #9682: remove data so that it's not used in an eventual retry
// trac-9682: remove data so that it's not used in an eventual retry
delete s.data;
}

Expand Down
6 changes: 3 additions & 3 deletions src/ajax/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var xhrSuccessStatus = {
0: 200,

// Support: IE <=9 only
// #1450: sometimes IE returns 1223 when it should be 204
// trac-1450: sometimes IE returns 1223 when it should be 204
1223: 204
},
xhrSupported = jQuery.ajaxSettings.xhr();
Expand Down Expand Up @@ -90,7 +90,7 @@ jQuery.ajaxTransport( function( options ) {
} else {
complete(

// File: protocol always yields status 0; see #8605, #14207
// File: protocol always yields status 0; see trac-8605, trac-14207
xhr.status,
xhr.statusText
);
Expand Down Expand Up @@ -151,7 +151,7 @@ jQuery.ajaxTransport( function( options ) {
xhr.send( options.hasContent && options.data || null );
} catch ( e ) {

// #14683: Only rethrow if this hasn't been notified as an error yet
// trac-14683: Only rethrow if this hasn't been notified as an error yet
if ( callback ) {
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion src/attributes/prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jQuery.extend( {
// Support: IE <=9 - 11 only
// elem.tabIndex doesn't always return the
// correct value when it hasn't been explicitly set
// Use proper attribute retrieval(#12072)
// Use proper attribute retrieval (trac-12072)
var tabindex = jQuery.find.attr( elem, "tabindex" );

if ( tabindex ) {
Expand Down
4 changes: 2 additions & 2 deletions src/attributes/val.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jQuery.extend( {
val :

// Support: IE <=10 - 11 only
// option.text throws exceptions (#14686, #14858)
// option.text throws exceptions (trac-14686, trac-14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
stripAndCollapse( jQuery.text( elem ) );
Expand All @@ -118,7 +118,7 @@ jQuery.extend( {
option = options[ i ];

// Support: IE <=9 only
// IE8-9 doesn't update selected after form reset (#2551)
// IE8-9 doesn't update selected after form reset (trac-2551)
if ( ( option.selected || i === index ) &&

// Don't return options that are disabled or in a disabled optgroup
Expand Down
2 changes: 1 addition & 1 deletion src/core/camelCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function fcamelCase( _all, letter ) {

// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (#9572)
// Microsoft forgot to hump their vendor prefix (trac-9572)
function camelCase( string ) {
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ define( [
var rootjQuery,

// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
// Strict HTML recognition (trac-11290: must start with <)
// Shortcut simple #id case for speed
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

Expand Down
2 changes: 1 addition & 1 deletion src/core/ready-no-deferred.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jQuery.extend( {
isReady: false,

// A counter to track how many items to wait for before
// the ready event fires. See #6781
// the ready event fires. See trac-6781
readyWait: 1,

ready: function( wait ) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jQuery.extend( {
isReady: false,

// A counter to track how many items to wait for before
// the ready event fires. See #6781
// the ready event fires. See trac-6781
readyWait: 1,

// Handle when the DOM is ready
Expand Down
6 changes: 3 additions & 3 deletions src/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ jQuery.extend( {
if ( value !== undefined ) {
type = typeof value;

// Convert "+=" or "-=" to relative numbers (#7345)
// Convert "+=" or "-=" to relative numbers (trac-7345)
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
value = adjustCSS( elem, name, ret );

// Fixes bug #9237
// Fixes bug trac-9237
type = "number";
}

// Make sure that null and NaN values aren't set (#7116)
// Make sure that null and NaN values aren't set (trac-7116)
if ( value == null || value !== value ) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/css/curCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function curCSS( elem, name, computed ) {
computed = computed || getStyles( elem );

// getPropertyValue is needed for:
// .css('filter') (IE 9 only, #12537)
// .css('--customProperty) (#3144)
// .css('filter') (IE 9 only, trac-12537)
// .css('--customProperty) (gh-3144)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];

Expand Down
2 changes: 1 addition & 1 deletion src/css/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ define( [
}

// Support: IE <=9 - 11 only
// Style of cloned element affects source element cloned (#8908)
// Style of cloned element affects source element cloned (trac-8908)
div.style.backgroundClip = "content-box";
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
Expand Down
2 changes: 1 addition & 1 deletion src/css/var/getStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define( function() {

return function( elem ) {

// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
Expand Down
2 changes: 1 addition & 1 deletion src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jQuery.fn.extend( {
while ( i-- ) {

// Support: IE 11 only
// The attrs elements can be null (#14894)
// The attrs elements can be null (trac-14894)
if ( attrs[ i ] ) {
name = attrs[ i ].name;
if ( name.indexOf( "data-" ) === 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/data/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Data.prototype = {
value = {};

// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.
// but we should not, see trac-8335.
// Always return an empty object.
if ( acceptData( owner ) ) {

Expand Down
2 changes: 1 addition & 1 deletion src/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function Animation( elem, properties, options ) {
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

// Support: Android 2.3 only
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
temp = remaining / animation.duration || 0,
percent = 1 - temp,
index = 0,
Expand Down
8 changes: 4 additions & 4 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,15 @@ jQuery.event = {

for ( ; cur !== this; cur = cur.parentNode || this ) {

// Don't check non-elements (#13208)
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
// Don't check non-elements (trac-13208)
// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
matchedHandlers = [];
matchedSelectors = {};
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];

// Don't conflict with Object.prototype properties (#13203)
// Don't conflict with Object.prototype properties (trac-13203)
sel = handleObj.selector + " ";

if ( matchedSelectors[ sel ] === undefined ) {
Expand Down Expand Up @@ -655,7 +655,7 @@ jQuery.Event = function( src, props ) {

// Create target properties
// Support: Safari <=6 - 7 only
// Target should not be a text node (#504, #13143)
// Target should not be a text node (trac-504, trac-13143)
this.target = ( src.target && src.target.nodeType === 3 ) ?
src.target.parentNode :
src.target;
Expand Down
6 changes: 3 additions & 3 deletions src/event/trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jQuery.extend( jQuery.event, {
return;
}

// Determine event propagation path in advance, per W3C events spec (#9951)
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
// Determine event propagation path in advance, per W3C events spec (trac-9951)
// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

bubbleType = special.delegateType || type;
Expand Down Expand Up @@ -128,7 +128,7 @@ jQuery.extend( jQuery.event, {
acceptData( elem ) ) {

// Call a native DOM method on the target with the same name as the event.
// Don't do default actions on window, that's where global variables be (#6170)
// Don't do default actions on window, that's where global variables be (trac-6170)
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {

// Don't re-trigger an onFOO event when we call its FOO() method
Expand Down
4 changes: 2 additions & 2 deletions src/exports/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jQuery.noConflict = function( deep ) {
};

// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (trac-13566)
if ( typeof noGlobal === "undefined" ) {
window.jQuery = window.$ = jQuery;
}
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function domManip( collection, args, callback, ignored ) {

// Use the original fragment for the last item
// instead of the first because it can end up
// being emptied incorrectly in certain situations (#8070).
// being emptied incorrectly in certain situations (trac-8070).
for ( ; i < l; i++ ) {
node = fragment;

Expand Down
2 changes: 1 addition & 1 deletion src/manipulation/_evalUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jQuery._evalUrl = function( url, options, doc ) {
return jQuery.ajax( {
url: url,

// Make this explicit, since user can override this through ajaxSetup (#11264)
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
type: "GET",
dataType: "script",
cache: true,
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation/buildFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
// Remember the top-level container
tmp = fragment.firstChild;

// Ensure the created nodes are orphaned (#12392)
// Ensure the created nodes are orphaned (trac-12392)
tmp.textContent = "";
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation/getAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define( [
function getAll( context, tag ) {

// Support: IE <=9 - 11 only
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
var ret;

if ( typeof context.getElementsByTagName !== "undefined" ) {
Expand Down
4 changes: 2 additions & 2 deletions src/manipulation/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ define( [
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Check state lost if the name is set (trac-11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
// `name` and `type` must use .setAttribute for WWA (trac-14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation/wrapMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define( [

"use strict";

// We have to close these tags to support XHTML (#13200)
// We have to close these tags to support XHTML (trac-13200)
var wrapMap = {

// XHTML parsers do not magically insert elements in the
Expand Down
2 changes: 1 addition & 1 deletion src/selector-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ jQuery.extend( jQuery.find, {
attr: function( elem, name ) {
var fn = jQuery.expr.attrHandle[ name.toLowerCase() ],

// Don't get fooled by Object.prototype properties (jQuery #13807)
// Don't get fooled by Object.prototype properties (jQuery trac-13807)
value = fn && hasOwn.call( jQuery.expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, jQuery.isXMLDoc( elem ) ) :
undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// (such as Node.js), expose a factory as module.exports.
// This accentuates the need for the creation of a real `window`.
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info.
// See ticket trac-14549 for more info.
module.exports = global.document ?
factory( global, true ) :
function( w ) {
Expand Down
2 changes: 1 addition & 1 deletion test/data/ajax/onunload.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>onunload ajax requests (#14379)</title>
<title>onunload ajax requests (trac-14379)</title>
<script src="../../jquery.js"></script>
<script src="../iframeTest.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion test/data/core/aliased.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>alias-masked DOM properties (#14074)</title>
<title>alias-masked DOM properties (trac-14074)</title>
<script>
var errors = [];
window.onerror = function( errorMessage, filePath, lineNumber ) {
Expand Down
Loading

0 comments on commit 95e34b6

Please sign in to comment.