You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Code"
I am currently in the process of converting a project to a monorepo. Here I noticed that tsc -b seems to ignore the --pretty flag defined in a parent tsconfig when its run through lerna (with the stream flag set to true).
The project is set up as follows tsconfig.json: pretty => true tsconfig.build.json: extends from tsconfig.json package/package-name/tsconfig.build.json: extends from ../../tsconfig.build.json package/package-name/package.json defines the npm scripts
The pretty flag only works sometimes:
If I manually execute npm run build in the package dir, the tsc output is pretty.
If I execute lerna run build --scope=package-name, the tsc output is NOT pretty.
If I execute lerna exec --scope=package-name -- npm run build, the tsc output is pretty.
If I manually add the --pretty flag to the npm script ("tsc -b tsconfig.build.json --watch --pretty"), the tsc output is pretty in all the cases.
Although this might be caused by lerna, I suspect this is actually a bug in TypeScript, because the prebuild output from gulp is colored (pretty) in all the cases I mentioned and manually adding the flag also works.
TypeScript Version: 39.4
Search Terms: build pretty
"Code"
I am currently in the process of converting a project to a monorepo. Here I noticed that
tsc -b
seems to ignore the--pretty
flag defined in a parent tsconfig when its run through lerna (with the stream flag set to true).The project is set up as follows
tsconfig.json
: pretty => truetsconfig.build.json
: extends from tsconfig.jsonpackage/package-name/tsconfig.build.json
: extends from../../tsconfig.build.json
package/package-name/package.json
defines the npm scriptsThe pretty flag only works sometimes:
If I manually execute
npm run build
in the package dir, the tsc output is pretty.If I execute
lerna run build --scope=package-name
, the tsc output is NOT pretty.If I execute
lerna exec --scope=package-name -- npm run build
, the tsc output is pretty.If I manually add the
--pretty
flag to the npm script ("tsc -b tsconfig.build.json --watch --pretty"
), the tsc output is pretty in all the cases.Although this might be caused by lerna, I suspect this is actually a bug in TypeScript, because the
prebuild
output fromgulp
is colored (pretty) in all the cases I mentioned and manually adding the flag also works.Expected behavior:
CLI output is "pretty"
Actual behavior:
It is not
Playground Link: not applicable
Related Issues: #30282
The text was updated successfully, but these errors were encountered: