GitXplorerGitXplorer
S

tssa

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
7e530cc217219c50722b0475f601c093ffcb3673

[dependency] Bump dependencies (#113)

SSamChou19815 committed 4 years ago
Verified
8c0b44282b3277a5f389405cf201283777236752

[printing] Hide large change list by default (#112)

SSamChou19815 committed 4 years ago
Verified
5f0c08b4d70f8896a3739da905d4000595987fac

[analysis] Decouple change impact classification with printing (#111)

SSamChou19815 committed 4 years ago
Verified
48d3583385738b4575ca84f6d5853bc6d14cca78

[repo] Release 0.0.10 (#110)

SSamChou19815 committed 4 years ago
Verified
cd015565e26c9667c962b7e9d4802610dc950ab1

[analysis] Only report direct affect is reference tree is linear (#109)

SSamChou19815 committed 4 years ago
Verified
4a30832026d65ccd0fcee307077e9013f06e78b7

[analysis] Drop support for css module analysis (#108)

SSamChou19815 committed 4 years ago

README

The README file for this repository.

tssa

Build Status

TypeScript Static Analyzer

Usage

yarn add --dev @dev-sam/tssa
# In Command Line
git diff HEAD^ HEAD | yarn tssa path/1/to/ts/project/to/analyze path/2/to/ts/project/to/analyze
# Inside a GitHub Action job triggered by pull request (tssa will auto-fetch PR diff)
GITHUB_TOKEN=<token> GITHUB_PR_NUMBER=<PR number> yarn tssa path/1/to/ts/project/to/analyze path/2/to/ts/project/to/analyze

Contributing

In order for your changes to be accepted, you need to pass all the CI tests. This implies:

  • Your code compiles;
  • Your code passes Prettier and ESLint;
  • Your code passes existing tests and new tests.

You are encouraged to test your changes locally instead of waiting on CI results. You must write unit tests for your added pure functions whenever possible.

You can also test your changes on tssa itself. For example, you can create a test branch test123, do some changes in test123 and commit. Then you can run git diff master test123 | yarn start ., which will give you the diff analysis result on your change in test123. Remember that you need to run yarn build before yarn start to ensure that you are always using the latest compiled code!

What's even more important is that you test your changes against real complex monorepos. To do that, you need to run yarn bundle to produce a self-contained index.js inside bin. Then you can copy index.js into the root of the monorepo, and run the test by git diff master test123 | node index.js monorepo-package-1 monorepo-package-2 .... Note that the root of the monorepo must has typescript as either devDependency or dependency, since the bundled index.js doesn't bundle TypeScript.