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

Fix regression introduced with Typescript #2144

Closed
christianlupus opened this issue Feb 14, 2024 · 3 comments
Closed

Fix regression introduced with Typescript #2144

christianlupus opened this issue Feb 14, 2024 · 3 comments
Labels
bug Something isn't working Frontend Issue or PR related to the frontend code

Comments

@christianlupus
Copy link
Collaborator

With 601de51 a regression was introduced into the code base. I do not know why the CI did not trigger a warning/error but with that commit the check of eslint fails.

To check this, simply checkout the corresponding commit and run npm ci && npm run eslint. Eslint reports a dozen errors like this:

/home/christian/Dokumente/nextcloud-docker-dev/workspace/server/apps-extra/cookbook/src/components/AppControls/AppControls.vue
  201:23  error  Unexpected use of file extension "js" for "@nextcloud/vue/dist/Components/NcActions.js"       import/extensions
  202:28  error  Unexpected use of file extension "js" for "@nextcloud/vue/dist/Components/NcActionButton.js"  import/extensions
  204:22  error  Unexpected use of file extension "js" for "@nextcloud/vue/dist/Components/NcButton.js"        import/extensions
  205:27  error  Unexpected use of file extension "js" for "@nextcloud/vue/dist/Components/NcActionInput.js"   import/extensions
  206:27  error  Unexpected use of file extension "js" for "@nextcloud/vue/dist/Components/NcLoadingIcon.js"   import/extensions

Just dropping the extension from the import statements will render the app non-buildable. For the parent commit, the linter seems to be perfectly happy.

As I am not used to and not experienced with typescript, could you have a look, @seyfeb?

@christianlupus christianlupus added bug Something isn't working Frontend Issue or PR related to the frontend code labels Feb 14, 2024
@christianlupus christianlupus added this to the Release 0.11.1 milestone Feb 14, 2024
@seyfeb
Copy link
Collaborator

seyfeb commented Feb 14, 2024

I justed started with ts, too, but I did not notice the issue 🤔 I made some changes in #2115 and have no troubles building the app - would you mind trying if you have any issues there?

@christianlupus
Copy link
Collaborator Author

The building of the app is not the problem here. The checked-in code will work. However, the eslint checker will fail on the current code base. This will cause trouble with anz PR that has the JS code updated. Also, my hooks trigger and reject the commit at the moment.

The code stops to build successfully, once you try to be compatible with the complaints of eslint and remove the .js suffix. Then, the bundler no longer detects the dependencies and fails to build the app.

Same happens on the commit 6f9c883 (current refactor/add-scheama-js-classes).

@christianlupus
Copy link
Collaborator Author

Very strange. I tried again on a plain new clone of the code base. There, eslint is not complaining anymore. Checking the CI once more, I saw the problem was somewhere completely different (unrelated to eslint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Frontend Issue or PR related to the frontend code
Projects
None yet
Development

No branches or pull requests

2 participants