elastic / ecs-logging-nodejs

https://www.elastic.co/guide/en/ecs-logging/nodejs/master/intro.html
Apache License 2.0
68 stars 39 forks source link

test: add TAV tests for pino and winston supported versions #160

Closed trentm closed 1 year ago

trentm commented 1 year ago

We support pino@6, pino@7, pino@8, and winston@3.

Refs: https://github.com/elastic/ecs-logging-nodejs/pull/131 Refs: https://github.com/elastic/ecs-logging-nodejs/issues/115


This adds "TAV" (test-all-versions) tests to test against supported versions of pino and winston. I didn't bother with morgan because there hasn't been a new release of it for years. CI is setup to run this once per week.

trentm commented 1 year ago

Here are npm run tav runs for pino and winston using node v16:

% npm run tav

> @elastic/ecs-pino-format@1.4.0 tav
> tav --quiet

-- required packages ["pino@8.16.1"]
-- installing ["pino@8.16.1"]
-- running test "npm test" with pino (env: {})
-- required packages ["pino@8.0.0"]
-- installing ["pino@8.0.0"]
-- running test "npm test" with pino (env: {})
-- required packages ["pino@7.11.0"]
-- installing ["pino@7.11.0"]
-- running test "npm test" with pino (env: {})
-- required packages ["pino@7.0.0"]
-- installing ["pino@7.0.0"]
-- running test "npm test" with pino (env: {})
-- required packages ["pino@6.14.0"]
-- installing ["pino@6.14.0"]
-- running test "npm test" with pino (env: {})
-- required packages ["pino@6.0.0"]
-- installing ["pino@6.0.0"]
-- running test "npm test" with pino (env: {})
-- ok

I did manually do a run with all pino versions, but that's too many versions.

% npm run tav

> @elastic/ecs-winston-format@1.4.0 tav
> tav --quiet

-- required packages ["winston@3.11.0"]
-- installing ["winston@3.11.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.10.0"]
-- installing ["winston@3.10.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.9.0"]
-- installing ["winston@3.9.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.8.2"]
-- installing ["winston@3.8.2"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.8.1"]
-- installing ["winston@3.8.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.8.0"]
-- installing ["winston@3.8.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.7.2"]
-- installing ["winston@3.7.2"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.7.1"]
-- installing ["winston@3.7.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.6.0"]
-- installing ["winston@3.6.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.5.1"]
-- installing ["winston@3.5.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.5.0"]
-- installing ["winston@3.5.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.4.0"]
-- installing ["winston@3.4.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.3.4"]
-- installing ["winston@3.3.4"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.3.3"]
-- installing ["winston@3.3.3"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.3.2"]
-- installing ["winston@3.3.2"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.3.1"]
-- installing ["winston@3.3.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.3.0"]
-- installing ["winston@3.3.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.2.1"]
-- installing ["winston@3.2.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.2.0"]
-- installing ["winston@3.2.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.1.0"]
-- installing ["winston@3.1.0"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.0.1"]
-- installing ["winston@3.0.1"]
-- running test "npm test" with winston (env: {})
-- required packages ["winston@3.0.0"]
-- installing ["winston@3.0.0"]
-- running test "npm test" with winston (env: {})
-- ok