Socket
Socket
Sign inDemoInstall

esbuild-register

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-register - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

13

dist/node.js

@@ -52,3 +52,11 @@ 'use strict';

}
const DEFAULT_EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx', '.mjs'];
const FILE_LOADERS = {
'.js': 'js',
'.jsx': 'jsx',
'.ts': 'ts',
'.tsx': 'tsx',
'.mjs': 'js',
};
const DEFAULT_EXTENSIONS = Object.keys(FILE_LOADERS);
const getLoader = (filename) => FILE_LOADERS[path.extname(filename)];
function compile(code, filename) {

@@ -59,4 +67,3 @@ const options = getOptions(path.dirname(filename));

sourcemap: true,
// Just use tsx for everything until we find a way to let user configure this
loader: 'tsx',
loader: getLoader(filename),
target: options.target,

@@ -63,0 +70,0 @@ jsxFactory: options.jsxFactory,

{
"name": "esbuild-register",
"description": "Transpile JSX, TypeScript and esnext features on the fly with esbuild",
"version": "1.0.2",
"version": "1.1.0",
"main": "register.js",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -21,4 +21,12 @@ # esbuild-register

When using Yarn, you can add an npm script:
```json
"ts": "node -r esm -r esbuild-register"
```
to shorten the command, now just run `yarn ts file.ts` instead.
## License
MIT © [EGOIST (Kevin Titor)](https://egoist.sh)
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