Gathering detailed insights and metrics for @polkadot/dev-ts
Gathering detailed insights and metrics for @polkadot/dev-ts
Gathering detailed insights and metrics for @polkadot/dev-ts
Gathering detailed insights and metrics for @polkadot/dev-ts
Development configuration, scripts and and CI setup for polkadot-js projects. It acts as templates for other projects to reduce boilerplate, making everything consistent.
npm install @polkadot/dev-ts
Typescript
Module System
Min. Node Version
Node Version
NPM Version
76
Supply Chain
83.2
Quality
86.9
Maintenance
100
Vulnerability
99.6
License
JavaScript (73.8%)
TypeScript (24.56%)
Shell (1.58%)
Rust (0.06%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
43 Stars
2,732 Commits
20 Forks
4 Watchers
2 Branches
18 Contributors
Updated on Jun 13, 2025
Latest Version
0.83.2
Package Id
@polkadot/dev-ts@0.83.2
Unpacked Size
62.66 kB
Size
13.32 kB
File Count
44
NPM Version
10.9.0
Node Version
22.12.0
Published on
Jan 17, 2025
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
3
This is an Node TS loader, specifically written to cater for the polkadot-js needs, aka it is meant to be used inside polkadot-js projects. It doesn't aim to be a catch-all resolver, although it does cover quite a large spectrum of functionality.
It caters for -
Just add the loader via the Node.js --loader
option. The API supported here is only for Node 16.12+, so ensure a new-ish LTS version is used.
node --loader @polkadot/dev-ts ...
Internally to the polkadot-js libraries, loader caching is used. This means that compiled files are store on-disk alongside the /src/
folder in /build-loader/
. To enable caching behavior, the loader endpoint is changed slightly,
node --loader @polkadot/dev-ts/cached ...
This is generally the suggested default, but it is only exposed via a different loader endpoint to ensure that users explicitly opt-in and not be suprised by "random output folders" being created.
The Node.js loader API could change in the future (as it has in the Node.js 16.12 version), so it may break or stop working on newer versions, and obviously won't work at all on older versions. As of this writing (Node.js 18.14 being the most-recent LTS), using the --loader
option will print a warning.
With all that said, it is used as-is for the polkadot-js test infrastructure and currently operates without issues in that environment.
TL;DR Different configs could yield some issues.
Yes, there are other options available - @babel/register, @esbuild-kit/esm-loader, @swc/register, @swc-node/loader, ts-node/esm, ...
We started off with a basic swc
loader (after swapping the infrastructure from Jest & Babel), just due to the fact that (at that time, and as of writing still) the base swc loader is still a WIP against the newer loader APIs. Since we didn't want to add more dependencies (and compile differently to our internal compiler infrastructure), we adapted our own.
Since then we just swapped to using base tsc
everywhere (for all builds) and may look at changing again (swc, esbuild. etc...) in the future. So effectively having a single loader, while re-inventing the wheel somewhat (since there seems to be a lot of options available) allows us to just keep the loader compiling options fully aligned with what TS -> JS output approach we take.
It meets our requirements: aligns fully with the overall configs we accross polkadot-js, compiles to ESM (no CJS used when testing/running) and has minimal dependencies that doesn't add bloat. In most cases you would probably be better off with one of the loaders/registration approaches linked in the first paragraph.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
Found 15/30 approved changesets -- score normalized to 5
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy 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
35 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