Skip to content

Commit 9a45a3e

Browse files
Backport PR jupyterlab#11370: Make orig_nbformat optional jupyterlab#11005 (jupyterlab#11384)
Co-authored-by: Frédéric Collonval <[email protected]>
1 parent ba558dc commit 9a45a3e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

galata/src/galata.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ export namespace galata {
292292
nbconvert_exporter: 'python',
293293
pygments_lexer: 'ipython3',
294294
version: '3.8.0'
295-
},
296-
orig_nbformat: 4
295+
}
297296
},
298297
nbformat: 4,
299298
nbformat_minor: 4

packages/nbformat/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface ILanguageInfoMetadata extends PartialJSONObject {
4646
export interface INotebookMetadata extends PartialJSONObject {
4747
kernelspec?: IKernelspecMetadata;
4848
language_info?: ILanguageInfoMetadata;
49-
orig_nbformat: number;
49+
orig_nbformat?: number;
5050
}
5151

5252
/**

packages/shared-models/src/ymodels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export class YNotebook
331331
*/
332332
getMetadata(): nbformat.INotebookMetadata {
333333
const meta = this.ymeta.get('metadata');
334-
return meta ? deepCopy(meta) : { orig_nbformat: 4 };
334+
return meta ? deepCopy(meta) : {};
335335
}
336336

337337
/**

0 commit comments

Comments
 (0)