浏览代码

Merge branch 'development' of https://github.com/HaxeFoundation/haxe into development

Simon Krajewski 9 年之前
父节点
当前提交
ce1e810d00
共有 4 个文件被更改,包括 22 次插入11 次删除
  1. 2 1
      extra/CHANGES.txt
  2. 5 5
      std/Sys.hx
  3. 10 0
      std/js/jquery/JQuery.hx
  4. 5 5
      std/sys/io/Process.hx

+ 2 - 1
extra/CHANGES.txt

@@ -1,4 +1,4 @@
-2015-??-??: 3.3.0
+2016-??-??: 3.3.0
 
 	New features:
 
@@ -35,6 +35,7 @@
 	Standard Library:
 
 	all : added Lambda.flatten and Lambda.flatMap (#3553)
+	sys : proper quoting/escaping (can be opt-out) for Sys.command and sys.io.Process (#3603)
 
 	Macro features and changes:
 

+ 5 - 5
std/Sys.hx

@@ -86,12 +86,12 @@ extern class Sys {
 		Run the given command. The command output will be printed on the same output as the current process.
 		The current process will block until the command terminates and it will return the command result (0 if there was no error).
 
-		When `args` is not `null`, it will be used as the command arguments,
-		with shell meta-characters automatically escaped and quoted if needed.
+		Command arguments can be passed in two ways: 1. using `args`, 2. appending to `cmd` and leaving `args` as `null`.
+
+		 1. When using `args` to pass command arguments, each argument will be automatically quoted, and shell meta-characters will be escaped if needed.
 		`cmd` should be an executable name that can be located in the `PATH` environment variable, or a path to an executable.
-		
-		When `args` is not given or is `null`, no automatic escaping/quoting is performed.
-		`cmd` should include the command together with its arguments, formatted exactly as it would be when typed at the command line.
+
+		 2. When `args` is not given or is `null`, command arguments can be appended to `cmd`. No automatic quoting/escaping will be performed. `cmd` should be formatted exactly as it would be when typed at the command line.
 		It can run executables, as well as shell commands that are not executables (e.g. on Windows: `dir`, `cd`, `echo` etc).
 
 		Read the `sys.io.Process` api for a more complete way to start background processes.

+ 10 - 0
std/js/jquery/JQuery.hx

@@ -202,6 +202,12 @@ package js.jquery;
 		Remove a previously-stored piece of data.
 	**/
 	static public function removeData(element:js.html.Element, ?name:String):js.jquery.JQuery;
+	/**
+		Creates an object containing a set of properties ready to be used in the definition of custom animations.
+	**/
+	@:overload(function(?duration:haxe.extern.EitherType<Float, String>, ?settings:Dynamic):Dynamic { })
+	@:overload(function(?duration:haxe.extern.EitherType<Float, String>, ?easing:String, ?complete:haxe.Constraints.Function):Dynamic { })
+	static public function speed(settings:Dynamic):Dynamic;
 	/**
 		A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as <a href="http://modernizr.com">Modernizr</a> instead of dependency on properties in <code>jQuery.support</code>.
 	**/
@@ -218,6 +224,10 @@ package js.jquery;
 		Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
 	**/
 	static public function unique(array:Array<js.html.Element>):Array<js.html.Element>;
+	/**
+		Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
+	**/
+	static public function uniqueSort(array:Array<js.html.Element>):Array<js.html.Element>;
 	/**
 		Provides a way to execute callback functions based on one or more objects, usually <a href="/category/deferred-object/">Deferred</a> objects that represent asynchronous events.
 	**/

+ 5 - 5
std/sys/io/Process.hx

@@ -30,12 +30,12 @@ extern class Process {
 	/**
 		Construct a `Process` object, which run the given command immediately.
 
-		When `args` is not `null`, it will be used as the command arguments,
-		with shell meta-characters automatically escaped and quoted if needed.
+		Command arguments can be passed in two ways: 1. using `args`, 2. appending to `cmd` and leaving `args` as `null`.
+
+		 1. When using `args` to pass command arguments, each argument will be automatically quoted, and shell meta-characters will be escaped if needed.
 		`cmd` should be an executable name that can be located in the `PATH` environment variable, or a path to an executable.
-		
-		When `args` is not given or is `null`, no automatic escaping/quoting is performed.
-		`cmd` should include the command together with its arguments, formatted exactly as it would be when typed at the command line.
+
+		 2. When `args` is not given or is `null`, command arguments can be appended to `cmd`. No automatic quoting/escaping will be performed. `cmd` should be formatted exactly as it would be when typed at the command line.
 		It can run executables, as well as shell commands that are not executables (e.g. on Windows: `dir`, `cd`, `echo` etc).
 
 		`close()` should be called when the `Process` is no longer used.