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

Commit

Permalink
Merge pull request #98 from data-provider/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
javierbrea committed Jan 7, 2021
2 parents edf24af + 709f75a commit cedb2f1
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
### Removed

## [2.1.0] - 2021-01-07

### Added
- feat: Add compatibility with @data-provider/core v3 arguments.

## [2.0.7] - 2020-12-27

### Added
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ module.exports = {
testEnvironment: "node",

// The glob patterns Jest uses to detect test files
testMatch: ["**/test/**/?(*.)+(spec|test).js?(x)"],
testMatch: ["<rootDir>/test/**/*.spec.js"],
// testMatch: ["<rootDir>/test/**/memoryV3.spec.js"],

transform: {
".js$": "babel-jest",
Expand Down
17 changes: 12 additions & 5 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@data-provider/memory",
"version": "2.0.7",
"version": "2.1.0",
"description": "Memory origin addon for Data Provider",
"keywords": [
"data-provider",
Expand Down Expand Up @@ -37,12 +37,12 @@
"test:mutation": "stryker run"
},
"peerDependencies": {
"@data-provider/core": "2.x"
"@data-provider/core": ">=2.10.0"
},
"devDependencies": {
"@babel/core": "7.12.10",
"@babel/preset-env": "7.12.10",
"@data-provider/core": "2.9.0",
"@data-provider/core": "2.10.0",
"@rollup/plugin-babel": "5.2.2",
"@rollup/plugin-commonjs": "17.0.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.organization=data-provider
sonar.projectKey=data-provider-memory
sonar.projectVersion=2.0.7
sonar.projectVersion=2.1.0

sonar.sources=src,test
sonar.exclusions=node_modules/**
Expand Down
7 changes: 4 additions & 3 deletions src/Memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/

import { Provider } from "@data-provider/core";
import { Provider, providerArgsV3 } from "@data-provider/core";

const TAG = "memory";

class Memory extends Provider {
constructor(id, options, query) {
super(id, options, query);
constructor(...args) {
const [id, options, queryValue] = providerArgsV3(args);
super({ id, ...options }, queryValue);
this._data = this.initialState.data;
this.options._data = this._options._data || this._data;
}
Expand Down
Loading

0 comments on commit cedb2f1

Please sign in to comment.