@observablehq/notebook-kit 1.1.0-rc.6 → 1.1.0-rc.7

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.
package/dist/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "1.1.0-rc.6",
8
+ "version": "1.1.0-rc.7",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",
@@ -64,7 +64,7 @@ function revive({ rows, schema, date, ...meta }) {
64
64
  const value = row[name];
65
65
  if (value == null)
66
66
  continue;
67
- row[name] = new Date(value);
67
+ row[name] = asDate(value);
68
68
  }
69
69
  break;
70
70
  }
@@ -74,6 +74,9 @@ function revive({ rows, schema, date, ...meta }) {
74
74
  date = new Date(date);
75
75
  return Object.assign(rows, { schema, date }, meta);
76
76
  }
77
+ function asDate(value) {
78
+ return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(?::\d{2})?$/.test(value) ? value + "Z" : value);
79
+ }
77
80
  DatabaseClient.hash = hash;
78
81
  DatabaseClient.revive = revive;
79
82
  DatabaseClient.prototype = DatabaseClientImpl.prototype; // instanceof
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "1.1.0-rc.6",
8
+ "version": "1.1.0-rc.7",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",