[Pkg-javascript-commits] [jquery] 05/18: debian/build.js: port applicable upstream changes
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Apr 9 13:59:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch debian/1.x
in repository jquery.
commit 0c155263f44ba50cb4387eede5c65df8f31baa54
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Apr 8 18:47:09 2016 -0300
debian/build.js: port applicable upstream changes
---
debian/build.js | 28 ++++++++++++----------------
debian/changelog | 2 ++
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/debian/build.js b/debian/build.js
index d258033..759a5ed 100644
--- a/debian/build.js
+++ b/debian/build.js
@@ -8,14 +8,13 @@
optimize: "none",
// Include dependencies loaded with require
findNestedDependencies: true,
+ // Avoid inserting define() placeholder
+ skipModuleInsertion: true,
// Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
startFile: "src/intro.js",
- endFile: "src/outro.js"
- },
- paths: {
- sizzle: "sizzle/dist/sizzle"
+ endFile: [ "src/exports/global.js", "src/outro.js" ]
},
rawText: {},
/**
@@ -28,28 +27,25 @@
* @param {String} contents The contents to be written (including their AMD wrappers)
*/
onBuildWrite: function( name, path, contents ) {
- var rdefineEnd = /\}\);[^}\w]*$/;
+ var rdefineEnd = /\}\s*?\);[^}\w]*$/;
var amdName;
// Convert var modules
- if ( /.\/var\//.test( path ) ) {
+ if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) {
contents = contents
- .replace( /define\([\w\W]*?return/, "var " + (/var\/([\w-]+)/.exec(name)[1]) + " =" )
+ .replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" )
.replace( rdefineEnd, "" );
// Sizzle treatment
- } else if ( /^sizzle$/.test( name ) ) {
+ } else if ( /\/sizzle$/.test( name ) ) {
contents = "var Sizzle =\n" + contents
// Remove EXPOSE lines from Sizzle
.replace( /\/\/\s*EXPOSE[\w\W]*\/\/\s*EXPOSE/, "return Sizzle;" );
} else {
+ contents = contents
+ .replace( /\s*return\s+[^\}]+(\}\s*?\);[^\w\}]*)$/, "$1" )
- // Ignore jQuery's exports (the only necessary one)
- if ( name !== "jquery" ) {
- contents = contents
- .replace( /\s*return\s+[^\}]+(\}\);[^\w\}]*)$/, "$1" )
- // Multiple exports
- .replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );
- }
+ // Multiple exports
+ .replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );
// Remove define wrappers, closure ends, and empty declarations
contents = contents
@@ -65,7 +61,7 @@
// Remove empty definitions
contents = contents
- .replace( /define\(\[[^\]]+\]\)[\W\n]+$/, "" );
+ .replace( /define\(\[[^\]]*\]\)[\W\n]+$/, "" );
}
return contents;
}
diff --git a/debian/changelog b/debian/changelog
index 76a8372..96988c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
jquery (1.12.3-1) UNRELEASED; urgency=medium
* New upstream release
+ - debian/build.js: port applicable upstream changes in
+ build/tasks/build.js since previous version
* Drop the version number mangling to add a `+dfsg` suffix. First the
changes from upstream are not due to the DFSG, but are removing pre-built
Javascript files, which is not a problem according to the DFSG, but a
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jquery.git
More information about the Pkg-javascript-commits
mailing list