Skip to content

chore: build Node output for Git installs - #2

Closed
roziscoding wants to merge 2 commits into
mainfrom
chore/deno2node-git-install
Closed

chore: build Node output for Git installs#2
roziscoding wants to merge 2 commits into
mainfrom
chore/deno2node-git-install

Conversation

@roziscoding

@roziscoding roziscoding commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep Deno imports isolated in src/deps.deno.ts and Node imports in the matching src/deps.node.ts
  • route source and example imports through the Deno dependency boundary so deno2node swaps the file during the Node build
  • install grammy from npm for the Node-specific dependency module
  • run the deno2node build from the prepare lifecycle hook so GitHub installs produce out

Verification

  • npm run build succeeds
  • emitted output contains out/deps.node.js and no out/deps.deno.js
  • emitted out/deps.node.js imports from npm package grammy
  • deno fmt --check passes
  • deno lint passes
  • from an empty directory with pnpm 9.15.9, installed github:grammyjs/format#chore/deno2node-git-install
  • verified the installed package contains JS and declarations for core, components, and JSX runtime entrypoints
  • imported grammy-rich-messages/core, grammy-rich-messages/components, grammy-rich-messages/jsx/jsx-runtime, and grammy-rich-messages/jsx/jsx-dev-runtime from the consumer workdir and executed them successfully

Notes

  • pnpm 10+ requires the consumer to authorize Git dependency build scripts through its build policy (onlyBuiltDependencies / pnpm approve-builds).
  • Deno test/check still fail because the existing denopkg grammY URLs return module resolution errors (TS2307); the same failure is present on the base branch and unrelated to the Node dependency split.

@roziscoding
roziscoding deleted the chore/deno2node-git-install branch August 13, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant