@8select/strulo
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@8select/strulo", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Log messages in a structured format.", | ||
"main": "index.js", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "DEBUG=DEBUG,INFO,ERROR jest" | ||
"precommit": "lint-staged", | ||
"prepush": "npm test -- --coverage && npm run coverbadge && dit add badges/coverage.svg && git commit -m \"update test coverage badge\"", | ||
"test": "DEBUG=DEBUG,INFO,ERROR jest", | ||
"build": "npm run build:lib && npm run build:flow", | ||
"build:lib": "babel --out-dir lib src", | ||
"build:flow": "flow-copy-source src lib", | ||
"prepublish": "npm run build", | ||
"coverbadge": "cat coverage/lcov.info | coverbadge -o ./badges/coverage.svg" | ||
}, | ||
@@ -35,5 +42,41 @@ "repository": { | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-eslint": "^8.0.1", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-transform-flow-strip-types": "^6.22.0", | ||
"babel-preset-env": "^1.6.1", | ||
"coverbadge": "^0.5.5", | ||
"eslint": "^4.9.0", | ||
"eslint-config-8select-node": "github:8select/eslint-config-8select-node#WGT-434-update-to-lambda-blueprint-reference", | ||
"flow-bin": "^0.57.3", | ||
"flow-copy-source": "^1.2.1", | ||
"intercept-stdout": "^0.1.2", | ||
"jest": "^21.1.0" | ||
"jest": "^21.1.0", | ||
"lint-staged": "^4.3.0", | ||
"prettier": "^1.7.4" | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.js" | ||
], | ||
"moduleDirectories": [ | ||
"node_modules" | ||
], | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 100, | ||
"functions": 100, | ||
"lines": 100, | ||
"statements": 100 | ||
} | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"prettier --parser flow --print-width 120 --no-semi --single-quote --write", | ||
"eslint --fix", | ||
"git add" | ||
] | ||
} | ||
} |
@@ -0,4 +1,10 @@ | ||
# strulo | ||
[![CircleCI](https://circleci.com/gh/8select/strulo/tree/master.svg?style=svg)](https://circleci.com/gh/8select/strulo/tree/master) | ||
# strulo | ||
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![](https://img.shields.io/npm/v/@8select/strulo.svg)](https://www.npmjs.com/package/@8select/strulo) | ||
[![](https://img.shields.io/npm/dm/@8select/strulo.svg)](https://www.npmjs.com/package/@8select/strulo) | ||
![module formats: cjs, esm](https://img.shields.io/badge/module%20formats-cjs%2C%20esm-green.svg) | ||
![](/badges/coverage.svg) | ||
Log messages in a structured format | ||
@@ -9,7 +15,7 @@ | ||
`npm install --save strulo` | ||
`npm install --save @8select/strulo` | ||
## How to use it | ||
## How to use it | ||
```js | ||
const logger = require('strulo') | ||
const logger = require('@8select/strulo') | ||
logger.debug('hello') | ||
@@ -32,2 +38,18 @@ logger.info('hello from strulo') | ||
ERROR {"message":"some error","level":"400","level_name":"ERROR","time":1506502554430} +40s | ||
``` | ||
``` | ||
# directory structure | ||
```sh | ||
+-- lib - "contains the lib files (ES5) + flow definitions" | ||
| +-- index.js - "which is compiled with Babel and stripped of types" | ||
| +-- index.js.flow - "which is the original file, with types left in it" | ||
| +-- info.js | ||
| +-- info.js.flow | ||
| +-- ... | ||
+-- src - "contains the source files (ES.next)" | ||
| +-- index.js | ||
| +-- info.js | ||
| +-- ... | ||
+-- test - "contains unit tests to related src structure | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20
54
1
17066
14
218