Comments (3)
Thank you for the kind words AJ!
Could you please share what versions of the octokit packages you are using (on mac/linux: npm ls | grep octokit
)
We upgraded to much better Types today, but I've only run into a few regressions, it's like that you run into one here as well. I'm having a look
from plugin-paginate-rest.js.
I think I found the problem. @octokit/types
will give you the new version with extended types, @octokit/rest
gets its version trough its dependency on @octokit/plugin-rest-endpoint-methods
, which has not yet been updated in @octokit/rest. That should be easy enough to fix
What I would do is to change your code slightly so you don't need to import @octokit/types
separately
import { Octokit } from "@octokit/rest";
const client = new Octokit();
(async () => {
try {
const repositories = await client.paginate(
client.apps.listReposAccessibleToInstallation
);
// Iterate over repos
for (let i = 0; i < repositories.length; i++) {
//
}
} catch (error) {
// error handling
}
})();
from plugin-paginate-rest.js.
Thanks, Gregor! That looks like it works. Here are my dependency versions for reference. It's likely that the upgrade was what affected my code since this issue only appeared after updating to the latest version today. Appreciate the help here. I'll close this issue and keep an eye out for the @octokit/rest
update.
Working:
{
"dependencies": {
"@octokit/auth-app": "^2.9.0",
"@octokit/plugin-throttling": "^3.3.2",
"@octokit/rest": "^18.0.6",
"@octokit/webhooks": "^7.15.1",
},
"devDependencies": {
"@octokit/types": "^5.5.0",
}
}
Not working:
{
"dependencies": {
"@octokit/auth-app": "^2.10.3",
"@octokit/plugin-throttling": "^3.3.4",
"@octokit/rest": "^18.0.9",
"@octokit/webhooks": "^7.15.1",
},
"devDependencies": {
"@octokit/types": "^6.0.1",
}
}
from plugin-paginate-rest.js.
Related Issues (20)
- export `composePaginateRest` for plugin composition HOT 1
- remove code duplication from PaginateInterfacte / ComposePaginateInterface
- [typescript] `await octokit.paginate("GET /repos/{owner}/{repo}/labels")` is typed as `unknown` HOT 1
- Dependency Dashboard
- The `done` parameter for the `.paginate()` callback should not be optional HOT 2
- PaginateInterface & ComposePaginateInterface - code duplication issue
- automated OpenAPI are currently failing HOT 1
- Action Required: Fix Renovate Configuration
- TypeScript types appear to be incorrect for paginate() on apps.listReposAccessibleToInstallation HOT 12
- Writing tests for a custom function using octokit.paginate HOT 3
- CodeQL Check Run requires write access when running for 'push' events HOT 1
- ci: use `test_matrix` and `test` jobs HOT 1
- peer dependency issues HOT 8
- The automated release is failing 🚨
- [MAINT]: "Add to Octokit Project" action fails due to missing token HOT 6
- [BUG]: @octokit/[email protected] incompatible with @octokit/[email protected] HOT 6
- [BUG]: TypeScript compilation errors due to `@octokit/types` v9.1.2 HOT 11
- [BUG]: Normalizing paginated response HOT 3
- [BUG]: Peer dependency of @octokit/core@">=5" broken as @octokit/core@6 is ESM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-paginate-rest.js.