Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esno

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esno - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

17

esno.js
#!/usr/bin/env node
const { execSync } = require('child_process')
const fs = require('fs')
const esm = require.resolve('esm')
const register = require.resolve('esbuild-register')
let isModule = false
try {
const { type } = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
isModule = type === 'module'
} catch {}

@@ -13,2 +17,9 @@ const argv = process.argv

execSync(`node -r ${esm} -r ${register} ${argv}`, { stdio: 'inherit' })
const register = require.resolve('esbuild-register')
if (isModule) {
execSync(`node -r ${register} ${argv}`, { stdio: 'inherit' })
} else {
const esm = require.resolve('esm')
execSync(`node -r ${esm} -r ${register} ${argv}`, { stdio: 'inherit' })
}

2

package.json
{
"name": "esno",
"description": "TS/JS Node powered by esbuild",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "https://github.com/antfu/esno.git",

@@ -1,4 +0,13 @@

<h2 align='center'>esno</h2>
<h2 align='center'>
<samp>esno</samp>
</h2>
<p align='center'>TS/JS node runtime powered by esbuild</p>
<p align='center'>
<samp>TS/JS node runtime powered by <a href='https://github.com/evanw/esbuild'>esbuild</a></samp>
<br>
<br>
<a href='https://www.npmjs.com/package/esno'>
<img src='https://img.shields.io/npm/v/esno?color=333&labelColor=555&style=flat-square' alt='version'/>
</a>
</p>

@@ -11,3 +20,3 @@ ## Usage

or install globally
#### Install globally

@@ -19,1 +28,22 @@ ```bash

```
#### Install as dependency
```bash
npm i esno
```
```json
{
"scripts": {
"start": "esno index.ts"
},
"dependencies": {
"esno": "*"
}
}
```
```bash
npm run start
```
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