diff --git a/editor/src/components/editor/store/editor-state.ts b/editor/src/components/editor/store/editor-state.ts index b874154f03d2..aa3231f356da 100644 --- a/editor/src/components/editor/store/editor-state.ts +++ b/editor/src/components/editor/store/editor-state.ts @@ -3278,14 +3278,17 @@ export function updatePackageJsonInEditorState( // There is a package.json file, we should update it. updatedPackageJsonFile = codeFile( transformPackageJson(packageJsonFile.fileContents.code), - RevisionsState.CodeAhead, + null, packageJsonFile.versionNumber + 1, + RevisionsState.CodeAheadButPleaseTellVSCodeAboutIt, ) } else { // There is something else called package.json, we should bulldoze over it. updatedPackageJsonFile = codeFile( transformPackageJson(JSON.stringify(DefaultPackageJson)), null, + 0, + RevisionsState.CodeAheadButPleaseTellVSCodeAboutIt, ) } } diff --git a/editor/src/components/editor/store/editor-update.spec.tsx b/editor/src/components/editor/store/editor-update.spec.tsx index 62d35e4ec115..855542efe4d1 100644 --- a/editor/src/components/editor/store/editor-update.spec.tsx +++ b/editor/src/components/editor/store/editor-update.spec.tsx @@ -1030,7 +1030,7 @@ describe('updating package.json', () => { "parsed": Object { "type": "UNPARSED", }, - "revisionsState": "CODE_AHEAD", + "revisionsState": "CODE_AHEAD_BUT_PLEASE_TELL_VSCODE_ABOUT_IT", } `) }