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' }) | ||
} |
{ | ||
"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 | ||
``` |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2663
19
48
1
2