Skip to content

Commit

Permalink
Merge pull request #7537 from mook-as/bump/node-20
Browse files Browse the repository at this point in the history
Upgrade to NodeJS 20
  • Loading branch information
jandubois committed Sep 23, 2024
2 parents 5ed9ca4 + 96ee486 commit 0b3030a
Show file tree
Hide file tree
Showing 7 changed files with 223 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ updates:
ignore:
- # Needs to be updated along with NodeJS version.
dependency-name: "@types/node"
versions: [ ">18" ]
versions: [ ">20" ]
- # Need to migrate to Vue 3 before moving beyond 2.7.x.
dependency-name: "vue"
versions: [ ">2" ]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can now clone the repository and run `yarn`.
2. Open a PowerShell prompt (hit Windows Key + `X` and open `Windows PowerShell`).
3. Install [Scoop] via `iwr -useb get.scoop.sh | iex`.
4. Install 7zip, git, go, mingw, nvm, and unzip via `scoop install 7zip git go mingw nvm python unzip`.
Check node version with `nvm list`. If node v18 is not installed or set as the current version, then install using `nvm install 18` and set as current using `nvm use 18.xx.xx`.
Check node version with `nvm list`. If node v20 is not installed or set as the current version, then install using `nvm install 20` and set as current using `nvm use 20.xx.xx`.
5. Install the yarn package manager via `npm install --global yarn`
6. Install Visual Studio 2017 or higher. As of this writing the latest version is available at [https://visualstudio.microsoft.com/downloads/]; if that's changed, a good search engine should find it.
7. Make sure you have the `Windows SDK` component installed. This [Visual Studio docs] describes steps to install components.
Expand Down Expand Up @@ -139,10 +139,10 @@ Note that this script adds code dealing with `nvm` to a profile file
(like `~/.bash_profile`). To add access to `nvm` to a current shell session,
you'll need to `source` that file.

Currently we build Rancher Desktop with Node 18. To install it, run:
Currently we build Rancher Desktop with Node 20. To install it, run:

```
nvm install 18.18
nvm install 20.17
```

Next, you'll need to install the yarn package manager:
Expand Down Expand Up @@ -173,9 +173,9 @@ yarn

Ensure you have the following installed:

- [Node.js][Node.js] v18. **Make sure you have any development packages
installed.** For example, on openSUSE Leap 15.3 you would need to install
`nodejs18` and `nodejs18-devel`.
- [Node.js][Node.js] v20. **Make sure you have any development packages
installed.** For example, on openSUSE Leap 15.6 you would need to install
`nodejs20` and `nodejs20-devel`.

- [yarn classic][yarn-classic]

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.ts$': 'ts-jest',
'^.+\\.vue$': 'vue-jest',
'^.+\\.vue$': '@vue/vue2-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!(yaml|jsonpath-plus|@kubernetes/client-node)/)',
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"email": "containers@suse.com"
},
"engines": {
"node": "^18.18"
"node": "^20.17"
},
"packageManager": "yarn@1.22.21",
"repository": {
Expand Down Expand Up @@ -115,7 +115,7 @@
"@types/jest": "29.5.13",
"@types/lodash": "4.17.7",
"@types/mustache": "4.2.5",
"@types/node": "18.19.50",
"@types/node": "20.16.5",
"@types/node-fetch": "2.6.9",
"@types/node-forge": "1.3.11",
"@types/plist": "3.0.5",
Expand All @@ -133,7 +133,7 @@
"@vue/eslint-config-standard": "8.0.1",
"@vue/eslint-config-typescript": "13.0.0",
"@vue/test-utils": "1.3.6",
"@vue/vue2-jest": "27.0.0",
"@vue/vue2-jest": "29.2.6",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "27.5.1",
Expand Down Expand Up @@ -169,7 +169,6 @@
"tsconfig-paths": "4.2.0",
"typescript": "5.6.2",
"vue-eslint-parser": "9.4.3",
"vue-jest": "3.0.7",
"vue-template-compiler": "2.7.16",
"webpack": "5.94.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe('commandLineOptions', () => {

expect(() => {
updateFromCommandLine(prefs, lockedSettings, [`${ arg }=${ value }`]);
}).toThrow(`Can't evaluate ${ arg }=${ value } as number: SyntaxError: Unexpected token a in JSON at position 0`);
}).toThrow(`Can't evaluate ${ arg }=${ value } as number: SyntaxError: Unexpected token 'a', \"angeles\" is not valid JSON`);
});

test('should complain about type mismatches', () => {
Expand Down
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/config/__tests__/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ describe('settings', () => {
return new RegExp(`Error loading plist file .*/io.rancherdesktop.profile.${ basename }.plist`);
}

return new RegExp(`Error parsing deployment profile from .*/\\.config/rancher-desktop.${ basename }.json: SyntaxError: Unexpected end of JSON input`);
return new RegExp(`Error parsing deployment profile from .*/\\.config/rancher-desktop.${ basename }.json: SyntaxError: Unterminated string in JSON at position`);
}
test('complains about invalid default values', async() => {
mock = jest.spyOn(fs, 'readFileSync')
Expand Down
Loading

0 comments on commit 0b3030a

Please sign in to comment.