diff --git a/README.md b/README.md index ac91dd0..3c846ae 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,41 @@ function updateFirstName(newName) { } ``` +# concepts + +val + +drv + +sub + +objects + +factories + +structural immutability + +mutability granularity + +rendering iwth react + +STATE DESIGN + +refs + +preprocessor validation + +preprocessor objects + + +models + +ADVANCED +updaes wit immer + +drv with setter + + # Api ## `val` @@ -176,14 +211,16 @@ Todo: * [ ] `drv(( tick ) => ())` * [x] ~`sub({ scheduler, onInvalidate(f (track)))})`~ -> `effect` * [ ] docs -* [ ] setup coveralls +* [x] setup coveralls * [x] rval-models * [ ] rval-react * [x] rval-immer -* [ ] custom schedulers +* [x] custom schedulers * [x] custom preprocessors * [ ] rename `sub` to `on`? * [ ] toJS +* [ ] `drv` with setter +* [ ] combine preprocessor array * [ ] config: warn on unbatched writes * [ ] config: warn on untracked, stale reads * [x] eliminate Reaction class @@ -191,6 +228,7 @@ Todo: * [x] swap export statement in `tests/rval.ts` in CI to test minified build * [x] mobx like evaluation order of drv * [ ] fix sourcemaps for minified builds +* [ ] rval-validation * [ ] rval-remote Later diff --git a/package.json b/package.json index a5657f6..c3d2bb2 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,11 @@ "build": "rimraf core immer models react && cross-env NODE_ENV=production rollup -c rollup.config.js && mv core/src/rval-core.d.ts core/index.d.ts && mv immer/src/rval-immer.d.ts immer/index.d.ts && mv models/src/rval-models.d.ts models/index.d.ts && mv react/src/rval-react.d.ts react/index.d.ts && rimraf core/src immer/src models/src react/src", "watch": "jest --config jest.config.json --watch", "test": "jest --config jest.config.test.json", - "coverage": "jest --runInBand --coverage --config jest.config.json" + "coverage": "jest --runInBand --coverage --config jest.config.json && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" }, "author": "Michel Weststrate", "license": "MIT", - "dependencies": { - "deepfreeze": "^2.0.0" - }, + "dependencies": {}, "files": [ "core", "immer", @@ -29,6 +27,7 @@ "devDependencies": { "@types/jest": "^23.3.9", "@types/node": "^10.12.10", + "coveralls": "^3.0.2", "cross-env": "^5.2.0", "immer": "^1.8.0", "jest": "^23.6.0", diff --git a/yarn.lock b/yarn.lock index 2b03711..95cb4f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -728,6 +728,18 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +coveralls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.2.tgz#f5a0bcd90ca4e64e088b710fa8dda640aea4884f" + integrity sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw== + dependencies: + growl "~> 1.10.0" + js-yaml "^3.11.0" + lcov-parse "^0.0.10" + log-driver "^1.2.7" + minimist "^1.2.0" + request "^2.85.0" + cross-env@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2" @@ -832,13 +844,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepfreeze@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deepfreeze/-/deepfreeze-2.0.0.tgz#ac5ed71069fd5e96dc01e400dd1edff133a5b0f9" - integrity sha1-rF7XEGn9XpbcAeQA3R7f8TOlsPk= - dependencies: - x-is-object "^0.1.0" - default-require-extensions@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" @@ -1349,6 +1354,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== +"growl@~> 1.10.0": + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -2191,7 +2201,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.7.0: +js-yaml@^3.11.0, js-yaml@^3.7.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== @@ -2321,6 +2331,11 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcov-parse@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -2368,6 +2383,11 @@ lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +log-driver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== + loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -3164,7 +3184,7 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@^2.87.0: +request@^2.85.0, request@^2.87.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -4038,11 +4058,6 @@ ws@^5.2.0: dependencies: async-limiter "~1.0.0" -x-is-object@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/x-is-object/-/x-is-object-0.1.0.tgz#8f9496d1686df487156096e76ca9944efc15bfec" - integrity sha1-j5SW0Wht9IcVYJbnbKmUTvwVv+w= - xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"