Release: compat -> 1.x. Remove compat-specific release semantics

This commit is contained in:
Timmy Willison 2016-01-08 12:38:18 -05:00
parent 704de8180f
commit 25d0afa51e
10 changed files with 28 additions and 55 deletions

View File

@ -129,4 +129,4 @@ This will only run the "css" module tests. This will significantly speed up your
Remember that jQuery supports multiple browsers and their versions; any contributed code must work in all of them. You can refer to the [browser support page](http://jquery.com/browser-support/) for the current list of supported browsers. Remember that jQuery supports multiple browsers and their versions; any contributed code must work in all of them. You can refer to the [browser support page](http://jquery.com/browser-support/) for the current list of supported browsers.
Note that browser support differs depending on whether you are targeting the `master` or `compat` branch. Note that browser support differs depending on whether you are targeting the `master` or `1.x` branch.

View File

@ -174,7 +174,7 @@ module.exports = function( grunt ) {
beautify: { beautify: {
"ascii_only": true "ascii_only": true
}, },
banner: "/*! jQuery Compat v<%= pkg.version %> | " + banner: "/*! jQuery v<%= pkg.version %> | " +
"(c) jQuery Foundation | jquery.org/license */", "(c) jQuery Foundation | jquery.org/license */",
compress: { compress: {
"hoist_funs": false, "hoist_funs": false,

View File

@ -14,8 +14,8 @@ In the spirit of open source software development, jQuery always encourages comm
Environments in which to use jQuery Environments in which to use jQuery
-------------------------------------- --------------------------------------
- [Browser support](http://jquery.com/browser-support/) differs between the master branch and the compat branch. Specifically, the master branch does not support legacy browsers such as IE6-8. The jQuery team continues to provide support for legacy browsers on the compat branch. Use the latest compat release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info. - [Browser support](http://jquery.com/browser-support/) differs between the master branch and the 1.x branch. Specifically, the master branch does not support legacy browsers such as IE6-8. The jQuery team continues to provide support for legacy browsers on the 1.x branch. Use the latest 1.x release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info.
- To use jQuery in Node, browser extensions, and other non-browser environments, use only master branch releases given the name "jquery" rather than "jquery-compat". The compat branch does not support these environments. - To use jQuery in Node, browser extensions, and other non-browser environments, use only master branch releases (2.x). The 1.x branch does not support these environments.
What you need to build your own jQuery What you need to build your own jQuery
@ -94,7 +94,7 @@ Some example modules that can be excluded are:
- **exports/global**: Exclude the attachment of global jQuery variables ($ and jQuery) to the window. - **exports/global**: Exclude the attachment of global jQuery variables ($ and jQuery) to the window.
- **exports/amd**: Exclude the AMD definition. - **exports/amd**: Exclude the AMD definition.
Removing Sizzle is not supported on the `compat` branch. Removing Sizzle is not supported on the `1.x` branch.
The build process shows a message for each dependent module it excludes or includes. The build process shows a message for each dependent module it excludes or includes.

View File

@ -7,8 +7,7 @@ module.exports = function( Release ) {
dist = require( "./release/dist" ), dist = require( "./release/dist" ),
ensureSizzle = require( "./release/ensure-sizzle" ), ensureSizzle = require( "./release/ensure-sizzle" ),
npmTags = Release.npmTags, npmTags = Release.npmTags;
createTag = Release._createTag;
Release.define( { Release.define( {
npmPublish: true, npmPublish: true,
@ -20,17 +19,6 @@ module.exports = function( Release ) {
checkRepoState: function( callback ) { checkRepoState: function( callback ) {
ensureSizzle( Release, callback ); ensureSizzle( Release, callback );
}, },
/**
* The tag for compat is different
* This sets a different new version for the source repo,
* but after building with the correct tag
* e.g. 3.0.0+compat
*/
_createTag: function( paths ) {
Release.distVersion = Release.newVersion;
Release.newVersion = Release.newVersion + "+compat";
return createTag( paths );
},
/** /**
* Generates any release artifacts that should be included in the release. * Generates any release artifacts that should be included in the release.
* The callback must be invoked with an array of files that should be * The callback must be invoked with an array of files that should be

View File

@ -10,33 +10,29 @@ var
mapFile = "dist/jquery.min.map", mapFile = "dist/jquery.min.map",
releaseFiles = { releaseFiles = {
"jquery-compat-VER.js": devFile, "jquery-VER.js": devFile,
"jquery-compat-VER.min.js": minFile, "jquery-VER.min.js": minFile,
"jquery-compat-VER.min.map": mapFile "jquery-VER.min.map": mapFile
}, },
googleFilesCDN = [ googleFilesCDN = [
"jquery-compat.js", "jquery-compat.min.js", "jquery-compat.min.map" "jquery.js", "jquery.min.js", "jquery.min.map"
], ],
msFilesCDN = [ msFilesCDN = [
"jquery-compat-VER.js", "jquery-compat-VER.min.js", "jquery-compat-VER.min.map" "jquery-VER.js", "jquery-VER.min.js", "jquery-VER.min.map"
], ];
rver = /VER/,
rcompat = /\-compat\./g;
/** /**
* Generates copies for the CDNs * Generates copies for the CDNs
*/ */
function makeReleaseCopies( Release ) { function makeReleaseCopies( Release ) {
var version = Release.newVersion.replace( "-compat", "" );
shell.mkdir( "-p", cdnFolder ); shell.mkdir( "-p", cdnFolder );
Object.keys( releaseFiles ).forEach( function( key ) { Object.keys( releaseFiles ).forEach( function( key ) {
var text, var text,
builtFile = releaseFiles[ key ], builtFile = releaseFiles[ key ],
unpathedFile = key.replace( /VER/g, version ), unpathedFile = key.replace( /VER/g, Release.newVersion ),
releaseFile = cdnFolder + "/" + unpathedFile; releaseFile = cdnFolder + "/" + unpathedFile;
if ( /\.map$/.test( releaseFile ) ) { if ( /\.map$/.test( releaseFile ) ) {
@ -59,8 +55,6 @@ function makeArchives( Release, callback ) {
Release.chdir( Release.dir.repo ); Release.chdir( Release.dir.repo );
var version = Release.newVersion.replace( "-compat", "" );
function makeArchive( cdn, files, callback ) { function makeArchive( cdn, files, callback ) {
if ( Release.preRelease ) { if ( Release.preRelease ) {
console.log( "Skipping archive creation for " + cdn + "; this is a beta release." ); console.log( "Skipping archive creation for " + cdn + "; this is a beta release." );
@ -74,8 +68,9 @@ function makeArchives( Release, callback ) {
archiver = require( "archiver" )( "zip" ), archiver = require( "archiver" )( "zip" ),
md5file = cdnFolder + "/" + cdn + "-md5.txt", md5file = cdnFolder + "/" + cdn + "-md5.txt",
output = fs.createWriteStream( output = fs.createWriteStream(
cdnFolder + "/" + cdn + "-jquery-compat-" + version + ".zip" cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip"
); ),
rver = /VER/;
output.on( "close", callback ); output.on( "close", callback );
@ -87,22 +82,15 @@ function makeArchives( Release, callback ) {
files = files.map( function( item ) { files = files.map( function( item ) {
return "dist" + ( rver.test( item ) ? "/cdn" : "" ) + "/" + return "dist" + ( rver.test( item ) ? "/cdn" : "" ) + "/" +
item.replace( rver, version ); item.replace( rver, Release.newVersion );
} ); } );
sum = Release.exec( sum = Release.exec( "md5sum " + files.join( " " ), "Error retrieving md5sum" );
fs.writeFileSync( md5file, sum );
// Read jQuery files
"md5sum " + files.join( " " ).replace( rcompat, "." ),
"Error retrieving md5sum"
);
fs.writeFileSync( "./" + md5file, sum );
files.push( md5file ); files.push( md5file );
files.forEach( function( file ) { files.forEach( function( file ) {
archiver.append( fs.createReadStream( file ),
// For Google, read jquery.js, write jquery-compat.js
archiver.append( fs.createReadStream( file.replace( rcompat, "." ) ),
{ name: path.basename( file ) } ); { name: path.basename( file ) } );
} ); } );

View File

@ -4,7 +4,7 @@ module.exports = function( Release, complete ) {
fs = require( "fs" ), fs = require( "fs" ),
shell = require( "shelljs" ), shell = require( "shelljs" ),
pkg = require( Release.dir.repo + "/package.json" ), pkg = require( Release.dir.repo + "/package.json" ),
distRemote = Release.remote.replace( "jquery.git", "jquery-compat-dist.git" ), distRemote = Release.remote.replace( "jquery.git", "jquery-dist.git" ),
// These files are included with the distribution // These files are included with the distribution
files = [ files = [
@ -32,7 +32,7 @@ module.exports = function( Release, complete ) {
} }
/** /**
* Generate bower file for jquery-compat-dist * Generate bower file for jquery-dist
*/ */
function generateBower() { function generateBower() {
return JSON.stringify( { return JSON.stringify( {
@ -70,9 +70,6 @@ module.exports = function( Release, complete ) {
// Write generated bower file // Write generated bower file
fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() ); fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() );
// Restore newVersion
Release.newVersion = Release.distVersion;
console.log( "Adding files to dist..." ); console.log( "Adding files to dist..." );
Release.exec( "git add .", "Error adding files." ); Release.exec( "git add .", "Error adding files." );
Release.exec( Release.exec(

View File

@ -173,7 +173,7 @@ module.exports = function( grunt ) {
// Can't exclude sizzle on this branch // Can't exclude sizzle on this branch
if ( module === "sizzle" ) { if ( module === "sizzle" ) {
grunt.log.error( "Sizzle cannot be excluded on the compat branch." ); grunt.log.error( "Sizzle cannot be excluded on the 1.x branch." );
// Can't exclude certain modules // Can't exclude certain modules
} else if ( minimum.indexOf( module ) === -1 ) { } else if ( minimum.indexOf( module ) === -1 ) {

View File

@ -1,13 +1,13 @@
{ {
"name": "jquery-compat", "name": "jquery",
"title": "jQuery", "title": "jQuery",
"description": "JavaScript library for DOM operations", "description": "JavaScript library for DOM operations",
"version": "3.0.0-pre", "version": "1.12.0-pre",
"main": "dist/jquery.js", "main": "dist/jquery.js",
"homepage": "http://jquery.com", "homepage": "http://jquery.com",
"author": { "author": {
"name": "jQuery Foundation and other contributors", "name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/jquery/blob/compat/AUTHORS.txt" "url": "https://github.com/jquery/jquery/blob/1.12-stable/AUTHORS.txt"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -13,7 +13,7 @@ define( [
class2type, toString, hasOwn, support ) { class2type, toString, hasOwn, support ) {
var var
version = "@VERSION+compat", version = "@VERSION",
// Define a local copy of jQuery // Define a local copy of jQuery
jQuery = function( selector, context ) { jQuery = function( selector, context ) {

View File

@ -1,5 +1,5 @@
/*! /*!
* jQuery Compat JavaScript Library v@VERSION * jQuery JavaScript Library v@VERSION
* http://jquery.com/ * http://jquery.com/
* *
* Includes Sizzle.js * Includes Sizzle.js