Gathering detailed insights and metrics for ts-deps
Gathering detailed insights and metrics for ts-deps
Gathering detailed insights and metrics for ts-deps
Gathering detailed insights and metrics for ts-deps
@virmator/deps
Default TS deps plugin for virmator.
used-deps-analyzer
Analyse js code to force match between installed & used deps
@0ti.me/ts-test-deps
A library for adding test tooling
@zaripych/ts-deps
TypeScript related dependencies and libraries to setup/scaffold typical build/lint/format/test pipeline and CI/CD pipeline using babel, jest, prettier, tslint and semantic-release. Meant to be added as dev dependency.
TypeScript related dependencies and libraries to setup typical build/lint/format/test pipeline and CI/CD pipeline using babel, jest, prettier, tslint and semantic-release. Meant to be added as dev dependency.
npm install ts-deps
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (76.27%)
TypeScript (23.73%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
370 Commits
27 Branches
3 Contributors
Updated on Jan 25, 2021
Latest Version
0.21.2
Package Id
ts-deps@0.21.2
Unpacked Size
199.12 kB
Size
56.53 kB
File Count
69
NPM Version
6.14.8
Node Version
15.0.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
39
dev dependency for your simple TypeScript projects
npm add ts-deps --save-dev
npx ts-deps init
The init
command will scaffold config files for your project. The typical output would be:
scripts/
scripts/build.js
scripts/clean.js
scripts/combineCoverage.js
src/
src/__integration-tests__
src/__tests__
.eslintrc.js
babel.config.js
commitlint.config.js
jest.config.integration.js
jest.config.js
package.json
prettier.config.js
release.config.js
tsconfig.json
tsconfig.declarations.json
Following packages already included for you:
.js
or .ts
which brings more transformation options and speedThe init
command can be run on an existing project, it will change your package.json
and remove superfluous dev dependencies.
All the source code should be located in src
directory. Extensions for the code should be .ts
or .js
.
You can add // @ts-check
in the beginning of .js
files to make TypeScript check those files as well.
For a Web app, please consider using create-react-app
, however, .tsx
and .jsx
extensions are still allowed, but not well-tested.
npm build
The code will be transformed by Babel and put into lib
folder. In addition to that .json
and .d.ts
files are copied over as well.
If declarations are required, we can generate them by running:
npm run declarations
This will use tsconfig.declarations.json
config to write declarations to the same lib
folder as transformed .js
or .ts
files.
To run all builds and compilation checks we can use the check
command which is automatically executed by husky on push.
npm run check
The build
and other commands listed below are included into check
.
So, to check your code for Type Script errors we can run:
npm run type-check
Linting:
npm run lint
Current configuration supports aliases. Sometimes we need to be able to alias a path to a module in order to require it by that alias name like so:
import { db } from '@shared'
The above becomes possible with aliases. The setup of aliases is tedious and requires multiple configuration changes that span across Babel, TypeScript and Jest.
With ts-deps
it should be as simple as creating a ts-deps.config.js
file at the root of your project and executing ts-deps patch
to patch tsconfig.json
:
module.exports = {
aliases: {
'@core-lib': './src/shared/core-lib',
'@feature-1': './src/shared/features/feature-1',
},
}
In the above example, in order to reference files within core-lib
directory we can just use:
import Module from '@core-lib'
That saves us from having to backward slash to that directory if we have a module in feature-1
directory that requires it.
The library supports two categories of tests: unit-tests and integration-tests.
Unit tests should be located within __tests__
directory anywhere under src
directory. Deep nesting is supported. Every test should have .test.
suffix. This is to ensure that the tests can also have test-only related helper files that can be required by the test but not included into result of build
.
Integration tests should be located within ./src/__integration-tests__
at the root. Similarly, every test should have .test.
suffix.
Integration and unit tests can be ran separately. If integration tests generate any coverage information we can combine it with unit tests using combine-coverage
script.
npm run test --coverage
npm run integration --coverage
npm run combine-coverage
To use semantic-release
for release process we could run:
npm run release
To setup follow the link at the top and follow the steps in documentation. With current config we only need to declare environment variables to make
semantic-release
push changes to GitHub Releases, git repo and npm.
export GH_TOKEN=
export NPM_TOKEN=
export GIT_AUTHOR_EMAIL=
export GIT_AUTHOR_NAME=
export GIT_COMMITTER_EMAIL=
export GIT_COMMITTER_NAME
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More