Stephen Grider
2667daccda
Optimize chalk performance with template literal and style caching improvements
...
- Cache style.open and style.close to reduce property access overhead
- Add configurable flag to Object.defineProperty for proper property redefinition
- Optimize createStyler with fast path for no parent scenario
- Improve template literal handling with dedicated fast path
- Add early returns for strings without escape codes or newlines
- Use indexOf checks instead of includes for better performance
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 17:03:40 -06:00
Edwin Kofler
4ebb62d1ca
Fix navigator not defined ReferenceError ( #642 )
2024-12-21 18:01:49 +01:00
Sindre Sorhus
f8381204fb
Update CIRCLECI environments to return level 3 color support
...
89a52f4a8e
2024-12-18 18:58:03 +01:00
Sindre Sorhus
77126fba13
Meta tweaks
2024-08-08 00:00:20 +02:00
Sindre Sorhus
df0e69df51
Fix CI
2023-06-29 12:50:22 +02:00
silverwind
29b856959f
Update supports-color to 9.4.0 ( #603 )
...
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2023-06-29 12:47:28 +02:00
idanran
7443e9faa0
Update supports-color dependency ( #579 )
2022-12-08 19:43:43 +01:00
Sindre Sorhus
a027e3c1e0
Minor tweaks
2022-11-28 14:15:46 +07:00
LitoMore
a34bcf6327
Fix exported styles names ( #569 )
2022-10-12 23:30:36 +07:00
LitoMore
6e0df055f4
Export styles from ansi-styles ( #567 )
2022-10-12 16:35:02 +07:00
LitoMore
d7d75717b3
Expose style names ( #566 )
...
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2022-10-05 21:44:40 +07:00
Sindre Sorhus
96f44c976b
Meta tweaks
2022-10-05 21:43:01 +07:00
Matt Schlenker
c2311622c3
Use template literal types for simple color name transformations in the TypeScript types ( #564 )
2022-09-25 12:24:19 +07:00
Richie Bendall
b17d862944
Improve browser detection ( #542 )
2022-03-30 12:41:57 +07:00
CommanderRoot
d28690e66b
Refactor: Replace deprecated String#substr() ( #541 )
2022-03-28 01:11:02 +07:00
Sindre Sorhus
7a6893551d
Fix code coverage
2021-11-26 16:55:15 +07:00
Sindre Sorhus
04fdbd6d8d
Bundle dependencies
2021-11-26 16:34:27 +07:00
Richie Bendall
09fd5c4ba8
Re-export types from supports-color ( #526 )
2021-11-21 13:51:24 +07:00
Richie Bendall
c987c61486
Remove support for tagged template literals ( #524 )
2021-11-10 16:12:33 +07:00
Richie Bendall
3761e455a1
Meta tweak ( #520 )
2021-10-25 02:07:02 +07:00
Sindre Sorhus
95217429be
Minor tweaks
2021-10-02 00:02:38 +07:00
Sindre Sorhus
625a285772
Add types field to package.json
...
Fixes #500
2021-07-30 17:35:30 +02:00
Richie Bendall
f8a3642a81
Minor tweaks ( #437 )
...
Co-authored-by: Qix <Qix-@users.noreply.github.com>
2021-04-22 15:03:48 +07:00
Richie Bendall
4cf2e40e07
Add overline style and remove keyword, hsl, hsv, hwb and ansi color spaces ( #433 )
2021-04-22 10:54:42 +07:00
Richie Bendall
0fba91b037
Keep function prototype methods ( #434 )
2021-04-20 13:48:30 +07:00
Richie Bendall
d798222a5a
Add named exports ( #432 )
2021-04-17 19:33:03 +07:00
Sindre Sorhus
fa16f4ec37
Require Node.js 12 and move to ESM
2021-04-16 16:22:53 +07:00
Richie Bendall
02abeebac3
Only iterate through models once ( #421 )
2020-11-21 20:07:13 +07:00
Richie Bendall
c0d8e7ed8a
Update test dependencies ( #414 )
2020-10-03 23:56:24 +02:00
Toon Baeyens
09ddbadcb5
Support template literals for nested calls ( #392 )
...
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2020-06-09 15:36:34 +08:00
Sindre Sorhus
61999a4e77
Require Node.js 10
2020-04-02 16:10:07 +08:00
Sindre Sorhus
f0f4638a92
Change the TypeScript Level type to be a union instead of enum
...
Fixes #373
Fixes #382
2020-04-02 15:51:17 +08:00
Richie Bendall
7f21f209da
Properly check if level is an integer ( #393 )
2020-04-02 15:49:20 +08:00
Bradley Farias
63469d30e4
Use Object.setPrototypeOf as __proto__ could potentially be disabled ( #387 )
2020-04-02 15:47:12 +08:00
Yanis Benson
61aca7cb76
Improve require speed ( #358 )
2019-09-27 10:55:19 +07:00
Khải
4e65299e7b
Fix const enum for TypeScript ( #364 )
2019-09-27 10:53:54 +07:00
Yanis Benson
2a53389d72
Add chalk.stderr ( #359 )
2019-09-22 16:07:33 +07:00
Qix
1f77953f1a
Remove the .enabled property in favor of .level ( #356 )
2019-07-13 12:45:31 +07:00
Ahad Birang
87156ce8e2
Fix support for nested styles ( #335 )
2019-07-13 01:49:56 +07:00
Sindre Sorhus
c25c32a25f
Update dependencies
2019-07-12 14:13:58 +07:00
Sindre Sorhus
655653bb0c
Meta tweaks
2019-07-12 14:13:02 +07:00