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

Reporter #67

Merged
merged 13 commits into from Apr 21, 2020
Merged

Reporter #67

merged 13 commits into from Apr 21, 2020

Conversation

brettz9
Copy link
Collaborator

@brettz9 brettz9 commented Apr 15, 2020

Builds on #66.

  • feat: replace render with reporter array
  • test: Add nyc for tests
  • test: 100% coverage
  • test: Use non-deprecated form file in tests

BREAKING CHANGE:

Removes render.

Also adds sourcemaps and bumps some devDeps and drops unneeded ones

(Re: the extra Rollup file, I'd like to use that as I've mentioned this on rollup/rollup#3445 , but not clear that this is possible at this point.) Removed.

@brettz9 brettz9 force-pushed the reporter branch 2 times, most recently from bb5ec8f to 8b38798 Compare April 15, 2020 09:44
@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 15, 2020

I've now removed the extra Rollup file, with this being expected to be entirely ready for review.

@ritz078
Copy link
Owner

ritz078 commented Apr 15, 2020

I don't think we should remove render straightaway. We should keep it and show a deprecation warning and then we can remove it in the next major release. wdyt ?

@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 16, 2020

Sure, sounds good to me. Note that this would be a breaking change relative to recent commits as far as reporter behavior, as if the user is specifying their own already, it would no longer use the boxen reporter too. However, the reporter behavior was not released, so as long as this merge is handled before any release, it should not be a breaking change (as I may have a chance to add back the render).

@brettz9 brettz9 force-pushed the reporter branch 2 times, most recently from 151506f to d6920a1 Compare April 16, 2020 04:39
@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 16, 2020

I've updated to be backward-compatible in supporting an explicit render (as well as the default of omitting it). I also added a test and updated the docs accordingly. Would still need to investigate the testing issue.

@brettz9 brettz9 force-pushed the reporter branch 4 times, most recently from b0a0887 to aa2288e Compare April 16, 2020 05:56
@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 16, 2020

I've now gotten the tests working here as well; it was an issue with the fact that the machines in use on Github do not support Terminal colors. The tests are now checking for environment support before making assertions on color.

@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 16, 2020

Oh, and I switched from colors to colors/safe to avoid colors extending the prototype (we weren't using that anyways).

@ritz078
Copy link
Owner

ritz078 commented Apr 20, 2020

I will review this PR once queries in #66 are resolved.

@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 21, 2020

I can see about making changes to support the feature you wish to add in #66, but #66 is just documenting existing behavior, and this PR, while being a breaking change, is unrelated to that "before" size feature.

Since this PR also adds testing and full coverage, I would very much appreciate your reviewing these PRs now. Any changes I then make to add the feature to check the old npm package size (and setting it as the default per your wishes) can ensure there are no regressions.

Copy link
Owner

@ritz078 ritz078 left a comment

Choose a reason for hiding this comment

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

Great job 🎉 Especially the tests.

Can you run prettier on the whole codebase once. We can add a pre-commit hook later to run prettier on the staged files directly.

@@ -4,6 +4,7 @@ module.exports = {
es6: true,
node: true,
},
parser: "babel-eslint",
Copy link
Owner

Choose a reason for hiding this comment

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

Should we use https://github.com/babel/babel/tree/master/eslint/babel-eslint-parser instead? babel-eslint is now deprecated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Where do you see notice about babel-eslint being deprecated? I am not seeing it as such with "check-is-deprecated" or on searches. But if it does the same job, I guess it probably is better to use something under the @babel umbrella.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See comment below.

Readme.md Outdated Show resolved Hide resolved
BREAKING CHANGE:

Removes `render`.

Also adds sourcemaps and bumps some devDeps and drops unneeded ones
…meta.url` until having Node 13 as a minimum and refactoring to avoid transpilation as `rollup.config.mjs`); the other, now only config, instead points to the bundled `dist` filesize for now.
…ter` (and mention it being replacement for `render`)
- Refactor: Use `colors/safe` API as not using prototype methods and could potentially clash
@brettz9
Copy link
Collaborator Author

brettz9 commented Apr 21, 2020

Re: prettier, sure, I've added a commit to apply.

(Note that even with prettier 2.0 part of package.json, we're still waiting on prettier/eslint-plugin-prettier#281 to ensure our IDEs can enforce that. But running prettier works.)

I added .prettierignore to avoid applying to .nyc_output and dist but applying to .github. Let me know if you want this some other way.

@ritz078 ritz078 merged commit 24fdf7c into ritz078:master Apr 21, 2020
@brettz9 brettz9 deleted the reporter branch April 21, 2020 05:03
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

2 participants