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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jinaga

v6.1.1

Published

Data management for web and mobile applications.

Downloads

356

Readme

Jinaga

End-to-end application state management framework.

Add Jinaga.JS to a client app and point it at a Replicator. Updates are sent to the Replicator as the user works with the app. Any changes that the app needs are pulled from the Replicator.

Install

Install Jinaga.JS from the NPM package.

npm i jinaga

This installs just the client side components. See jinaga.com for details on how to use them.

Running a Replicator

A Jinaga front end connects to a device called a Replicator. The Jinaga Replicator is a single machine in a network. It stores and shares facts. To get started, create a Replicator of your very own using Docker.

docker pull jinaga/jinaga-replicator
docker run --name my-replicator -p8080:8080 jinaga/jinaga-replicator

This creates and starts a new container called my-replicator. The container is listening at port 8080 for commands. Configure Jinaga to use the replicator:

import { JinagaBrowser } from "jinaga";

export const j = JinagaBrowser.create({
  httpEndpoint: "http://localhost:8080/jinaga"
});

Breaking Changes

If you are upgrading from an older version, you may need to update your code.

Changes in version 4.0.0

In version 4.0.0, the server side code has been moved to a separate package. This allows you to build a client using Create React App and connect it to a Replicator.

When upgrading, take the following steps:

  • Install the jinaga-server package.
  • Remove the 'jinaga' alias from 'webpack.config.js'.
  • Import JinagaServer from 'jinaga-server'.
  • Rename any references of Specification<T> to SpecificationOf<T>, and Condition<T> to ConditionOf<T>. These are used as return types of specification functions. It is uncommon to be explicit about them.

Changes in version 3.1.0

The name of the client-side script changed from jinaga.js to jinaga-client.js. In webpack.config.js, update the jinaga alias from jinaga/dist/jinaga to jinaga/dist/jinaga-client.

Changes in version 3.0.0

In version 3 of Jinaga.JS, the has function takes two parameters. The second is the name of the predecessor type. In version 2, the function took only one parameter: the field name.

To upgrade, change this:

function assignmentUser(assignment) {
  ensure(assignment).has("user");
  return j.match(assignment.user);
}

To this:

function assignmentUser(assignment) {
  ensure(assignment).has("user", "Jinaga.User");
  return j.match(assignment.user);
}

Build

To build Jinaga.JS, you will need Node 16.

npm ci
npm run build
npm test

Release

To release a new version of Jinaga.JS, bump the version number, create and push a tag, and create a release. The GitHub Actions workflow will build and publish the package.

git c main
git pull
npm version patch
git push --follow-tags
gh release create v$(node -p "require('./package.json').version") --generate-notes --verify-tag