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

interpret

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interpret - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

143

index.js

@@ -1,40 +0,38 @@

const extensions = {
var extensions = {
'.babel.js': [
{
module: '@babel/register',
register: function (module) {
module({
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
extensions: '.js'
});
}
register: function(hook) {
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
hook({ extensions: '.js' });
},
},
{
module: 'babel-register',
register: function (module) {
module({
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
extensions: '.js'
});
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
{
module: 'babel-core/register',
register: function (module) {
module({
extensions: '.js'
});
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
{
module: 'babel/register',
register: function (module) {
module({
extensions: '.js'
});
}
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
],
'.babel.ts': [
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.ts' });
},
},
],
'.buble.js': 'buble/register',

@@ -48,2 +46,11 @@ '.cirru': 'cirru-script/lib/register',

'.eg': 'earlgrey/register',
'.esm.js': {
module: 'esm',
register: function(hook) {
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
var esmLoader = hook(module);
require.extensions['.js'] = esmLoader('module')._extensions['.js'];
},
},
'.iced': ['iced-coffee-script/register', 'iced-coffee-script'],

@@ -58,30 +65,22 @@ '.iced.md': 'iced-coffee-script/register',

module: '@babel/register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel-register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel-core/register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel/register',
register: function (module) {
module({
extensions: '.jsx'
});
register: function(hook) {
hook({ extensions: '.jsx' });
},

@@ -91,9 +90,6 @@ },

module: 'node-jsx',
register: function (module) {
module.install({
extension: '.jsx',
harmony: true
});
}
}
register: function(hook) {
hook.install({ extension: '.jsx', harmony: true });
},
},
],

@@ -106,17 +102,38 @@ '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'],

module: 'toml-require',
register: function (module) {
module.install();
}
register: function(hook) {
hook.install();
},
},
'.ts': ['ts-node/register', 'typescript-node/register', 'typescript-register', 'typescript-require'],
'.tsx': ['ts-node/register', 'typescript-node/register'],
'.ts': [
'ts-node/register',
'typescript-node/register',
'typescript-register',
'typescript-require',
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.ts' });
},
},
],
'.tsx': [
'ts-node/register',
'typescript-node/register',
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.tsx' });
},
},
],
'.wisp': 'wisp/engine/node',
'.xml': 'require-xml',
'.yaml': 'require-yaml',
'.yml': 'require-yaml'
'.yml': 'require-yaml',
};
const jsVariantExtensions = [
var jsVariantExtensions = [
'.js',
'.babel.js',
'.babel.ts',
'.buble.js',

@@ -129,2 +146,3 @@ '.cirru',

'.eg',
'.esm.js',
'.iced',

@@ -137,3 +155,4 @@ '.iced.md',

'.ts',
'.wisp'
'.tsx',
'.wisp',
];

@@ -143,6 +162,6 @@

extensions: extensions,
jsVariants: jsVariantExtensions.reduce(function (result, ext) {
jsVariants: jsVariantExtensions.reduce(function(result, ext) {
result[ext] = extensions[ext];
return result;
}, {})
}, {}),
};
{
"name": "interpret",
"version": "1.2.0",
"description": "A dictionary of file extensions and associated module loaders.",
"version": "1.1.0",
"homepage": "https://github.com/tkellen/node-interpret",
"author": {
"name": "Tyler Kellen",
"url": "http://goingslowly.com/"
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
"Blaine Bublitz <blaine.bublitz@gmail.com>",
"Tyler Kellen <tyler@sleekcode.net> (http://goingslowly.com/)"
],
"repository": "gulpjs/interpret",
"license": "MIT",
"engines": {
"node": ">= 0.10"
},
"repository": {
"type": "git",
"url": "git://github.com/tkellen/node-interpret.git"
"main": "index.js",
"files": [
"LICENSE",
"index.js"
],
"scripts": {
"lint": "eslint .",
"pretest": "rm -rf tmp/ && npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"bugs": {
"url": "https://github.com/tkellen/node-interpret/issues"
"dependencies": {},
"devDependencies": {
"eslint": "^2.13.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"mocha": "^3.5.3",
"parse-node-version": "^1.0.0",
"rechoir": "^0.6.2",
"shelljs": "0.7.5"
},
"license": "MIT",
"main": "index.js",
"keywords": [

@@ -20,0 +40,0 @@ "cirru-script",

@@ -0,6 +1,13 @@

<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# interpret
> A dictionary of file extensions and associated module loaders.
[![NPM](https://nodei.co/npm/interpret.png)](https://nodei.co/npm/interpret/)
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
A dictionary of file extensions and associated module loaders.
## What is it

@@ -19,37 +26,35 @@ This is used by [Liftoff](http://github.com/tkellen/node-liftoff) to automatically require dependencies for configuration files, and by [rechoir](http://github.com/tkellen/node-rechoir) for registering module loaders.

module: '@babel/register',
register: function (module) {
module({
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
extensions: '.js'
});
}
register: function(hook) {
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
hook({ extensions: '.js' });
},
},
{
module: 'babel-register',
register: function (module) {
module({
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
extensions: '.js'
});
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
{
module: 'babel-core/register',
register: function (module) {
module({
extensions: '.js'
});
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
{
module: 'babel/register',
register: function (module) {
module({
extensions: '.js'
});
}
}
register: function(hook) {
hook({ extensions: '.js' });
},
},
],
'.babel.ts': [
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.ts' });
},
},
],
'.buble.js': 'buble/register',

@@ -63,2 +68,11 @@ '.cirru': 'cirru-script/lib/register',

'.eg': 'earlgrey/register',
'.esm.js': {
module: 'esm',
register: function(hook) {
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
// which only captures the final extension (.babel.js -> .js)
var esmLoader = hook(module);
require.extensions['.js'] = esmLoader('module')._extensions['.js'];
},
},
'.iced': ['iced-coffee-script/register', 'iced-coffee-script'],

@@ -73,30 +87,22 @@ '.iced.md': 'iced-coffee-script/register',

module: '@babel/register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel-register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel-core/register',
register: function (module) {
module({
extensions: '.jsx'
});
}
register: function(hook) {
hook({ extensions: '.jsx' });
},
},
{
module: 'babel/register',
register: function (module) {
module({
extensions: '.jsx'
});
register: function(hook) {
hook({ extensions: '.jsx' });
},

@@ -106,9 +112,6 @@ },

module: 'node-jsx',
register: function (module) {
module.install({
extension: '.jsx',
harmony: true
});
}
}
register: function(hook) {
hook.install({ extension: '.jsx', harmony: true });
},
},
],

@@ -121,13 +124,33 @@ '.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'],

module: 'toml-require',
register: function (module) {
module.install();
}
register: function(hook) {
hook.install();
},
},
'.ts': ['ts-node/register', 'typescript-node/register', 'typescript-register', 'typescript-require'],
'.tsx': ['ts-node/register', 'typescript-node/register'],
'.ts': [
'ts-node/register',
'typescript-node/register',
'typescript-register',
'typescript-require',
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.ts' });
},
},
],
'.tsx': [
'ts-node/register',
'typescript-node/register',
{
module: '@babel/register',
register: function(hook) {
hook({ extensions: '.tsx' });
},
},
],
'.wisp': 'wisp/engine/node',
'.xml': 'require-xml',
'.yaml': 'require-yaml',
'.yml': 'require-yaml'
};
'.yml': 'require-yaml',
}
```

@@ -151,1 +174,17 @@

[require.extensions]: http://nodejs.org/api/globals.html#globals_require_extensions
[downloads-image]: http://img.shields.io/npm/dm/interpret.svg
[npm-url]: https://www.npmjs.com/package/interpret
[npm-image]: http://img.shields.io/npm/v/interpret.svg
[travis-url]: https://travis-ci.org/gulpjs/interpret
[travis-image]: http://img.shields.io/travis/gulpjs/interpret.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/interpret
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/interpret.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/interpret
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/interpret/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

Sorry, the diff of this file is not supported yet

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