Skip to content

Commit 2e84a4d

Browse files
committed
ensure process is available in config
1 parent cec10e6 commit 2e84a4d

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.changeset/plenty-ants-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/contentlayer": patch
3+
---
4+
5+
ensure process is available in config

packages/core/src/ConfigBuilder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ export const fromPath = Effect.fnUntraced(function*(
105105
const content = yield* Effect.orDie(fs.readFileString(outPath))
106106

107107
const context = VM.createContext({
108-
...globalThis
108+
...globalThis,
109+
process
109110
})
110111
context.require = Module.createRequire(entrypoint)
111112
context.module = { exports: {} }

packages/core/src/SourcePlugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ export class UnifiedOutput extends Context.Tag("@effect/contentlayer/SourcePlugi
9898
* .use(remarkStringify)
9999
* .use(remarkFrontmatter)
100100
* .use(remarkParseFrontmatter)
101-
* .use(SourcePlugin.unifiedRemoveYaml)
101+
* .use(unifiedRemoveYaml)
102+
* .use(remarkRehype)
103+
* .use(rehypeFormat)
104+
* .use(rehypeStringify),
102105
* })
103106
* ```
104107
*

0 commit comments

Comments
 (0)