Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix: remove 'skipLibCheck' flag requirement from client's projects #367

Merged
merged 8 commits into from
Oct 17, 2018

Conversation

kuzhelov
Copy link
Contributor

@kuzhelov kuzhelov commented Oct 17, 2018

TODO

  • update CHANGELOG

This PR serves the main goal to eliminate requirement of using skipLibCheck TS compiler flag in client's TS projects (fixes #276). Detailed overview is provided below.

Address skipLibCheck problem

Problem

skipLibCheck was a mandatory flag for client's TS projects to consume Stardust.

Solution

With typescript package has been upgraded to 3.1.* this issue is fixed (fix for the related one microsoft/TypeScript#27136 has resolved problem for us). To prevent potential breaking changes with new version of TS compiler being released, more strict expression has been used in package.json to control its version. Not necessary anymore gulp plugin has been removed.

Wrong local debug results for yarn test:projects:cra-ts

Problem

The problem represents itself in the following form - while trying to debug yarn test:projects:cra-ts command developer might observer the fact that after this command being run once and local changes being introduced to Stardust files, the unchanged files are used in @stardust package installed for test project. Cause of the problem is that yarn add command results in added package being implicitly cached (https://yarnpkg.com/lang/en/docs/cli/cache/). This behavior results in cached package files used with each repetition of this command (note that this primarily attributes to local debugging cases, as for CI clean container is deployed each time).

Solution

This problem is fixed by replacing yarn add command on npm install one for test scenario.

@codecov
Copy link

codecov bot commented Oct 17, 2018

Codecov Report

Merging #367 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #367   +/-   ##
=======================================
  Coverage   89.33%   89.33%           
=======================================
  Files          64       64           
  Lines        1257     1257           
  Branches      186      163   -23     
=======================================
  Hits         1123     1123           
  Misses        131      131           
  Partials        3        3

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 2d414f9...ab0d23d. Read the comment docs.

@kuzhelov kuzhelov added 🚀 ready for review 🧰 fix Introduces fix for broken behavior. and removed 🚧 WIP labels Oct 17, 2018

const runInTestApp = runIn(testAppPath())
log(`Test React project is successfully created: ${testAppPath()}`)

//////// ADD STARDUST AS A DEPENDENCY ///////
log('STEP 2. Add Stardust dependency to test project..')

await runInTestApp(`yarn add ${paths.base(stardustPackageFilename)}`)
await runInTestApp(`npm install add ${paths.base(stardustPackageFilename)}`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo npm install add

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@kuzhelov kuzhelov merged commit 07b2aa9 into master Oct 17, 2018
@layershifter layershifter deleted the fix/remove-skip-lib-check-from-test-app branch November 9, 2018 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stardust is unconsumable for TS client project with no --skipLibCheck flag
4 participants