Skip to content

chore(npm): rename package to unscoped fli-js#189

Merged
punitarani merged 1 commit into
mainfrom
claude/rename-npm-fli-js
May 24, 2026
Merged

chore(npm): rename package to unscoped fli-js#189
punitarani merged 1 commit into
mainfrom
claude/rename-npm-fli-js

Conversation

@punitarani

@punitarani punitarani commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

Rename the npm package from the scoped @punitarani/fli to the available unscoped name fli-js, so install and import are the same clean bare name — no scope, no install alias:

npm i fli-js
import { SearchFlights } from "fli-js";

Why

The unscoped fli name is owned by another npm account (so we can't publish it), and @punitarani/fli forces consumers to import the scoped specifier (from "@punitarani/fli"). The import specifier must equal the published package name, so the only way to get a clean import … from "<name>" with a plain install is to name the package that. fli-js is free, matches the directory, and reads as "fli for JS".

Changes (publish name + docs only)

  • fli-js/package.json: name @punitarani/flifli-js
  • .github/workflows/publish-npm.yml: environment urlhttps://www.npmjs.com/package/fli-js
  • fli-js/README.md: install command, import examples, and module subpath labels (fli-js/models etc.) use fli-js
  • CLAUDE.md, docs/guides/release.md, docs/guides/release-npm.md: refer to the package as fli-js

No source changes (internal imports are relative); 261 tests + typecheck + lint pass locally. --access public / publishConfig.access remain valid for an unscoped public package, and provenance is unchanged.

Notes

  • Supersedes docs(fli-js): import as "fli" via alias install #188 (alias-install approach), which I'm closing.
  • version is left at 0.0.4; the next release-npm bumps to 0.0.5 and publishes fli-js@0.0.5. (If you'd prefer the first fli-js release to start at 0.1.0/1.0.0, say so and I'll adjust.)
  • The previously published @punitarani/fli@0.0.3 stays on npm; you can npm deprecate it to point users at fli-js if you like.

https://claude.ai/code/session_01R2vZihmSWV2wvRawjF4Gjo


Generated by Claude Code

Greptile Summary

Renames the npm package from the scoped @punitarani/fli to the unscoped fli-js, enabling a clean npm i fli-js / import … from "fli-js" experience without an install alias. All changes are publish-metadata and documentation only — no source files or internal relative imports are touched.

  • fli-js/package.json: name field is the sole functional change; exports, publishConfig, engines, and dependencies are unchanged and remain valid for an unscoped public package.
  • Workflow & docs: The GitHub Actions environment URL and all documentation references (CLAUDE.md, release.md, release-npm.md, README.md) are updated consistently to fli-js; the README also incidentally fixes a pre-existing inconsistency where module subpaths were listed as fli/models rather than the correct scoped form.

Confidence Score: 5/5

Safe to merge — the change is a publish-metadata rename with no source, logic, or workflow behavior modifications.

Every changed line is either the package name field, the npm environment URL, or a documentation string. Internal imports are all relative and unaffected. The publish workflow's tarball discovery uses a *.tgz glob that works correctly with the new filename fli-js-X.Y.Z.tgz. No test, build, or auth logic is modified.

No files require special attention.

Important Files Changed

Filename Overview
fli-js/package.json Package name field renamed from @punitarani/fli to fli-js; all other fields (exports, publishConfig, engines, dependencies) are unchanged and remain valid for an unscoped public package.
.github/workflows/publish-npm.yml Single-line update to the GitHub environment URL to point at the new fli-js npm page; publish logic and tarball discovery are unaffected by the rename.
fli-js/README.md Install command, all import examples, and module subpath labels updated from @punitarani/fli to fli-js; also fixes a pre-existing inconsistency where subpaths were listed as fli/models instead of the correct scoped form.
CLAUDE.md Single reference to the npm package name updated from fli to fli-js.
docs/guides/release-npm.md Package name and npmjs.com URL updated from fli to fli-js.
docs/guides/release.md Cross-reference to the JS package updated from fli to fli-js.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant npm as npmjs.com

    Dev->>GH: Trigger release-npm workflow
    GH->>GH: Run tests, lint, typecheck (fli-js-tests job)
    GH->>GH: Build dist/ (release-build job)
    GH->>GH: npm pack → fli-js-X.Y.Z.tgz
    GH->>GH: Upload artifact (npm-tarball)
    GH->>npm: npm publish fli-js-X.Y.Z.tgz --provenance --access public
    npm-->>GH: Published: https://www.npmjs.com/package/fli-js
    GH-->>Dev: Environment URL updated to fli-js page
Loading

Reviews (1): Last reviewed commit: "chore(npm): rename package to unscoped f..." | Re-trigger Greptile

The unscoped `fli` name is owned by another npm account, and the scoped
`@punitarani/fli` forces consumers to import the scoped specifier. Rename
to the available unscoped name `fli-js` so install and import are the same
clean bare name with no scope and no install alias:

  npm i fli-js
  import { SearchFlights } from "fli-js";

- fli-js/package.json: name @punitarani/fli -> fli-js
- publish-npm.yml: environment url -> npmjs.com/package/fli-js
- fli-js/README.md: install + import examples + module subpaths use fli-js
- CLAUDE.md / docs/guides/release*.md: refer to the package as fli-js

Publish name only; no source changes (internal imports are relative).
The already-published @punitarani/fli@0.0.3 is left as-is.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    5 files  ±0     56 suites  ±0   1m 7s ⏱️ +7s
  659 tests ±0    659 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 861 runs  ±0  1 861 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ff7ffc9. ± Comparison against base commit 88d9d1d.

@punitarani punitarani merged commit ed65504 into main May 24, 2026
13 checks passed
@punitarani punitarani deleted the claude/rename-npm-fli-js branch May 24, 2026 02:46
punitarani pushed a commit that referenced this pull request May 24, 2026
Main's #189 renamed the npm package to the unscoped `fli-js`, but the
TypeScript examples and docs still imported from `fli` and pinned
`fli@^0.0.2` — which now resolves to an unrelated npm package. Point all
imports, install commands, package links, and the example dependency at
`fli-js` (^0.0.4). Also future-proof the README's TS snippet date.

Typechecked the example scripts against the local fli-js source (tsc, 0 errors).

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp
punitarani added a commit that referenced this pull request May 24, 2026
* docs(examples): split examples by language and add TypeScript set

Reorganize examples/ into examples/python/ and examples/typescript/ so the
two libraries have parallel, comparable example sets.

- Move the 11 existing Python scripts under examples/python/.
- Add Python examples for previously-undocumented capabilities:
  multi_city_search.py and advanced_filters_search.py (alliances,
  airline exclusions, layover bounds, currency/locale).
- Add a mirrored TypeScript example set under examples/typescript/
  (one-way, round-trip, dates, multi-city, advanced filters, error
  handling) with a runnable package.json/tsconfig and README.
- Rewrite the top-level examples README as a language index and add
  per-language READMEs. Drop the inaccurate "automatic dependency
  checking" claim the scripts never implemented.

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp

* docs: restructure into Python + TypeScript sections

Reorganize the documentation site so each library has its own section,
and add first-class TypeScript docs (previously Python-only).

- Move Python docs under docs/python/ (quickstart, examples, api/) and
  fix their internal links and example paths (examples/ -> examples/python/).
- Add docs/typescript/ (quickstart + examples) covering install, one-way,
  round-trip, dates, multi-city, filters/alliances/locale, client config,
  and typed errors.
- Rewrite docs/index.md as a dual-language landing page.
- Update mkdocs nav for the Python/TypeScript split and drop the
  Contributing/Releasing section. Exclude the internal release runbooks
  from the built site via exclude_docs while keeping the files in-repo.
- Update the README example paths, add a TypeScript section, and drop the
  inaccurate "automatic dependency checking" claims.

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp

* docs: remove internal maintainer release runbooks

Delete docs/guides/release.md and docs/guides/release-npm.md. These are
maintainer-internal release runbooks that don't belong on the public docs
site; the same process is summarized in CLAUDE.md and is fully defined by
the release workflows themselves.

Replaces the earlier exclude_docs approach with outright removal and fixes
the now-dangling references in CLAUDE.md, AGENTS.md, and publish.yml.

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp

* docs: guard nullable price and use future-proof dates in TS examples

Address Greptile review on PR #186:
- FlightResult.price is `number | null`; print `?? "N/A"` instead of
  rendering `$null` for premium-cabin results Google doesn't price.
- Replace hardcoded travel dates (which fail FlightSegment's "Travel date
  cannot be in the past" check once they pass) with dynamic `inDays(N)`
  dates, matching the runnable example scripts.

Applied across all affected TS example scripts and the TS docs snippets,
not just the two flagged lines, since they share the same patterns.

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp

* docs: update TypeScript references from fli to fli-js

Main's #189 renamed the npm package to the unscoped `fli-js`, but the
TypeScript examples and docs still imported from `fli` and pinned
`fli@^0.0.2` — which now resolves to an unrelated npm package. Point all
imports, install commands, package links, and the example dependency at
`fli-js` (^0.0.4). Also future-proof the README's TS snippet date.

Typechecked the example scripts against the local fli-js source (tsc, 0 errors).

https://claude.ai/code/session_01VPkFrjXBZkS8Cjzc82X5tp

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants