Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Substitute deprecation #389

Merged
merged 6 commits into from

2 participants

Dav Glass Eric Ferraiuolo
Dav Glass
Owner

Added deprecation messaging to the module, class and method.

Updated Uploader & Calendar to remove substitute from their Loader meta-data.

Updated Editor to not use substitute in the iframe's instance.

Removed substitute from a DD test.

Updated History files

Eric Ferraiuolo
Owner

The uploader/temp/ stuff was just extra garbage you found laying around?

Dav Glass
Owner

Yeah, when cleaning up the uploader meta-data stuff.

Dav Glass davglass merged commit 2d0f77c into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
5 src/calendar/HISTORY.md
View
@@ -1,6 +1,11 @@
Calendar Change History
=======================
+@VERSION@
+-----
+
+ * Removed unused `substitute` dependency.
+
3.8.0
-----
1  src/calendar/meta/calendar-base.json
View
@@ -2,7 +2,6 @@
"calendar-base": {
"requires": [
"widget",
- "substitute",
"datatype-date",
"datatype-date-math",
"cssgrids"
3  src/calendar/meta/calendarnavigator.json
View
@@ -4,8 +4,7 @@
"plugin",
"classnamemanager",
"datatype-date",
- "node",
- "substitute"
+ "node"
],
"skinnable": true
}
2  src/dd/tests/unit/index.html
View
@@ -31,7 +31,7 @@
modules: {
'dd-tests': {
fullpath: './assets/dd-tests.js',
- requires: [ 'event-synthetic', 'event-gestures', 'dd', 'dd-plugin', 'panel', 'console', 'test', 'substitute', 'selector-css3' ]
+ requires: [ 'event-synthetic', 'event-gestures', 'dd', 'dd-plugin', 'panel', 'console', 'test', 'selector-css3' ]
},
'dd-base': {
fullpath: './assets/dd-base.js',
5 src/editor/HISTORY.md
View
@@ -1,6 +1,11 @@
Rich Text Editor Change History
===============================
+@VERSION@
+-----
+
+ * Removed unused `substitute` dependency.
+
3.8.0
-----
2  src/editor/js/editor-base.js
View
@@ -791,7 +791,7 @@
* @property USE
* @type Array
*/
- USE: ['substitute', 'node', 'selector-css3', 'editor-selection', 'stylesheet'],
+ USE: ['node', 'selector-css3', 'editor-selection', 'stylesheet'],
/**
* The Class Name: editorBase
* @static
7 src/substitute/HISTORY.md
View
@@ -1,6 +1,13 @@
Substitute Utility Change History
=================================
+
+@VERSION@
+-----
+
+ * Officially Deprecating
+
+
3.8.0
-----
61 src/substitute/js/substitute.js
View
@@ -3,6 +3,7 @@
* If included, the substitute method is added to the YUI instance.
*
* @module substitute
+ * @deprecated
*/
var L = Y.Lang, DUMP = 'dump', SPACE = ' ', LBRACE = '{', RBRACE = '}',
@@ -10,37 +11,45 @@
/**
* The following methods are added to the YUI instance
+ *
+ * <strong>Use `Y.Lang.sub` or `Y.Template` instead.</strong>
* @class YUI~substitute
+ * @deprecated
*/
- /**
- Does {placeholder} substitution on a string. The object passed as the
- second parameter provides values to replace the {placeholder}s.
- {placeholder} token names must match property names of the object. For
- example
-
- `var greeting = Y.substitute("Hello, {who}!", { who: "World" });`
-
- {placeholder} tokens that are undefined on the object map will be left in
- tact (leaving unsightly "{placeholder}"s in the output string). If your
- replacement strings *should* include curly braces, use `{LBRACE}` and
- `{RBRACE}` in your object map string value.
-
- If a function is passed as a third argument, it will be called for each
- {placeholder} found. The {placeholder} name is passed as the first value
- and the value from the object map is passed as the second. If the
- {placeholder} contains a space, the first token will be used to identify
- the object map property and the remainder will be passed as a third
- argument to the function. See below for an example.
-
- If the value in the object map for a given {placeholder} is an object and
- the `dump` module is loaded, the replacement value will be the string
- result of calling `Y.dump(...)` with the object as input. Include a
- numeric second token in the {placeholder} to configure the depth of the call
- to `Y.dump(...)`, e.g. "{someObject 2}". See the
- <a href="../classes/YUI.html#method_dump">`dump`</a> method for details.
+/**
+<strong>Use `Y.Lang.sub` or `Y.Template` instead.</strong>
+
+
+
+Does `{placeholder}` substitution on a string. The object passed as the
+second parameter provides values to replace the `{placeholder}`s.
+{placeholder} token names must match property names of the object. For
+example
+
+`var greeting = Y.substitute("Hello, {who}!", { who: "World" });`
+
+`{placeholder}` tokens that are undefined on the object map will be left in
+tact (leaving unsightly "{placeholder}"s in the output string). If your
+replacement strings *should* include curly braces, use `{LBRACE}` and
+`{RBRACE}` in your object map string value.
+
+If a function is passed as a third argument, it will be called for each
+{placeholder} found. The {placeholder} name is passed as the first value
+and the value from the object map is passed as the second. If the
+{placeholder} contains a space, the first token will be used to identify
+the object map property and the remainder will be passed as a third
+argument to the function. See below for an example.
+
+If the value in the object map for a given {placeholder} is an object and
+the `dump` module is loaded, the replacement value will be the string
+result of calling `Y.dump(...)` with the object as input. Include a
+numeric second token in the {placeholder} to configure the depth of the call
+to `Y.dump(...)`, e.g. "{someObject 2}". See the
+<a href="../classes/YUI.html#method_dump">`dump`</a> method for details.
@method substitute
+ @deprecated
@param {string} s The string that will be modified.
@param {object} o An object containing the replacement values.
@param {function} f An optional function that can be used to
5 src/uploader/HISTORY.md
View
@@ -1,6 +1,11 @@
Uploader Utility (New) Change History
=====================================
+@VERSION@
+-----
+
+ * Removed unused `substitute` dependency.
+
3.8.1
-----
1  src/uploader/meta/uploader-flash.json
View
@@ -3,7 +3,6 @@
"requires": [
"swf",
"widget",
- "substitute",
"base",
"cssbutton",
"node",
1  src/uploader/meta/uploader-html5.json
View
@@ -3,7 +3,6 @@
"requires": [
"widget",
"node-event-simulate",
- "substitute",
"file-html5",
"uploader-queue"
]
4 src/uploader/temp/uploader-flash.js
View
@@ -1,4 +0,0 @@
-function(Y) {
- var Win = Y.config.win;
- return !(Win && Win.File && Win.FormData && Win.XMLHttpRequest);
-}
4 src/uploader/temp/uploader-html5.js
View
@@ -1,4 +0,0 @@
-function(Y) {
- var Win = Y.config.win;
- return (Win && Win.File && Win.FormData && Win.XMLHttpRequest);
-}
46 src/uploader/temp/uploader.json
View
@@ -1,46 +0,0 @@
-{
- "uploader": {
-
- "requires": [
- "swfdetect"
- ],
-
- "use": [
- "uploader-html5",
- "uploader-flash"
- ],
-
- "submodules" : {
- "uploader-html5" : {
- "condition" : {
- "trigger": "uploader",
- "test" : "uploader-html5.js"
- },
- "requires" : [
- "widget",
- "node-event-simulate",
- "substitute",
- "file",
- "uploader-queue"
- ]
- },
- "uploader-flash" : {
- "condition" : {
- "trigger": "uploader",
- "test" : "uploader-flash.js"
- },
- "requires" : [
- "swf",
- "widget",
- "substitute",
- "base",
- "cssbutton",
- "node",
- "event-custom",
- "file",
- "uploader-queue"
- ]
- }
- }
- }
-}
Something went wrong with that request. Please try again.