source-academy / modules

Modules that can be imported by programs in Source Academy, an online experiential environment for computational thinking
Apache License 2.0
8 stars 28 forks source link

Bump BlueprintJS to v5 #275

Closed RichDom2185 closed 6 months ago

RichDom2185 commented 6 months ago

Description

The frontend has been updated to Blueprint v5 in https://github.com/source-academy/frontend/pull/2718.

I've done a quick check so far and it doesn't seem to be the case that any of the modules in our codebase depend on changes that are broken when moving from v4 → v5.

(Though we should move soon to prevent this possibility)


I'm removing the deprecated @blueprintjs/popover2 in https://github.com/source-academy/frontend/pull/2773. But modules still depend on it.

Thus I'm removing @blueprintjs/popover2 as external in our build options.

In reality, @blueprintjs/popover2 just re-exports components from @blueprintjs/core (at least, for the newer versions of the library) so it shouldn't be needed at all and we should proceed to bump Blueprint and remove this package from modules as well.

In the meantime, this is a hotfix to ensure existing modules keep working.

Type of change

Please delete options that are not relevant.

Checklist:

leeyi45 commented 6 months ago

If @blueprintjs/popover2 just reexports components, would it be too much to migrate the modules that still rely on it?

RichDom2185 commented 6 months ago

If @blueprintjs/popover2 just reexports components, would it be too much to migrate the modules that still rely on it?

We'd have to bump modules to Blueprint 5 first (in the Blueprint 4 series of packages, they are still different components) – but okay, I'll work on it since the frontend PR is not merged yet anyway.

leeyi45 commented 6 months ago

It has come to my attention that the codebase has a lot of inconsistencies with regards to the use of single/double quotes, and tabs/spaces, as well as potentially other things.

This is likely due to the different ESLint configs and them being set to "warn" instead of "error". I guess I'll revive my #241 PR and try to reformat all these for consistency.

Are these not being caught by the CI?

RichDom2185 commented 6 months ago

It has come to my attention that the codebase has a lot of inconsistencies with regards to the use of single/double quotes, and tabs/spaces, as well as potentially other things. This is likely due to the different ESLint configs and them being set to "warn" instead of "error". I guess I'll revive my #241 PR and try to reformat all these for consistency.

Are these not being caught by the CI?

Nope they're not, also seems that yarn build and yarn lint did not catch the above error that was caught when doing yarn build --tsc --lint in the CI.

leeyi45 commented 6 months ago

It has come to my attention that the codebase has a lot of inconsistencies with regards to the use of single/double quotes, and tabs/spaces, as well as potentially other things. This is likely due to the different ESLint configs and them being set to "warn" instead of "error". I guess I'll revive my #241 PR and try to reformat all these for consistency.

Are these not being caught by the CI?

Nope they're not, also seems that yarn build and yarn lint did not catch the above error that was caught when doing yarn build --tsc --lint in the CI.

Hmm this one's on me then. commander released a new typescript package, it's time for me to relook at the script code again

RichDom2185 commented 6 months ago

It has come to my attention that the codebase has a lot of inconsistencies with regards to the use of single/double quotes, and tabs/spaces, as well as potentially other things. This is likely due to the different ESLint configs and them being set to "warn" instead of "error". I guess I'll revive my #241 PR and try to reformat all these for consistency.

Are these not being caught by the CI?

Nope they're not, also seems that yarn build and yarn lint did not catch the above error that was caught when doing yarn build --tsc --lint in the CI.

Hmm this one's on me then. commander released a new typescript package, it's time for me to relook at the script code again

Perhaps we can simply remove lint from the scripts, and use (in package.json):

{
  // ...
  "scripts": {
    // ...
    "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
  }
}

since we don't require complex functionality for linting?

leeyi45 commented 6 months ago

The reason why it's like this is because I wanted to run everything in parallel. I'm currently working on refactoring the code to ensure it's correctness