Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nlib/tsm

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nlib/tsm

Thin .ts/.mts loader & test runner

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@nlib/tsm

Thin .mts loader and test runner

.github/workflows/test.yml codecov

Install

npm install @nlib/tsm

Usage: Run *.ts/*.mts file

node --experimental-loader=@nlib/tsm path/to/your/script.mts

loader.mjs is a Loader to customize the default module resolution. It exports the load function that loads modules with esbuild.

Usage: Run test files

Node.js added the stable node:test in v20. We can run tests with node --test. It searches for test files when a directory is specified as arguments. But it doesn't search for *.mts (even with the --experimental-loader option). So, you must pass the files one by one to run it.

The tsm-test will search for the test file for you and pass it to node --test.

npx tsm-test src

FAQs

Package last updated on 02 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc