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

eslint-plugin-import

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-import - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

7

CHANGELOG.md

@@ -8,2 +8,5 @@ # Change Log

## [1.9.1] - 2016-06-16
### Fixed
- Reordered precedence for loading resolvers. ([#373])

@@ -252,2 +255,3 @@ ## [1.9.0] - 2016-06-10

[#373]: https://github.com/benmosher/eslint-plugin-import/issues/373
[#342]: https://github.com/benmosher/eslint-plugin-import/issues/342

@@ -273,3 +277,4 @@ [#328]: https://github.com/benmosher/eslint-plugin-import/issues/328

[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.0...HEAD
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.1...HEAD
[1.9.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.0...v1.9.1
[1.9.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.8.1...v1.9.0

@@ -276,0 +281,0 @@ [1.8.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.8.0...v1.8.1

51

lib/core/resolve.js

@@ -29,6 +29,2 @@ 'use strict';

var _isAbsolute = require('is-absolute');
var _isAbsolute2 = _interopRequireDefault(_isAbsolute);
var _fs = require('fs');

@@ -40,10 +36,12 @@

var path = _interopRequireWildcard(_path);
var _crypto = require('crypto');
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var isAbsolute = _path.isAbsolute || _isAbsolute2.default;
var CASE_SENSITIVE_FS = exports.CASE_SENSITIVE_FS = !_fs2.default.existsSync(path.join(__dirname, 'reSOLVE.js'));
var CASE_SENSITIVE_FS = exports.CASE_SENSITIVE_FS = !_fs2.default.existsSync((0, _path.join)(__dirname, 'reSOLVE.js'));
var fileExistsCache = new _es6Map2.default();

@@ -79,3 +77,3 @@

var dir = (0, _path.dirname)(filepath);
var dir = path.dirname(filepath);

@@ -90,3 +88,3 @@ var result = checkCache(filepath, cacheSettings);

var filenames = _fs2.default.readdirSync(dir);
if (filenames.indexOf((0, _path.basename)(filepath)) === -1) {
if (filenames.indexOf(path.basename(filepath)) === -1) {
result = false;

@@ -103,3 +101,3 @@ } else {

var sourceDir = (0, _path.dirname)(sourceFile),
var sourceDir = path.dirname(sourceFile),
cacheKey = sourceDir + hashObject(settings) + modulePath;

@@ -119,5 +117,5 @@

function cache(path) {
cachePath(cacheKey, path);
return path;
function cache(resolvedPath) {
cachePath(cacheKey, resolvedPath);
return resolvedPath;
}

@@ -129,5 +127,5 @@

try {
var path = resolver.resolveImport(modulePath, sourceFile, config);
if (path === undefined) return { found: false };
return { found: true, path: path };
var resolved = resolver.resolveImport(modulePath, sourceFile, config);
if (resolved === undefined) return { found: false };
return { found: true, path: resolved };
} catch (err) {

@@ -216,13 +214,5 @@ return { found: false };

function requireResolver(name, sourceFile) {
// Try to resolve package with absolute path (/Volumes/....)
if (isAbsolute(name)) {
try {
return require(name);
} catch (err) {/* continue */}
}
// Try to resolve package with path, relative to closest package.json
// Try to resolve package with conventional name
try {
var packageDir = _pkgDir2.default.sync(sourceFile);
return require((0, _path.join)(packageDir, name));
return require('eslint-import-resolver-' + name);
} catch (err) {} /* continue */

@@ -235,5 +225,8 @@

// Try to resolve package with conventional name
// Try to resolve package with path, relative to closest package.json
// or current working directory
try {
return require('eslint-import-resolver-' + name);
var baseDir = _pkgDir2.default.sync(sourceFile) || process.cwd();
// absolute paths ignore base, so this covers both
return require(path.resolve(baseDir, name));
} catch (err) {} /* continue */

@@ -275,2 +268,2 @@

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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VtLmRpZ2VzdCgnaGV4Jylcbn1cbiJdfQ==
{
"name": "eslint-plugin-import",
"version": "1.9.0",
"version": "1.9.1",
"description": "Import with sanity.",

@@ -74,3 +74,2 @@ "main": "lib/index.js",

"eslint-import-resolver-node": "^0.2.0",
"is-absolute": "^0.2.5",
"lodash.cond": "^4.3.0",

@@ -77,0 +76,0 @@ "lodash.endswith": "^4.0.1",

@@ -128,17 +128,10 @@ # eslint-plugin-import

- with an absolute path to resolver, used as a `computed property` name, which is supported since Node v4:
- as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`:
```js
// .eslintrc.js
module.exports = {
settings: {
'import/resolver': {
[path.resolve('../../../my-resolver')]: { someConfig: value }
}
}
}
```yaml
# .eslintrc.yml
settings:
# uses 'eslint-import-resolver-foo':
import/resolver: foo
```
- with a path relative to the closest `package.json` file:
```js

@@ -149,3 +142,3 @@ // .eslintrc.js

'import/resolver': {
'./my-resolver': { someConfig: value }
foo: { someConfig: value }
}

@@ -156,2 +149,3 @@ }

- with a full npm module name, like `my-awesome-npm-module`:

@@ -161,7 +155,4 @@ ```yaml

settings:
import/resolver: './my-resolver'
import/resolver: 'my-awesome-npm-module'
```
- with an npm module name, like `my-awesome-npm-module`:
```js

@@ -178,12 +169,4 @@ // .eslintrc.js

- with a filesystem path to resolver, defined in this example as a `computed property` name:
```yaml
# .eslintrc.yml
settings:
import/resolver: 'my-awesome-npm-module'
```
- as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`:
```js

@@ -194,3 +177,3 @@ // .eslintrc.js

'import/resolver': {
foo: { someConfig: value }
[path.resolve('../../../my-resolver')]: { someConfig: value }
}

@@ -201,8 +184,7 @@ }

`.eslintrc.yml`:
```yaml
settings:
import/resolver: foo
```
Relative paths will be resolved relative to the source's nearest `package.json` or
the process's current working directory if no `package.json` is found.
If you are interesting in writing a resolver, see the [spec](./resolvers/README.md) for more details.

@@ -209,0 +191,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