lingo.dev 0.87.12 → 0.87.13

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/build/cli.cjs CHANGED
@@ -1190,7 +1190,7 @@ function denormalizeObjectKeys(obj) {
1190
1190
  obj,
1191
1191
  (result, value, key) => {
1192
1192
  const newKey = !isNaN(Number(key)) ? `${OBJECT_NUMERIC_KEY_PREFIX}${key}` : key;
1193
- result[newKey] = _lodash2.default.isObject(value) ? denormalizeObjectKeys(value) : value;
1193
+ result[newKey] = _lodash2.default.isObject(value) && !_lodash2.default.isDate(value) ? denormalizeObjectKeys(value) : value;
1194
1194
  },
1195
1195
  {}
1196
1196
  );
@@ -1204,7 +1204,7 @@ function normalizeObjectKeys(obj) {
1204
1204
  obj,
1205
1205
  (result, value, key) => {
1206
1206
  const newKey = `${key}`.replace(OBJECT_NUMERIC_KEY_PREFIX, "");
1207
- result[newKey] = _lodash2.default.isObject(value) ? normalizeObjectKeys(value) : value;
1207
+ result[newKey] = _lodash2.default.isObject(value) && !_lodash2.default.isDate(value) ? normalizeObjectKeys(value) : value;
1208
1208
  },
1209
1209
  {}
1210
1210
  );
@@ -3091,11 +3091,13 @@ function createLockedKeysLoader(lockedKeys, isCacheRestore = false) {
3091
3091
 
3092
3092
  // src/cli/loaders/mdx2/frontmatter-split.ts
3093
3093
 
3094
+
3094
3095
  function createMdxFrontmatterSplitLoader() {
3096
+ const fmEngine = createFmEngine();
3095
3097
  return createLoader({
3096
3098
  async pull(locale, input2) {
3097
3099
  const source = input2 || "";
3098
- const { data: frontmatter, content } = _graymatter2.default.call(void 0, source);
3100
+ const { data: frontmatter, content } = fmEngine.parse(source);
3099
3101
  return {
3100
3102
  frontmatter,
3101
3103
  content
@@ -3103,11 +3105,29 @@ function createMdxFrontmatterSplitLoader() {
3103
3105
  },
3104
3106
  async push(locale, data) {
3105
3107
  const { frontmatter = {}, content = "" } = data || {};
3106
- const result = _graymatter2.default.stringify(content, frontmatter).trim();
3108
+ const result = fmEngine.stringify(content, frontmatter).trim();
3107
3109
  return result;
3108
3110
  }
3109
3111
  });
3110
3112
  }
3113
+ function createFmEngine() {
3114
+ const yamlEngine2 = {
3115
+ parse: (str) => _yaml2.default.parse(str),
3116
+ stringify: (obj) => _yaml2.default.stringify(obj, { defaultStringType: "PLAIN" })
3117
+ };
3118
+ return {
3119
+ parse: (input2) => _graymatter2.default.call(void 0, input2, {
3120
+ engines: {
3121
+ yaml: yamlEngine2
3122
+ }
3123
+ }),
3124
+ stringify: (content, frontmatter) => _graymatter2.default.stringify(content, frontmatter, {
3125
+ engines: {
3126
+ yaml: yamlEngine2
3127
+ }
3128
+ })
3129
+ };
3130
+ }
3111
3131
 
3112
3132
  // src/cli/utils/md5.ts
3113
3133
  var _objecthash = require('object-hash');
@@ -3309,6 +3329,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3309
3329
  createMdxSectionsSplit2Loader(),
3310
3330
  createLocalizableMdxDocumentLoader(),
3311
3331
  createFlatLoader(),
3332
+ createLockedKeysLoader(lockedKeys || [], options.isCacheRestore),
3312
3333
  createSyncLoader(),
3313
3334
  createUnlocalizableLoader(
3314
3335
  options.isCacheRestore,
@@ -5679,7 +5700,7 @@ function validateParams2(i18nConfig, flags) {
5679
5700
  // package.json
5680
5701
  var package_default = {
5681
5702
  name: "lingo.dev",
5682
- version: "0.87.12",
5703
+ version: "0.87.13",
5683
5704
  description: "Lingo.dev CLI",
5684
5705
  private: false,
5685
5706
  publishConfig: {