fix(dns): detect package manager in scripts init and publish scriptab…#108
Conversation
|
@codex review |
🦋 Changeset detectedLatest commit: c86566d The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThis PR promotes
Confidence Score: 5/5Safe to merge — the changes are a clean refactor that moves a utility to core, fixes hardcoded bun assumptions in the DNS init flow, and adds a minimal publish job for a types-only package. All changed paths are well-scoped: the package-manager module is a pure rename with no logic changes, both init commands correctly handle the null-PM case, and the new CI publish job correctly omits a build step because the package ships a pre-authored index.d.ts with no compilation needed. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User runs dns scripts init / scripts init] --> B{--skip-install?}
B -- Yes --> Z[Done]
B -- No --> C{Interactive?}
C -- No --> D[shouldInstall = true]
C -- Yes --> E[Prompt: Install dependencies?]
E -- No --> Z
E -- Yes --> D
D --> F[pickPackageManager dirPath]
F --> G{npm_config_user_agent set?}
G -- Yes --> H{binary on PATH?}
H -- Yes --> K[return user-agent PM]
H -- No --> I
G -- No --> I{lockfile in dir?}
I -- Yes --> J{binary on PATH?}
J -- Yes --> K
J -- No --> L
I -- No --> L[probe bun → pnpm → yarn → npm]
L --> M{any found?}
M -- No --> N[warn: no PM on PATH]
M -- Yes --> K
K --> O[Bun.spawn pm install]
O --> P{exit 0?}
P -- Yes --> Q[logger.success]
P -- No --> R[warn: run pm install manually]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User runs dns scripts init / scripts init] --> B{--skip-install?}
B -- Yes --> Z[Done]
B -- No --> C{Interactive?}
C -- No --> D[shouldInstall = true]
C -- Yes --> E[Prompt: Install dependencies?]
E -- No --> Z
E -- Yes --> D
D --> F[pickPackageManager dirPath]
F --> G{npm_config_user_agent set?}
G -- Yes --> H{binary on PATH?}
H -- Yes --> K[return user-agent PM]
H -- No --> I
G -- No --> I{lockfile in dir?}
I -- Yes --> J{binary on PATH?}
J -- Yes --> K
J -- No --> L
I -- No --> L[probe bun → pnpm → yarn → npm]
L --> M{any found?}
M -- No --> N[warn: no PM on PATH]
M -- Yes --> K
K --> O[Bun.spawn pm install]
O --> P{exit 0?}
P -- Yes --> Q[logger.success]
P -- No --> R[warn: run pm install manually]
Reviews (2): Last reviewed commit: "remove <pm>" | Re-trigger Greptile |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…le-dns-types