-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(scripts): use solution ts config when enabled within tsc just task #20515
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,11 @@ const useTsBuildInfo = | |
* > - Without setting rootDir we would get output dir mapping following path from monorepo root | ||
*/ | ||
function prepareTsTaskConfig(options: TscTaskOptions) { | ||
const tsConfigFilePath = resolveCwd('./tsconfig.json'); | ||
const tsConfigMainFilePath = resolveCwd('./tsconfig.json'); | ||
const tsConfigLibFilePath = resolveCwd('./tsconfig.lib.json'); | ||
const isUsingTsSolutionConfigs = fs.existsSync(tsConfigLibFilePath); | ||
|
||
const tsConfigFilePath = isUsingTsSolutionConfigs ? tsConfigLibFilePath : tsConfigMainFilePath; | ||
const tsConfig: TsConfig = jju.parse(fs.readFileSync(tsConfigFilePath, 'utf-8')); | ||
|
||
if (tsConfig.extends) { | ||
|
@@ -40,10 +44,13 @@ function prepareTsTaskConfig(options: TscTaskOptions) { | |
const normalizedOptions = { ...options }; | ||
normalizedOptions.baseUrl = '.'; | ||
normalizedOptions.rootDir = './src'; | ||
normalizedOptions.project = path.basename(tsConfigFilePath); | ||
|
||
return normalizedOptions; | ||
} | ||
|
||
options.target = 'es5'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you didn't remove any hardcoded There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed them from all tsc tasks by default to maintain old behaviours (please mind the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually just checked this recently, the hardcoded |
||
|
||
return options; | ||
} | ||
|
||
|
@@ -88,6 +95,7 @@ export const ts = { | |
const extraOptions = getExtraTscParams(getJustArgv()); | ||
const options = prepareTsTaskConfig({ | ||
...extraOptions, | ||
target: 'es5', | ||
outDir: 'lib-amd', | ||
module: 'amd', | ||
...(useTsBuildInfo && { tsBuildInfoFile: '.amd.tsbuildinfo' }), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microsoft/just#561
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I don't quite understand how the issue relates to this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that we cannot use build mode at this point, which is ok for now.