Skip to content

Commit 4d671eb

Browse files
committedMar 27, 2025·
[IMP] data: match data versions to release versions
This commit fixes two issues at once. Issue 1 ------- Currently, the migration process will ONLY run if the version of the original data (in json) is smaller than the last version set in the source code (`CURRENT_VERSION`). This means that any additional step set outside of the library is not run without incrementing CURRENT_VERSION in o-spreadsheet. Example: - we bump the latest version to 25 in o-spreadsheet; - we push that value in Odoo - users start creating spreadsheets in that version so their spreadsheets are set to version 25 - later on, we need to add a migration step for whatever reason in Odoo, we assign it to 25.1 => the migration code will check against the latest version in the source (25) vs the one in the spreadsheet data (25 as well) and will simply skip the migration. So 25.1 will never run... Issue 2 ------- The current scheme of the incremented integer is impractical when it comes to figure out which odoo version it matches(*). Knowing the release version is usefull for bug fixes to know which version of the code generated the json data. With this commit, data format version are now aligned with odoo versions Current master is 18.3. Next, it'll be 18.4, 19.0, 19.1, etc. (*) o-spreadsheet releases follow the same version numbers as odoo releases. closes #5973 Task: 4659206 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>

File tree

8 files changed

+115
-90
lines changed

8 files changed

+115
-90
lines changed
 

‎src/helpers/ui/paste_interactive.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CURRENT_VERSION } from "../../migrations/data";
1+
import { getCurrentVersion } from "../../migrations/data";
22
import { _t } from "../../translation";
33
import {
44
ClipboardPasteOptions,
@@ -75,7 +75,7 @@ export async function interactivePasteFromOS(
7575
} catch (error) {
7676
const parsedSpreadsheetContent = parsedClipboardContent.data;
7777

78-
if (parsedSpreadsheetContent?.version !== CURRENT_VERSION) {
78+
if (parsedSpreadsheetContent?.version !== getCurrentVersion()) {
7979
env.raiseError(
8080
_t(
8181
"An unexpected error occurred while pasting content.\

‎src/migrations/data.ts

+60-13
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@ import { XlsxReader } from "../xlsx/xlsx_reader";
1515
import { migrationStepRegistry } from "./migration_steps";
1616

1717
/**
18-
* This is the current state version number. It should be incremented each time
19-
* a breaking change is made in the way the state is handled, and an upgrade
20-
* function should be defined
18+
* Represents the current version of the exported JSON data.
19+
* A new version must be created whenever a breaking change is introduced in the export format.
20+
* To define a new version, add an upgrade function to `migrationStepRegistry`.
2121
*/
22-
export const CURRENT_VERSION = 25;
22+
export function getCurrentVersion() {
23+
return getSortedVersions().at(-1)!;
24+
}
25+
26+
function getSortedVersions() {
27+
return migrationStepRegistry.getKeys().sort(compareVersions);
28+
}
29+
2330
const INITIAL_SHEET_ID = "Sheet1";
2431

2532
/**
@@ -47,7 +54,10 @@ export function load(data?: any, verboseImport?: boolean): WorkbookData {
4754

4855
// apply migrations, if needed
4956
if ("version" in data) {
50-
if (data.version < CURRENT_VERSION) {
57+
if (isLegacyVersioning(data)) {
58+
data.version = LEGACY_VERSION_MAPPING[data.version];
59+
}
60+
if (data.version !== getCurrentVersion()) {
5161
console.debug("Migrating data from version", data.version);
5262
data = migrate(data);
5363
}
@@ -58,6 +68,44 @@ export function load(data?: any, verboseImport?: boolean): WorkbookData {
5868
return data;
5969
}
6070

71+
const LEGACY_VERSION_MAPPING = {
72+
25: "18.2",
73+
24: "18.1.1",
74+
23: "18.1",
75+
22: "18.0.4",
76+
21: "18.0.3",
77+
20: "18.0.2",
78+
19: "18.0.1",
79+
18: "18.0",
80+
17: "17.4",
81+
16: "17.3",
82+
15: "17.2",
83+
14: "16.4",
84+
13: "16.3",
85+
12: "15.4",
86+
87+
// not accurate starting at this point
88+
11: "0.10",
89+
10: "0.9",
90+
9: "0.8",
91+
8: "0.7",
92+
7: "0.6",
93+
6: "0.5",
94+
5: "0.4",
95+
4: "0.3",
96+
3: "0.2",
97+
2: "0.1",
98+
1: "0",
99+
};
100+
101+
/**
102+
* Versions used to be an incremented integer.
103+
* This was later changed to match release versions (matching Odoo release names).
104+
*/
105+
function isLegacyVersioning(data: { version: number | string }): boolean {
106+
return typeof data.version === "number";
107+
}
108+
61109
// -----------------------------------------------------------------------------
62110
// Migrations
63111
// -----------------------------------------------------------------------------
@@ -83,12 +131,11 @@ function compareVersions(v1: string, v2: string): number {
83131

84132
function migrate(data: any): WorkbookData {
85133
const start = performance.now();
86-
const steps = migrationStepRegistry
87-
.getAll()
88-
.sort((a, b) => compareVersions(a.versionFrom, b.versionFrom));
89-
const index = steps.findIndex((step) => step.versionFrom === data.version.toString());
90-
for (let i = index; i < steps.length; i++) {
91-
data = steps[i].migrate(data);
134+
const versions = getSortedVersions();
135+
const index = versions.findIndex((v) => v === data.version);
136+
for (let i = index + 1; i < versions.length; i++) {
137+
const nextVersion = versions[i];
138+
data = migrationStepRegistry.get(nextVersion).migrate(data);
92139
}
93140
console.debug("Data migrated in", performance.now() - start, "ms");
94141
return data;
@@ -131,7 +178,7 @@ function forceUnicityOfFigure(data: Partial<WorkbookData>): Partial<WorkbookData
131178
*/
132179
function setDefaults(partialData: Partial<WorkbookData>): Partial<WorkbookData> {
133180
const data: WorkbookData = Object.assign(createEmptyWorkbookData(), partialData, {
134-
version: CURRENT_VERSION,
181+
version: getCurrentVersion(),
135182
});
136183
data.sheets = data.sheets
137184
? data.sheets.map((s, i) =>
@@ -291,7 +338,7 @@ export function createEmptySheet(sheetId: UID, name: string): SheetData {
291338

292339
export function createEmptyWorkbookData(sheetName = "Sheet1"): WorkbookData {
293340
return {
294-
version: CURRENT_VERSION,
341+
version: getCurrentVersion(),
295342
sheets: [createEmptySheet(INITIAL_SHEET_ID, sheetName)],
296343
styles: {},
297344
formats: {},

‎src/migrations/migration_steps.ts

+31-53
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,23 @@ import { normalizeV9 } from "./legacy_tools";
1010
import { WEEK_START } from "./locale";
1111

1212
export interface MigrationStep {
13-
versionFrom: string;
1413
migrate: (data: any) => any;
1514
}
1615

1716
export const migrationStepRegistry = new Registry<MigrationStep>();
1817

1918
migrationStepRegistry
20-
.add("migration_1", {
19+
.add("0.1", {
2120
// add the `activeSheet` field on data
22-
versionFrom: "1",
2321
migrate(data: any): any {
2422
if (data.sheets && data.sheets[0]) {
2523
data.activeSheet = data.sheets[0].name;
2624
}
2725
return data;
2826
},
2927
})
30-
.add("migration_2", {
28+
.add("0.2", {
3129
// add an id field in each sheet
32-
versionFrom: "2",
3330
migrate(data: any): any {
3431
if (data.sheets && data.sheets.length) {
3532
for (let sheet of data.sheets) {
@@ -39,9 +36,8 @@ migrationStepRegistry
3936
return data;
4037
},
4138
})
42-
.add("migration_3", {
39+
.add("0.3", {
4340
// activeSheet is now an id, not the name of a sheet
44-
versionFrom: "3",
4541
migrate(data: any): any {
4642
if (data.sheets && data.activeSheet) {
4743
const activeSheet = data.sheets.find((s) => s.name === data.activeSheet);
@@ -50,19 +46,17 @@ migrationStepRegistry
5046
return data;
5147
},
5248
})
53-
.add("migration_4", {
49+
.add("0.4", {
5450
// add figures object in each sheets
55-
versionFrom: "4",
5651
migrate(data: any): any {
5752
for (let sheet of data.sheets || []) {
5853
sheet.figures = sheet.figures || [];
5954
}
6055
return data;
6156
},
6257
})
63-
.add("migration_5", {
58+
.add("0.5", {
6459
// normalize the content of the cell if it is a formula to avoid parsing all the formula that vary only by the cells they use
65-
versionFrom: "5",
6660
migrate(data: any): any {
6761
for (let sheet of data.sheets || []) {
6862
for (let xc in sheet.cells || []) {
@@ -75,9 +69,8 @@ migrationStepRegistry
7569
return data;
7670
},
7771
})
78-
.add("migration_6", {
72+
.add("0.6", {
7973
// transform chart data structure
80-
versionFrom: "6",
8174
migrate(data: any): any {
8275
for (let sheet of data.sheets || []) {
8376
for (let f in sheet.figures || []) {
@@ -100,9 +93,8 @@ migrationStepRegistry
10093
return data;
10194
},
10295
})
103-
.add("migration_7", {
96+
.add("0.7", {
10497
// remove single quotes in sheet names
105-
versionFrom: "7",
10698
migrate(data: any): any {
10799
const namesTaken: string[] = [];
108100
for (let sheet of data.sheets || []) {
@@ -165,9 +157,8 @@ migrationStepRegistry
165157
return data;
166158
},
167159
})
168-
.add("migration_8", {
160+
.add("0.8", {
169161
// transform chart data structure with design attributes
170-
versionFrom: "8",
171162
migrate(data: any): any {
172163
for (const sheet of data.sheets || []) {
173164
for (const chart of sheet.figures || []) {
@@ -180,9 +171,8 @@ migrationStepRegistry
180171
return data;
181172
},
182173
})
183-
.add("migration_9", {
174+
.add("0.9", {
184175
// de-normalize formula to reduce exported json size (~30%)
185-
versionFrom: "9",
186176
migrate(data: any): any {
187177
for (let sheet of data.sheets || []) {
188178
for (let xc in sheet.cells || []) {
@@ -201,9 +191,8 @@ migrationStepRegistry
201191
return data;
202192
},
203193
})
204-
.add("migration_10", {
194+
.add("0.10", {
205195
// normalize the formats of the cells
206-
versionFrom: "10",
207196
migrate(data: any): any {
208197
const formats: { [formatId: number]: Format } = {};
209198
for (let sheet of data.sheets || []) {
@@ -218,26 +207,23 @@ migrationStepRegistry
218207
return data;
219208
},
220209
})
221-
.add("migration_11", {
210+
.add("15.4", {
222211
// Add isVisible to sheets
223-
versionFrom: "11",
224212
migrate(data: any): any {
225213
for (let sheet of data.sheets || []) {
226214
sheet.isVisible = true;
227215
}
228216
return data;
229217
},
230218
})
231-
.add("migration_12", {
219+
.add("15.4.1", {
232220
// Fix data filter duplication
233-
versionFrom: "12",
234221
migrate(data: any): any {
235222
return fixOverlappingFilters(data);
236223
},
237224
})
238-
.add("migration_12_5", {
225+
.add("16.3", {
239226
// Change Border description structure
240-
versionFrom: "12.5",
241227
migrate(data: any): any {
242228
for (const borderId in data.borders) {
243229
const border = data.borders[borderId];
@@ -253,9 +239,8 @@ migrationStepRegistry
253239
return data;
254240
},
255241
})
256-
.add("migration_13", {
242+
.add("16.4", {
257243
// Add locale to spreadsheet settings
258-
versionFrom: "13",
259244
migrate(data: any): any {
260245
if (!data.settings) {
261246
data.settings = {};
@@ -266,16 +251,14 @@ migrationStepRegistry
266251
return data;
267252
},
268253
})
269-
.add("migration_14", {
254+
.add("16.4.1", {
270255
// Fix datafilter duplication (post saas-17.1)
271-
versionFrom: "14",
272256
migrate(data: any): any {
273257
return fixOverlappingFilters(data);
274258
},
275259
})
276-
.add("migration_14_5", {
260+
.add("17.2", {
277261
// Rename filterTable to tables
278-
versionFrom: "14.5",
279262
migrate(data: any): any {
280263
for (const sheetData of data.sheets || []) {
281264
sheetData.tables = sheetData.tables || sheetData.filterTables || [];
@@ -284,9 +267,8 @@ migrationStepRegistry
284267
return data;
285268
},
286269
})
287-
.add("migration_15", {
270+
.add("17.3", {
288271
// Add pivots
289-
versionFrom: "15",
290272
migrate(data: any): any {
291273
if (!data.pivots) {
292274
data.pivots = {};
@@ -297,9 +279,8 @@ migrationStepRegistry
297279
return data;
298280
},
299281
})
300-
.add("migration_16", {
282+
.add("17.4", {
301283
// transform chart data structure (2)
302-
versionFrom: "16",
303284
migrate(data: any): any {
304285
for (const sheet of data.sheets || []) {
305286
for (const f in sheet.figures || []) {
@@ -320,18 +301,16 @@ migrationStepRegistry
320301
return data;
321302
},
322303
})
323-
.add("migration_17", {
304+
.add("18.0", {
324305
// Empty migration to allow external modules to add their own migration steps
325306
// before this version
326-
versionFrom: "17",
327307
migrate(data: any): any {
328308
return data;
329309
},
330310
})
331-
.add("migration_18", {
311+
.add("18.0.1", {
332312
// Change measures and dimensions `name` to `fieldName`
333313
// Add id to measures
334-
versionFrom: "18",
335314
migrate(data: any): any {
336315
interface PivotCoreMeasureV17 {
337316
name: string;
@@ -362,9 +341,8 @@ migrationStepRegistry
362341
return data;
363342
},
364343
})
365-
.add("migration_19", {
344+
.add("18.0.2", {
366345
// "Add weekStart to locale",
367-
versionFrom: "19",
368346
migrate(data: any): any {
369347
const locale = data.settings?.locale;
370348
if (locale) {
@@ -374,9 +352,8 @@ migrationStepRegistry
374352
return data;
375353
},
376354
})
377-
.add("migration_20", {
355+
.add("18.0.3", {
378356
// group style and format into zones,
379-
versionFrom: "20",
380357
migrate(data: any): any {
381358
for (const sheet of data.sheets || []) {
382359
sheet.styles = {};
@@ -394,9 +371,8 @@ migrationStepRegistry
394371
return data;
395372
},
396373
})
397-
.add("migration_21", {
374+
.add("18.0.4", {
398375
// "Add operator in gauge inflection points",
399-
versionFrom: "21",
400376
migrate(data: WorkbookData): any {
401377
for (const sheet of data.sheets || []) {
402378
for (const figure of sheet.figures || []) {
@@ -415,9 +391,8 @@ migrationStepRegistry
415391
return data;
416392
},
417393
})
418-
.add("migration_22", {
394+
.add("18.1", {
419395
// "tables are no longer inserted with filters by default",
420-
versionFrom: "22",
421396
migrate(data: WorkbookData): any {
422397
for (const sheet of data.sheets || []) {
423398
for (const table of sheet.tables || []) {
@@ -429,9 +404,8 @@ migrationStepRegistry
429404
return data;
430405
},
431406
})
432-
.add("migration_23", {
407+
.add("18.1.1", {
433408
// Flatten cell content: { content: "value" } -> "value"
434-
versionFrom: "23",
435409
migrate(data: WorkbookData): any {
436410
for (const sheet of data.sheets || []) {
437411
for (const xc in sheet.cells) {
@@ -444,12 +418,16 @@ migrationStepRegistry
444418
return data;
445419
},
446420
})
447-
.add("migration_24", {
421+
.add("18.2", {
448422
// Empty migration to allow odoo migrate pivot custom sorting.
449-
versionFrom: "24",
450423
migrate(data: WorkbookData): any {
451424
return data;
452425
},
426+
})
427+
.add("18.3", {
428+
migrate(data) {
429+
return data;
430+
},
453431
});
454432

455433
function fixOverlappingFilters(data: any): any {

‎src/plugins/ui_stateful/clipboard.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { SELECTION_BORDER_COLOR } from "../../constants";
66
import { getClipboardDataPositions } from "../../helpers/clipboard/clipboard_helpers";
77
import { getMaxFigureSize } from "../../helpers/figures/figure/figure";
88
import { UuidGenerator, isZoneValid, union } from "../../helpers/index";
9-
import { CURRENT_VERSION } from "../../migrations/data";
9+
import { getCurrentVersion } from "../../migrations/data";
1010
import { _t } from "../../translation";
1111
import {
1212
ClipboardData,
@@ -47,7 +47,7 @@ type MinimalClipboardData = {
4747
};
4848

4949
export interface SpreadsheetClipboardData extends MinimalClipboardData {
50-
version?: number;
50+
version?: string;
5151
clipboardId?: string;
5252
}
5353
/**
@@ -528,7 +528,7 @@ export class ClipboardPlugin extends UIPlugin {
528528

529529
private getSheetData(): SpreadsheetClipboardData {
530530
const data = {
531-
version: CURRENT_VERSION,
531+
version: getCurrentVersion(),
532532
clipboardId: this.clipboardId,
533533
};
534534
if (this.copiedData && "figureId" in this.copiedData) {

‎src/types/workbook_data.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface WorkbookSettings {
5757
type PivotData = { formulaId: string } & PivotCoreDefinition;
5858

5959
export interface WorkbookData {
60-
version: number;
60+
version: string;
6161
sheets: SheetData[];
6262
styles: { [key: number]: Style };
6363
formats: { [key: number]: Format };

‎src/xlsx/xlsx_reader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { getXLSXFilesOfType } from "./helpers/xlsx_helper";
2626
import { XLSXImportWarningManager } from "./helpers/xlsx_parser_error_manager";
2727
import { escapeTagNamespaces, parseXML } from "./helpers/xml_helpers";
2828

29-
const EXCEL_IMPORT_VERSION = 24;
29+
const EXCEL_IMPORT_VERSION = "18.3";
3030

3131
export class XlsxReader {
3232
warningManager: XLSXImportWarningManager;

‎tests/model/data.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { DEFAULT_REVISION_ID } from "../../src/constants";
2-
import { CURRENT_VERSION, load } from "../../src/migrations/data";
2+
import { getCurrentVersion, load } from "../../src/migrations/data";
33
import { DEFAULT_LOCALE } from "../../src/types";
44

55
describe("load data", () => {
66
test("create empty workbookdata when loading nothing", () => {
77
const emptyWorkbook = load({});
88
expect(emptyWorkbook).toMatchObject({
9-
version: CURRENT_VERSION,
9+
version: getCurrentVersion(),
1010
borders: {},
1111
styles: {},
1212
formats: {},
@@ -41,7 +41,7 @@ describe("load data", () => {
4141
sheets: [{ id: "asdf", merges: ["A1:B2"] }],
4242
})
4343
).toMatchObject({
44-
version: CURRENT_VERSION,
44+
version: getCurrentVersion(),
4545
borders: {},
4646
styles: {},
4747
formats: {},
@@ -73,7 +73,7 @@ describe("load data", () => {
7373
sheets: [{ name: "Sheet1", merges: ["A1:B2"] }],
7474
})
7575
).toMatchObject({
76-
version: CURRENT_VERSION,
76+
version: getCurrentVersion(),
7777
borders: {},
7878
styles: {},
7979
formats: {},
@@ -154,7 +154,7 @@ describe("load data", () => {
154154
sheets: [{ merges: ["A1:B2"] }],
155155
})
156156
).toMatchObject({
157-
version: CURRENT_VERSION,
157+
version: getCurrentVersion(),
158158
borders: {},
159159
styles: {},
160160
formats: {},
@@ -205,7 +205,7 @@ describe("load data", () => {
205205
],
206206
})
207207
).toMatchObject({
208-
version: CURRENT_VERSION,
208+
version: getCurrentVersion(),
209209
sheets: [
210210
{
211211
figures: [

‎tests/model/model_import_export.test.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from "../../src/constants";
99
import { toCartesian, toZone } from "../../src/helpers";
1010
import { DEFAULT_TABLE_CONFIG } from "../../src/helpers/table_presets";
11-
import { CURRENT_VERSION } from "../../src/migrations/data";
11+
import { getCurrentVersion } from "../../src/migrations/data";
1212
import {
1313
BorderDescr,
1414
ColorScaleRule,
@@ -59,7 +59,7 @@ describe("Migrations", () => {
5959
],
6060
});
6161
const data = model.exportData();
62-
expect(data.version).toBe(CURRENT_VERSION);
62+
expect(data.version).toBe(getCurrentVersion());
6363
expect(data.sheets[0].id).toBeDefined();
6464
expect(data.sheets[0].figures).toBeDefined();
6565
expect(data.sheets[0].cells.A1).toBe("=A1");
@@ -82,7 +82,7 @@ describe("Migrations", () => {
8282
});
8383
const data = model.exportData();
8484
const cells = data.sheets[0].cells;
85-
expect(data.version).toBe(CURRENT_VERSION);
85+
expect(data.version).toBe(getCurrentVersion());
8686
// formulas are de-normalized with version 9
8787
expect(cells.A1).toBe("=A1");
8888
expect(cells.A2).toBe("=1");
@@ -450,8 +450,8 @@ describe("Migrations", () => {
450450
],
451451
});
452452
const data = model.exportData();
453-
expect(data.version).toEqual(CURRENT_VERSION);
454-
expect(CURRENT_VERSION).toBeGreaterThanOrEqual(14.5);
453+
expect(data.version).toEqual(getCurrentVersion());
454+
expect(Number(getCurrentVersion())).toBeGreaterThanOrEqual(14.5);
455455
expect(data.sheets[0].tables).toEqual([
456456
{
457457
range: "A1:C2",
@@ -473,7 +473,7 @@ describe("Migrations", () => {
473473
});
474474
expect(model.getters.getTables("1")).toMatchObject([{ range: { zone: toZone("A1:B2") } }]);
475475
let data = model.exportData();
476-
expect(data.version).toBe(CURRENT_VERSION);
476+
expect(data.version).toBe(getCurrentVersion());
477477
expect(data.sheets[0].tables).toEqual([
478478
{
479479
range: "A1:B2",
@@ -504,7 +504,7 @@ describe("Migrations", () => {
504504
expect(getCell(model, "A1")?.style).toEqual(style);
505505
expect(getBorder(model, "A1")).toEqual(border);
506506
const data = model.exportData();
507-
expect(data.version).toBe(CURRENT_VERSION);
507+
expect(data.version).toBe(getCurrentVersion());
508508
expect(data.sheets[0].cells).toEqual({ A1: "hi" });
509509
expect(data.sheets[0].formats).toEqual({ A1: 1 });
510510
expect(data.sheets[0].styles).toEqual({ A1: 1 });
@@ -565,7 +565,7 @@ describe("Migrations", () => {
565565
});
566566
expect(model.getters.getTables("1")).toMatchObject([{ range: { zone: toZone("A1:B2") } }]);
567567
const data = model.exportData();
568-
expect(data.version).toBe(CURRENT_VERSION);
568+
expect(data.version).toBe(getCurrentVersion());
569569
expect(data.sheets[0].tables).toEqual([
570570
{
571571
range: "A1:B2",
@@ -715,7 +715,7 @@ describe("Export", () => {
715715

716716
test("complete import, then export", () => {
717717
const modelData = {
718-
version: CURRENT_VERSION,
718+
version: getCurrentVersion(),
719719
revisionId: DEFAULT_REVISION_ID,
720720
sheets: [
721721
{
@@ -810,7 +810,7 @@ test("complete import, then export", () => {
810810
test("can import cells outside sheet size", () => {
811811
const sheetId = "someuuid";
812812
const modelData = {
813-
version: CURRENT_VERSION,
813+
version: getCurrentVersion(),
814814
sheets: [
815815
{
816816
id: sheetId,
@@ -846,7 +846,7 @@ test("Data of a duplicate sheet are correctly duplicated", () => {
846846

847847
test("import then export (figures)", () => {
848848
const modelData = {
849-
version: CURRENT_VERSION,
849+
version: getCurrentVersion(),
850850
revisionId: DEFAULT_REVISION_ID,
851851
sheets: [
852852
{

0 commit comments

Comments
 (0)
Please sign in to comment.