Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge release 1.10.3 #432

Merged
merged 3 commits into from
Jul 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"presets": [ "es2015-loose" ],
"sourceMaps": "inline"
"sourceMaps": "inline",
"env": {
"test": {
"plugins": [ "istanbul" ]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ node_modules

# generated output
lib/
/.nyc_output/
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).

## [Unreleased]


## [1.10.3] - 2016-07-08
### Fixed
- removing `Symbol` dependencies (i.e. `for-of` loops) due to Node 0.10 polyfill
issue (see [#415]). Should not make any discernible semantic difference.
Expand Down Expand Up @@ -310,7 +313,8 @@ for info on changes for earlier releases.
[#119]: https://github.com/benmosher/eslint-plugin-import/issues/119
[#89]: https://github.com/benmosher/eslint-plugin-import/issues/89

[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.2...HEAD
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.3...HEAD
[1.10.3]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.2...v1.10.3
[1.10.2]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.1...v1.10.2
[1.10.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.0...v1.10.1
[1.10.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.2...v1.10.0
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ test_script:
- cd .\resolvers\webpack && npm test && cd ..\..
- cd .\resolvers\node && npm test && cd ..\..

on_success:
- npm run coveralls

# Don't actually build.
build: off
90 changes: 3 additions & 87 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,102 +1,18 @@
var gulp = require('gulp')
, changed = require('gulp-changed')
, babel = require('gulp-babel')
, mocha = require('gulp-mocha')
, path = require('path')
, glob = require('glob')
, fs = require('fs')
, rimraf = require('rimraf')

var SRC = 'src/**/*.js'
, DEST = 'lib'

gulp.task('src', function () {
gulp.task('src', ['clean'], function () {
return gulp.src(SRC)
.pipe(changed(DEST))
.pipe(babel())
.pipe(gulp.dest(DEST))
})

/**
* Delete any file under `dest` that has no corresponding file in `src`.
* I.E. remove generated files that have been orphaned via deletion of their source.
* @param {string} src
* @param {string} dest
* @param {Function} done - callback upon completion
*/
function wipeExtras(src, dest, done) {
// glob into 'lib' and delete whatever isn't there
glob(dest + '/**/*.js', function (err, files) {
if (err) {
done(err); return
}

function checkFile(index) {
if (index >= files.length) {
done(); return
}

var libFilename = files[index]
, srcFilename = path.resolve(src, path.relative(path.resolve(dest), libFilename))

fs.stat(srcFilename, function (err) {
if (err) {
fs.unlink(libFilename, function () {
checkFile(index + 1)
})
} else {
checkFile(index + 1)
}
})
}


checkFile(0)
})
}

gulp.task('clean-src', function (done) {
gulp.task('clean', function (done) {
rimraf(DEST, done)
})

gulp.task('clean-tests', function (done) {
rimraf('tests/lib', done)
})

gulp.task('clean', ['clean-src', 'clean-tests'])

gulp.task('wipe-extras', function (done) {
var unfinished = 2
function megadone(err) {
if (err) { done(err); return }
if (--unfinished === 0) done()
}
wipeExtras('src', DEST, megadone)
wipeExtras('tests/src', 'tests/lib', megadone)
})

gulp.task('prepublish', ['src', 'wipe-extras'])

gulp.task('tests', function () {
return gulp.src('tests/src/**/*.js')
.pipe(changed('tests/lib'))
.pipe(babel())
.pipe(gulp.dest('tests/lib'))
})

// used externally by Istanbul, too
gulp.task('pretest', ['src', 'tests', 'wipe-extras'])

var reporter = 'spec'

gulp.task('test', ['pretest'], function () {
return gulp.src('tests/lib/**/*.js', { read: false })
.pipe(mocha({ reporter: reporter, grep: process.env.TEST_GREP, timeout: 5000 }))
// NODE_PATH=./lib mocha --recursive --reporter dot tests/lib/
})

gulp.task('watch-test', function () {
reporter = 'progress'
gulp.watch(SRC, ['test'])
gulp.watch('tests/' + SRC, ['test'])
})
gulp.task('prepublish', ['src'])
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-import",
"version": "1.10.2",
"version": "1.10.3",
"description": "Import with sanity.",
"main": "lib/index.js",
"directories": {
Expand All @@ -15,12 +15,13 @@
"watch": "cross-env NODE_PATH=./lib gulp watch-test",
"cover": "gulp pretest && cross-env NODE_PATH=./lib istanbul cover --dir reports/coverage _mocha tests/lib/ -- --recursive -R progress",
"posttest": "eslint ./src",
"test": "cross-env NODE_PATH=./lib gulp test",
"test": "cross-env BABEL_ENV=test NODE_PATH=./src nyc mocha --recursive tests/src -R progress -t 5s",
"coverage-report": "npm t && nyc report --reporter html",
"test-all": "npm test && for resolver in ./resolvers/*; do cd $resolver && npm test && cd ../..; done",
"ci-test": "eslint ./src && gulp pretest && cross-env NODE_PATH=./lib istanbul cover --report lcovonly --dir reports/coverage _mocha tests/lib/ -- --recursive --reporter dot",
"debug": "cross-env NODE_PATH=./lib mocha debug --recursive --reporter dot tests/lib/",
"prepublish": "gulp prepublish",
"coveralls": "cat ./reports/coverage/lcov.info | coveralls"
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls"
},
"repository": {
"type": "git",
Expand All @@ -43,21 +44,21 @@
"homepage": "https://github.com/benmosher/eslint-plugin-import",
"devDependencies": {
"babel-eslint": "next",
"babel-plugin-istanbul": "^1.0.3",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-register": "6.9.0",
"chai": "^3.4.0",
"coveralls": "^2.11.4",
"cross-env": "^1.0.7",
"eslint": "2.x",
"eslint-import-resolver-node": "file:./resolvers/node",
"eslint-import-resolver-webpack": "file:./resolvers/webpack",
"glob": "^6.0.2",
"gulp": "^3.9.0",
"gulp-babel": "6.1.2",
"gulp-changed": "^1.3.0",
"gulp-mocha": "^2.2.0",
"istanbul": "^0.4.0",
"mocha": "^2.2.1",
"nyc": "^7.0.0",
"redux": "^3.0.4",
"rimraf": "2.5.2"
},
Expand All @@ -78,5 +79,12 @@
"object-assign": "^4.0.1",
"pkg-dir": "^1.0.0",
"pkg-up": "^1.0.0"
},
"nyc": {
"require": [
"babel-register"
],
"sourceMap": false,
"instrument": false
}
}
2 changes: 1 addition & 1 deletion src/core/getExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default class ExportMap {
// default exports must be explicitly re-exported (#328)
let returnValue = undefined
if (name !== 'default') {
this.dependencies.foreach((dep) => {
this.dependencies.forEach((dep) => {
if (returnValue === undefined) {
let innerMap = dep()
// todo: report as unresolved?
Expand Down
2 changes: 1 addition & 1 deletion tests/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('CLI regression tests', function () {
cli = new CLIEngine({
useEslintrc: false,
configFile: './tests/files/issue210.config.js',
rulePaths: ['./lib/rules'],
rulePaths: ['./src/rules'],
rules: {
'named': 2,
},
Expand Down
2 changes: 1 addition & 1 deletion tests/src/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var path = require('path')
, fs = require('fs')

describe('package', function () {
let pkg = path.join(process.cwd(), 'lib')
let pkg = path.join(process.cwd(), 'src')
, module

before('is importable', function () {
Expand Down