Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TS types #913

Merged
merged 12 commits into from
May 28, 2021
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pino.d.ts
test/types/pino.test-d.ts
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"version": "6.11.3",
"description": "super fast, all natural json logger",
"main": "pino.js",
"type": "commonjs",
"types": "pino.d.ts",
"browser": "./browser.js",
"files": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcollina and @davidmarkclements I thought we removed this difficult to maintain property from the package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fastify uses .npmignore instead. If that is the way, I can use same approach here as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remember we used this here even. Let's not change it in this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Just asking because it got added in pino-std-serializers with this types stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsumners pino-std-serializer currently bundles all the garbage such as travis config, which felt not ideal. I can remove it from there if you feel strongly about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we actually settled on files 🤦‍♂️

#136

"pino.js",
"pino.d.ts",
"bin.js",
"browser.js",
"pretty.js",
Expand All @@ -19,8 +22,9 @@
"docs": "docsify serve",
"browser-test": "airtap --local 8080 test/browser*test.js",
"lint": "eslint .",
"test": "npm run lint && tap --100 test/*test.js test/*/*test.js",
"test": "npm run lint && tap --100 test/*test.js test/*/*test.js && npm run test:types",
"test-ci": "npm run lint && tap test/*test.js test/*/*test.js --coverage-report=lcovonly",
"test-types": "tsc && tsd",
"cov-ui": "tap --coverage-report=html test/*test.js test/*/*test.js",
"bench": "node benchmarks/utils/runbench all",
"bench-basic": "node benchmarks/utils/runbench basic",
Expand Down Expand Up @@ -60,6 +64,7 @@
},
"homepage": "http://getpino.io",
"devDependencies": {
"@types/node": "^15.3.0",
"airtap": "4.0.3",
"benchmark": "^2.1.4",
"bole": "^4.0.0",
Expand All @@ -76,7 +81,7 @@
"import-fresh": "^3.2.1",
"log": "^6.0.0",
"loglevel": "^1.6.7",
"pino-pretty": "^4.1.0",
"pino-pretty": "^5.0.0",
"pre-commit": "^1.2.2",
"proxyquire": "^2.1.3",
"pump": "^3.0.0",
Expand All @@ -87,13 +92,18 @@
"tap": "^15.0.1",
"tape": "^5.0.0",
"through2": "^4.0.0",
"tsd": "^0.15.1",
"typescript": "^4.2.4",
"winston": "^3.3.3"
},
"dependencies": {
"fast-redact": "^3.0.0",
"fast-safe-stringify": "^2.0.7",
"pino-std-serializers": "^3.1.0",
"pino-std-serializers": "^4.0.0",
"quick-format-unescaped": "^4.0.3",
"sonic-boom": "^1.0.2"
"sonic-boom": "^2.0.1"
},
"tsd": {
"directory": "test/types"
}
}
Loading