Skip to content

Commit

Permalink
Upgrade nvm-desktop version v2.5.0 -> v2.6.0.
Browse files Browse the repository at this point in the history
Signed-off-by: The1111mp <[email protected]>
  • Loading branch information
1111mp committed Nov 23, 2023
1 parent 572eb2a commit 73c8549
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nvm-desktop",
"productName": "NVM-Desktop",
"version": "2.5.0",
"version": "2.6.0",
"description": "A desktop client for manage the version of Nodejs.",
"keywords": [
"node",
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nvm-desktop",
"productName": "NVM-Desktop",
"version": "2.5.0",
"version": "2.6.0",
"description": "A desktop client for manage the version of Nodejs.",
"license": "MIT",
"main": "./dist/main/main.js",
Expand Down
10 changes: 6 additions & 4 deletions src/main/utils/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { app } from 'electron';

import { APPDIR, BIN_DIR, MIRRATION_FILE } from '../constants';

const CURRENT_MIGRATION_VERSION: number = 5;
const CURRENT_MIGRATION_VERSION: number = 6;

export async function updateSchema() {
const schemaVersion = await getSchemaVersion();
Expand Down Expand Up @@ -85,9 +85,11 @@ async function updateToSchemaVersionDefault(version: number) {

await copy(sourceFile, targetFile).catch((_err) => {});

['node', 'npm', 'npx', 'corepack'].forEach((name) => {
symlink(targetFile, join(BIN_DIR, name));
});
await Promise.all(
['node', 'npm', 'npx', 'corepack'].map((name) =>
symlink(targetFile, join(BIN_DIR, name)),
),
);

setSchemaVersion(CURRENT_MIGRATION_VERSION);
return;
Expand Down

0 comments on commit 73c8549

Please sign in to comment.