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

Dependencies Update plus small fixes #147

Merged
merged 13 commits into from
Dec 10, 2021

Conversation

fabiovedovelli
Copy link
Contributor

Changes

  • Full project dependency update with yarn upgrade-interactive --exact --latest
  • Installation of @nuxt/types and uuid, after which the project started to build again
  • Adds testEnvironment: 'jsdom' to jest.config.js, required after jest upgrade
  • Adds a missing stylesheet in the RequestInfo.vue component to properly display formatted JSON output

Testing

I've been manually testing the application for the past hour and so far everything is working as expected.

Reviewers

@MasterXen @kristinfritsch @jiacovino-circle @MasterXen @tgolbs-circle @felipelima-circle @MehediH @dave-circle @neilkumar-circle @fn0rth

@kristinfritsch kristinfritsch changed the title [BRAAV-7475] - Dependencies Update plus small fixes Dependencies Update plus small fixes Dec 7, 2021
@kristinfritsch
Copy link
Contributor

I get eslint-plugin-vue@8.2.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "12.13.0" when deleting node_modules and running yarn install

@fabiovedovelli
Copy link
Contributor Author

I get eslint-plugin-vue@8.2.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "12.13.0" when deleting node_modules and running yarn install

Do you have a suggestion on how to proceed?

Shall we document this requirement somewhere?

@kristinfritsch
Copy link
Contributor

Shall we document this requirement somewhere?

The node version is pinned here: https://github.com/circlefin/payments-sample-app/blob/master/.nvmrc

To bump Node version to the current LTS
@fabiovedovelli
Copy link
Contributor Author

Shall we document this requirement somewhere?

The node version is pinned here: https://github.com/circlefin/payments-sample-app/blob/master/.nvmrc

It's done!

@itsikcircle
Copy link
Contributor

Increasing the node version can break it for someone who runs it on old node, I'm all in on upgrading versions, but just want to make sure we aware of the output of it.

@fabiovedovelli
Copy link
Contributor Author

Increasing the node version can break it for someone who runs it on old node, I'm all in on upgrading versions, but just want to make sure we aware of the output of it.

If the version is pinned in the .nvm it becomes part of the project's prerequisites. We can improve it by clearly stating it in the docs and sending communication to everyone using the app (if possible).

@MasterXen We could use your input in the matter. Thanks!

@MasterXen
Copy link
Contributor

Agree that we should update to avoid warnings and product a clean build/runtime. But upgrades should not exceed the LTS version

itsikcircle
itsikcircle previously approved these changes Dec 8, 2021
To fix Node version to 16.3.0 instead of 16.3.1.

16.3.0 is the version we have a Docker image for.
@fabiovedovelli
Copy link
Contributor Author

@itsikcircle @kristinfritsch @MasterXen Node version fixed on 16.3.0 which is the same image we're using on account-web and an image we're providing ourselves.

@itsikcircle
Copy link
Contributor

Build fail...

@MasterXen
Copy link
Contributor

I've retested the build manually in CodeBuild. There's a few new warnings related to the Nuxt upgrade which seem relatively harmless. However, the build looks to fail on eslint now:

$ eslint --ext .ts,.js,.vue .
--
395 |  
396 | Oops! Something went wrong! :(
397 |  
398 | ESLint: 8.4.1
399 |  
400 | Error: Cannot read config file: /opt/circle/payments-sample-app/src/node_modules/eslint-config-prettier/vue.js
401 | Error: "prettier/vue" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

@kristinfritsch
Copy link
Contributor

kristinfritsch commented Dec 9, 2021

Apps starts for me locally now, but there is an issue with making requests Works for me locally now! Just need to fix eslint 👯

@kristinfritsch

This comment has been minimized.

Comment on lines +30 to +37
overrides: [
{
files: ['*.vue'],
rules: {
indent: 'off',
},
},
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This disables default ESLint's indent rule for Vue files, letting vue/script-indent do its job.

@@ -22,7 +22,17 @@ module.exports = {
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/multi-word-component-names': 'off',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This rule doesn't make sense in Nuxt apps because of the filename based routing system. We want to have single name components in order to have tidy routes.

@@ -14,6 +14,7 @@

<script lang="ts">
import { Component, Prop, Vue } from 'nuxt-property-decorator'
// eslint-disable-next-line import/named
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find a configuration based solution for this warning, so I am disabling it in the 3 places where it's happening. I've checked the lib source code, and it's being named exported.

CleanShot 2021-12-09 at 16 42 10

server: {
host: '0.0.0.0',
host: 'localhost',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should fix the URL suggestion in the Terminal output. Now it is http://localhost:3000

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, i like that better than #148

Comment on lines -263 to -277
interface CreateChargePayload {
id: string
amount: {
amount: number
currency: string
}
verification: string
source: {
id: string
type: string
}
keyId: string
encryptedData: string
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESLint caught this unused piece of code

@kristinfritsch
Copy link
Contributor

@fabiovedovelli is currently looking into an issue with the eslint config in devtools/node

@fabiovedovelli
Copy link
Contributor Author

@fabiovedovelli is currently looking into an issue with the eslint config in devtools/node

This is now ready for another review/tests! Thank you

@@ -0,0 +1,19 @@
module.exports = {
root: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what prevents ESLint configurations to clash.

@kristinfritsch
Copy link
Contributor

Thanks for addressing all the issues! Looks great locally!

@fabiovedovelli
Copy link
Contributor Author

@itsikcircle @kristinfritsch Everything is fixed and this PR is ready for approval. Thanks

@kristinfritsch kristinfritsch merged commit 11b7328 into circlefin:master Dec 10, 2021
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.

4 participants