Skip to content

Commit 79a7a57

Browse files
committed
feedback
1 parent 085fafb commit 79a7a57

File tree

6 files changed

+26
-15
lines changed

6 files changed

+26
-15
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: 'Help and Support'
44
url: https://github.com/deepnote/vscode-extension/discussions
5-
about: "Need help getting something to work, but you're not sure it's worth of submitting an issue? Ask here."
5+
about: "Need help getting something to work, but you're not sure it's worth submitting an issue? Ask here."
66
- name: 'Chat on Discord'
77
url: https://aka.ms/python-discord
88
about: 'You can ask for help or chat in the `#jupyter` channel of our microsoft-python Discord server'

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ permissions:
1515
contents: read
1616
actions: read
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
lint:
2024
name: Lint & Format
2125
runs-on: ubuntu-latest
2226
steps:
2327
- name: Checkout
24-
uses: actions/checkout@v5
28+
uses: actions/checkout@v4
2529

2630
- name: Setup Node.js
2731
uses: actions/setup-node@v4
@@ -46,7 +50,7 @@ jobs:
4650
runs-on: ubuntu-latest
4751
steps:
4852
- name: Checkout
49-
uses: actions/checkout@v5
53+
uses: actions/checkout@v4
5054

5155
- name: Setup Node.js
5256
uses: actions/setup-node@v4

.github/workflows/deps.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ jobs:
3131
run: npm ci --prefer-offline --no-audit
3232

3333
- name: Run security audit
34-
run: npm audit --audit-level=moderate
34+
run: npm audit --json > audit-report.json || true
35+
36+
- name: Upload audit report
37+
if: always()
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: npm-audit-report
41+
path: audit-report.json
3542

3643
- name: Check for outdated packages
3744
run: npm outdated || true

src/notebooks/deepnote/deepnoteActivationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { workspace, commands, window, WorkspaceEdit, NotebookEdit, NotebookRange
33
import { IExtensionSyncActivationService } from '../../platform/activation/types';
44
import { IExtensionContext } from '../../platform/common/types';
55
import { DeepnoteNotebookSerializer } from './deepnoteSerializer';
6-
import { DeepnoteProject } from './deepnoteTypes';
6+
import type { DeepnoteProject } from './deepnoteTypes';
77
import { DeepnoteNotebookSelector } from './deepnoteNotebookSelector';
88
import { Commands } from '../../platform/common/constants';
99

src/notebooks/deepnote/deepnoteDataConverter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class DeepnoteDataConverter {
2525
deepnoteBlockType: block.type,
2626
deepnoteSortingKey: block.sortingKey,
2727
deepnoteMetadata: block.metadata,
28-
...(block.executionCount && { executionCount: block.executionCount }),
28+
...(typeof block.executionCount === 'number' && { executionCount: block.executionCount }),
2929
...(block.outputReference && { deepnoteOutputReference: block.outputReference })
3030
},
3131
outputs: this.convertDeepnoteOutputsToVSCodeOutputs(block.outputs || [])

src/notebooks/deepnote/deepnoteSerializer.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@ export class DeepnoteNotebookSerializer implements NotebookSerializer {
1313
private static converter = new DeepnoteDataConverter();
1414

1515
static setSelectedNotebookForUri(uri: string, notebookId: string) {
16-
this.manager.setSelectedNotebookForUri(uri, notebookId);
16+
DeepnoteNotebookSerializer.manager.setSelectedNotebookForUri(uri, notebookId);
1717
}
1818

1919
static getSelectedNotebookForUri(uri: string): string | undefined {
20-
return this.manager.getSelectedNotebookForUri(uri);
20+
return DeepnoteNotebookSerializer.manager.getSelectedNotebookForUri(uri);
2121
}
2222

2323
static shouldSkipPrompt(uri: string): boolean {
24-
return this.manager.shouldSkipPrompt(uri);
24+
return DeepnoteNotebookSerializer.manager.shouldSkipPrompt(uri);
2525
}
2626

2727
static storeOriginalProject(projectId: string, project: DeepnoteProject, notebookId: string) {
28-
this.manager.storeOriginalProject(projectId, project, notebookId);
28+
DeepnoteNotebookSerializer.manager.storeOriginalProject(projectId, project, notebookId);
2929
}
3030

3131
static getOriginalProject(projectId: string): DeepnoteProject | undefined {
32-
return this.manager.getOriginalProject(projectId);
32+
return DeepnoteNotebookSerializer.manager.getOriginalProject(projectId);
3333
}
3434

3535
static getCurrentNotebookId(projectId: string): string | undefined {
36-
return this.manager.getCurrentNotebookId(projectId);
36+
return DeepnoteNotebookSerializer.manager.getCurrentNotebookId(projectId);
3737
}
3838

3939
static getManager(): DeepnoteNotebookManager {
40-
return this.manager;
40+
return DeepnoteNotebookSerializer.manager;
4141
}
4242

4343
static getConverter(): DeepnoteDataConverter {
44-
return this.converter;
44+
return DeepnoteNotebookSerializer.converter;
4545
}
4646

4747
async deserializeNotebook(content: Uint8Array, _token: CancellationToken): Promise<NotebookData> {
@@ -53,7 +53,6 @@ export class DeepnoteNotebookSerializer implements NotebookSerializer {
5353
throw new Error('Invalid Deepnote file: no notebooks found');
5454
}
5555

56-
// Select the notebook to open
5756
const selectedNotebook = await this.selectNotebookForOpen(
5857
deepnoteProject.project.id,
5958
deepnoteProject.project.notebooks
@@ -84,6 +83,7 @@ export class DeepnoteNotebookSerializer implements NotebookSerializer {
8483
};
8584
} catch (error) {
8685
console.error('Error deserializing Deepnote notebook:', error);
86+
8787
throw new Error(
8888
`Failed to parse Deepnote file: ${error instanceof Error ? error.message : 'Unknown error'}`
8989
);

0 commit comments

Comments
 (0)