Skip to content

Commit e6cc200

Browse files
chore: update deps 2025-08-18 (#1808)
1 parent 792d711 commit e6cc200

File tree

4 files changed

+506
-498
lines changed

4 files changed

+506
-498
lines changed

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
"typings/index.flow.js"
4848
],
4949
"dependencies": {
50-
"chalk": "^4.1.2",
51-
"jest-matcher-utils": "^30.0.2",
52-
"pretty-format": "^30.0.2",
50+
"jest-matcher-utils": "^30.0.5",
51+
"picocolors": "^1.1.1",
52+
"pretty-format": "^30.0.5",
5353
"redent": "^3.0.0"
5454
},
5555
"peerDependencies": {
@@ -64,36 +64,36 @@
6464
}
6565
},
6666
"devDependencies": {
67-
"@babel/cli": "^7.25.9",
68-
"@babel/core": "^7.26.0",
69-
"@babel/plugin-transform-strict-mode": "^7.25.9",
70-
"@babel/preset-env": "^7.26.0",
71-
"@babel/preset-flow": "^7.25.9",
72-
"@babel/preset-react": "^7.25.9",
73-
"@babel/preset-typescript": "^7.26.0",
67+
"@babel/cli": "^7.28.3",
68+
"@babel/core": "^7.28.3",
69+
"@babel/plugin-transform-strict-mode": "^7.27.1",
70+
"@babel/preset-env": "^7.28.3",
71+
"@babel/preset-flow": "^7.27.1",
72+
"@babel/preset-react": "^7.27.1",
73+
"@babel/preset-typescript": "^7.27.1",
7474
"@callstack/eslint-config": "^15.0.0",
75-
"@react-native/babel-preset": "0.81.0-rc.3",
76-
"@release-it/conventional-changelog": "^10.0.0",
75+
"@react-native/babel-preset": "0.81.0",
76+
"@release-it/conventional-changelog": "^10.0.1",
7777
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
7878
"@types/jest": "^30.0.0",
79-
"@types/node": "^24.0.13",
80-
"@types/react": "^19.1.0",
79+
"@types/node": "^24.3.0",
80+
"@types/react": "^19.1.10",
8181
"@types/react-test-renderer": "^19.1.0",
82-
"babel-jest": "^30.0.2",
82+
"babel-jest": "^30.0.5",
8383
"babel-plugin-module-resolver": "^5.0.2",
8484
"del-cli": "^6.0.0",
85-
"eslint": "^9.17.0",
85+
"eslint": "^9.33.0",
8686
"eslint-plugin-simple-import-sort": "^12.1.1",
8787
"flow-bin": "~0.170.0",
88-
"jest": "^30.0.2",
89-
"prettier": "^2.8.8",
88+
"jest": "^30.0.5",
89+
"prettier": "^3.6.2",
9090
"react": "19.1.0",
91-
"react-native": "0.81.0-rc.3",
92-
"react-native-gesture-handler": "^2.27.1",
91+
"react-native": "0.81.0",
92+
"react-native-gesture-handler": "^2.28.0",
9393
"react-test-renderer": "19.1.0",
94-
"release-it": "^19.0.3",
95-
"typescript": "^5.6.3",
96-
"typescript-eslint": "^8.19.1"
94+
"release-it": "^19.0.4",
95+
"typescript": "^5.9.2",
96+
"typescript-eslint": "^8.39.1"
9797
},
9898
"publishConfig": {
9999
"registry": "https://registry.npmjs.org"

src/helpers/__tests__/logger.test.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { _console, logger } from '../logger';
2+
3+
beforeEach(() => {
4+
jest.spyOn(_console, 'debug').mockImplementation(() => {});
5+
jest.spyOn(_console, 'info').mockImplementation(() => {});
6+
jest.spyOn(_console, 'warn').mockImplementation(() => {});
7+
jest.spyOn(_console, 'error').mockImplementation(() => {});
8+
});
9+
10+
test('debug should call console.debug', () => {
11+
logger.debug('test message');
12+
13+
expect(_console.debug).toHaveBeenCalledTimes(1);
14+
expect(jest.mocked(_console.debug).mock.calls[0][0]).toMatchInlineSnapshot(`
15+
" ● test message
16+
"
17+
`);
18+
});
19+
20+
test('should call console.info', () => {
21+
logger.info('info message');
22+
23+
expect(_console.info).toHaveBeenCalledTimes(1);
24+
expect(jest.mocked(_console.info).mock.calls[0][0]).toMatchInlineSnapshot(`
25+
" ● info message
26+
"
27+
`);
28+
});
29+
30+
test('should call console.warn', () => {
31+
logger.warn('warning message');
32+
33+
expect(_console.warn).toHaveBeenCalledTimes(1);
34+
expect(jest.mocked(_console.warn).mock.calls[0][0]).toMatchInlineSnapshot(`
35+
" ▲ warning message
36+
"
37+
`);
38+
});
39+
40+
test('should call console.error', () => {
41+
logger.error('error message');
42+
43+
expect(_console.error).toHaveBeenCalledTimes(1);
44+
expect(jest.mocked(_console.error).mock.calls[0][0]).toMatchInlineSnapshot(`
45+
" ■ error message
46+
"
47+
`);
48+
});

src/helpers/logger.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
import chalk from 'chalk';
21
import * as nodeConsole from 'console';
2+
import pc from 'picocolors';
33
import redent from 'redent';
44
import * as nodeUtil from 'util';
55

6+
export const _console = {
7+
debug: nodeConsole.debug,
8+
info: nodeConsole.info,
9+
warn: nodeConsole.warn,
10+
error: nodeConsole.error,
11+
};
12+
613
export const logger = {
714
debug(message: unknown, ...args: unknown[]) {
815
const output = formatMessage('●', message, ...args);
9-
nodeConsole.debug(chalk.dim(output));
16+
_console.debug(pc.dim(output));
1017
},
1118

1219
info(message: unknown, ...args: unknown[]) {
1320
const output = formatMessage('●', message, ...args);
14-
nodeConsole.info(output);
21+
_console.info(output);
1522
},
1623

1724
warn(message: unknown, ...args: unknown[]) {
1825
const output = formatMessage('▲', message, ...args);
19-
nodeConsole.warn(chalk.yellow(output));
26+
_console.warn(pc.yellow(output));
2027
},
2128

2229
error(message: unknown, ...args: unknown[]) {
2330
const output = formatMessage('■', message, ...args);
24-
nodeConsole.error(chalk.red(output));
31+
_console.error(pc.red(output));
2532
},
2633
};
2734

0 commit comments

Comments
 (0)