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

bug(auth): Typescript not checking all files #17940

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

dschom
Copy link
Contributor

@dschom dschom commented Oct 30, 2024

Because

  • While working on FXA-10460, I noticed that auth-server wasn't actually targeting all typescript files for compilation.

This pull request

  • Targets all files
  • Fixes ensuing errors

Issue that this pull request solves

Closes: FXA-10676

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

This is a fast follow to #17938. Also it's good to note that make this PR reasonable in size, noImplicitAny was set to false. We can address this at a later point in time. There were enough of these errors that it didn't make sense to fix them here, and to fix them properly actual types should be tracked down.

@dschom dschom requested a review from a team as a code owner October 30, 2024 21:18
@dschom dschom force-pushed the fix-auth-tsconfig branch 2 times, most recently from 9acff8a to f9451ae Compare October 30, 2024 21:31
packages/fxa-auth-server/test/local/senders/emails.ts Outdated Show resolved Hide resolved
@@ -365,7 +365,8 @@ describe('CustomerPlanMover', () => {
it("returns false if the customer does not have a price that's excluded", () => {
const result = customerPlanMover.isCustomerExcluded([
{
...subscription1,
// TODO: Either provide full mock, or reduce type required isCustomerExcluded
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we file a bug for this so we track/bury it in the backlog?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do this as unknown as Type pattern quite a bit. Maybe it's fine. I'll let @StaberindeZA make the call.

Comment on lines 17 to 24
"bin/**/*.js",
"bin/**/*.ts",
"lib/**/*.ts",
"lib/**/*.js",
"scripts/*.ts",
"scripts/*.js",
"test/**/*.ts",
"test/**/*.js"
Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed no weird .jsx or .tsx files.

git ls-files packages/fxa-auth-server/(bin|lib|scripts|test)/ | grep -Eo "\.[a-z]+$" | sort | uniq -c | sort -rn
 343 .js
 197 .ts
 139 .json
  85 .txt
  77 .mjml
  76 .ftl
   8 .scss
 ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for checking. Server so, hopefully not!

@dschom dschom force-pushed the fix-auth-tsconfig branch 2 times, most recently from 8cfef67 to 4d20a37 Compare November 2, 2024 01:04
@dschom
Copy link
Contributor Author

dschom commented Nov 4, 2024

@StaberindeZA BTW, looks we we are hitting OOMs in CI tests. If you got any suggestions let me know.

@dschom dschom force-pushed the fix-auth-tsconfig branch 3 times, most recently from 25e249e to 42e15ad Compare November 5, 2024 21:36
Because:
- While working on FXA-10460, I noticed that auth-server wasn't actually targeting all typescript files for compilation.

This commit:
- Targets all files
- Fixes ensuing errors
Copy link
Contributor

@StaberindeZA StaberindeZA left a comment

Choose a reason for hiding this comment

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

lgtm

@dschom dschom merged commit 5af8f3f into main Nov 6, 2024
25 checks passed
@dschom dschom deleted the fix-auth-tsconfig branch November 6, 2024 18:25
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.

3 participants