open-index/open-npm huggingface dataset:
npm package: @oc-digital/data-snippets
Description: A shared graphql snippets package
Latest version: 6.13.0

# OC-Digital graphql snippets library

## Local development usage

For use during early testing on your machine:

1. In the downstream app run `npm install ../data-snippets` (use the path to this repo)
2. Start your downstream app in watch mode (for Partners this is just npm start)
3. In here, run `npm run build` (you'll need to re-run this after making changes)
4. It will use the latest locally-built version in the downstream app

> **Note**
> Don't commit the `package.json` change to github! It won't work on the code build system.

## Beta usage

When you've tested it locally and its working, do a beta deploy as follows:

1. check the package version in `package.json` and increment it according to semantic versioning (details below)
2. run `npm version 2.0.7-beta.0` using the incremented package version followed by `-beta.0` for testing
   - increment it to `2.0.7-beta.1` for further beta tests
3. run `npm publish --tag beta` to publish to npm (don't forget the `--tag beta`!)
4. in the downstream app run `npm install @oc-digital/data-snippets@x.y.z-beta.0` replacing with your version number

## Publishing a new version

1. Update the version in `package.json`
2. Create and push a git tag:
   ```bash
   git tag v1.2.3
   git push origin v1.2.3
   ```

**The package will be automatically published to npm via GitHub Actions.**

## Versioning

This package uses [semantic versioning](https://semver.org/).

To summarise the above link:

- The version is in the format MAJOR.MINOR.PATCH.
- If you make a breaking change (eg you remove a snippet or fields from a snippet), increment the MAJOR version.
- If you add a new snippet, increment the MINOR version.
- If you add fields to an existing snippet, increment the PATCH version.