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.
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: {
"ascii_only": true
},
banner: "/*! jQuery Compat v<%= pkg.version %> | " +
banner: "/*! jQuery v<%= pkg.version %> | " +
"(c) jQuery Foundation | jquery.org/license */",
compress: {
"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
--------------------------------------
- [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.
- 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.
- [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 (2.x). The 1.x branch does not support these environments.
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/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.

View File

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

View File

@ -4,7 +4,7 @@ module.exports = function( Release, complete ) {
fs = require( "fs" ),
shell = require( "shelljs" ),
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
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() {
return JSON.stringify( {
@ -70,9 +70,6 @@ module.exports = function( Release, complete ) {
// Write generated bower file
fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() );
// Restore newVersion
Release.newVersion = Release.distVersion;
console.log( "Adding files to dist..." );
Release.exec( "git add .", "Error adding files." );
Release.exec(

View File

@ -173,7 +173,7 @@ module.exports = function( grunt ) {
// Can't exclude sizzle on this branch
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
} else if ( minimum.indexOf( module ) === -1 ) {

View File

@ -1,13 +1,13 @@
{
"name": "jquery-compat",
"name": "jquery",
"title": "jQuery",
"description": "JavaScript library for DOM operations",
"version": "3.0.0-pre",
"version": "1.12.0-pre",
"main": "dist/jquery.js",
"homepage": "http://jquery.com",
"author": {
"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": {
"type": "git",

View File

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

View File

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