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 4.6.2 to 4.7.0

dist/package-22dbf202.cjs

4

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

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

"dependencies": {
"esbuild": "~0.18.20",
"esbuild": "~0.19.10",
"get-tsconfig": "^4.7.2"

@@ -43,0 +43,0 @@ },

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

> **💡 Protip: Looking to bundle your TypeScript project?**
> [!TIP]
> **Do you need to compile your TypeScript projects?** Try [pkgroll](https://github.com/privatenumber/pkgroll)—the zero-config bundler _tsx_ uses!
>
> If you're looking for a dead simple way to bundle your TypeScript projects, take a look at [`pkgroll`](https://github.com/privatenumber/pkgroll). It's an esbuild-enhanced Rollup that's auto configured based on your `package.json`!
> _pkgroll_ is a thin layer over Rollup that auto-configures it based on your `package.json` entry points.
>
> It supports next-gen TS formats, export maps, `.d.ts` generation, and more!

@@ -38,2 +42,14 @@ <br>

> [!TIP]
> **tsx is not just for TypeScript!** It also helps Node load `module` type packages.
>
> If you're getting the following error, give _tsx_ a try!
> ```
> require('ESM package');
> ^
>
> Error [ERR_REQUIRE_ESM]: require() of ES Module <ESM package> from ./file.js not supported.
> Instead change the require of <ESM package> in ./file.js to a dynamic import() which is available in all CommonJS modules.
> ```
### Quick start

@@ -51,3 +67,2 @@ Try tsx now without setup! Just pass in a TypeScript file:

## Install

@@ -338,3 +353,3 @@

### Why is it named `tsx`?
### Why is it named _tsx_?

@@ -347,7 +362,7 @@ `tsx` stands for "TypeScript execute". Mirroring [`npx`](https://docs.npmjs.com/cli/v8/commands/npx), which stands for "Node.js package execute".

### Does it do type-checking?
### Does it type check the code it runs?
No, [esbuild does not support type checking](https://esbuild.github.io/faq/#:~:text=TypeScript%20type%20checking%20(just%20run%20tsc%20separately)).
No. tsx is designed to be a simple TypeScript runner.
It's recommended to run TypeScript separately as a command (`tsc --noEmit`) or via [IDE IntelliSense](https://code.visualstudio.com/docs/languages/typescript).
If you need type-checking, you can use an IDE like [VS Code](https://code.visualstudio.com) and it will type-check as you code via [IntelliSense](https://code.visualstudio.com/docs/languages/typescript). Alternatively, you can run the TypeScript Compiler only for type-checking (e.g. `tsc --noEmit`) as a linting step.

@@ -379,13 +394,9 @@

### Can it use esbuild plugins?
No. tsx uses esbuild's [Transform API](https://esbuild.github.io/api/#transform-api), which doesn't support plugins.
### Does it have a configuration file?
No. tsx's integration with Node.js is designed to be seamless so there is no configuration.
No. tsx's integration with Node.js is designed to be simple & seamless. However, it supports a few properties from `tsconfig.json` to determine how to compile TypeScript files.
### Does it have any limitations?
Transformations are handled by esbuild, so it shares the same limitations such as:
TypeScript & ESM transformations are handled by [esbuild](https://esbuild.github.io/), so it shares the same limitations such as:

@@ -398,12 +409,2 @@ - Compatibility with code executed via `eval()` is not preserved

### Does Yarn PnP work?
In CommonJS mode, yes. But in Module/ESM mode, [Node.js version v19.6.0 and up](https://github.com/nodejs/node/blob/v19.6.0/doc/changelogs/CHANGELOG_V19.md#esm-leverage-loaders-when-resolving-subsequent-loaders) is required.
### There's an outdated dependency in tsx—can you update?
Dependencies are typically declared with SemVer ranges to allow updates. You can use the [`npm update <package name>`](https://docs.npmjs.com/cli/v8/commands/npm-update) command to automatically update them to the latest version within the defined range.
If the dependencies are out of the specified range, it indicates a potential breaking change that requires manual review. You're welcome to submit a pull request to initiate the upgrade.
## Sponsors

@@ -410,0 +411,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

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