superbee 0.4.3 → 0.4.4-pre.1

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/README.md CHANGED
@@ -53,7 +53,11 @@ Requires a supported Node.js 22, 24, or 26 release (22.14.0 minimum) on macOS or
53
53
  npm install -g superbee
54
54
  ```
55
55
 
56
- Stable releases publish on npm's `latest` tag and prereleases on `next`.
56
+ Stable releases publish on npm's `latest` tag and prereleases on `next`. To try the prerelease:
57
+
58
+ ```sh
59
+ npm install -g superbee@next
60
+ ```
57
61
 
58
62
  Windows adapters and the `superbee-windows` executable live in a separate repository and are
59
63
  not included in `superbee`. Most Windows users should run Superbee in WSL2, where npm sees a
@@ -3346,9 +3346,9 @@ var yamlEngine = {
3346
3346
  return import_js_yaml2.default.safeLoad(input, { schema: losslessDateSchema }) ?? {};
3347
3347
  }
3348
3348
  };
3349
- function normalizeFrontmatter(data, okfVersion) {
3349
+ function normalizeFrontmatter(data, options) {
3350
3350
  const out = { ...data };
3351
- if (okfVersion === "0.2") return out;
3351
+ if (options.preserveTimestamp || options.okfVersion === "0.2") return out;
3352
3352
  const value = out.timestamp;
3353
3353
  if (value instanceof Date) {
3354
3354
  out.timestamp = value.toISOString();
@@ -3372,7 +3372,7 @@ function parseFrontmatter(source, context, options = {}) {
3372
3372
  } catch (err) {
3373
3373
  throw new MalformedDocumentError(context, err);
3374
3374
  }
3375
- return normalizeFrontmatter(parsed, options.okfVersion);
3375
+ return normalizeFrontmatter(parsed, options);
3376
3376
  }
3377
3377
  function stringifyFrontmatter(data) {
3378
3378
  return import_js_yaml2.default.safeDump(data).trim();
@@ -31300,9 +31300,9 @@ var yamlEngine = {
31300
31300
  return import_js_yaml2.default.safeLoad(input, { schema: losslessDateSchema }) ?? {};
31301
31301
  }
31302
31302
  };
31303
- function normalizeFrontmatter(data, okfVersion) {
31303
+ function normalizeFrontmatter(data, options) {
31304
31304
  const out = { ...data };
31305
- if (okfVersion === "0.2") return out;
31305
+ if (options.preserveTimestamp || options.okfVersion === "0.2") return out;
31306
31306
  const value = out.timestamp;
31307
31307
  if (value instanceof Date) {
31308
31308
  out.timestamp = value.toISOString();
@@ -31326,7 +31326,7 @@ function parseFrontmatter(source, context, options = {}) {
31326
31326
  } catch (err) {
31327
31327
  throw new MalformedDocumentError(context, err);
31328
31328
  }
31329
- return normalizeFrontmatter(parsed, options.okfVersion);
31329
+ return normalizeFrontmatter(parsed, options);
31330
31330
  }
31331
31331
  function stringifyFrontmatter(data) {
31332
31332
  return import_js_yaml2.default.safeDump(data).trim();