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

Housekeeping - get build/tests running #78

Merged
merged 6 commits into from
Feb 14, 2019

Conversation

davidgovea
Copy link
Contributor

Been using frisbee for about a year now, and came across the bug-bounty repo today. Was getting started on the cross-fetch task, but ran into some deprecations/build issues.

There were a handful of separate issues, but for this PR I took the approach of minimum change.

  1. Babel polyfill error - can be seen on the latest travis build. Quick removal from .babelrc.
  2. Babel environment problem: .browserlistrc was being ignored due to the targets config of @babel/env in the .babelrc file. The build contained class, const etc, while current release version of frisbee has only es5-level code. Tests were refusing to run.
  • Moved the browserlist config into .babelrc
  1. Ava deprecations: the form of throws assertions have changed since 1.0-beta versions of ava.
  • I needed to disable an xo/eslint rule, due to the version of xo being locked down.
  • Could have just locked down ava to 1.0.0-beta.4, but the yarn.lock already had a more recent version, so I figured a light test refactor was appropriate

Going to start the cross-fetch task from here, but would be happy to explore different approaches to anything.

Error from babel: The 'polyfill' option has been removed. The
@babel/runtime module now skips polyfilling by default.
it appears that @babel/preset-env ignores .browserslistrc when `targets`
are provided (node 6.4.0 in this case)
Regex used:
(t)hrows\(([^(].*)\);
$1hrows(() => $2);
error from ava:
Function returned a promise. Use `t.throwsAsync()` instead:
Since xo version is locked down, the ava rules are out-of-date. This was
the least-changes way to get build working.
@davidgovea
Copy link
Contributor Author

Hmm, looks like the node v6 & v9 tests are running into engine conflicts from dependencies.

For node 6, eslint-plugin-compat causes an error:
error eslint-plugin-compat@2.6.3: The engine "node" is incompatible with this module. Expected version ">=8.x".

For node 9, ava causes an error:
error ava@1.0.1: The engine "node" is incompatible with this module. Expected version ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0".

@niftylettuce
Copy link
Collaborator

We can drop support for Node version 6.x and only support LTS versions v8.x and v10.x End of life for v6.x is April 2019, which is only 2 months away. https://github.com/nodejs/Release#release-schedule

@davidgovea
Copy link
Contributor Author

That sounds good.

Having devDependencies block the install process felt... a bit wrong to me. So, I made a tweak to the travis install process -- I'm pretty sure that npm and yarn differ in this respect (npm being less strict with the engine requirements).

@davidgovea davidgovea mentioned this pull request Feb 14, 2019
@niftylettuce niftylettuce merged commit 5a5aada into ladjs:master Feb 14, 2019
@niftylettuce
Copy link
Collaborator

@davidgovea I believe https://github.com/niftylettuce/frisbee/blob/master/.babelrc#L5 needs updated to target 8.x

@niftylettuce
Copy link
Collaborator

@davidgovea also see 52310f9

@niftylettuce
Copy link
Collaborator

@davidgovea what is your PayPal? I owe you some bounties. Feel free to email it to niftylettuce@gmail.com if you wish to keep private.

@niftylettuce
Copy link
Collaborator

Also could you tackle https://github.com/niftylettuce/bug-bounties/issues/5 too? 💯 I would prob double bounty if you did.

@davidgovea
Copy link
Contributor Author

@niftylettuce awesome! Just added another PR for the bump

And yep, was already starting some research on niftylettuce/bug-bounties#5 :) Going to take deeper dive comparing the libraries you listed, as well as other retry-scheduling utilities.

@niftylettuce
Copy link
Collaborator

@davidgovea thanks! version 2.0.6 of frisbee has been released, see https://github.com/niftylettuce/frisbee/releases/tag/v2.0.6 for release notes. I've also updated the README at https://github.com/niftylettuce/frisbee and provided clearer examples and usage.

@niftylettuce
Copy link
Collaborator

@davidgovea just let me know what your PayPal is - I also make you a collaborator on this repo

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