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

tsx

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsx - npm Package Compare versions

Comparing version 3.3.1 to 3.4.0

dist/loader.js

2

dist/repl.js

@@ -1,3 +0,3 @@

import c from"repl";import{transform as l}from"@esbuild-kit/core-utils";import{v as m}from"./package-1162f6d5.js";console.log(`Welcome to tsx v${m} (Node.js ${process.version}).
import c from"repl";import{transform as l}from"@esbuild-kit/core-utils";import{v as m}from"./package-2effcb46.js";console.log(`Welcome to tsx v${m} (Node.js ${process.version}).
Type ".help" for more information.`);const o=c.start(),{eval:i}=o,f=async function(e,r,t,s){const n=await l(e,".ts").catch(a=>(console.log(a.message),{code:`
`}));return i.call(this,n.code,r,t,s)};o.eval=f;
{
"name": "tsx",
"version": "3.3.1",
"version": "3.4.0",
"description": "Node.js runtime enhanced with esbuild for loading TypeScript & ESM",

@@ -25,2 +25,3 @@ "keywords": [

"exports": {
".": "./dist/loader.js",
"./cli": "./dist/cli.js",

@@ -27,0 +28,0 @@ "./repl": "./dist/repl.js"

@@ -65,2 +65,20 @@ # tsx

### Node.js Loader
tsx is a standalone binary used in-place of Node.js, but sometimes you'll want to use `node` directly. For example, when adding TypeScript & ESM support to Node.js binaries.
To use tsx with Node.js, pass it into the [`--loader`](https://nodejs.org/api/esm.html#loaders) flag.
> Note: Node.js's experimental feature warnings will not be suppressed when used as a loader
```sh
# As a CLI flag
node --loader tsx ./file.ts
# As an environment variable
NODE_OPTIONS='--loader tsx' node ./file.ts
```
If you're looking to use the [`-r, --require`](https://nodejs.org/api/cli.html#-r---require-module) flag, you can use [`@esbuild-kit/cjs-loader`](https://github.com/esbuild-kit/cjs-loader) but transformations _will not_ be applied to dynamic `import()`s.
## Dependencies

@@ -67,0 +85,0 @@

Sorry, the diff of this file is too big to display

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