Socket
Socket
Sign inDemoInstall

tsx

Package Overview
Dependencies
Maintainers
1
Versions
108
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.13.0 to 3.14.0

dist/index-5f60304b.cjs

2

package.json
{
"name": "tsx",
"version": "3.13.0",
"version": "3.14.0",
"description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files",

@@ -5,0 +5,0 @@ "keywords": [

@@ -156,6 +156,6 @@ # tsx <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/v/tsx"></a> <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/dm/tsx"></a> <a href="https://packagephobia.now.sh/result?p=tsx"><img src="https://packagephobia.now.sh/badge?p=tsx"></a>

To use `tsx` as a Node.js loader, pass it in to the [`--loader`](https://nodejs.org/api/esm.html#loaders) flag. This will add TypeScript & ESM support for both ESM and CommonJS contexts.
To use `tsx` as a Node.js loader, pass it in to the [`--import`](https://nodejs.org/api/module.html#enabling) flag. This will add TypeScript & ESM support for both Module and CommonJS contexts.
```sh
node --loader tsx ./file.ts
node --import tsx ./file.ts
```

@@ -165,3 +165,3 @@

```sh
NODE_OPTIONS='--loader tsx' node ./file.ts
NODE_OPTIONS='--import tsx' node ./file.ts
```

@@ -175,3 +175,10 @@

##### Node.js v20.6.0 and above
```sh
node --import tsx/esm ./file.ts
```
##### Node.js v20.5.1 and below
```sh
node --loader tsx/esm ./file.ts

@@ -178,0 +185,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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