Skip to content

Commit 7cfa970

Browse files
authored
Merge pull request #208 from ember-learn/fix-build
Bump node version and re-roll yarn.lock to fix build
2 parents 72608b7 + 26ef259 commit 7cfa970

File tree

5 files changed

+822
-733
lines changed

5 files changed

+822
-733
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"postbuild": "yarn lint:md:dist"
6767
},
6868
"volta": {
69-
"node": "12.22.1",
69+
"node": "14.19.1",
7070
"yarn": "1.22.10"
7171
}
7272
}

src/bin/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function group<T>(name: string, callback: () => Promise<T>): Promise<T> {
4444
async function run(processor: Processor, inputPath: string, outputPath: string, options: VFileOptions): Promise<void> {
4545
let contents = await readFile(inputPath, { encoding: 'utf8' });
4646
let result = await processor.process({ ...options, contents });
47-
await writeFile(outputPath, result, { encoding: 'utf8' });
47+
await writeFile(outputPath, result.toString(), { encoding: 'utf8' });
4848
}
4949

5050
async function main() {

src/lib/plugins/zoey-says/walker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BlockContent, Blockquote, HTML } from 'mdast';
1+
import { BlockContent, Blockquote, DefinitionContent, HTML } from 'mdast';
22
import { Position } from 'unist';
33
import { VFile } from 'vfile';
44
import BaseWalker from '../../walker';
@@ -23,7 +23,7 @@ function isZoeySays({ children }: Blockquote): boolean {
2323
firstParagraph.value === ZOEY_SAYS;
2424
}
2525

26-
async function render(nodes: BlockContent[], position?: Position): Promise<HTML> {
26+
async function render(nodes: Array<BlockContent | DefinitionContent>, position?: Position): Promise<HTML> {
2727
let content = [];
2828

2929
for (let node of nodes) {

src/lib/walker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import { VFile } from 'vfile';
66
type Handler<Options> = (this: Walker<Options>, node: Node) => Option<Node> | Promise<Option<Node>>;
77

88
function isParent(node: Node): node is Parent {
9-
return Array.isArray(node.children);
9+
return Array.isArray((node as Node & { children: unknown }).children);
1010
}
1111

1212
export default class Walker<Options> {
13-
constructor(protected options: Options, protected file: VFile) {}
13+
constructor(protected options: Options, protected file: VFile) { }
1414

1515
[key: string]: unknown;
1616

@@ -42,10 +42,10 @@ export default class Walker<Options> {
4242
let handler = maybeHandler as Handler<Options>;
4343
return handler.call(this, node);
4444
} else if (isParent(node)) {
45-
return {
45+
return ({
4646
...node,
4747
children: await this.visit(node.children)
48-
};
48+
} as Parent);
4949
} else {
5050
return node;
5151
}

0 commit comments

Comments
 (0)