Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

fix: cleanup tsbuildinfo #394

Merged
merged 2 commits into from
Sep 24, 2021
Merged

fix: cleanup tsbuildinfo #394

merged 2 commits into from
Sep 24, 2021

Conversation

ghost
Copy link

@ghost ghost commented Sep 23, 2021

Description

This PR fixes the yarn clean which has been broken since #327.

TypeScript 3.4 introduces a new flag called --incremental which tells TypeScript to save information about the project graph from the last compilation. The next time TypeScript is invoked with --incremental, it will use that information to detect the least costly way to type-check and emit changes to your project.

TypeScript 3.4 introduced --incremental and it is set to true by default when --composite is true which is the our case.

Therefore,tsconfig.tsbuildinfo is generated and it causes the yarn bundle && yarn clean && yarn bundle to fail.

TypeScript will look for a file called .tsbuildinfo in the output directory (./lib). If ./lib/.tsbuildinfo doesn’t exist, it’ll be generated. But if it does, tsc will try to use that file to incrementally type-check and update our output files.

To fix the issue, this PR removes the tsconfig.tsbuildinfo files when yarn clean.
Also, it sets the compiler option incremental value as true explicitly which is already true implicitly.

Motivation and Context

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • Add tests to cover changes as needed.
  • Update documentation as needed.

@ghost ghost requested review from AmritKumar and bb111189 as code owners September 23, 2021 11:09
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2021

Codecov Report

Merging #394 (f06a04b) into dev (e31b873) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #394   +/-   ##
=======================================
  Coverage   80.92%   80.92%           
=======================================
  Files          43       43           
  Lines        1798     1798           
  Branches      327      327           
=======================================
  Hits         1455     1455           
  Misses        342      342           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e31b873...f06a04b. Read the comment docs.

@ghost ghost changed the title Fix/clean fix: cleanup tsbuildinfo Sep 23, 2021
@bb111189 bb111189 merged commit 0d43bfc into dev Sep 24, 2021
@bb111189 bb111189 deleted the fix/clean branch September 24, 2021 04:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants