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

Move signal-exit from devDependencies to dependencies. Fixes #3185 #3186

Merged
merged 1 commit into from Feb 21, 2018

Conversation

4 participants
@hudochenkov
Member

hudochenkov commented Feb 21, 2018

Which issue, if any, is this issue related to?

#3185

Is there anything in the PR that needs further explanation?

I don't know how to test it. Or recreate a problem. But this package is required in our code. Even, though, we don't use sync method in writeFileAtomic.js, which is the only place uses this package.

@evilebottnawi

This comment has been minimized.

Member

evilebottnawi commented Feb 21, 2018

@hudochenkov need patch release 😞

@jeddy3

jeddy3 approved these changes Feb 21, 2018

@jeddy3 jeddy3 merged commit 206fd48 into master Feb 21, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.525%
Details

@jeddy3 jeddy3 deleted the fix-3185 branch Feb 21, 2018

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Feb 21, 2018

  • Fixed: missing signal-exit dependency (#3186).

@hudochenkov need patch release 😞

I'll do one now.

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Feb 21, 2018

Released as 9.1.1.

I might be remembering incorrectly, but didn't we add an eslint plugin or something similar to protected us from these missing dependencies issues?

@hudochenkov

This comment has been minimized.

Member

hudochenkov commented Feb 21, 2018

Thanks, @jeddy3!

@hudochenkov

This comment has been minimized.

Member

hudochenkov commented Feb 21, 2018

@jeddy3 we do have such rules, but they won't protect from this situation. We have package in package.json, and it exists. I don't thinks it's possible to know if required package should be in devDepenendencies or in dependencies.

no-missing-require
no-extraneous-require

@ntwb

This comment has been minimized.

Member

ntwb commented Feb 23, 2018

That discussion was in #2978, it primarily revolved around the eslint-plugin-node no-unpublished-require rule, this rule doesn't cover what occurred in this case.

I had a quick look at the other rules not included in the eslint-plugin-node/recommend ruleset that we use and none of those would have detected that either.

Something to keep a lookout for, or possibly create a new ESLint rule maybe

@ntwb

This comment has been minimized.

Member

ntwb commented Feb 23, 2018

I tried using this plugin https://www.npmjs.com/package/eslint-plugin-implicit-dependencies and reverting the change in this PR, the result:

npm run lint:js

> stylelint@9.1.1 lint:js /Users/netweb/dev/stylelint/stylelint
> eslint . --cache


/Users/netweb/dev/stylelint/stylelint/lib/__tests__/ignoreDisables.test.js
  5:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/__tests__/needlessDisables.test.js
  6:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/__tests__/standalone-cache.test.js
  11:16  error  Module "cp-file" is not listed as a dependency in package.json              implicit-dependencies/no-implicit
  12:20  error  Module "file-exists-promise" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/__tests__/standalone-formatter.test.js
  6:19  error  Module "strip-ansi" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/__tests__/standalone-syntax.test.js
  11:19  error  Module "strip-ansi" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/formatters/__tests__/needlessDisablesStringFormatter.test.js
  4:19  error  Module "strip-ansi" is not listed as a dependency in package.json   implicit-dependencies/no-implicit
  5:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/formatters/__tests__/prepareFormatterOutput.js
  3:19  error  Module "strip-ansi" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/formatters/__tests__/stringFormatter.test.js
  5:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/formatters/__tests__/verboseFormatter.test.js
  4:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/rules/at-rule-empty-line-before/__tests__/index.js
  8:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/rules/no-duplicate-selectors/__tests__/index.js
  6:23  error  Module "postcss-import" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/rules/selector-nested-pattern/__tests__/index.js
  8:21  error  Module "common-tags" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/lib/utils/__tests__/nodeContextLookup.test.js
  6:23  error  Module "postcss-import" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/scripts/benchmark-rule.js
  4:19  error  Module "benchmark" is not listed as a dependency in package.json  implicit-dependencies/no-implicit
  8:17  error  Module "request" is not listed as a dependency in package.json    implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/system-tests/fix/fix.test.js
  4:16  error  Module "cp-file" is not listed as a dependency in package.json  implicit-dependencies/no-implicit
  5:13  error  Module "del" is not listed as a dependency in package.json      implicit-dependencies/no-implicit

/Users/netweb/dev/stylelint/stylelint/system-tests/systemTestUtils.js
  5:19  error  Module "strip-ansi" is not listed as a dependency in package.json  implicit-dependencies/no-implicit

✖ 20 problems (20 errors, 0 warnings)

And signal-exit is not listed as one of those missing, its also not listed once I remove it completely from package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment