-
Notifications
You must be signed in to change notification settings - Fork 82
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
Node.js upgrade to v18 along with dependency upgrades and linting fixes #645
Conversation
Before I actually update the changelog file, please let me know how my notes look in the PR. |
Noting we must update the Node.js version in Netlify before merging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @bjester! This looks great to me 👐, I left just some questions. And just a small note: Could you add your changelog items to CHANGELOG.md please?
- Node.js 10.x (see [Node Version Manager](https://github.com/nvm-sh/nvm)) | ||
- Yarn 1.x | ||
- Node.js 18.x (see [Node Version Manager](https://github.com/nvm-sh/nvm)) | ||
- Yarn >=1.22.22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now when I run yarn lint
, yarn dev
I get this error because I dont have pnpm installed:
> yarn lint
yarn run v1.22.22
$ kolibri-tools lint --pattern '**/*.{js,vue,scss,less,css}' --ignore '**/node_modules/**,**/.nuxt/**,**/dist/**,**/lib/KIcon/precompiled-icons/**,**/lib/keen/**,**/docs/environment.js,**/docs/jsdocs.js'
Kolibri CLI: Error: Command failed: "pnpm --version"
stderr:
Volta error: Could not find executable "pnpm"
Use `volta install` to add a package to your toolchain (see `volta help install` for more info).
Error details written to /home/alexvelezll/.volta/log/volta-error-2024-05-27_11_10_15.764.log
original error message:
Command failed: pnpm --version
Volta error: Could not find executable "pnpm"
Use `volta install` to add a package to your toolchain (see `volta help install` for more info).
Error details written to /home/alexvelezll/.volta/log/volta-error-2024-05-27_11_10_15.764.log
error Command failed with exit code 1.
Does the new version of kolibri-tools require pnpm to be installed? If so I think we need to add this to our prerequisites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no requirement on pnpm
-- nothing in regards to that has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you previously run a corepack
command on your system?
I don't think this will resolve the issue, but you could try adding export SKIP_YARN_COREPACK_CHECK=1
to your terminal env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, no, that didn't solve it. It's weird because I tried to run it on my Windows machine, where I also don't have Pnpm, and it worked there 🤔
In my Ubuntu machine I finally installed pnpm using volta install pnpm
and then yarn lint
worked.
Hmm linting was passing, but now it isn't 🤔 I'll take a look |
Thank you, @bjester, to me it looks well and clear, and I appreciate the guidance |
Hi @bjester, thanks a lot - lots of work! I've switched to this branch, then
Can you see something problematic in the log above or have some recommendations on how to best proceed with debuggin? |
Good news is that I could successfully run
So it is only |
import KTextBox from '../KTextbox'; | ||
|
||
let uuid = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we used the same approach from another component (instead of using uuid
library), could there be any conflicts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if the ID prefix wasn't already unique
}; | ||
return defaultValue; | ||
} | ||
// Avoid accessing unset indices through `this.ratio` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also just read the code and haven't noticed any issues, just have one question about uuid
@bjester Upgrading yarn to v1.22.22 as discussed helped me with |
I have replicated @MisRob's issue. It seems to stem from incompatibility with hoisted postcss packages. I will look at fixing it |
I will unassign myself from the asigned reviewer role for now since everything is reviewed at this point. So that I don't block another round of review as I will be away for two weeks, back on July 8. If it's still open when I'm back and I can help, please ping me :)! Thanks. |
CHANGELOG.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note here that before merging it'd be good to revert CHANGELOG.md changes since the new GH action will now update the CHANGELOG.md after merging this PR by pasting the changelog from the PR description. Otherwise we'd have duplicate entries.
Hi! According to our conversation with @rtibbles. This PR should be retargeted to the develop branch. |
0beb457
to
c06a8f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rtibbles and @bjester! This is looking good. I have ran all the package.json scripts and havent got any errors on any of them, and I have briefly checked the rendered docs pages, and havent noticed anything wrong with it. I just noted some js code examples that were incorrectly formatted.
And I was also wondering if we should include the code format commits to a .git-blame-ignore-revs
file, similar to what we did in Kolibri to avoid losing the blame of those lines.
@@ -145,9 +146,11 @@ | |||
window.removeEventListener('keydown', this.handleOpenMenuNavigation, true); | |||
}, | |||
methods: { | |||
handleOpen() { | |||
async handleOpen() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this a change made from the linter? :0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the linter didn't like the double nested $nextTick
call unless it used await this.$nextTick()
twice instead - so this seemed like the easiest way to workaround it. It feels like maybe a bug in the linter, but this also feels more readable, so I didn't see a concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
c06a8f1
to
a5534f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes looks good, all package.json scripts are working as expected and netlify deploy using node 18 was successful!! Thanks!
Description
Upgrades Node.js to v18, along with Kolibri-Tools to v0.16, Jest to v29 and Nuxt to v2.15. Additionally, this pins dependencies in order to maintain compatibility between Nuxt and kolibri-tools, applies fixes for new linting errors, and cleans up testing output through better error handling.
Issue addressed
Addresses #439
Changelog
Description: Upgrades Node.js to v18, along with Kolibri-Tools to v0.16, Jest to v29 and Nuxt to v2.15
Products impact: none
Addresses: Upgrade to NodeJS 18 #439
Components: none
Breaking: no
Impacts a11y: no
Guidance: Netlify configuration needs to be updated to use v18 as well
Description: Component error handling now use
@error
listener to avoid polluting test output, nor suppressingconsole.*
in testsProducts impact: any
Addresses: n/a
Components:
KImg
,KTabs
,KTabsList
Breaking: yes
Impacts a11y: no
Guidance: The
KImg
component may now emit anError
object in its@error
listener when incorrectly configured, in addition to anUiEvent|Event
when an image fails to load. Consumers should type check the value.Steps to test
yarn run test
yarn run dev
(optional) Implementation notes
At a high level, how did you implement this?
Does this introduce any tech-debt items?
Yes #646
Testing checklist
Reviewer guidance
After review
CHANGELOG.md
Comments