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

Update deps #11

Merged
merged 11 commits into from
Nov 25, 2019
Merged

Update deps #11

merged 11 commits into from
Nov 25, 2019

Conversation

bemailloux
Copy link
Contributor

@bemailloux bemailloux commented Nov 15, 2019

Continuing what @jwong-d2l started in #10: remove vinyl-fs (EDIT: vinyl-fs is back. Too many consumers of this module are still using vinyl), modernize delete babel, and update dev dependencies. With these changes there are 0 known vulnerabilities in this package (down from 38)!

Testing:

  • Unit tests pass + coverage increased
  • I npm linked it to my local clone of bdp-visualizations-fra and ran the script. It builds appconfig.json correctly, in the location specified in dist. The file is always called appconfig.json, which I'm pretty sure was the case before.
  • yargs command line arguments and aliases still work
  • reading arguments from a package.json still works
  • chalk still prints in the correct colours

Note: if you're running from command line, frau-appconfig-builder will likely fail because you haven't specified an appClass.

@bemailloux
Copy link
Contributor Author

Argh. Looks like I will need to update node as part of this change

@coveralls
Copy link

coveralls commented Nov 15, 2019

Coverage Status

Coverage increased (+6.4%) to 100.0% when pulling 4504df1 on bemailloux:update-deps into e1dc706 on Brightspace:master.

@bemailloux
Copy link
Contributor Author

Not sure if we also want to update the other dependencies that are out of date (yargs, chalk, semver)

@@ -102,7 +102,7 @@ This repository is configured with [EditorConfig](http://editorconfig.org) rules
[npm-url]: https://www.npmjs.org/package/frau-appconfig-builder
[npm-image]: https://img.shields.io/npm/v/frau-appconfig-builder.svg
[ci-url]: https://travis-ci.org/Brightspace/frau-appconfig-builder
[ci-image]: https://img.shields.io/travis-ci/Brightspace/frau-appconfig-builder.svg
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want this URL: https://img.shields.io/travis/com/Brightspace/frau-appconfig-builder.svg

We try to use the badges from img.shields.io for consistency, otherwise they are different size/font and they look terrible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok thanks! The existing badge was broken but the one in the link you provided works

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool yeah, I think we probably have a few that are broken due to the switch to travis.com.

Copy link
Collaborator

@dbatiste dbatiste left a comment

Choose a reason for hiding this comment

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

This looks ok to me. I'd probably try to update the other dependencies you asked about as well. It'd be good to get someone elses eyes on this since I haven't worked with appconfig in years.

@bemailloux
Copy link
Contributor Author

bemailloux commented Nov 18, 2019

TODO:

  • Update other dependencies
  • Update travis badge


argv = argv.usage('Usage: frau-appconfig-builder [--appfile|-f] [--dist|-d] [--loader|l] [--showloading|-s]')
argv = argv.usage('Usage: frau-appconfig-builder [--appfile|-f] [--dist|-d] [--loader|-l] [--showloading|-s]')

Choose a reason for hiding this comment

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

nice!

.travis.yml Outdated
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '0.12'
- '6.9'

Choose a reason for hiding this comment

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

wow, really? It was on 0.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lol yeah. One of the dependencies used const and travis freaked out when I tried to test it

Copy link
Contributor

@omsmith omsmith left a comment

Choose a reason for hiding this comment

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

Have you searched if people were consuming this programmatically, or are they just using the cli?

Transformations done seem okay to me, though they are breaking (hence the question above). The end result is still imperfect error-handling wise, but not something that needs to be fixed here.

test/mocha.opts Outdated
@@ -1 +1 @@
--compilers js:babel/register -R spec
--require @babel/register -R spec
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe babel is needed at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's because recent versions of node support ES5/ES6 features natively, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. I expect this was mostly in here to be able to use, say, const in the tests.

.travis.yml Outdated
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '0.12'
- '6.9'
Copy link
Contributor

Choose a reason for hiding this comment

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

Node.js 6 was EOL in April. If we're updating things, not a ton of point in including or, or at least having it as the only version.

Maybe do a list of 8, 10 and 12

@bemailloux
Copy link
Contributor Author

Have you searched if people were consuming this programmatically

Looks like they are, which is not a case I considered. Example: https://github.com/Brightspace/simplified-interface-checklist/blob/master/bin/build-appconfig.js

If I still want to go ahead with this change, I guess I should bump the major version number (1.0.0 -> 2.0.0)?

@omsmith
Copy link
Contributor

omsmith commented Nov 18, 2019

If I still want to go ahead with this change, I guess I should bump the major version number (1.0.0 -> 2.0.0)?

Yeah, and ideally open a PR against the users so the company isn't sitting stale. I know that makes more work for you though.

If you wanted to stay non-breaking, you'd want to put vinyl back in probably.

@@ -1,8 +1,8 @@
import chai from 'chai';

Choose a reason for hiding this comment

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

this wasn't you.. but anyone else notice that space in the filename?

@bemailloux
Copy link
Contributor Author

bemailloux commented Nov 18, 2019

you'd want to put vinyl back in probably.

vinyl-fs@3.0.3 doesn't have any vulnerabilities, so I did that. I also put this package's version number back to 1.1.0.

I know that makes more work for you though.

For something that was part of inspiration I don't want to spend that much time on this :)

@bemailloux bemailloux merged commit 9e08e22 into Brightspace:master Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants