From 25d0afa51e08c00556c9e6906851d771a851ae23 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Fri, 8 Jan 2016 12:38:18 -0500 Subject: [PATCH] Release: compat -> 1.x. Remove compat-specific release semantics --- CONTRIBUTING.md | 2 +- Gruntfile.js | 2 +- README.md | 6 +++--- build/release.js | 14 +------------- build/release/cdn.js | 40 ++++++++++++++-------------------------- build/release/dist.js | 7 ++----- build/tasks/build.js | 2 +- package.json | 6 +++--- src/core.js | 2 +- src/intro.js | 2 +- 10 files changed, 28 insertions(+), 55 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f6547c56..e4373785f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/Gruntfile.js b/Gruntfile.js index c5c111161..41d7b616d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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, diff --git a/README.md b/README.md index 79dfb4942..388574b74 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/build/release.js b/build/release.js index 9e31e80d6..7fd00bd8c 100644 --- a/build/release.js +++ b/build/release.js @@ -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 diff --git a/build/release/cdn.js b/build/release/cdn.js index 67bcd73fc..07285a56d 100644 --- a/build/release/cdn.js +++ b/build/release/cdn.js @@ -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 ) } ); } ); diff --git a/build/release/dist.js b/build/release/dist.js index 0faa8aab0..32053eafb 100644 --- a/build/release/dist.js +++ b/build/release/dist.js @@ -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( diff --git a/build/tasks/build.js b/build/tasks/build.js index 4f719c703..664ccafe9 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -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 ) { diff --git a/package.json b/package.json index 8db74a3e6..18bef3ca8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/core.js b/src/core.js index c000e5339..cdbc1971c 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ) { diff --git a/src/intro.js b/src/intro.js index ef9a03ea9..aab47c2d9 100644 --- a/src/intro.js +++ b/src/intro.js @@ -1,5 +1,5 @@ /*! - * jQuery Compat JavaScript Library v@VERSION + * jQuery JavaScript Library v@VERSION * http://jquery.com/ * * Includes Sizzle.js -- 2.39.5