Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/eighty-terms-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"create-hypergraph": patch
---

fix cli build by including type module in package.json

5 changes: 3 additions & 2 deletions apps/create-hypergraph/scripts/copy-package-json.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'node:path';
import * as FileSystem from '@effect/platform/FileSystem';
import * as NodeFileSystem from '@effect/platform-node/NodeFileSystem';
import * as FileSystem from '@effect/platform/FileSystem';
import { Effect, pipe } from 'effect';
import * as path from 'node:path';

const read = pipe(
FileSystem.FileSystem,
Expand All @@ -15,6 +15,7 @@ const read = pipe(
'create-hypergraph': 'bin.js',
ch: 'bin.js',
},
type: json.type,
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type field is being copied without validation. If json.type is undefined, this will add type: undefined to the package.json, which could cause issues. Consider adding a conditional check or default value.

Suggested change
type: json.type,
...(json.type ? { type: json.type } : {}),

Copilot uses AI. Check for mistakes.

engines: json.engines,
repository: json.repository,
license: json.license,
Expand Down
Loading