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

Typescript compilation failures #115

Closed
2 of 7 tasks
Stono opened this issue Sep 22, 2021 · 7 comments · Fixed by octokit/plugin-paginate-rest.js#363
Closed
2 of 7 tasks

Typescript compilation failures #115

Stono opened this issue Sep 22, 2021 · 7 comments · Fixed by octokit/plugin-paginate-rest.js#363
Labels
Type: Bug Something isn't working as documented typescript

Comments

@Stono
Copy link

Stono commented Sep 22, 2021

Checklist

Environment

Versions

❯ npm ls | grep -v deduped | grep octokit
├── @octokit/rest@18.10.0

What happened?

As of today our builds using @octokit/rest@18.10.0 have started failing to compile with this error:

node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(1351,31): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.
node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(1352,29): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.
node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts(1475,60): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.
node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts(1476,33): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.

We have not changed the version of the package, so this feels like some sort of transitive dependency issue.

Minimal test case to reproduce the problem

Build an app with @octokit/rest@18.10.0

What did you expect to happen?

Typescript compilation to work

What the problem might be

This feels similar to octokit/plugin-rest-endpoint-methods.js#172, https://www.npmjs.com/package/@octokit/plugin-rest-endpoint-methods was published 17 hours ago so feels somewhat suspicious

@Stono Stono added the Type: Bug Something isn't working as documented label Sep 22, 2021
@gr2m
Copy link
Contributor

gr2m commented Sep 22, 2021

I'm looking into it right now, will be fixed with octokit/plugin-paginate-rest.js#363

@Stono
Copy link
Author

Stono commented Sep 22, 2021

Cheers @gr2m :) Let me know when the packages are published and i'll test it on my end.

@gr2m
Copy link
Contributor

gr2m commented Sep 22, 2021

Can you try again? Make sure to update your lock file and the dependency tree. Make sure you have @octokit/plugin-rest-endpoint-methods@5.11.1 and @octokit/plugin-paginate-rest@2.16.4

@Stono
Copy link
Author

Stono commented Sep 22, 2021

@gr2m just gave it another go this time i get:

node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(1351,31): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.
node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(1352,29): error TS2339: Property 'GET /user/{username}/packages' does not exist on type 'Endpoints'.

Looks like its pulling in 2.16.3 of @octokit/plugin-paginate-rest however:

❯ cat node_modules/@octokit/plugin-paginate-rest/package.json|grep version
  "version": "2.16.3",

That's with a fresh rm -rf ./node_modules so struggling to get it to install 2.16.4 (which i do see published https://www.npmjs.com/package/@octokit/plugin-paginate-rest)

@Stono
Copy link
Author

Stono commented Sep 22, 2021

Hmm I had to rm -rf ~/.npm too to get it to do 2.16.4, event --prefer-online didn't help.

❯ cat node_modules/@octokit/plugin-paginate-rest/package.json|grep version
  "version": "2.16.4",

Now that we have that dependency, it builds OK.
Is it worth explicitly bumping the minimum version in @octokit/rest to ensure this gets picked up properly?

@gr2m
Copy link
Contributor

gr2m commented Sep 22, 2021

Is it worth explicitly bumping the minimum version in @octokit/rest to ensure this gets picked up properly?

already ahead of you 😁
https://github.com/octokit/rest.js/releases/tag/v18.11.0

@Stono
Copy link
Author

Stono commented Sep 22, 2021

Sorted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented typescript
Projects
None yet
2 participants