open-index/open-npm huggingface dataset:
npm package: @guardian/pkgu
Description: Automatically build @guardian packages for publishing to NPM inline with our recommendations.
Latest version: 0.6.2

# `@guardian/pkgu`

<img src="https://user-images.githubusercontent.com/867233/118273242-9f558c80-b4bb-11eb-92f5-d1c2b9b8079b.png" height="191" alt="pikachu box">

> Automatically build `@guardian` packages for publishing to NPM inline with [our recommendations](https://github.com/guardian/recommendations/blob/master/npm-packages.md).

[![npm (scoped)](https://img.shields.io/npm/v/@guardian/pkgu)](https://www.npmjs.com/package/@guardian/pkgu)

## Installation

[![Generic badge](https://img.shields.io/badge/google-chat-259082.svg)](https://chat.google.com/room/AAAAWwBdSMs)

```bash
yarn add -D @guardian/pkgu
```

or

```bash
npm install -D @guardian/pkgu
```

## Usage

`@guardian/pkgu` installs a CLI tool called `pkgu` that you can use to create your build.

### Commands

#### `build`

##### Example

```js
// package.json
{
    ...,
    "scripts": {
        "prebuild": "rm -rf dist",
        "build": "pkgu build"
    },
    ...,
}
```

This will compile your project to a `dist` directory ready for publishing, performing the following steps:

1. Lint your `package.json` and `tsconfig.json` files and update/add/remove any fields as necessary.
2. Compile 3 versions of your project:
    1. CommonJS version targetting ES2018 (for Node 10+).
    2. ESM version targetting ES2020 for use by bundlers (see [Using `@guardian` NPM packages](https://github.com/guardian/recommendations/blob/master/npm-packages.md#using-guardian-npm-packages) in the recommendations for more info).
    3. TypeScript declaration files.
3. Check that the build artefacts match the `package.json` config.
4. If your package provides a CLI it will set the permissions needed to make it executable.

You should then be good to publish.

## Requirements

-   Your source code is written in TypeScript.
-   The source code lives in a directory called `src` at the package root level.
-   There is one entry point: `src/index.ts`.
npm package: @guardian/prosemirror-invisibles
Description: A plugin to show invisibles in prosemirror
Author: Richard Beddington
Latest version: 3.1.3

# prosemirror-invisibles
A simple implementation of invisible characters in [ProseMirror](https://prosemirror.net/).

Demo [here.](https://guardian.github.io/prosemirror-invisibles/)

---

## Install
`npm install @guardian/prosemirror-invisibles`

## Usage
Add the plugin to the state and pass the invisibles you would like to display in the document.
```javascript
import invisibles, { space, hardBreak, paragraph } from 'prosemirror-invisibles';

new EditorView(document.querySelector("#editor"), {
  state: EditorState.create({
    doc: DOMParser.fromSchema(mySchema).parse(
      document.querySelector("#content")
    ),
    plugins: [
      invisibles([space(), hardBreak(), paragraph()])
    ]
  })
});
```

And import the css from `prosemirror-invisibles/dist/invisibles.css`.

## A note on line-break invisibles and selections

At the time of writing, Chrome, Firefox and Safari all provide limited feedback when rendering a selection that includes a line break – the selection and cursor does not change until content after the break is highlighted. Below, you can see there is a selection position that includes the linebreak which is not visible to users:

![No clear indication when we've selected across the paragraph boundary. Taken in Firefox](https://user-images.githubusercontent.com/7767575/196673262-27f8bd5f-ea43-4139-805e-59576d06aaab.gif)

This is problematic for invisible characters that represent line breaks (paragraphs, soft returns, etc.) – we must include line break invisibles when they're part of a selection, or we risk misleading the user by implying that line breaks are not part of a selection when they are.

Including content in the decorations representing invisible characters introduces problems with layout and cursor behaviour, so at present we fake this by adding an additional span within these decorations when they're part of a selection. We can then add a width to the span, and give it a background colour that's identical to the text selection. This kludge gives us the behaviour we expect:

![Selecting invisibles provides a clear indication when we've selected across the paragraph boundary. Taken in Firefox](https://user-images.githubusercontent.com/7767575/196673269-9f8794a6-91c0-432b-a4c6-ec54a9a12e40.gif)

Adapting this styling may be necessary in your own editor to ensure that the impostor span's colour and size are correct. We recommend removing this styling if this behaviour isn't desirable. Finally, we'd love a better solution to this problem – any suggestions most welcome!

## Running locally 

To run the sandbox locally run: 

```yarn watch```
npm package: @guardian/rocky
Description: friend of riff-raff
Author: Alex Ware
Latest version: 0.0.7

# Rocky

Rocky writes all your cloudformation and riff-raff configuration for you.

```ts
const rocky = new Rocky({
  name: "Rocky",
  url: "https://github.com/guardian/Rocky"
  parameters: {
    "parameterName":{
      description: "This is where some data goes"
    }
  }
})

const deployment = rocky.deployment({
  name: "deployment",
  path: "./dist"
})

const lambda = rocky.lambda({
  name: "lambda",
  handler: "index.handler",
  deployment
})

```
npm package: @guardian/slot-machine-client
Description: Client lib for Slot Machine
Author: Nicolas Long
Latest version: 0.2.7
Deprecated: This project has been renamed to @guardian/automat-client

# @guardian/slot-machine-client

A basic (JS) client for Slot Machine. If you are reading this and don't know
what Slot Machine is, this library is probably not useful for you.

## Local dev

### Watch for changes

```
$ yarn dev
```

### Point a project to your local version of slot-machine-client

With [`yarn link`] you can develop against a locally checked out version of
this client:

In your local checkout of `slot-machine-client`:

```
$ yarn link
```

And then in the project consuming the client:

```
$ yarn link "@guardian/slot-machine-client"
```

To revert back to using the published version of the package:

```
$ yarn unlink "@guardian/slot-machine-client"
$ yarn install --force
```

[`yarn link`]: https://classic.yarnpkg.com/en/docs/cli/link/

NOTE: Ensure you build this library before adding it locally to your project, by running `yarn build`.

## Publishing

On your feature branch, increment the version in the `package.json` file.
Once we hit version 1 we should use semver when doing this.

Once the feature branch is merged into master, run:

    yarn publish

This will build and then publish to NPM.

You can then update the clients!

Note: you'll need to be part of the @guardian org on npm to do this.\
Speak to a suitable person if you don't have access.