Comparing version 3.13.0 to 4.1.1
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
387369
10
329
4
29
1552