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.13.0 to 4.1.1

dist/index-c4b20163.mjs

7

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

@@ -15,3 +15,3 @@ "keywords": [

"license": "MIT",
"repository": "esbuild-kit/tsx",
"repository": "privatenumber/tsx",
"author": {

@@ -37,2 +37,5 @@ "name": "Hiroki Osame",

"bin": "./dist/cli.mjs",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {

@@ -39,0 +42,0 @@ "esbuild": "~0.18.20",

@@ -9,7 +9,5 @@ # 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>

- Supports next-gen TypeScript extensions (`.cts` & `.mts`)
- Supports `node:` import prefixes
- Hides experimental feature warnings
- TypeScript REPL
- Resolves `tsconfig.json` [`paths`](https://www.typescriptlang.org/tsconfig#paths)
- Tested on Linux & Windows with Node.js v12~20

@@ -49,3 +47,3 @@ > **💡 Protip: Looking to bundle your TypeScript project?**

2. Improve ESM <-> CJS interoperability
3. Support the latest major version of Node.js v12 and up _(likely to change in the future)_
3. Support the [LTS versions of Node.js](https://endoflife.date/nodejs)

@@ -111,6 +109,6 @@ ## Install

Alternatively, use the `ESBK_TSCONFIG_PATH` environment variable:
Alternatively, use the `TSX_TSCONFIG_PATH` environment variable:
```sh
ESBK_TSCONFIG_PATH=./path/to/tsconfig.custom.json tsx ./file.ts
TSX_TSCONFIG_PATH=./path/to/tsconfig.custom.json tsx ./file.ts
```

@@ -155,2 +153,8 @@

Alternatively, use the `TSX_DISABLE_CACHE` environment variable:
```sh
TSX_DISABLE_CACHE=1 tsx ./file.ts
```
### Node.js Loader

@@ -160,6 +164,6 @@

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
```

@@ -169,3 +173,3 @@

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

@@ -179,3 +183,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

@@ -182,0 +193,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

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