Skip to content

Release: cjconv CLI, multi-input merge, npm publish workflows - #4

Merged
HideBa merged 5 commits into
mainfrom
develop
Oct 11, 2026
Merged

HideBa merged 5 commits into
mainfrom
develop

Conversation

@HideBa

@HideBa HideBa commented Oct 11, 2026

Copy link
Copy Markdown
Member
  • Monorepo: packages/core (@cityjson/cjconv-core), packages/cjconv (@cityjson/cjconv, the cjconv CLI), apps/web
  • cjconv CLI and Node library (convertFile / inspectFile)
  • Several inputs of one dataset combined into one output (CLI, library, website)
  • Publish to npm (workflow dispatch: patch/minor/major, dry run) and release (GitHub release after a successful publish)

CI on develop passed.

…, apps/web)

src/core becomes @cityjson/cjconv-core, unchanged; the website moves to apps/web and
imports it by package name. packages/cjconv holds the native DuckDB engine and the
integration tests, ready for the CLI. Shared lint/format config stays at the root,
with the no-React/DuckDB/Node rule now on packages/core. docs/cli.md is the plan.
@cityjson/cjconv converts between CityJSON, CityJSONSeq, FlatCityBuf, CityParquet
packages and OBJ natively with @duckdb/node-api and the community cityjson extension:

  cjconv <input> <output> [--to --from --lod --attributes --no-attributes
                           --obj-lod --crs --extension --force]
  cjconv info <input> [--json]

convertFile() and inspectFile() are the library API the CLI wraps. Inputs are local
files, package directories or URLs; the output format comes from the output name
(a trailing / is a package). Existing outputs are kept unless --force; unknown LoDs
and attributes are named; OBJ reports when the extension build predates it.

Core: inspect() reports the object count, and an OBJ COPY returns only the files it
wrote (the .obj, its .mtl and what appeared), not its whole directory. The Node engine
returns BIGINT as number, as the Engine contract says. CI packs both packages and
runs the built CLI; the deploy builds apps/web.
A new Source kind, merge, takes several files (CityJSON, CityJSONSeq, FlatCityBuf,
OBJ) and exports them as one: a single COPY over all of them by column name, or
for a CityParquet package the extension's insert_* pragmas, one input after another.

It refuses, before writing, what would need a guess: an id in more than one input,
a column typed differently between inputs, different CRSs, and materials/textures
across inputs (their ids are per file). A column only some inputs have is NULL in
the rest.

cjconv takes several inputs before the output (cjconv a b c out.fcb), and info
summarises them together; convertFile/inspectFile accept string[]. The website
merges when several CityJSON-family files are dropped at once.
publish.yml (manual, from main): choose patch/minor/major (or a dry run); it checks
and tests the packages, bumps @cityjson/cjconv-core and @cityjson/cjconv to one new
version (scripts/bump-version.mjs), builds, publishes with provenance, then pushes a
`release: vX.Y.Z` commit and tag to main and merges it back into develop.

release.yml runs when that succeeds: it takes the latest version on npm and creates
its GitHub release with generated notes and both tarballs. A version that already has
a release is skipped, so a dry run creates nothing. It can also be run by hand.

The packages start at 0.0.0, so the first `minor` publishes 0.1.0.
@HideBa
HideBa merged commit f62a776 into main Oct 11, 2026
2 checks passed
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.

1 participant