docs(fli-js): import as "fli" via alias install#188
Closed
punitarani wants to merge 1 commit into
Closed
Conversation
The package is published as @punitarani/fli (the unscoped `fli` name is owned by another npm account). To let consumers write `import … from "fli"`, document the install-time alias `npm i fli@npm:@punitarani/fli`, which installs the scoped package under the local name `fli` so the bare `"fli"` specifier resolves. Update the Quick start / SearchDates / Client examples to import from "fli", and note the plain scoped alternative for anyone who prefers it.
Contributor
Owner
Author
|
Superseded by #189, which renames the package to the unscoped Generated by Claude Code |
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
Make the documented usage
import … from "fli"(instead offrom "@punitarani/fli") while keeping the published name@punitarani/fli.Why an alias install
In Node/npm the import specifier is the installed package's name. The unscoped
fliname is owned by another npm account, so we can't publish under it, and there's nopackage.jsonfield that lets consumers import a package under a different name than it's installed as. The one supported way to getimport … from "fli"is an install-time alias, which all package managers support:This installs the scoped package under the local name
fliinnode_modules, so the bare"fli"specifier resolves.Changes (
fli-js/README.mdonly)@punitarani/fli+from "@punitarani/fli") as an alternative.import … from "fli".No source/package.json changes — the publish name stays
@punitarani/fli; this is purely how consumers are guided to install and import.https://claude.ai/code/session_01R2vZihmSWV2wvRawjF4Gjo
Generated by Claude Code
Greptile Summary
This PR updates
fli-js/README.mdto guide consumers to install the scoped package@punitarani/fliunder the local aliasfli, enabling cleanerimport … from "fli"syntax. No source files orpackage.jsonare changed.pkg@npm:@punitarani/flialias commands for npm, pnpm, yarn, and bun, with a blockquote explaining the mechanism and offering the plain scoped install as an alternative."@punitarani/fli"to"fli"to match the aliased install.Confidence Score: 5/5
Documentation-only change with no source or package.json modifications; safe to merge.
The change touches only the README. The alias install pattern (
pkg@npm:scope/pkg) is natively supported by npm, pnpm, yarn, and bun, so the documented commands are correct. All updated import examples are consistent with the aliased install. The alternative scoped-name path is preserved and clearly explained.No files require special attention.
Important Files Changed
@punitarani/flitofli.Sequence Diagram
sequenceDiagram participant User participant npm/pnpm/yarn/bun participant node_modules User->>npm/pnpm/yarn/bun: "install fli@npm:@punitarani/fli" npm/pnpm/yarn/bun->>node_modules: "place @punitarani/fli files under fli/ alias" note over node_modules: node_modules/fli/ → @punitarani/fli contents User->>User: "import { SearchFlights } from "fli"" User->>node_modules: resolve specifier "fli" node_modules-->>User: "returns @punitarani/fli exports"Reviews (1): Last reviewed commit: "docs(fli-js): import as "fli" via alias ..." | Re-trigger Greptile