New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-resolver

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-resolver - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

example-app/views/UserList.jsx

2

example-app/controllers/User.js
import assert from 'assert';
import utils from 'utils';
import UserModel from 'models/User';
import UserList from 'views/UserList';
assert(utils === 'utils');
assert(UserModel === 'UserModel');
assert(UserList === 'UserList');
export default 'UserController';
v0.0.16 / 2015-11-21
====================
* bump version
* support '.jsx' file extensions, resolves #1
* more rearranging
* deitalicize
* rearrange
* more wordiness
* wordiness
* spacing
* changelog v0.0.15
v0.0.15 / 2015-11-13

@@ -3,0 +16,0 @@ ====================

6

lib/createBabelResolver.js

@@ -7,3 +7,3 @@ var findNodeModulesPath = require('./findNodeModulesPath');

var nodeModulesPath = findNodeModulesPath(__dirname);
var extensionsToTry = ['.js', '.json'];
var extensionsToTry = ['.js', '.json', '.jsx'];

@@ -14,6 +14,4 @@ if (nodeModulesPath && moduleDirsToCheck.indexOf(nodeModulesPath) === -1) {

return function (source) {
return resolveModuleSource(source, moduleDirsToCheck, extensionsToTry);
};
return function (source) { return resolveModuleSource(source, moduleDirsToCheck, extensionsToTry); };
};
{
"name": "babel-resolver",
"version": "0.0.15",
"version": "0.0.16",
"description": "Resolve modules from any directory.",

@@ -5,0 +5,0 @@ "main": "lib/createBabelResolver.js",

# Babel Resolver [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Coverage status][coveralls-image]][coveralls-url]
*To configure this using .babelrc, use the [Babel Resolver Plugin](https://github.com/jshanson7/babel-plugin-resolver)*
Resolve modules from any directory.

@@ -38,2 +36,4 @@

If you wish to define options in .babelrc, use the [Babel Resolver Plugin](https://github.com/jshanson7/babel-plugin-resolver) instead.
**Note:** Run `rm -rf ~/.babel.json` if you're seeing errors.

@@ -40,0 +40,0 @@

@@ -6,3 +6,3 @@ var assert = require('assert');

function pathExists(path) {
return autoExtensionedPathExists(path, ['.js', '.json']);
return autoExtensionedPathExists(path, ['.js', '.json', '.jsx']);
}

@@ -46,2 +46,10 @@

});
it('existing file with .jsx', function () {
assert(pathExists(getFullPath('../example-app/views/UserList.jsx')));
});
it('non-existing file with .jsx extension', function () {
assert(!pathExists(getFullPath('../example-app/views/foo.jsx')));
});
});

@@ -12,3 +12,3 @@ var assert = require('assert');

[nodeModulesDir, exampleAppDir, exampleAppLibDir],
['.js', '.json']
['.js', '.json', '.jsx']
);

@@ -15,0 +15,0 @@ }

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