Skip to content

Commit a60eb9d

Browse files
authored
Merge pull request #122 from SpringRoll/release/2.3.2
Release 2.3.2
2 parents ca8f177 + 443ea7d commit a60eb9d

File tree

8 files changed

+39
-28
lines changed

8 files changed

+39
-28
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
## [2.3.2] 2022-04-14
10+
11+
## Fixed
12+
13+
- re-re-named UserDataPlugin onUserDataRead and onUserDataRemove parameters from 'name' to 'data' to match Bellhop
14+
815
## [2.3.1] 2022-03-10
16+
917
### Fixed
18+
1019
- replaced `return` with `continue` in set up plugin function
1120

1221
## [2.3.0] - 2022-03-03
@@ -20,9 +29,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2029
- Bumped karma dependency from 5.2.3 to 6.3.14
2130

2231
## [2.2.5] - 2022-02-03
32+
2333
- Upgraded follow-redirects dependency for security alert
2434

2535
## Fixed
36+
2637
- Fixed error when reporting a plugin preload failure
2738

2839
## [2.2.4] - 2021-06-04

dist/SpringRoll-Container-umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/SpringRoll-Container-umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "springroll-container",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "The iframe controller for interacting with SpringRoll applications",
55
"main": "./dist/index.js",
66
"license": "MIT",

src/plugins/UserDataPlugin.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BasePlugin } from '../base-plugins';
55
* @export
66
* @class UserDataPlugin
77
* @extends {BasePlugin}
8-
* @property {SavedDataHandler} SavedDataHandler The handler to work with the savedData class
8+
* @property {SavedDataHandler} SavedDataHandler The handler to work with the savedData class
99
*/
1010
export class UserDataPlugin extends BasePlugin {
1111
/**
@@ -34,7 +34,7 @@ export class UserDataPlugin extends BasePlugin {
3434
}
3535

3636
/**
37-
*
37+
*
3838
* @memberof UserDataPlugin
3939
*/
4040
init() {
@@ -54,27 +54,27 @@ export class UserDataPlugin extends BasePlugin {
5454
}
5555

5656
/**
57-
* Handler for the userDataRemove event
57+
* Handler for the userDataRemove event
5858
* @method onUserDataRemove
5959
* @private
60-
* @param {string} name The name of the record to be removed
60+
* @param {string} data The name of the record to be removed
6161
* @param {string} type The type of listener for bellhop to send to
6262
*/
63-
onUserDataRemove({ name, type }) {
64-
SavedDataHandler.remove(name, () => {
63+
onUserDataRemove({ data, type }) {
64+
SavedDataHandler.remove(data, () => {
6565
this.client.send(type);
6666
});
6767
}
6868

6969
/**
7070
* Handler for the userDataRead event
7171
* @method onUserDataRead
72-
* @private
73-
* @param {string} name The name of the record to be removed
72+
* @private
73+
* @param {string} data The name of the record to be removed
7474
* @param {string} type The type of listener for bellhop to send to
7575
*/
76-
onUserDataRead({ name, type }) {
77-
SavedDataHandler.read(name, value => this.client.send(type, value));
76+
onUserDataRead({ data, type }) {
77+
SavedDataHandler.read(data, value => this.client.send(type, value));
7878
}
7979

8080
/**
@@ -91,7 +91,7 @@ export class UserDataPlugin extends BasePlugin {
9191
}
9292

9393
// ----------------------------------------------------------------
94-
// IndexedDB Manipulation
94+
// IndexedDB Manipulation
9595
// ----------------------------------------------------------------
9696

9797
/**
@@ -100,12 +100,12 @@ export class UserDataPlugin extends BasePlugin {
100100
* @param {string} dbName The name of your IndexedDB database
101101
* @param {string} [dbVersion] The version number of the database
102102
* @param {JSON} [additions] Any additions to the structure of the database
103-
* @param {array} [additions.stores] Any stores to be added into the database syntax:
103+
* @param {array} [additions.stores] Any stores to be added into the database syntax:
104104
* @param {string} [additions.stores.storeName] The name of the store
105-
* @param {object} [additions.stores.options] Optionally, the option parameter for the createStore method
106-
* @param {array} [additions.indexes] Any Indexes to be added to the database syntax:
105+
* @param {object} [additions.stores.options] Optionally, the option parameter for the createStore method
106+
* @param {array} [additions.indexes] Any Indexes to be added to the database syntax:
107107
* @param {string} [additions.indexes.storeName] The name of the store
108-
* @param {object} [additions.indexes.options] Optionally, the option parameter for the createIndex method
108+
* @param {object} [additions.indexes.options] Optionally, the option parameter for the createIndex method
109109
* @param {string} type The type of listener for bellhop to send to
110110
*/
111111
onIDBOpen({type, data: {dbName, dbVersion = null, additions = {}, deletions = {} }}) {
@@ -119,12 +119,12 @@ export class UserDataPlugin extends BasePlugin {
119119
* @param {string} type The type of listener for bellhop to send to
120120
* @param {string} storeName The name of the store from which the record will be updated
121121
* @param {*} value The value for the record with the given key to be updated
122-
* @param {string} key the key of the record to be updated
122+
* @param {string} key the key of the record to be updated
123123
*/
124124
onIDBAdd({type, data: { storeName, value, key}}) {
125125
this.savedDataHandler.IDBAdd(storeName, value, key, value => this.client.send(type, value));
126126
}
127-
127+
128128
/**
129129
* Update a record from a given store
130130
* @param {string} type The type of listener for bellhop to send to
@@ -140,7 +140,7 @@ export class UserDataPlugin extends BasePlugin {
140140
* Remove a record from a store
141141
* @param {string} type The type of listener for bellhop to send to
142142
* @param {string} storeName The name of the store from which the record will be removed
143-
* @param {*} key the key of the record to be removed
143+
* @param {*} key the key of the record to be removed
144144
*/
145145
onIDBRemove({type, data: {storeName, key}}) {
146146
this.savedDataHandler.IDBRemove(storeName, key, value => this.client.send(type, value));
@@ -149,13 +149,13 @@ export class UserDataPlugin extends BasePlugin {
149149
/**
150150
* Return a record from a given store with a given key
151151
* @param {string} storeName The name of the store to read from
152-
* @param {string} key The key for the record in the given store
152+
* @param {string} key The key for the record in the given store
153153
* @param {string} type The type of listener for bellhop to send to
154154
*/
155155
onIDBRead({type, data: {storeName, key}}) {
156156
this.savedDataHandler.IDBRead(storeName, key, value => this.client.send(type, value));
157157
}
158-
158+
159159
/**
160160
* Get all records from a store
161161
* @param {string} storeName The store to get all records from
@@ -165,7 +165,7 @@ export class UserDataPlugin extends BasePlugin {
165165
onIDBReadAll({ type, data: {storeName, count} }) {
166166
this.savedDataHandler.IDBReadAll(storeName, count, value => this.client.send(type, value));
167167
}
168-
168+
169169
/**
170170
* Get the version of a given database
171171
* @param {string} dbName The name of the database to return the version of
@@ -176,7 +176,7 @@ export class UserDataPlugin extends BasePlugin {
176176
const sdh = new SavedDataHandler();
177177
sdh.IDBGetVersion(dbName, value => this.client.send(type, value));
178178
}
179-
179+
180180
/**
181181
* Close the connection with the database
182182
* @param {string} type The type of listener for bellhop to send to

0 commit comments

Comments
 (0)