core.js icon indicating copy to clipboard operation
core.js copied to clipboard

feat: remove previews

Open wolfy1339 opened this issue 3 years ago • 6 comments

Followup to https://github.com/octokit/endpoint.js/pull/382#issuecomment-1370197900 See also https://github.com/octokit/endpoint.js/pull/388 https://github.com/octokit/plugin-paginate-rest.js/pull/486 Requires https://github.com/octokit/types.ts/pull/491


Behavior

Before the change?

  • Previews were documented

After the change?

  • Previews are no longer documented

Other information


Additional info

Pull request checklist

  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • [ ] Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • [x] Yes (Please add the Type: Breaking change label)
  • [ ] No

If Yes, what's the impact:

  • Removal of previews

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

wolfy1339 avatar Jan 03 '23 21:01 wolfy1339

Previews still exist for the GraphQL endpoint, this as-is won't work

wolfy1339 avatar Jan 07 '23 21:01 wolfy1339

Previews still exist for the GraphQL endpoint, this as-is won't work

What do you suggest we should do @wolfy1339 ?

oscard0m avatar Jan 08 '23 11:01 oscard0m

For the types, we can probably do a ternary expression based on the endpoint, to only have previews for GraphQL as it is only one endpoint (/graphql)

For the code itself a simple if statement can work

How does that sound?

wolfy1339 avatar Jan 08 '23 17:01 wolfy1339

For the types, we can probably do a ternary expression based on the endpoint, to only have previews for GraphQL as it is only one endpoint (/graphql)

For the code itself a simple if statement can work

How does that sound?

Sounds good to me.

oscard0m avatar Jan 10 '23 08:01 oscard0m

Since the underlying packages have been updated to no longer support previews for the REST API, this shouldn't be a breaking change.

I will come back to this once things calm down with the major version bumps

wolfy1339 avatar Jul 10 '23 22:07 wolfy1339

if you could add a test to https://github.com/octokit/core.js/blob/main/test/graphql.test.ts with a preview that'd be :100:

gr2m avatar Jul 11 '23 22:07 gr2m