Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit e139535

Browse files
authored
Merge pull request #33 from data-provider/release
Update dependencies
2 parents 50af940 + ab96b35 commit e139535

8 files changed

Lines changed: 1112 additions & 1439 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111
### Removed
1212

13+
## [2.0.2] - 2020-03-22
14+
15+
### Changed
16+
- chore(deps): update dependencies
17+
1318
## [2.0.1] - 2020-03-18
1419

1520
### Fixed

package-lock.json

Lines changed: 1064 additions & 1396 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@data-provider/browser-storage",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Data Provider addon providing localStorage and sessionStorage origins",
55
"keywords": [
66
"data-provider",
@@ -37,29 +37,29 @@
3737
"@data-provider/core": "2.x"
3838
},
3939
"devDependencies": {
40-
"@babel/core": "7.8.4",
41-
"@babel/preset-env": "7.8.4",
40+
"@babel/core": "7.8.7",
41+
"@babel/preset-env": "7.8.7",
4242
"@babel/preset-react": "7.8.3",
43-
"@data-provider/core": "2.0.0",
43+
"@data-provider/core": "2.1.1",
4444
"@rollup/plugin-commonjs": "11.0.2",
4545
"@rollup/plugin-json": "4.0.2",
4646
"@rollup/plugin-node-resolve": "7.1.1",
4747
"babel-core": "7.0.0-bridge.0",
48-
"babel-jest": "24.9.0",
48+
"babel-jest": "25.1.0",
4949
"babel-polyfill": "6.26.0",
5050
"coveralls": "3.0.9",
5151
"eslint": "6.8.0",
5252
"eslint-config-prettier": "6.10.0",
5353
"eslint-plugin-prettier": "3.1.2",
54-
"husky": "4.2.1",
54+
"husky": "4.2.3",
5555
"jest": "25.1.0",
5656
"lint-staged": "10.0.8",
57-
"prettier": "1.19.1",
57+
"prettier": "2.0.1",
5858
"redux": "4.0.5",
59-
"rollup": "1.30.1",
60-
"rollup-plugin-babel": "4.3.3",
59+
"rollup": "1.32.1",
60+
"rollup-plugin-babel": "4.4.0",
6161
"rollup-plugin-uglify": "6.0.4",
62-
"sinon": "8.1.1"
62+
"sinon": "9.0.1"
6363
},
6464
"lint-staged": {
6565
"src/**/*.js": "eslint",

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.organization=data-provider
22
sonar.projectKey=data-provider-browser-storage
3-
sonar.projectVersion=2.0.1
3+
sonar.projectVersion=2.0.2
44

55
sonar.sources=src,test
66
sonar.exclusions=node_modules/**

src/Storage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Provider } from "@data-provider/core";
1616
const TAG = "browser-storage";
1717
const storageKeysTags = {
1818
localStorage: "local-storage",
19-
sessionStorage: "session-storage"
19+
sessionStorage: "session-storage",
2020
};
2121

2222
class StorageMock {
@@ -71,7 +71,7 @@ export class Storage extends Provider {
7171
this._storage = this._getStorage(this.options.storageKey, this.options.root);
7272
return {
7373
...initialState,
74-
data: this.readMethod()
74+
data: this.readMethod(),
7575
};
7676
}
7777

test/Storage.mock.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const Mock = class Mock {
1616

1717
this._stubs = {
1818
getItem: this._sandbox.stub().returns(""),
19-
setItem: this._sandbox.stub().returns("")
19+
setItem: this._sandbox.stub().returns(""),
2020
};
2121

2222
this._mock = {
23-
[storageKey]: this._stubs
23+
[storageKey]: this._stubs,
2424
};
2525
}
2626

test/local-storage-methods.spec.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe("Local Storage", () => {
4444
describe("When window is not available and it uses storage mock", () => {
4545
let userData;
4646
const fooData = {
47-
foo: "foo-value"
47+
foo: "foo-value",
4848
};
4949

5050
beforeEach(() => {
@@ -77,7 +77,7 @@ describe("Local Storage", () => {
7777

7878
beforeAll(() => {
7979
userData = new LocalStorage("userData", {
80-
root: storage.mock
80+
root: storage.mock,
8181
});
8282
});
8383

@@ -117,13 +117,13 @@ describe("Local Storage", () => {
117117
describe("Data property of a method", () => {
118118
let userData;
119119
const fooData = {
120-
foo: "foo-value"
120+
foo: "foo-value",
121121
};
122122

123123
beforeEach(() => {
124124
storage.stubs.getItem.returns(JSON.stringify(fooData));
125125
userData = new LocalStorage("userData", {
126-
root: storage.mock
126+
root: storage.mock,
127127
});
128128
});
129129

@@ -155,7 +155,7 @@ describe("Local Storage", () => {
155155
it("should return default value correspondent to query while resource is being loaded", () => {
156156
expect.assertions(2);
157157
userData = new LocalStorage("userData", {
158-
root: storage.mock
158+
root: storage.mock,
159159
});
160160
let queriedData = userData.query({ prop: "foo" });
161161
const promise = queriedData.read();
@@ -170,13 +170,13 @@ describe("Local Storage", () => {
170170
describe("Update method", () => {
171171
let userData;
172172
const fooData = {
173-
foo: "foo-value"
173+
foo: "foo-value",
174174
};
175175

176176
beforeEach(() => {
177177
storage.stubs.getItem.returns(JSON.stringify(fooData));
178178
userData = new LocalStorage("userData", {
179-
root: storage.mock
179+
root: storage.mock,
180180
});
181181
});
182182

@@ -214,7 +214,7 @@ describe("Local Storage", () => {
214214
await queriedData.update("foo-updated-value");
215215
expect(storage.stubs.setItem.getCall(0).args[1]).toEqual(
216216
JSON.stringify({
217-
foo: "foo-updated-value"
217+
foo: "foo-updated-value",
218218
})
219219
);
220220
});
@@ -237,13 +237,13 @@ describe("Local Storage", () => {
237237
describe("Delete method", () => {
238238
let userData;
239239
const fooData = {
240-
foo: "foo-value"
240+
foo: "foo-value",
241241
};
242242

243243
beforeEach(() => {
244244
storage.stubs.getItem.returns(JSON.stringify(fooData));
245245
userData = new LocalStorage("userData", {
246-
root: storage.mock
246+
root: storage.mock,
247247
});
248248
});
249249

@@ -289,22 +289,22 @@ describe("Local Storage", () => {
289289
describe("when passing tags", () => {
290290
it("should contain the local-storage tag even when a custom tag is received", () => {
291291
fooData = new LocalStorage("fooData", {
292-
tags: ["foo-tag"]
292+
tags: ["foo-tag"],
293293
});
294294
expect(providers.getByTag("local-storage").elements[0]).toEqual(fooData);
295295
});
296296

297297
it("should contain the ocal-storage tag even when an array of custom tags is received", () => {
298298
fooData = new LocalStorage("fooData", {
299-
tags: ["foo-tag", "foo-tag-2"]
299+
tags: ["foo-tag", "foo-tag-2"],
300300
});
301301
expect(providers.getByTag("local-storage").elements[0]).toEqual(fooData);
302302
});
303303

304304
it("should contain defined custom tag if received", () => {
305305
const FOO_TAG = "foo-tag";
306306
fooData = new LocalStorage("fooData", {
307-
tags: [FOO_TAG]
307+
tags: [FOO_TAG],
308308
});
309309
expect(providers.getByTag(FOO_TAG).elements[0]).toEqual(fooData);
310310
});
@@ -314,7 +314,7 @@ describe("Local Storage", () => {
314314
const FOO_TAG = "foo-tag";
315315
const FOO_TAG_2 = "foo-tag-2";
316316
fooData = new LocalStorage("fooData", {
317-
tags: [FOO_TAG, FOO_TAG_2]
317+
tags: [FOO_TAG, FOO_TAG_2],
318318
});
319319
expect(providers.getByTag(FOO_TAG).elements[0]).toEqual(fooData);
320320
expect(providers.getByTag(FOO_TAG_2).elements[0]).toEqual(fooData);

test/session-storage-methods.spec.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe("SessionStorage Storage", () => {
4444
describe("When window is not available and it uses storage mock", () => {
4545
let userData;
4646
const fooData = {
47-
foo: "foo-value"
47+
foo: "foo-value",
4848
};
4949

5050
beforeEach(() => {
@@ -77,7 +77,7 @@ describe("SessionStorage Storage", () => {
7777

7878
beforeAll(() => {
7979
userData = new SessionStorage("userData", {
80-
root: storage.mock
80+
root: storage.mock,
8181
});
8282
});
8383

@@ -117,13 +117,13 @@ describe("SessionStorage Storage", () => {
117117
describe("Data property of a method", () => {
118118
let userData;
119119
const fooData = {
120-
foo: "foo-value"
120+
foo: "foo-value",
121121
};
122122

123123
beforeEach(() => {
124124
storage.stubs.getItem.returns(JSON.stringify(fooData));
125125
userData = new SessionStorage("userData", {
126-
root: storage.mock
126+
root: storage.mock,
127127
});
128128
});
129129

@@ -155,7 +155,7 @@ describe("SessionStorage Storage", () => {
155155
it("should return default value correspondent to query while resource is being loaded", () => {
156156
expect.assertions(2);
157157
userData = new SessionStorage("userData", {
158-
root: storage.mock
158+
root: storage.mock,
159159
});
160160
let queriedData = userData.query({ prop: "foo" });
161161
const promise = queriedData.read();
@@ -170,13 +170,13 @@ describe("SessionStorage Storage", () => {
170170
describe("Update method", () => {
171171
let userData;
172172
const fooData = {
173-
foo: "foo-value"
173+
foo: "foo-value",
174174
};
175175

176176
beforeEach(() => {
177177
storage.stubs.getItem.returns(JSON.stringify(fooData));
178178
userData = new SessionStorage("userData", {
179-
root: storage.mock
179+
root: storage.mock,
180180
});
181181
});
182182

@@ -214,7 +214,7 @@ describe("SessionStorage Storage", () => {
214214
await queriedData.update("foo-updated-value");
215215
expect(storage.stubs.setItem.getCall(0).args[1]).toEqual(
216216
JSON.stringify({
217-
foo: "foo-updated-value"
217+
foo: "foo-updated-value",
218218
})
219219
);
220220
});
@@ -237,13 +237,13 @@ describe("SessionStorage Storage", () => {
237237
describe("Delete method", () => {
238238
let userData;
239239
const fooData = {
240-
foo: "foo-value"
240+
foo: "foo-value",
241241
};
242242

243243
beforeEach(() => {
244244
storage.stubs.getItem.returns(JSON.stringify(fooData));
245245
userData = new SessionStorage("userData", {
246-
root: storage.mock
246+
root: storage.mock,
247247
});
248248
});
249249

@@ -289,22 +289,22 @@ describe("SessionStorage Storage", () => {
289289
describe("when passing tags", () => {
290290
it("should contain the session-storage tag even when a custom tag is received", () => {
291291
fooData = new SessionStorage("fooData", {
292-
tags: ["foo-tag"]
292+
tags: ["foo-tag"],
293293
});
294294
expect(providers.getByTag("session-storage").elements[0]).toEqual(fooData);
295295
});
296296

297297
it("should contain the ocal-storage tag even when an array of custom tags is received", () => {
298298
fooData = new SessionStorage("fooData", {
299-
tags: ["foo-tag", "foo-tag-2"]
299+
tags: ["foo-tag", "foo-tag-2"],
300300
});
301301
expect(providers.getByTag("session-storage").elements[0]).toEqual(fooData);
302302
});
303303

304304
it("should contain defined custom tag if received", () => {
305305
const FOO_TAG = "foo-tag";
306306
fooData = new SessionStorage("fooData", {
307-
tags: [FOO_TAG]
307+
tags: [FOO_TAG],
308308
});
309309
expect(providers.getByTag(FOO_TAG).elements[0]).toEqual(fooData);
310310
});
@@ -314,7 +314,7 @@ describe("SessionStorage Storage", () => {
314314
const FOO_TAG = "foo-tag";
315315
const FOO_TAG_2 = "foo-tag-2";
316316
fooData = new SessionStorage("fooData", {
317-
tags: [FOO_TAG, FOO_TAG_2]
317+
tags: [FOO_TAG, FOO_TAG_2],
318318
});
319319
expect(providers.getByTag(FOO_TAG).elements[0]).toEqual(fooData);
320320
expect(providers.getByTag(FOO_TAG_2).elements[0]).toEqual(fooData);

0 commit comments

Comments
 (0)