Socket
Socket
Sign inDemoInstall

jiti

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jiti - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [0.1.3](https://github.com/nuxt-contrib/jiti/compare/v0.1.2...v0.1.3) (2020-06-07)
### [0.1.2](https://github.com/nuxt-contrib/jiti/compare/v0.1.1...v0.1.2) (2020-06-07)

@@ -7,0 +9,0 @@

4

package.json
{
"name": "jiti",
"version": "0.1.2",
"description": "",
"version": "0.1.3",
"description": "Runtime typescript and ESM support for Node.js (CommonJS)",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "dist/jiti.js",

# jiti
Just-in-time compiler for typescript and esm files for CommonJS environments.
> Runtime typescript and ESM support for Node.js (CommonJS)
[![version][npm-v-src]][npm-v-href]
[![downloads][npm-d-src]][npm-d-href]
[![size][size-src]][size-href]
## Features
- Stable typescript and esm syntax support (currently using babel)
- Provide sync interface to replace `require()` and `esm()`
- Super slim and zero dependency (~1M install size)
- Stable typescript and esm syntax support
- Provide sync interface to replace require
- Super slim and zero dependency
- Syntax detect to avoid extra transform

@@ -21,2 +25,39 @@ - CommonJS cache integration

## Compared to Alternatives
### [`standard-things/esm`](https://github.com/standard-things/esm)
- `+` Much more stable thanks to babel
- `+` Less low level operations
- `+` Typescript support
- `-` Slower
- `-` No source-map support at the moment
### [`babel-register`](https://babeljs.io/docs/en/babel-register)
- `+` Smaller install size (~1M vs ~11M with same plugins)
- `+` Configured out of the box
- `+` Smart syntax detect to avoid unnecessary trnaspilation
- `+` Does not ignores `node_modules`. ESM everywhere yay!
- `+` Embeddable
### [`esbuild`](https://github.com/evanw/esbuild)
- `+` No native dependency
- `+` More stable thanks to babel
- `-` Slower
- `+` Embeddable
### `ts-node`
- `+` Support both esm and typescript
- `/` No typechecking support / Faster
- `+` Smart syntax detect to avoid unnecessary trnaspilation
### Bundlers (`rollup`, `webpack`, `snowpack`, etc)
Meanwhile it would be much better making an optimized bundle to deploy to production or as npm package, using bundler setup and watching is frustrating during project development that's where `jiti` (or similar tools like `ts-node`) would be more convenient.
**Note:** However currently only babel transform is supported, configurable transform support is in the roadmap so using `esbuild` or other solutions would be possible.
## Development

@@ -42,2 +83,15 @@

MIT
MIT. Made with 💖
<!-- Refs -->
[npm-v-src]: https://img.shields.io/npm/v/jiti?style=flat-square
[npm-v-href]: https://npmjs.com/package/jiti
[npm-d-src]: https://img.shields.io/npm/dm/jiti?style=flat-square
[npm-d-href]: https://npmjs.com/package/jiti
[github-actions-src]: https://img.shields.io/github/workflow/status/nuxt-contrib/jiti/ci/master?style=flat-square
[github-actions-href]: https://github.com/nuxt-contrib/jiti/actions?query=workflow%3Aci
[size-src]: https://packagephobia.now.sh/badge?p=jiti
[size-href]: https://packagephobia.now.sh/result?p=jiti
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