@rljson/io 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,12 +79,6 @@ export const runIoConformanceTests = () => {
79
79
 
80
80
  describe('isOpen()', () => {
81
81
  it('should return false before init, true after and false after close', async () => {
82
- const setup = testSetup();
83
- await setup.beforeEach();
84
-
85
- const io = setup.io;
86
- expect(io.isOpen).toBe(false);
87
-
88
82
  await io.init();
89
83
  expect(io.isOpen).toBe(true);
90
84
 
@@ -312,6 +306,28 @@ export const runIoConformanceTests = () => {
312
306
  ]);
313
307
  });
314
308
 
309
+ it('should add tables with foreign keys', async () => {
310
+ const tableCfg1: TableCfg = exampleTableCfg({ key: 'table1' });
311
+ // Create a first table
312
+ const domTable = {
313
+ ...tableCfg1,
314
+ key: 'domTable',
315
+ } as TableCfg;
316
+ await io.createOrExtendTable({ tableCfg: domTable });
317
+
318
+ // Create a second table
319
+ const mainTable = {
320
+ ...tableCfg1,
321
+ key: 'mainTable',
322
+ columns: [
323
+ { ...tableCfg1.columns[0], type: 'string' },
324
+ { ...tableCfg1.columns[1], type: 'boolean' },
325
+ { ...tableCfg1.columns[2], key: 'domTableRef', type: 'string' },
326
+ ],
327
+ } as TableCfg;
328
+ await io.createOrExtendTable({ tableCfg: mainTable });
329
+ });
330
+
315
331
  it('should do nothing when the columns do not have changed', async () => {
316
332
  const exampleCfg: TableCfg = exampleTableCfg({ key: 'tableA' });
317
333
  await io.createOrExtendTable({ tableCfg: exampleCfg });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/io",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "packageManager": "pnpm@10.9.0",
5
5
  "description": "Low level interface for reading and writing RLJSON data",
6
6
  "homepage": "https://github.com/rljson/io",
@@ -29,24 +29,24 @@
29
29
  "updateGoldens": "cross-env UPDATE_GOLDENS=true pnpm test"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^22.15.29",
33
- "@typescript-eslint/eslint-plugin": "^8.33.1",
34
- "@typescript-eslint/parser": "^8.33.1",
35
- "@vitest/coverage-v8": "^3.2.0",
32
+ "@types/node": "^24.0.3",
33
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
34
+ "@typescript-eslint/parser": "^8.34.1",
35
+ "@vitest/coverage-v8": "^3.2.3",
36
36
  "cross-env": "^7.0.3",
37
- "eslint": "^9.28.0",
38
- "eslint-plugin-jsdoc": "^50.7.1",
37
+ "eslint": "^9.29.0",
38
+ "eslint-plugin-jsdoc": "^51.0.1",
39
39
  "eslint-plugin-tsdoc": "^0.4.0",
40
40
  "globals": "^16.2.0",
41
41
  "jsdoc": "^4.0.4",
42
42
  "read-pkg": "^9.0.1",
43
43
  "typescript": "~5.8.3",
44
- "typescript-eslint": "^8.33.1",
44
+ "typescript-eslint": "^8.34.1",
45
45
  "vite": "^6.3.5",
46
- "vite-node": "^3.2.0",
46
+ "vite-node": "^3.2.3",
47
47
  "vite-plugin-dts": "^4.5.4",
48
48
  "vite-tsconfig-paths": "^5.1.4",
49
- "vitest": "^3.2.0",
49
+ "vitest": "^3.2.3",
50
50
  "vitest-dom": "^0.1.1"
51
51
  },
52
52
  "pnpm": {