diff --git a/.github/README.md b/.github/README.md index 9143b46..f35a775 100644 --- a/.github/README.md +++ b/.github/README.md @@ -4,6 +4,7 @@ [![gzip size](https://badgen.net/bundlephobia/minzip/antiutils?color=green)](https://bundlephobia.com/result?p=antiutils) [![tree shaking](https://badgen.net/bundlephobia/tree-shaking/antiutils)](https://bundlephobia.com/result?p=antiutils) [![types](https://img.shields.io/npm/types/antiutils?color=brightgreen)](https://www.npmjs.com/package/antiutils) +[![coverage status](https://coveralls.io/repos/github/ivan7237d/antiutils/badge.svg?branch=master)](https://coveralls.io/github/ivan7237d/antiutils?branch=master) TypeScript/JavaScript utilities for those who don't like utilities. diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..681d8ff --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - '14' + - '15' +script: + - yarn run coveralls +cache: yarn diff --git a/README.md b/README.md index 95d47ed..39bcab3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ + + +[![npm version](https://img.shields.io/npm/v/antiutils.svg?style=flat&color=brightgreen)](https://www.npmjs.com/package/antiutils) +[![license](https://img.shields.io/npm/l/antiutils.svg?color=brightgreen)](https://www.npmjs.com/package/antiutils) +[![downloads](https://img.shields.io/npm/dt/antiutils.svg?color=brightgreen)](https://www.npmjs.com/package/antiutils) [![gzip size](https://badgen.net/bundlephobia/minzip/antiutils?color=green)](https://bundlephobia.com/result?p=antiutils) [![tree shaking](https://badgen.net/bundlephobia/tree-shaking/antiutils)](https://bundlephobia.com/result?p=antiutils) [![types](https://img.shields.io/npm/types/antiutils?color=brightgreen)](https://www.npmjs.com/package/antiutils) +[![coverage status](https://coveralls.io/repos/github/ivan7237d/antiutils/badge.svg?branch=master)](https://coveralls.io/github/ivan7237d/antiutils?branch=master) TypeScript/JavaScript utilities for those who don't like utilities. Based on "only one way to do it" principle, this library provides a utility only when something can't be easily and readably accomplished with vanilla JavaScript. The library provides a pipeline operator ponyfill, functions for working with objects, arrays, maps, sets and iterables, memoization utilities, lenses, and more. diff --git a/package.json b/package.json index 5427cda..d9b5be2 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,11 @@ "reset-hard": "git clean -dfx && git reset --hard && yarn", "release:prepare": "run-s test doc:html version doc:publish", "release": "run-s release:prepare", - "commit": "cz" + "commit": "cz", + "coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls" }, "engines": { - "node": ">=10" + "node": ">=14" }, "dependencies": {}, "devDependencies": { @@ -60,6 +61,7 @@ "@typescript-eslint/eslint-plugin": "4.0.1", "@typescript-eslint/parser": "4.0.1", "commitizen": "4.2.2", + "coveralls": "3.1.0", "cz-conventional-changelog": "3.3.0", "eslint": "7.8.0", "eslint-config-prettier": "6.11.0", diff --git a/yarn.lock b/yarn.lock index e2d5ea8..65dfb57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2218,6 +2218,17 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +coveralls@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b" + integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ== + dependencies: + js-yaml "^3.13.1" + lcov-parse "^1.0.0" + log-driver "^1.2.7" + minimist "^1.2.5" + request "^2.88.2" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -4415,6 +4426,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lcov-parse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" + integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A= + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -4535,6 +4551,11 @@ lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +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== + longest@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-2.0.1.tgz#781e183296aa94f6d4d916dc335d0d17aefa23f8"