File: force-chalk-require.patch

package info (click to toggle)
node-yarnpkg 4.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,752 kB
  • sloc: javascript: 38,953; ansic: 26,035; cpp: 7,247; sh: 2,829; makefile: 724; perl: 493
file content (21 lines) | stat: -rw-r--r-- 1,933 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Force use of chalk cjs (v4) instead of chalk esm (v5)
--- a/packages/yarnpkg-core/sources/formatUtils.ts
+++ b/packages/yarnpkg-core/sources/formatUtils.ts
@@ -1,5 +1,5 @@
 import {npath}                                                              from '@yarnpkg/fslib';
-import chalk                                                                from 'chalk';
+import chalk                                                                from '/usr/share/nodejs/chalk/cjs/index.cjs';
 import CI                                                                   from 'ci-info';
 import {ColorFormat, formatMarkdownish}                                     from 'clipanion';
 import micromatch                                                           from 'micromatch';
--- a/packages/yarnpkg-shell/sources/index.ts
+++ b/packages/yarnpkg-shell/sources/index.ts
@@ -1,7 +1,7 @@
 import {PortablePath, npath, ppath, FakeFS, NodeFS}                                                         from '@yarnpkg/fslib';
 import {Argument, ArgumentSegment, CommandChain, CommandLine, ShellLine, parseShell, stringifyCommandChain} from '@yarnpkg/parsers';
 import {EnvSegment, ArithmeticExpression, ArithmeticPrimary}                                                from '@yarnpkg/parsers';
-import chalk                                                                                                from 'chalk';
+import chalk                                                                                                from '/usr/share/nodejs/chalk/cjs/index.cjs';
 import {homedir}                                                                                            from 'os';
 import {PassThrough, Readable, Writable}                                                                    from 'stream';
 import {setTimeout}                                                                                         from 'timers/promises';