Skip to content

Commit f9856cf

Browse files
committed
add json assertsions
1 parent 9410310 commit f9856cf

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/core/src/generators/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ const optionallyTransformContentNodes = (
203203
if (!transformer?.parse) {
204204
throw new Error(`no transformer found for ${node.path}`);
205205
}
206-
console.log({ transformer });
207206
const doc = transformer.parse(node);
208207
doc._flatbread.transformedBy = transformer.id;
209208
doc._flatbread.reference = get(doc, doc._flatbread.referenceField);

packages/source-filesystem/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import slugify from '@sindresorhus/slugify';
22
import { defaultsDeep, merge } from 'lodash-es';
33
import { read } from 'to-vfile';
4-
import ownPackage from '../package.json';
4+
import ownPackage from '../package.json' assert { type: 'json' };
55
import type {
66
CollectionEntry,
77
LoadedFlatbreadConfig,

packages/transformer-markdown/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import matter from 'gray-matter';
22
import { excerpt, html, timeToRead } from './graphql/schema-helpers';
3-
import ownPackage from '../package.json';
3+
import ownPackage from '../package.json' assert { type: 'json' };
4+
45

56
import type { EntryNode, TransformerPlugin } from '@flatbread/core';
67
import type { VFile } from 'vfile';

packages/transformer-yaml/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { EntryNode, TransformerPlugin } from '@flatbread/core';
22
import type { YAMLException } from 'js-yaml';
33
import yaml from 'js-yaml';
44
import { VFile } from 'vfile';
5-
import ownPackage from '../package.json';
5+
import ownPackage from '../package.json' assert { type: 'json' };
66

77
/**
88
* Transforms a yaml file (content node) to JSON.

0 commit comments

Comments
 (0)