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

Bump @types/node to 20.17.6 #12616

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rak-phillip
Copy link
Member

@rak-phillip rak-phillip commented Nov 14, 2024

Summary

This bumps @types/node to 20.17.6.

@types/node was recently targeting node 16, which Dashboard no longer supports as of the Vue 3 migration.

Occurred changes and/or fixed issues

  • bump @types/node to 20.17.6

Technical notes summary

  • Dashboard no longer supports node 16 after migrating to Vue 3

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@@ -161,7 +161,7 @@
"roarr": "7.0.4",
"semver": "7.5.4",
"@types/lodash": "4.17.5",
"@types/node": "~20.10.0",
"@types/node": "20.17.6",
Copy link
Member Author

Choose a reason for hiding this comment

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

We can consider sticking to 20.10.8 if this is known to be working in shell. I only went with 20.17.6 because this is the latest available for node 20.

@aalves08
Copy link
Member

aalves08 commented Nov 15, 2024

@rak-phillip the key here is the check-plugins-build step for all these PRs for dependencies updates... It failed in a simpler usecase of a newly generated extension: https://github.com/rancher/dashboard/actions/runs/11846587182/job/33014521563?pr=12616#step:5:2370

All extensions migrated to vue3 have this resolution for @types/node:

"@types/node": "~20.10.0"

Signed-off-by: Phillip Rak <[email protected]>
@rak-phillip
Copy link
Member Author

@rak-phillip the key here is the check-plugins-build step for all these PRs for dependencies updates... It failed in a simpler usecase of a newly generated extension: https://github.com/rancher/dashboard/actions/runs/11846587182/job/33014521563?pr=12616#step:5:2370

All extensions migrated to vue3 have this resolution for @types/node:

"@types/node": "~20.10.0"

@aalves08 Then it's settled, 2.10.8 is the version that we want to target. Although, I do question why we need to set the resolution for @types/node, my expectation is that we should be able to remove the resolution now that we target types that match our actual node version.

@aalves08
Copy link
Member

@rak-phillip the key here is the check-plugins-build step for all these PRs for dependencies updates... It failed in a simpler usecase of a newly generated extension: https://github.com/rancher/dashboard/actions/runs/11846587182/job/33014521563?pr=12616#step:5:2370
All extensions migrated to vue3 have this resolution for @types/node:
"@types/node": "~20.10.0"

@aalves08 Then it's settled, 2.10.8 is the version that we want to target. Although, I do question why we need to set the resolution for @types/node, my expectation is that we should be able to remove the resolution now that we target types that match our actual node version.

Hopefully we can, mate! 🤞 🤞 🤞 no it's just a matter of testing it with extensions

@aalves08
Copy link
Member

aalves08 commented Nov 15, 2024

I've just generated a new extension via yarn create @rancher/extension my-app and the output was "hideous" in terms of dependencies/resolutions....

{
  "name": "my-app",
  "version": "0.1.0",
  "private": false,
  "engines": {
    "node": ">=20"
  },
  "dependencies": {
    "cache-loader": "^4.1.0",
    "color": "4.2.3",
    "ip": "2.0.1",
    "node-polyfill-webpack-plugin": "^3.0.0",
    "@rancher/shell": "^3.0.0"
  },
  "resolutions": {
    "@types/node": "~20.10.0",
    "d3-color": "3.1.0",
    "ejs": "3.1.9",
    "follow-redirects": "1.15.2",
    "glob": "7.2.3",
    "glob-parent": "6.0.2",
    "json5": "2.2.3",
    "@types/lodash": "4.17.5",
    "merge": "2.1.1",
    "node-forge": "1.3.1",
    "nth-check": "2.1.1",
    "qs": "6.11.1",
    "roarr": "7.0.4",
    "semver": "7.5.4",
    "@vue/cli-service/html-webpack-plugin": "^5.0.0"
  },
  "scripts": {
    "dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve",
    "build": "./node_modules/.bin/vue-cli-service build",
    "clean": "./node_modules/@rancher/shell/scripts/clean",
    "build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh",
    "serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
    "publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
    "parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name"
  }
}

We need to clean this up and consolidate it... This hasn't been touched in a bit (I forgot to update them 💦 when I reviewed some dependencies).

In theory it should only be:

{
  "name": "my-app",
  "version": "0.1.0",
  "private": false,
  "engines": {
    "node": ">=20"
  },
  "dependencies": {
    "@rancher/shell": "^3.0.0"
  },
  "scripts": {
    "dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve",
    "build": "./node_modules/.bin/vue-cli-service build",
    "clean": "./node_modules/@rancher/shell/scripts/clean",
    "build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh",
    "serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
    "publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
    "parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name"
  }
}

@aalves08
Copy link
Member

aalves08 commented Nov 15, 2024

I've yarn linked your branch to a newly generated extension with just the shell dependency:

{
  "name": "my-app",
  "version": "0.1.0",
  "private": false,
  "engines": {
    "node": ">=20"
  },
  "dependencies": {
    "@rancher/shell": "^3.0.0"
  },
  "scripts": {
    "dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve",
    "build": "./node_modules/.bin/vue-cli-service build",
    "clean": "./node_modules/@rancher/shell/scripts/clean",
    "build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh",
    "serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
    "publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
    "parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name"
  }
}

And the build failed with @types/node problems 🤔

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.

2 participants