fix(npm): use scoped package name and fix installer tar import#5
Merged
fix(npm): use scoped package name and fix installer tar import#5
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes npm distribution by moving the package to the scoped name @yousali/codetok (to match publish permissions) and resolving an ESM import issue in the postinstall installer that was causing runtime failures.
Changes:
- Rename npm package from
codetokto@yousali/codetok. - Fix installer extraction by switching from
tardefault import to the namedxexport and updating the call site. - Update user-facing install/reinstall commands in READMEs and the npm wrapper error message.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| npm/scripts/install.mjs | Fixes tar extraction import/call to work under ESM and prevent postinstall failures. |
| npm/package.json | Updates published npm package name to the scoped identity. |
| npm/bin/codetok.js | Updates missing-binary reinstall hint to the scoped npm package name. |
| npm/README.md | Updates npm install instructions to the scoped package name. |
| README.md | Updates npm install instructions to the scoped package name. |
| README_zh.md | Updates npm install instructions to the scoped package name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
codetokto@yousali/codetokto align with publish permissions.tar.Changes
npm/package.json@yousali/codetok0.0.0-dev(CI still sets publish version from tag)npm/scripts/install.mjsimport tar from 'tar'withimport { x as extractTar } from 'tar'extractTar(...)npm/bin/codetok.jsREADME.md,README_zh.md,npm/README.mdnpm install -g @yousali/codetokValidation
make testmake lintmake vetmake buildnpm pack --dry-run(innpm/)Why this PR
codetokdue to permission restrictions.tarhad no default export in ESM mode.