Comparing version 4.6.2 to 4.7.0
{ | ||
"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
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
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
428
393583
+ Added@esbuild/aix-ppc64@0.19.12(transitive)
+ Added@esbuild/android-arm@0.19.12(transitive)
+ Added@esbuild/android-arm64@0.19.12(transitive)
+ Added@esbuild/android-x64@0.19.12(transitive)
+ Added@esbuild/darwin-arm64@0.19.12(transitive)
+ Added@esbuild/darwin-x64@0.19.12(transitive)
+ Added@esbuild/freebsd-arm64@0.19.12(transitive)
+ Added@esbuild/freebsd-x64@0.19.12(transitive)
+ Added@esbuild/linux-arm@0.19.12(transitive)
+ Added@esbuild/linux-arm64@0.19.12(transitive)
+ Added@esbuild/linux-ia32@0.19.12(transitive)
+ Added@esbuild/linux-loong64@0.19.12(transitive)
+ Added@esbuild/linux-mips64el@0.19.12(transitive)
+ Added@esbuild/linux-ppc64@0.19.12(transitive)
+ Added@esbuild/linux-riscv64@0.19.12(transitive)
+ Added@esbuild/linux-s390x@0.19.12(transitive)
+ Added@esbuild/linux-x64@0.19.12(transitive)
+ Added@esbuild/netbsd-x64@0.19.12(transitive)
+ Added@esbuild/openbsd-x64@0.19.12(transitive)
+ Added@esbuild/sunos-x64@0.19.12(transitive)
+ Added@esbuild/win32-arm64@0.19.12(transitive)
+ Added@esbuild/win32-ia32@0.19.12(transitive)
+ Added@esbuild/win32-x64@0.19.12(transitive)
+ Addedesbuild@0.19.12(transitive)
- Removed@esbuild/android-arm@0.18.20(transitive)
- Removed@esbuild/android-arm64@0.18.20(transitive)
- Removed@esbuild/android-x64@0.18.20(transitive)
- Removed@esbuild/darwin-arm64@0.18.20(transitive)
- Removed@esbuild/darwin-x64@0.18.20(transitive)
- Removed@esbuild/freebsd-arm64@0.18.20(transitive)
- Removed@esbuild/freebsd-x64@0.18.20(transitive)
- Removed@esbuild/linux-arm@0.18.20(transitive)
- Removed@esbuild/linux-arm64@0.18.20(transitive)
- Removed@esbuild/linux-ia32@0.18.20(transitive)
- Removed@esbuild/linux-loong64@0.18.20(transitive)
- Removed@esbuild/linux-mips64el@0.18.20(transitive)
- Removed@esbuild/linux-ppc64@0.18.20(transitive)
- Removed@esbuild/linux-riscv64@0.18.20(transitive)
- Removed@esbuild/linux-s390x@0.18.20(transitive)
- Removed@esbuild/linux-x64@0.18.20(transitive)
- Removed@esbuild/netbsd-x64@0.18.20(transitive)
- Removed@esbuild/openbsd-x64@0.18.20(transitive)
- Removed@esbuild/sunos-x64@0.18.20(transitive)
- Removed@esbuild/win32-arm64@0.18.20(transitive)
- Removed@esbuild/win32-ia32@0.18.20(transitive)
- Removed@esbuild/win32-x64@0.18.20(transitive)
- Removedesbuild@0.18.20(transitive)
Updatedesbuild@~0.19.10