@react-foundry/fastify-dev-logger 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest.config.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const baseConfig = require('../../jest.config.base');
3
+ const baseConfig = require('../../jest.config.base.cjs');
4
4
 
5
5
  const config = {
6
6
  ...baseConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-foundry/fastify-dev-logger",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "A Pino transport for pretty printing Fastify logs in dev environments.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/spec/index.js CHANGED
@@ -16,6 +16,7 @@ describe('fastifyDevLogger', () => {
16
16
  write(chunk, _enc, cb) {
17
17
  output.push(
18
18
  stripColours(chunk.toString())
19
+ .replace(/^\r/, '')
19
20
  .replace(/\n$/, '')
20
21
  );
21
22
  cb();
@@ -106,7 +107,7 @@ describe('fastifyDevLogger', () => {
106
107
  it('outputs log level', () => expect(output[0]).toContain('info'));
107
108
  it('outputs the time', () => expect(output[0]).toMatch(timeRegex));
108
109
  it('outputs in the correct format', () => expect(output[0]).toMatch(new RegExp(
109
- `^${timePattern} info \\(C3\\) \\| GET /path/to/resource - request completed; 200 OK \\(1066ms\\)$`
110
+ `^${timePattern} info \\(C3\\) \\| GET /path/to/resource - request completed; 200 OK \\(1.07s\\)$`
110
111
  )));
111
112
  });
112
113
  });