diff --git a/package.json b/package.json index 3391bddfc..9af648d59 100644 --- a/package.json +++ b/package.json @@ -1652,7 +1652,7 @@ }, "deepnote.snapshots.enabled": { "type": "boolean", - "default": false, + "default": true, "description": "When enabled, outputs are saved to separate snapshot files in a 'snapshots' folder instead of the main .deepnote file.", "scope": "resource" }, diff --git a/src/notebooks/deepnote/deepnoteActivationService.ts b/src/notebooks/deepnote/deepnoteActivationService.ts index 62ca8c04d..96c35288c 100644 --- a/src/notebooks/deepnote/deepnoteActivationService.ts +++ b/src/notebooks/deepnote/deepnoteActivationService.ts @@ -77,7 +77,7 @@ export class DeepnoteActivationService implements IExtensionSyncActivationServic const config = workspace.getConfiguration('deepnote'); - return config.get('snapshots.enabled', false); + return config.get('snapshots.enabled', true); } private promptReloadForSnapshots(): void { diff --git a/src/notebooks/deepnote/snapshots/snapshotService.ts b/src/notebooks/deepnote/snapshots/snapshotService.ts index 207901732..9289ab007 100644 --- a/src/notebooks/deepnote/snapshots/snapshotService.ts +++ b/src/notebooks/deepnote/snapshots/snapshotService.ts @@ -328,7 +328,7 @@ export class SnapshotService implements ISnapshotMetadataService, IExtensionSync isSnapshotsEnabled(): boolean { const config = workspace.getConfiguration('deepnote'); - return config.get('snapshots.enabled', false); + return config.get('snapshots.enabled', true); } mergeOutputsIntoBlocks(blocks: DeepnoteBlock[], outputs: Map): DeepnoteBlock[] { diff --git a/src/notebooks/deepnote/snapshots/snapshotService.unit.test.ts b/src/notebooks/deepnote/snapshots/snapshotService.unit.test.ts index e35d745e4..c334b7aaf 100644 --- a/src/notebooks/deepnote/snapshots/snapshotService.unit.test.ts +++ b/src/notebooks/deepnote/snapshots/snapshotService.unit.test.ts @@ -438,7 +438,7 @@ suite('SnapshotService', () => { suite('isSnapshotsEnabled', () => { test('should return true when snapshots.enabled is true', () => { const mockConfig = mock(); - when(mockConfig.get('snapshots.enabled', false)).thenReturn(true); + when(mockConfig.get('snapshots.enabled', true)).thenReturn(true); when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig)); const result = service.isSnapshotsEnabled(); @@ -448,7 +448,7 @@ suite('SnapshotService', () => { test('should return false when snapshots.enabled is false', () => { const mockConfig = mock(); - when(mockConfig.get('snapshots.enabled', false)).thenReturn(false); + when(mockConfig.get('snapshots.enabled', true)).thenReturn(false); when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig)); const result = service.isSnapshotsEnabled(); @@ -1007,7 +1007,7 @@ project: test('should detect Run All when all code cells are executed', async () => { // Set up mocks const mockConfig = mock(); - when(mockConfig.get('snapshots.enabled', false)).thenReturn(true); + when(mockConfig.get('snapshots.enabled', true)).thenReturn(true); when(mockedVSCodeNamespaces.workspace.getConfiguration('deepnote')).thenReturn(instance(mockConfig)); const projectId = 'test-project-id';