feat(create-typink): add flexibility in package manager when initializing project#201
Merged
feat(create-typink): add flexibility in package manager when initializing project#201
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the create-typink CLI tool to automatically detect and use the package manager that the user invoked the tool with, instead of defaulting to yarn. The tool now supports npm, yarn, pnpm, and bun package managers with automatic detection based on the user agent environment variable.
- Adds package manager detection via user agent parsing
- Updates installation commands and help messages to use the detected package manager
- Simplifies project structure by removing workspace configuration and moving contracts to src/contracts
Reviewed Changes
Copilot reviewed 28 out of 123 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/create-typink/src/utils/string.ts | Adds pkgFromUserAgent function for parsing package manager from user agent |
| packages/create-typink/src/utils/render.ts | Updates help messages to use detected package manager instead of hardcoded yarn |
| packages/create-typink/src/types.ts | Adds PkgManagerInfo interface and updates BaseOptions to include package manager |
| packages/create-typink/src/utils/options.ts | Sets default package manager to npm in options |
| packages/create-typink/src/index.ts | Implements package manager detection and assignment to options |
| packages/create-typink/src/tasks/installPackages.ts | Updates package installation to use detected package manager |
| packages/create-typink/src/createProject.ts | Updates task title to show detected package manager |
| Template files | Restructures project from workspace to single package, moves contracts to src/contracts, updates imports |
Comments suppressed due to low confidence (1)
# Conflicts: # packages/create-typink/src/templates/legacy/default/contracts/package.json # packages/create-typink/src/templates/legacy/default/package.json.template.ejs # packages/create-typink/src/templates/v6/default/contracts/package.json # packages/create-typink/src/templates/v6/default/package.json.template.ejs
cbdf9e9 to
247153b
Compare
sinzii
approved these changes
Aug 10, 2025
Member
sinzii
left a comment
There was a problem hiding this comment.
Looking neat to me, I've made some minor changes, let's go with this first! Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create-typinkcli for ink! v6 #194 by adding flexibility to the package manager used when calling create-typink. Previously, it defaulted toyarn; now it automatically detects the package manager the user intends to use.npm.$ npm create typink$ yarn create typink$ bun create typink$ pnpm create typink