npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@syncrona/mirror

v1.1.0

Published

Full-instance ServiceNow git mirror engine for SyncroNow AI: deterministic, byte-stable serialization of Table API rows into a git-friendly working tree.

Downloads

32

Readme

@syncrona/mirror

| npm | node | license | CI | TypeScript | |:--:|:--:|:--:|:--:|:--:|

Instance mirror engine for SyncroNow AI — the read-only pipeline that turns a ServiceNow instance into a byte-stable local tree, so that an unchanged instance produces an unchanged tree and every diff means something.

The full design lives in docs/design/mirror-architecture.md. This package implements it stage by stage; the sections below describe what is shipped today.

What lives here

Serializer (src/serialize/serializer.ts)

One Table API row in, the canonical value set for that record out. This is the single place where "what the instance said" becomes "what git will see".

  • serializeRow(row, tableEntry) — the whole stage, as one pure function.
  • canonicalJsonText(value) / canonicalJsonBytes(value) — the canonical rendering of any JSON-shaped value.
  • encodeUtf8(text) — UTF-8 bytes, never a BOM.
  • withTrailingNewline(contents) — exactly one trailing newline, nothing else touched.

The canonical byte format (architecture §8), each rule implemented once:

| Rule | Effect | |---|---| | Sorted keys | Object keys ascending by UTF-16 code unit, at every nesting level | | Empties dropped | "" is absence, not a value — the Table API returns every column | | Suppression | Noise and denied columns are absent entirely | | Extraction | Scripts, styles and templates become sibling files with a trailing newline | | JSON blobs | Parsed and re-emitted canonically; unparsable content is kept verbatim behind a raw: marker and reported | | Encoding | UTF-8, LF, exactly one trailing newline, two-space indent, no BOM |

Design notes

The serializer is pure (INV-7): a function of the row and the catalog entry and of nothing else — no config, no clock, no filesystem, no environment, no module-level state. That is not a style rule. The mirror's value is that a re-run diffs to nothing, and any hidden input turns a re-run into a whole-tree diff. test/serializerPurity.test.ts walks the module's import graph and fails if a forbidden dependency, ambient global or module-level mutable binding appears.

The emitted bytes are versioned (INV-8). Every rule above is pinned by a golden fixture under test/golden/serializer/, and the fixtures are pinned to FORMAT_VERSION. Changing what the serializer emits is therefore not a refactor: it requires bumping FORMAT_VERSION and shipping a migration, because every mirror already on disk would otherwise rewrite itself on the next run.

Naming is normalized, content never is. Extracted file names are NFC-normalized (D18) so macOS and Linux agree on the path; file contents are reproduced byte for byte, because the mirror records what the instance has.