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

feat: export all errors #7006

Merged
merged 2 commits into from
Feb 8, 2021
Merged

feat: export all errors #7006

merged 2 commits into from
Feb 8, 2021

Conversation

Agreon
Copy link
Contributor

@Agreon Agreon commented Nov 3, 2020

Description of change

This PR adds the export of all errors.

Fixes #7000

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

@rubiin
Copy link

rubiin commented Nov 9, 2020

@imnotjames can have this in next realease, most awaited feature for me

Copy link
Contributor

@imnotjames imnotjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of exporting each of these individually in the src/index.ts, would it be clearer to create an index.ts in error which iterates through them?

That way we could do export * from "./error" and isolate the error export iteration to the error dir.

What do you think?

@Agreon
Copy link
Contributor Author

Agreon commented Nov 11, 2020

That's a good idea an i had it myself, i just oriented myself on the existing code to stay consistent. But of course, will do it in a second

@Agreon
Copy link
Contributor Author

Agreon commented Dec 3, 2020

@imnotjames ping!

@rubiin
Copy link

rubiin commented Dec 3, 2020

I think this pr can be merged if there are no any alterations to be made

@Agreon
Copy link
Contributor Author

Agreon commented Jan 6, 2021

Why is this not merged? It's not even hard to review :/

@rubiin
Copy link

rubiin commented Jan 7, 2021

@imnotjames little help here

@nebkat
Copy link
Contributor

nebkat commented Jan 7, 2021

There is still the unresolved conversation in #6909. Personally I think the classes should all be exported but there may be reasons not to, for example avoiding creating a public API that will later result in breaking changes if the errors are renamed.

Either way it's not being ignored, pleerock has just not gotten around to all the pending pull requests and there are many others waiting too. If you need it I suggest making a local repo with the changes applied and using npm link.

@pleerock
Copy link
Member

pleerock commented Feb 8, 2021

I don't think errors should be part of public API and I don't really like how errors are currently designed, but we can merge this PR if somebody needs it.

@pleerock pleerock merged commit 56300d8 into typeorm:master Feb 8, 2021
@pleerock
Copy link
Member

pleerock commented Feb 8, 2021

Thank you for contribution! Please keep in mind in the future we most probably will change errors public api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export error types for checks on the outside
5 participants