GithubHelp home page GithubHelp logo

Comments (12)

timrogers avatar timrogers commented on June 1, 2024 2

Yep! I have just released updates to several Octokit packages. Can you tell me the versions of all of your Octokit-related packages in your lock file?

from plugin-rest-endpoint-methods.js.

wolfy1339 avatar wolfy1339 commented on June 1, 2024

Can you please share your tsconfig.json as well? Also, can you share a snippet of code that reproduces the problem?

from plugin-rest-endpoint-methods.js.

timrogers avatar timrogers commented on June 1, 2024

Could you also check what version of @octokit/plugin-rest-endpoint-methods is in node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods by checking node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json? Judging by the error, I think it isn't the current version (v5.15.0).

from plugin-rest-endpoint-methods.js.

karmann-dm avatar karmann-dm commented on June 1, 2024

@timrogers

Could you also check what version of @octokit/plugin-rest-endpoint-methods

Yes, seems like, do you have an idea how to fix it?

$ cat node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json | grep \"version\":
  "version": "5.13.0"

from plugin-rest-endpoint-methods.js.

timrogers avatar timrogers commented on June 1, 2024

@timrogers

Could you also check what version of @octokit/plugin-rest-endpoint-methods

Yes, seems like, do you have an idea how to fix it?

$ cat node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json | grep \"version\":
  "version": "5.13.0"

Interesting! I wonder if we need to update the dependency defined on @octokit/rest. The links between all of these packages are pretty tricky to understand.

@gr2m Can you point us in the right direction?

from plugin-rest-endpoint-methods.js.

karmann-dm avatar karmann-dm commented on June 1, 2024

@wolfy1339

Can you please share your tsconfig.json as well? Also, can you share a snippet of code that reproduces the problem?

tsconfig.json

{
  "compilerOptions": {
    "target": "es2019",
    "module": "commonjs",
    "outDir": "./lib",
    "rootDir": "./src",
    "strict": true,
    "noImplicitAny": true,
    "esModuleInterop": true,
    "strictPropertyInitialization": false
  },
  "exclude": ["node_modules"]
}

About the snippet - there is nothing special, basically if I import

import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"

problem starts to appear.

In my case I just do this

export type CreatePullRequestParameters =
  RestEndpointMethodTypes["pulls"]["create"]["parameters"]

from plugin-rest-endpoint-methods.js.

gr2m avatar gr2m commented on June 1, 2024

The POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments endpoint has been removed, it no longer exists. This is an edge case, it happens very rarely. You likely have the latest version of @octokit/openapi-types, but not the latest version of @octokit/plugin-rest-endpoint-methods.

Try to delete the node_modules folder and whatever lock file you use (usually package-lock.json). Then run npm install again, that should fix it

from plugin-rest-endpoint-methods.js.

a-tarasyuk avatar a-tarasyuk commented on June 1, 2024

TypeScript uses the latest version of @octokit/rest., today I noticed that the CI build failed due to the following errors

Error: node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts(903,48): error TS2344: Type '"/orgs/{org_id}/codespaces"' does not satisfy the constraint 'keyof paths'.
Error: node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts(1612,70): error TS2344: Type '"/repos/{owner}/{repo}/community/code_of_conduct"' does not satisfy the constraint 'keyof paths'.
Error: node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(226,74): error TS2339: Property 'data' does not exist on type 'unknown'.

I'm not sure if this is related to this issue or should I create a new one?

from plugin-rest-endpoint-methods.js.

timrogers avatar timrogers commented on June 1, 2024

@a-tarasyuk Can you try updating all of the Octokit packages? I think you'll find this is fixed now.

from plugin-rest-endpoint-methods.js.

a-tarasyuk avatar a-tarasyuk commented on June 1, 2024

It uses the latest version. Has it been updated recently?

"@octokit/rest": "latest",

from plugin-rest-endpoint-methods.js.

a-tarasyuk avatar a-tarasyuk commented on June 1, 2024

@timrogers Thanks. The latest version seems to work fine.

from plugin-rest-endpoint-methods.js.

timrogers avatar timrogers commented on June 1, 2024

Great - sorry about that! The packages have complicated dependencies and some of them still needed updates.

from plugin-rest-endpoint-methods.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.