Skip to content

Commit 34571e7

Browse files
committed
Bump version to 0.0.4
1 parent acd2813 commit 34571e7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/storage/upgrade_project.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import * as storageProject from './project';
3131
import { ClassMethodDefBlock, BLOCK_NAME as MRC_CLASS_METHOD_DEF_BLOCK_NAME } from '../blocks/mrc_class_method_def';
3232

3333
export const NO_VERSION = '0.0.0';
34-
export const CURRENT_VERSION = '0.0.3';
34+
export const CURRENT_VERSION = '0.0.4';
3535

3636
export async function upgradeProjectIfNecessary(
3737
storage: commonStorage.Storage, projectName: string): Promise<void> {
@@ -45,8 +45,16 @@ export async function upgradeProjectIfNecessary(
4545
// @ts-ignore
4646
case '0.0.1':
4747
upgradeFrom_001_to_002(storage, projectName, projectInfo);
48+
// Intentional fallthrough
49+
// @ts-ignore
4850
case '0.0.2':
4951
upgradeFrom_002_to_003(storage, projectName, projectInfo);
52+
// Intentional fallthrough
53+
// @ts-ignore
54+
case '0.0.3':
55+
upgradeFrom_003_to_004(storage, projectName, projectInfo);
56+
default:
57+
throw new Error('Unrecognized project version: ' + projectInfo.version);
5058

5159
}
5260
await storageProject.saveProjectInfo(storage, projectName);
@@ -137,3 +145,12 @@ async function upgradeFrom_002_to_003(
137145
}
138146
projectInfo.version = '0.0.3';
139147
}
148+
149+
async function upgradeFrom_003_to_004(
150+
_storage: commonStorage.Storage,
151+
_projectName: string,
152+
projectInfo: storageProject.ProjectInfo): Promise<void> {
153+
// The only change in this version are some new blocks. This keeps you
154+
// from loading a project with an older version of software.
155+
projectInfo.version = '0.0.4';
156+
}

0 commit comments

Comments
 (0)