Skip to content
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

fix(scripts): non build tsc would fail if there is only one project #69

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

SimeonC
Copy link
Collaborator

@SimeonC SimeonC commented Jul 28, 2022

An issue occured in tablekit-next where if there was only one typescript package the project build would fail with Debug Failure. project /…/tablekit-next/tsconfig.json expected to have at least one output

This PR fixes that issue by detecting if we are doing a "type check" (ie non-build) and if there is only one TS project in the lerna repo then we replace the top level config with a copy of the tsconfig in the child project so we then run a "single" run not a projects/workspace run (all paths are absolute so this has no issues).

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @tablecheck/scripts@2.3.1-canary.69.2751406635.0
# or 
yarn add @tablecheck/scripts@2.3.1-canary.69.2751406635.0

@SimeonC SimeonC added the patch Increment the patch version when merged label Jul 28, 2022
@github-actions
Copy link

github-actions bot commented Jul 28, 2022

Unit Test Results

55 tests   55 ✔️  9s ⏱️
  9 suites    0 💤
  2 files      0

Results for commit d978ecc.

♻️ This comment has been updated with latest results.

An issue occured in tablekit-next where if there was only one typescript package the project build would fail with `Debug Failure. project /…/tablekit-next/tsconfig.json expected to have at least one output`
@SimeonC SimeonC force-pushed the fix-single-lerna-project-lint branch from 4349f10 to d978ecc Compare July 28, 2022 04:59
@daniellizik
Copy link
Contributor

if there is only one TS project in the lerna repo then we replace the top level config with a copy of the tsconfig in the child project

it isn't possible to just use the top level tsconfig?

@SimeonC
Copy link
Collaborator Author

SimeonC commented Jul 28, 2022

if there is only one TS project in the lerna repo then we replace the top level config with a copy of the tsconfig in the child project

it isn't possible to just use the top level tsconfig?

Basically, this PR does that - it takes the single child level tsconfig and replaces the top level config with it. For some reason I can't build a multi-project tsconfig if none of the children require each other and none of them are emitting anything (as is the case with linter)

@SimeonC SimeonC merged commit d2d2588 into main Jul 28, 2022
@SimeonC SimeonC deleted the fix-single-lerna-project-lint branch July 28, 2022 06:38
@tablecheck-public-automation
Copy link
Collaborator

🚀 PR was released in @tablecheck/scripts@2.3.1 🚀

@tablecheck-public-automation tablecheck-public-automation added the released This issue/pull request has been released. label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants