Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Clean dependencies #141

Merged
merged 3 commits into from
May 2, 2019
Merged

Clean dependencies #141

merged 3 commits into from
May 2, 2019

Conversation

artem-zakharchenko
Copy link
Contributor

Changelog

  • Removes CoffeeScript-related dependencies
  • Adjusts the usage points of CoffeeScript dependencies
  • Removes unnecessary dependencies (is-type)
  • Removes dependencies that can be replaced by other existing dependencies (lodash)

@artem-zakharchenko
Copy link
Contributor Author

Test coverage is still removed, as it needs to be rewritten to use a different (perhaps, a more simple) solution than the current scripts/cov.

@@ -193,7 +196,7 @@ class World {

// Debugging helper
inspect(data) {
if (typeof data === 'object') {
if (data !== null && typeof data === 'object') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added explicit comparison to null to prevent false positives (typeof null is "object").

Copy link
Contributor

@honzajavorek honzajavorek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about the lodash, otherwise looks good.

@@ -100,7 +99,9 @@ class SchemaV4Generator {
const schemaType = this.getSchemaTypeFor(baseObject);

const hasKeys =
type.object(baseObject) && Object.keys(baseObject).length > 0;
baseObject !== null &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be !== or !=? (thinking of undefined)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well typeof undefined is 'undefined' so I guess it's sorted by the other line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First checking for null to prevent false positive on the next line. Yes, then the next line is satisfied only on object. undefined value would reject then.

"json-parse-helpfulerror": "1.0.3",
"json-pointer": "0.6.0",
"media-typer": "0.3.0",
"tv4": "1.3.0"
},
"devDependencies": {
"chai": "4.2.0",
"coffee-coverage": "2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #114

@@ -5,6 +5,9 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const gavel = require('../../../lib/gavel');
// DO NOT REMOVE!
// lodash is not used, but somehow accessed from Cucumber feature testing.
// May be a case of nasty shadow module references.
const _ = require('lodash');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can the line work if we removed lodash from deps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'm testing now, and it seems to pass. Sorry for the confusing comment. Will remove.

@honzajavorek honzajavorek merged commit f2d5304 into master May 2, 2019
@honzajavorek honzajavorek deleted the 96-clean-dependencies branch May 2, 2019 14:08
@ApiaryBot
Copy link
Collaborator

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants