From 95cc1d4cd544c2b9bd751e74eae1db5fa218145f Mon Sep 17 00:00:00 2001 From: javierbrea Date: Sat, 23 Nov 2019 09:21:17 +0100 Subject: [PATCH 1/2] Rename project --- .travis.yml | 8 +-- CHANGELOG.md | 4 ++ LICENSE | 13 +---- NOTICE | 6 ++ README.md | 64 +++++++++++---------- assets/logos/mercury_wings_orange_100.png | Bin 2605 -> 0 bytes package-lock.json | 65 ++++++++-------------- package.json | 23 ++++---- rollup.config.js | 10 ++-- sonar-project.properties | 10 +++- src/Memory.js | 6 +- test/memory.spec.js | 2 +- 12 files changed, 96 insertions(+), 115 deletions(-) create mode 100644 NOTICE delete mode 100644 assets/logos/mercury_wings_orange_100.png diff --git a/.travis.yml b/.travis.yml index 66c34c4..04e7608 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,7 @@ cache: addons: sonarcloud: - organization: "javierbrea" - token: - secure: "$SONAR_TOKEN" + organization: "data-provider" branch: name: "$TRAVIS_CURRENT_BRANCH" @@ -21,11 +19,11 @@ script: - npm run test-ci - npm run build - npm run coveralls - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then sonar-scanner; fi' + - 'if [ -n "$SONAR_TOKEN" ]; then sonar-scanner -Dsonar.login=${SONAR_TOKEN}; fi' deploy: provider: npm - email: "devops@xbyorange.com" + email: "javier.brea@gmail.com" api_key: "$NPM_TOKEN" on: tags: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b6031d..60872fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - "queriesDefaultValue" option has to be removed. - Options should be accepted only as second argument. "uuid" should be defined only using the "uuid" option, not as second argument. +## [1.3.0] - 2019-11-23 +### Changed +- Project migration. Read NOTICE for further info. All previous releases in this CHANGELOG file correspond to @xbyorange/mercury-memory package distribution. + ## [1.2.0] - 2019-10-16 ### Added - Add "queriesDefaultValue" option. If defined, queried instances will have default value corresponding to the value of query "key" in the default value object. If not, the behavior of "default value" will be the same than in previous versions, and will return the full object even for queried instances) diff --git a/LICENSE b/LICENSE index 9ff4f16..d939707 100644 --- a/LICENSE +++ b/LICENSE @@ -175,16 +175,5 @@ END OF TERMS AND CONDITIONS + Copyright 2019 Javier Brea Copyright 2019 XByOrange - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - 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. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..bd56d7e --- /dev/null +++ b/NOTICE @@ -0,0 +1,6 @@ +data-provider memory +Copyright 2019 Javier Brea + +Portions of this software were developed at XbyOrange company. + Forked from XByOrange Mercury Memory v1.5.0, distributed under The Apache Software License, Version 2.0. + Github repository "xbyorange/mercury-memory" (https://github.com/XbyOrange/mercury-memory), branch master, commit a24de510820d7e30d1be7d0837f127ea88ea85d2. The original project files were wrongly licensed because an error of the main maintainer, Javier Brea, who received instructions from the XbyOrange company about licensing it as Apache2.0, but didn't include the appropiate license header in all repository files by error. The error has been fixed and XbyOrange license headers have been added to all original files, as it was the real intention of the XbyOrange company. diff --git a/README.md b/README.md index ec6956b..c5c46f4 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,17 @@ [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![License][license-image]][license-url] -# ![Mercury Logo](assets/logos/mercury_wings_orange_100.png) Mercury Memory - ## Overview -This package provides a Mercury origin for handling memory objects. +This package provides a Data Provider origin for handling memory objects. -* __Mercury queries__ based on object keys. +* __Data Provider queries__ based on object keys. * __Reactivity__ to CRUD actions. When a "create", "update" or "delete" method is called over an instance, the cache clean events are dispatched. ### Install ```bash -npm i @xbyorange/mercury-memory --save +npm i @data-provider/memory --save ``` ## Api @@ -24,11 +22,11 @@ npm i @xbyorange/mercury-memory --save `new Memory(defaultValue[, options || uuid][, options])` * Arguments * defaultValue - _``_. Object to be stored. Default value is assigned too at the same time. - * uuid - _``_. Unique id to assign to returned Mercury instance. Useful when using [mercury `sources` handler][mercury-sources-docs-url]. __To be deprecated in next releases. Options object should be passed as second argument instead of uuid.__ + * uuid - _``_. Unique id to assign to returned Data Provider instance. Useful when using [Data Provider `sources` handler][data-provider-sources-docs-url]. __To be deprecated in next releases. Options object should be passed as second argument instead of uuid.__ * options - `` containing properties: * queriesDefaultValue - _``_ If `true`, the default value of queried sources will be the value of the "key" in the query. If not defined, the default value of queried sources will be the full `defaultValue` object. - * uuid - _``_ Unique id to assign to returned Mercury instance. Useful when using [mercury `sources` handler][mercury-sources-docs-url]. - * tags - _` or `_ Tags to assign to the instance. Useful when using [mercury `sources` handler][mercury-sources-docs-url]. A "memory" tag will be always added to provided tags by default. + * uuid - _``_ Unique id to assign to returned Data Provider instance. Useful when using [Data Provider `sources` handler][data-provider-sources-docs-url]. + * tags - _` or `_ Tags to assign to the instance. Useful when using [Data Provider `sources` handler][data-provider-sources-docs-url]. A "memory" tag will be always added to provided tags by default. ## Methods @@ -47,7 +45,7 @@ All cache will be cleaned when the `update`, `delete` or `create` methods are ex The default value of a "queried" instance will be the complete `defaultValue` object until the "queriesDefaultValue" option is set as `true`, in which case the default value will be the value of the key corresponding to the query: ```js -import { Memory } from "@xbyorange/mercury-memory"; +import { Memory } from "@data-provider/memory"; const fooMemory = new Memory({ foo: "foo-value", @@ -69,10 +67,10 @@ console.log(fooMemory.query("foo").read.value) // "foo" ## Examples -Next example will be easier to understand if you are already familiarized with the [mercury][mercury-url] syntax. +Next example will be easier to understand if you are already familiarized with the [Data Provider][data-provider-url] syntax. ```js -import { Memory } from "@xbyorange/mercury-memory"; +import { Memory } from "@data-provider/memory"; const sessionDetails = new Memory({ userId: null, @@ -85,12 +83,12 @@ sessionDetails.query("isLogedIn").update(true) ``` -Use Mercury Memory objects in combination with Api Origins, and take advantage of the built-in reactivity. Use the memory objects to query the api origins, and, when you update the Memory Object, the API object caches will be cleaned as a consequence: +Use Data Provider Memory objects in combination with Api Origins, and take advantage of the built-in reactivity. Use the memory objects to query the api origins, and, when you update the Memory Object, the API object caches will be cleaned as a consequence: ```js -import { Memory } from "@xbyorange/mercury-memory"; -import { Api } from "@xbyorange/mercury-api"; +import { Memory } from "@data-provider/memory"; +import { Api } from "@data-provider/axios"; const currentAuthor = new Memory({ id: null @@ -136,22 +134,22 @@ await currentAuthorBooks.read(); Contributors are welcome. Please read the [contributing guidelines](.github/CONTRIBUTING.md) and [code of conduct](.github/CODE_OF_CONDUCT.md). -[mercury-url]: https://github.com/xbyorange/mercury -[mercury-sources-docs-url]: https://github.com/XbyOrange/mercury/blob/master/docs/sources/api.md - -[coveralls-image]: https://coveralls.io/repos/github/XbyOrange/mercury-memory/badge.svg -[coveralls-url]: https://coveralls.io/github/XbyOrange/mercury-memory -[travisci-image]: https://travis-ci.com/xbyorange/mercury-memory.svg?branch=master -[travisci-url]: https://travis-ci.com/xbyorange/mercury-memory -[last-commit-image]: https://img.shields.io/github/last-commit/xbyorange/mercury-memory.svg -[last-commit-url]: https://github.com/xbyorange/mercury-memory/commits -[license-image]: https://img.shields.io/npm/l/@xbyorange/mercury-memory.svg -[license-url]: https://github.com/xbyorange/mercury-memory/blob/master/LICENSE -[npm-downloads-image]: https://img.shields.io/npm/dm/@xbyorange/mercury-memory.svg -[npm-downloads-url]: https://www.npmjs.com/package/@xbyorange/mercury-memory -[npm-dependencies-image]: https://img.shields.io/david/xbyorange/mercury-memory.svg -[npm-dependencies-url]: https://david-dm.org/xbyorange/mercury-memory -[quality-gate-image]: https://sonarcloud.io/api/project_badges/measure?project=xbyorange-mercury-memory&metric=alert_status -[quality-gate-url]: https://sonarcloud.io/dashboard?id=xbyorange-mercury-memory -[release-image]: https://img.shields.io/github/release-date/xbyorange/mercury-memory.svg -[release-url]: https://github.com/xbyorange/mercury-memory/releases +[data-provider-url]: https://github.com/data-provider/core +[data-provider-sources-docs-url]: https://github.com/data-provider/core/blob/master/docs/sources/api.md + +[coveralls-image]: https://coveralls.io/repos/github/data-provider/memory/badge.svg +[coveralls-url]: https://coveralls.io/github/data-provider/memory +[travisci-image]: https://travis-ci.com/data-provider/memory.svg?branch=master +[travisci-url]: https://travis-ci.com/data-provider/memory +[last-commit-image]: https://img.shields.io/github/last-commit/data-provider/memory.svg +[last-commit-url]: https://github.com/data-provider/memory/commits +[license-image]: https://img.shields.io/npm/l/@data-provider/memory.svg +[license-url]: https://github.com/data-provider/memory/blob/master/LICENSE +[npm-downloads-image]: https://img.shields.io/npm/dm/@data-provider/memory.svg +[npm-downloads-url]: https://www.npmjs.com/package/@data-provider/memory +[npm-dependencies-image]: https://img.shields.io/david/data-provider/memory.svg +[npm-dependencies-url]: https://david-dm.org/data-provider/memory +[quality-gate-image]: https://sonarcloud.io/api/project_badges/measure?project=data-provider-memory&metric=alert_status +[quality-gate-url]: https://sonarcloud.io/dashboard?id=data-provider-memory +[release-image]: https://img.shields.io/github/release-date/data-provider/memory.svg +[release-url]: https://github.com/data-provider/memory/releases diff --git a/assets/logos/mercury_wings_orange_100.png b/assets/logos/mercury_wings_orange_100.png deleted file mode 100644 index 23e2e899847e007032da0874e1b719086111b720..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2605 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 P00000NkvXXu0mjfX*|-3 diff --git a/package-lock.json b/package-lock.json index 6297ab2..443c3b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@xbyorange/mercury-memory", - "version": "1.2.0", + "name": "@data-provider/memory", + "version": "1.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -861,6 +861,16 @@ "minimist": "^1.2.0" } }, + "@data-provider/core": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@data-provider/core/-/core-1.6.0.tgz", + "integrity": "sha512-bbNvhhO9VC+yzeNlcxVjtofTbUh1Zc8MD/5hSICIYNx9gS0QwxJ3WEIA8u/Tkec9lSYlyI9DtORX42aO+oHCVw==", + "dev": true, + "requires": { + "is-promise": "^2.1.0", + "lodash": "4.17.15" + } + }, "@jest/console": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", @@ -1261,16 +1271,6 @@ "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==", "dev": true }, - "@xbyorange/mercury": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@xbyorange/mercury/-/mercury-1.5.0.tgz", - "integrity": "sha512-7LxkOj0B+q3N37UOYn7tbK1Jto9be7/XNmjUvDB3wi4hb6csXZ1XgGN0DCMxgUg6aNjcjw+AymmYMTD6/+TYeA==", - "dev": true, - "requires": { - "is-promise": "^2.1.0", - "lodash": "4.17.15" - } - }, "abab": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.2.tgz", @@ -3438,8 +3438,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -3460,14 +3459,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3482,20 +3479,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -3612,8 +3606,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -3625,7 +3618,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3640,7 +3632,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3648,14 +3639,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3674,7 +3663,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -3755,8 +3743,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -3768,7 +3755,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3854,8 +3840,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -3891,7 +3876,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3911,7 +3895,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3955,14 +3938,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/package.json b/package.json index 99ce364..572a120 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,25 @@ { - "name": "@xbyorange/mercury-memory", - "version": "1.2.0", - "description": "Mercury memory origin", + "name": "@data-provider/memory", + "version": "1.3.0", + "description": "Memory Data Provider", "keywords": [ - "reactive", + "data-provider", "data", "crud", - "memory" + "memory", + "reactive" ], - "author": "XByOrange", + "author": "Javier Brea", "license": "Apache-2.0", - "repository": "https://github.com/xbyorange/mercury-memory", + "repository": "https://github.com/data-provider/memory", "publishConfig": { "access": "public" }, "files": [ "dist" ], - "main": "dist/mercury-memory.umd.js", - "module": "dist/mercury-memory.esm.js", + "main": "dist/memory.umd.js", + "module": "dist/memory.esm.js", "scripts": { "lint": "eslint src test", "lint-staged": "lint-staged", @@ -28,7 +29,7 @@ "coveralls": "cat ./coverage/lcov.info | coveralls" }, "peerDependencies": { - "@xbyorange/mercury": "1.5.0" + "@data-provider/core": "1.6.0" }, "dependencies": { "lodash": "4.17.15" @@ -37,7 +38,7 @@ "@babel/core": "^7.6.4", "@babel/preset-env": "^7.6.3", "@babel/preset-react": "^7.6.3", - "@xbyorange/mercury": "1.5.0", + "@data-provider/core": "1.6.0", "babel-core": "^7.0.0-bridge.0", "babel-jest": "^24.9.0", "babel-polyfill": "^6.26.0", diff --git a/rollup.config.js b/rollup.config.js index c6b13ce..4894175 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -25,12 +25,12 @@ const BASE_PLUGINS = [ const BASE_CONFIG = { input: "src/index.js", - external: ["@xbyorange/mercury", "lodash"], + external: ["@data-provider/core", "lodash"], plugins: [...BASE_PLUGINS, uglifier.uglify()] }; const GLOBALS = { - "@xbyorange/mercury": "mercury", + "@data-provider/core": "dataProvider", lodash: "lodash" }; @@ -38,16 +38,16 @@ module.exports = [ { ...BASE_CONFIG, output: { - file: "dist/mercury-memory.umd.js", + file: "dist/memory.umd.js", format: "umd", - name: "mercury-memory", + name: "memoryDataProvider", globals: GLOBALS } }, { ...BASE_CONFIG, output: { - file: "dist/mercury-memory.esm.js", + file: "dist/memory.esm.js", format: "esm", globals: GLOBALS }, diff --git a/sonar-project.properties b/sonar-project.properties index 1cc5a8e..b69a2f8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,6 @@ -sonar.organization=javierbrea -sonar.projectKey=xbyorange-mercury-memory -sonar.projectVersion=1.1.0 +sonar.organization=data-provider +sonar.projectKey=data-provider-memory +sonar.projectVersion=1.3.0 sonar.sources=src,test sonar.exclusions=node_modules/** @@ -9,3 +9,7 @@ sonar.coverage.exclusions=test/**/*,rollup.config.js,dist/**/* sonar.cpd.exclusions=test/** sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.host.url=https://sonarcloud.io + +sonar.issue.ignore.multicriteria=j1 +sonar.issue.ignore.multicriteria.j1.ruleKey=javascript:S4144 +sonar.issue.ignore.multicriteria.j1.resourceKey=test/**/* diff --git a/src/Memory.js b/src/Memory.js index b2b1045..a5fa896 100644 --- a/src/Memory.js +++ b/src/Memory.js @@ -1,4 +1,4 @@ -import { Origin } from "@xbyorange/mercury"; +import { Origin } from "@data-provider/core"; import { cloneDeep } from "lodash"; const TAG = "memory"; @@ -6,7 +6,7 @@ const TAG = "memory"; const ensureId = id => id || TAG; const traceLegacyOptions = () => { console.warn( - 'Defining "id" as second argument will be deprecated in next major versions of "mercury-memory". Please define an options object with "uuid" property' + 'Defining "id" as second argument will be deprecated in next major versions of "@data-provider/memory". Please define an options object with "uuid" property' ); }; @@ -42,7 +42,7 @@ export class Memory extends Origin { }; if (!options.queriesDefaultValue) { console.warn( - 'Usage of "queriesDefaultValue" option is recommended to prepare your code for next major version of "mercury-memory"' + 'Usage of "queriesDefaultValue" option is recommended to prepare your code for next major version of "@data-provider/memory"' ); } const getDefaultValue = function(query) { diff --git a/test/memory.spec.js b/test/memory.spec.js index 1516050..d313906 100644 --- a/test/memory.spec.js +++ b/test/memory.spec.js @@ -1,4 +1,4 @@ -const { sources } = require("@xbyorange/mercury"); +const { sources } = require("@data-provider/core"); const { Memory } = require("../src/index"); describe("Memory origin", () => { From 1c9ab6c4085b455b45bc952bfb06bff7d9e0dd86 Mon Sep 17 00:00:00 2001 From: javierbrea Date: Sat, 23 Nov 2019 09:25:58 +0100 Subject: [PATCH 2/2] Fix license --- rollup.config.js | 11 +++++++++++ src/Memory.js | 11 +++++++++++ src/index.js | 10 ++++++++++ test/index.spec.js | 10 ++++++++++ test/memory.spec.js | 11 +++++++++++ 5 files changed, 53 insertions(+) diff --git a/rollup.config.js b/rollup.config.js index 4894175..e7049db 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,3 +1,14 @@ +/* +Copyright 2019 Javier Brea +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +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. +*/ + const json = require("rollup-plugin-json"); const commonjs = require("rollup-plugin-commonjs"); const resolve = require("rollup-plugin-node-resolve"); diff --git a/src/Memory.js b/src/Memory.js index a5fa896..c738299 100644 --- a/src/Memory.js +++ b/src/Memory.js @@ -1,3 +1,14 @@ +/* +Copyright 2019 Javier Brea +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +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 { Origin } from "@data-provider/core"; import { cloneDeep } from "lodash"; diff --git a/src/index.js b/src/index.js index a93989c..57c4d98 100644 --- a/src/index.js +++ b/src/index.js @@ -1 +1,11 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +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. +*/ + export { Memory } from "./Memory"; diff --git a/test/index.spec.js b/test/index.spec.js index bb7c302..50314cb 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,3 +1,13 @@ +/* +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +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. +*/ + const index = require("../src/index"); describe("index", () => { diff --git a/test/memory.spec.js b/test/memory.spec.js index d313906..bc4b3c8 100644 --- a/test/memory.spec.js +++ b/test/memory.spec.js @@ -1,3 +1,14 @@ +/* +Copyright 2019 Javier Brea +Copyright 2019 XbyOrange + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +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. +*/ + const { sources } = require("@data-provider/core"); const { Memory } = require("../src/index");