@trayio/winston 5.32.0 → 5.34.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.
@@ -8,6 +8,15 @@ jest.mock('winston', () => ({
8
8
  Logger: jest.fn(),
9
9
  }));
10
10
  describe('Logger', () => {
11
+ // The logger reports the running package's name (npm_package_name). Pin it, so the expectations do not
12
+ // depend on whether jest was started from the repo root or from this module.
13
+ const originalPackageName = process.env.npm_package_name;
14
+ beforeAll(() => {
15
+ process.env.npm_package_name = 'tray-typescript-sdk';
16
+ });
17
+ afterAll(() => {
18
+ process.env.npm_package_name = originalPackageName;
19
+ });
11
20
  const mockedCreateLogger = winston_1.createLogger;
12
21
  beforeEach(() => {
13
22
  jest.clearAllMocks();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/winston",
3
- "version": "5.32.0",
3
+ "version": "5.34.0",
4
4
  "description": "Tray implementation of Winston logger",
5
5
  "author": "Tray.io",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@trayio/commons": "5.32.0",
11
+ "@trayio/commons": "5.34.0",
12
12
  "chalk": "4.1.2",
13
13
  "json-colorizer": "2.2.2",
14
14
  "winston": "3.8.2"
@@ -26,5 +26,11 @@
26
26
  },
27
27
  "files": [
28
28
  "/dist"
29
- ]
29
+ ],
30
+ "scripts": {
31
+ "clean": "rm -rf dist tsconfig.tsbuildinfo",
32
+ "compile": "tsc --build && tscp",
33
+ "test:integration": "jest --config ../../jest.config.integration.js --passWithNoTests --testPathPattern integration.test",
34
+ "test:unit": "jest --config ../../jest.config.js --passWithNoTests --testPathPattern unit.test"
35
+ }
30
36
  }