Skip to content

Commit

Permalink
add json assertsions
Browse files Browse the repository at this point in the history
  • Loading branch information
odama626 committed Aug 5, 2022
1 parent 9410310 commit f9856cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/core/src/generators/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ const optionallyTransformContentNodes = (
if (!transformer?.parse) {
throw new Error(`no transformer found for ${node.path}`);
}
console.log({ transformer });
const doc = transformer.parse(node);
doc._flatbread.transformedBy = transformer.id;
doc._flatbread.reference = get(doc, doc._flatbread.referenceField);
Expand Down
2 changes: 1 addition & 1 deletion packages/source-filesystem/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import slugify from '@sindresorhus/slugify';
import { defaultsDeep, merge } from 'lodash-es';
import { read } from 'to-vfile';
import ownPackage from '../package.json';
import ownPackage from '../package.json' assert { type: 'json' };
import type {
CollectionEntry,
LoadedFlatbreadConfig,
Expand Down
3 changes: 2 additions & 1 deletion packages/transformer-markdown/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import matter from 'gray-matter';
import { excerpt, html, timeToRead } from './graphql/schema-helpers';
import ownPackage from '../package.json';
import ownPackage from '../package.json' assert { type: 'json' };


import type { EntryNode, TransformerPlugin } from '@flatbread/core';
import type { VFile } from 'vfile';
Expand Down
2 changes: 1 addition & 1 deletion packages/transformer-yaml/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { EntryNode, TransformerPlugin } from '@flatbread/core';
import type { YAMLException } from 'js-yaml';
import yaml from 'js-yaml';
import { VFile } from 'vfile';
import ownPackage from '../package.json';
import ownPackage from '../package.json' assert { type: 'json' };

/**
* Transforms a yaml file (content node) to JSON.
Expand Down

0 comments on commit f9856cf

Please sign in to comment.