| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ait `await import()` statements
|
@travi we get the error with ls-engines again. Did you figure out how to fix it? |
Sorry, something went wrong.
yep, thats this issue. should be solved once that is merged. maybe we comment out the check for now while we wait on a new version? |
Sorry, something went wrong.
| './get-client': proxyquire('../lib/get-client', {'./definitions/rate-limit': rateLimit}), | ||
| }); | ||
| // mock rate limit imported via lib/get-client.js | ||
| await quibble.esm('../lib/definitions/rate-limit.js', RATE_LIMIT_MOCK) |
Sorry, something went wrong.
Sorry, something went wrong.
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
…tch requests yet
|
@travi sorry it's quite the massive PR in the end, but I think this is ready
|
Sorry, something went wrong.
There was a problem hiding this comment.
i havent gotten very deep yet, but have a couple of thoughts for tonight. i'll continue to review again later
Sorry, something went wrong.
| context | ||
| ); | ||
| const { owner, repo } = parseGithubUrl(repositoryUrl); | ||
| const octokit = new Octokit( |
There was a problem hiding this comment.
to build on the injection question above, i'm curious if there would be value in passing an instance through rather than passing the constructor and constructing here and various other places.
two potential benefits:
these are just questions for consideration. i'm good with either approach
Sorry, something went wrong.
There was a problem hiding this comment.
I had the same thought but didn't want to overburden this pull request. It would be an internal refactoring so shouldn't impact future releases.
Main benefit of having a shared octokit instance is that it would share the same throttling state. But it would be a side effect, which we already do for the verified flag here: Line 12 in /index.js
We could add a singleton octokit instance. That is initiated first time any of the plugin methods are called? Only problem I see is that it would break if the different methods would be called with different configuration, but that doesn't seem to be a problem?
Do you have an idea how we might avoid the side effect for both octokit and verified? It's bound to cause trouble eventually, it aways does 🤣
Sorry, something went wrong.
There was a problem hiding this comment.
I had the same thought but didn't want to overburden this pull request. It would be an internal refactoring so shouldn't impact future releases.
i think this is where my head is too. even if we do think it is a worthwhile change, it feels worthwhile to defer until after merging the rest of this change and releasing to latest.
would it be worth capturing an issue for later (optional) consideration? that way we are less likely to lose track of the thoughts you've shared here if we do decide to revisit?
Sorry, something went wrong.
There was a problem hiding this comment.
The only way I can think of is for semantic-release plugins to have a function that needs to be called, which then in turn returns the lifecycle functions. I guess we could add that functionality to semantic-release and support both patterns for a while or even forever. But for the time being we do the side effect?
Sorry, something went wrong.
There was a problem hiding this comment.
would it be worth capturing an issue for later (optional) consideration
yes I'll do that. I'll probably send a pull request right away so we can discuss it in isolation, and then do a follow up issue to discuss the new plugin API which would export a single function as default export that works as a factory function for the lifecycle APIs to contain state / avoid side effects
Sorry, something went wrong.
|
not sure what your plan is for merging this into beta, but if we don't squash, i think it could be a good idea to capture the prettier commit(s) to be ignored from blame, like we did in https://github.com/semantic-release/semantic-release/blob/master/.git-blame-ignore-revs and others. also, since beta is behind master, we could avoid some conflicts when merging beta to master if we dont squash. alternatively, maybe it is worth getting beta up to date with master before we merge this into beta? |
Sorry, something went wrong.
There was a problem hiding this comment.
i've looked through all of the source files so far, but need to step away again for now. i don't expect any big concerns with the test files, though, so this is looking great!
main thing so far is just the simplification of the dependency injection for the octokit constructor in the various places where defaults arent needed
Sorry, something went wrong.
| "license": "MIT", | ||
| "main": "index.js", | ||
| "nyc": { | ||
| "exports": "./index.js", |
Sorry, something went wrong.
| context | ||
| ); | ||
| const { owner, repo } = parseGithubUrl(repositoryUrl); | ||
| const octokit = new Octokit( |
There was a problem hiding this comment.
I had the same thought but didn't want to overburden this pull request. It would be an internal refactoring so shouldn't impact future releases.
i think this is where my head is too. even if we do think it is a worthwhile change, it feels worthwhile to defer until after merging the rest of this change and releasing to latest.
would it be worth capturing an issue for later (optional) consideration? that way we are less likely to lose track of the thoughts you've shared here if we do decide to revisit?
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
the remainder looks good to me. a lot of formatting changes to sort through, so let me know if there is anything in particular you'd like to make sure i got my eyes on beyond the dependency injection pieces
Sorry, something went wrong.
Sorry, something went wrong.
|
🎉 This PR is included in version 9.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sorry, something went wrong.
|
🎉 This PR is included in version 9.0.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fixes #418
closes #330, closes #358, closes #390, closes #395, closes #396, closes #515, close #548, closes #580, closes #627, closes #628, closes #630, closes #631, closes #635
For reference, because it came up in other discussions, here is how I replaced proxyquire with quibble
BREAKING CHANGE: @semantic-release/github is now a native ES Module. It has named exports for each plugin hook (verifyConditions, publish, addChannel, success, fail)
BREAKING CHANGE: in case of error, the thrown error is not iterable directly. Use the error.errors property instead (via aggregate-error v4.0.0)
Todos
Reminder to self: run a single test: