Skip to content

Commit

Permalink
Commit v1.0.15
Browse files Browse the repository at this point in the history
This minor update includes a bug fix described in issue:
BorisMoore/jsviews#459

Paths such as `'list^[].a'` and `'list()^[].a'` are now fully supported

See unit tests https://www.jsviews.com/test/unit-tests-jsobservable-no-jqueryviews.html.
  • Loading branch information
BorisMoore committed Jul 14, 2024
1 parent 6b71243 commit a2cfec6
Show file tree
Hide file tree
Showing 91 changed files with 14,047 additions and 17,749 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ desktop.ini
Scripts
-*
bin
built
built
/.vscode/launch.json
/test/unit-tests/.vscode/launch.json
6 changes: 4 additions & 2 deletions _src/jquery.observable.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ if (!$.observe) {
data = events[el] && events[el].data;
if (data && (off && data.ns !== initialNs
// When observing, don't unbind dups unless they have the same namespace
|| !off && data.ns === initialNs && data.cb && data.cb._cId === cb._cId && (!cb._wrp || data.cb._wrp)))
|| !off && data.ns === initialNs && data.cb && data.cb._cId === cb._cId && data.cb._inId === cb._inId && (!cb._wrp || data.cb._wrp)))
// When observing and doing array binding, don't bind dups if they have the same namespace (Dups can happen e.g. with {^{for people ^~foo=people}})
{
return;
Expand Down Expand Up @@ -428,6 +428,7 @@ if (!$.observe) {
if (callback) {
obArrAddRemove._cId = getCbKey(callback); // Identify wrapped callback with unwrapped callback, so unobserveAll will
// remove previous observeAll wrapped callback, if inner callback was the same;
obArrAddRemove._inId = ".arIn" + observeInnerCbKey++; // Specific _inId for each distinct obArrAddRemove, so not skipped as dups
}

var arrIndex, skip, dep, obArr, prt, fnProp, isGet,
Expand Down Expand Up @@ -468,7 +469,8 @@ if (!$.observe) {
}
if (skip) {
// Duplicate binding(s) found, so move on
obj = obj[prop];
fnProp = obj[prop];
obj = $isFunction(fnProp) ? fnProp.call(obj) : obj[prop];
continue;
}
}
Expand Down
8 changes: 4 additions & 4 deletions _src/jsrender-node-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsrender-node-starter",
"version": "1.0.14",
"version": "1.0.15",
"description": "Starter app for JsRender server-rendered templates on Node.js using Express 4 or Hapi, and optionally Browserify and JsRenderify",
"main": "index-express.js",
"scripts": {
Expand All @@ -15,14 +15,14 @@
},
"dependencies": {
"body-parser": "^1.13.2",
"browserify": "^16.3.0",
"browserify": "^17.0.0",
"express": "^4.17.1",
"@hapi/hapi": "^18.1.0",
"@hapi/inert": "^5.2.1",
"@hapi/vision": "^5.5.2",
"jquery": "^3.4.1",
"jsrender": "^1.0.14",
"jsviews": "^1.0.14",
"jsrender": "^1.0.15",
"jsviews": "^1.0.15",
"serve-favicon": "^2.5.0",
"through2": "^3.0.1"
},
Expand Down
10 changes: 5 additions & 5 deletions _src/jsrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsrender",
"version": "v1.0.14",
"version": "v1.0.15",
"description": "Best-of-breed templating in browser or on Node.js (with Express 4, Hapi and Browserify integration)",
"main": "./jsrender-node.js",
"browser": "./jsrender.js",
Expand Down Expand Up @@ -34,11 +34,11 @@
],
"devDependencies": {
"@types/jquery": "^3.3.31",
"browserify": "^11.0.1",
"gulp": "^3.9.0",
"glob-stream": "^5.0.0",
"browserify": "^17.0.0",
"gulp": "^5.0.0",
"glob-stream": "^8.0.2",
"jquery": "^3.4.1",
"qunit": "^0.7.6"
"qunit": "^2.21.0"
},
"dependencies": {
"through2": "^3.0.1"
Expand Down
12 changes: 6 additions & 6 deletions _src/jsviews/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsviews",
"version": "v1.0.14",
"version": "v1.0.15",
"description": "Next-generation MVVM and MVP framework - built on top of JsRender templates. Bringing templates to life...",
"main": "./jsviews.js",
"author": {
Expand Down Expand Up @@ -32,11 +32,11 @@
],
"devDependencies": {
"@types/jquery": "^3.3.31",
"browserify": "^11.0.1",
"glob-stream": "^5.0.0",
"gulp": "^3.9.0",
"jsrender": "^1.0.14",
"qunit": "^0.7.6"
"browserify": "^17.0.0",
"glob-stream": "^8.0.2",
"gulp": "^5.0.0",
"jsrender": "^1.0.15",
"qunit": "^2.21.0"
},
"dependencies": {
"jquery": "^3.4.1"
Expand Down
2 changes: 1 addition & 1 deletion _src/templates/jsrender-node-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"body-parser": "^1.13.2",
"browserify": "^16.3.0",
"browserify": "^17.0.0",
"express": "^4.17.1",
"@hapi/hapi": "^18.1.0",
"@hapi/inert": "^5.2.1",
Expand Down
8 changes: 4 additions & 4 deletions _src/templates/jsrender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
],
"devDependencies": {
"@types/jquery": "^3.3.31",
"browserify": "^11.0.1",
"gulp": "^3.9.0",
"glob-stream": "^5.0.0",
"browserify": "^17.0.0",
"gulp": "^5.0.0",
"glob-stream": "^8.0.2",
"jquery": "^3.4.1",
"qunit": "^0.7.6"
"qunit": "^2.21.0"
},
"dependencies": {
"through2": "^3.0.1"
Expand Down
22 changes: 11 additions & 11 deletions _src/templates/jsviews.com/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
},
"devDependencies": {
"@types/jquery": "^3.3.31",
"browserify": "^11.0.1",
"glob-stream": "^5.0.0",
"gulp": "^3.9.0",
"gulp-debug": "^2.0.1",
"gulp-file-include": "^0.13.5",
"gulp-jscs": "^1.6.0",
"browserify": "^17.0.0",
"glob-stream": "^8.0.2",
"gulp": "^5.0.0",
"gulp-debug": "<=4.0.0",
"gulp-file-include": "^2.3.0",
"gulp-jscs": "^4.1.0",
"gulp-jscs-stylish": "^1.1.0",
"gulp-jshint": "^1.11.2",
"gulp-load-plugins": "^1.0.0-rc",
"gulp-jshint": "^2.1.0",
"gulp-load-plugins": "^2.0.8",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"jshint-stylish": "^2.0.1",
"jshint-summary": "^0.4.0",
"jsrender": "^@@include("templates/-version.txt")",
"node-qunit-phantomjs": "^1.2.1",
"qunit": "^0.7.6",
"node-qunit": "^2.0.0",
"qunit": "^2.21.0",
"qunitjs": "^1.18.0",
"through2": "^2.0.0"
},
Expand All @@ -51,7 +51,7 @@
"elision": true,
"debug": true,
"loopfunc": true,
"multistr": true
"multistr": true
},
"jscsConfig": {
"disallowTrailingWhitespace": true,
Expand Down
8 changes: 4 additions & 4 deletions _src/templates/jsviews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
],
"devDependencies": {
"@types/jquery": "^3.3.31",
"browserify": "^11.0.1",
"glob-stream": "^5.0.0",
"gulp": "^3.9.0",
"browserify": "^17.0.0",
"glob-stream": "^8.0.2",
"gulp": "^5.0.0",
"jsrender": "^@@include("templates/-version.txt")",
"qunit": "^0.7.6"
"qunit": "^2.21.0"
},
"dependencies": {
"jquery": "^3.4.1"
Expand Down
10 changes: 5 additions & 5 deletions documentation/contents-download.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion documentation/contents-download.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-download.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-getstarted.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-getstarted.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-jsoapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ content.jsoapi = content.useStorage && $.parseJSON(localStorage.getItem("JsViews
{
"_type": "para",
"title": "Computed observable: observable get / set function",
"text": "It can be convenient to be make the getter function behave also as an *observable setter*, so that simply passing it the new value will observably modify the *computed observable* (without needing to call `setProperty`):\n\n```js\nperson.firstName(\"updatedFirstName\");\n``` \n\nThis is made possible by modifying the getter function, and using the following pattern:\n\n```js\nfunction firstName(val) {\n if (!arguments.length) {\n return this._fistName;\n }\n // If there is a val argument, treat as observable setter\n $.observable(this).setProperty(\"firstName\", val);\n}\n```\n\nSee the topic: [JsViews with 'hand-coded 'View Model objects](#jsvmodel@vm), for discussion and examples.",
"text": "It can be convenient to be make the getter function behave also as an *observable setter*, so that simply passing it the new value will observably modify the *computed observable* (without needing to call `setProperty`):\n\n```js\nperson.firstName(\"updatedFirstName\");\n``` \n\nThis is made possible by modifying the getter function, and using the following pattern:\n\n```js\nfunction firstName(val) {\n if (!arguments.length) {\n return this._firstName;\n }\n // If there is a val argument, treat as observable setter\n $.observable(this).setProperty(\"firstName\", val);\n}\n```\n\nSee the topic: [JsViews with 'hand-coded 'View Model objects](#jsvmodel@vm), for discussion and examples.",
"anchor": "observable-getset"
},
{
Expand Down
2 changes: 1 addition & 1 deletion documentation/contents-jsoapi.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-jsoapi.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-jsvapi.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/contents-samples.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit a2cfec6

Please sign in to comment.