open-index/open-npm huggingface dataset:
npm package: @replit/ruspty
Description: A very thin wrapper around PTYs and processes.
Author: Szymon Kaliski
Latest version: 3.7.0

# `@replit/ruspty` - PTY for JavaScript through Rust FFI

A very thin wrapper around PTYs and processes.

```ts
const { Pty } = require('@replit/ruspty');

const pty = new Pty({
  command: '/bin/sh',
  args: [],
  envs: {},
  size: { rows: 24, cols: 80 },
  onExit: (...result) => {
    // TODO: Handle process exit.
  },
});

const read = pty.read;
const write = pty.write;

read.on('data', (chunk) => {
  // TODO: Handle data.
});
write.write('echo hello\n');
```

## Local Development

- `npm install`
- `npm run build`
- `npm run test`

## Publishing

Following ["Publish It" section from `napi-rs` docs](https://napi.rs/docs/introduction/simple-package#publish-it):

1. `git clean -f && npm install && npm run build`
2. `npm version [major|minor|patch]`
3. Send that as a Pull Request to GitHub. Ensure that the commit message consisting **only** of `x.y.z` - this is how the CI decides to publish to `npm`!

Configure npm trusted publishing for `replit/ruspty` with the workflow filename `CI.yml` before merging a version bump PR. The publish job now uses GitHub OIDC, so `NPM_TOKEN` is no longer required.
npm package: @replit/typescript-prettier-language-service
Description: TypeScript language service plugin for Prettier
Latest version: 0.0.2
Deprecated: tsserver cannot deal with scoped packages, package moved to typescript-prettier-language-service

# typescript-prettier-language-service

TypeScript language service plugin to format using prettier. Supports range formatting and document formatting.

## Issues
Leave a comment on our [cover page](https://replit.com/@util/typescript-prettier-language-service)

## Development

To develop on Replit
- fork this Repl
- hit the Run button to start compiling and watching changes
- make changes in `src/index.ts`
- when you want to test your changes:
  - make an edit to the `languages.typescript` field (e.g. you can change `hostInfo`) to trigger the LSP server to restart and pick up the changes
  - use the `logs` folder to read logs and debug

It is possible to hook-up a debugger to this using debug protocol, but it is not [configured](https://docs.replit.com/programming-ide/configuring-repl#debugger).

## TODOs:

- Only activate plugin when prettier is installed
- Allow configuring .editorConfig option
- Watch workspace to and clear prettier config cache when relevant
- Implement getFormattingEditsAfterKeystroke
- Combine spans that are both an addition and deletion in minimalEdits
npm package: @replit/ui
Description: React components for Repl.it UI
Author: moudy@repl.it
Latest version: 0.0.53

# Repl.it UI

[![Run on Repl.it](https://repl.it/badge/github/replit/ui)](https://repl.it/github/replit/ui)

React components for repl.it

## Usage

```sh
npm install @replit/ui
```

```tsx
import { ROOT_THEME_CLASS } from '@replit/ui';
import Styles from '@replit/ui/Styles';

// Include <Styles /> on every pages to apply global css variables
const Layout = () => (
  <body>
    <Styles />
    <div className={ROOT_THEME_CLASS}>{content}</div>

    {/* Add "dark" class for dark theme */}
    <div className={ROOT_THEME_CLASS + ' dark'}>{content}</div>
  </body>
);

// Use a component
import Button from '@replit/ui/Button';

const Dialog: React.FC<{ /* ... */ }> = (props) => (
  <div>
    {props.children}
    <Button onClick={props.onClick}>Ok</Button>
  </div>
);
```

## Development

### Heuristics: when do we move components into here?
1. If there are designs for a component already and you are touching it a lot OR it’s completely new, move it in and implement. It should be there.
2. If there are no new designs, but it’s very simple / dumb, if most of the redesign would just be CSS changes, move it into the UI lib, convert it to typescript, and Tyler (I) will go in and redesign it later.
3. If there are no new designs and it’s complicated, don’t move it, we’ll deal with it later.

### Install packages:

```sh
npm install
```

### Running:

```sh

// For cosmos workshop
npm run dev

// For nextjs docs app
npm run dev:next

# or run inside docker
docker run -it --rm -v (pwd):/app -w /app -p 3000:3000 node:13-alpine npm run dev
```

### Principles:

- Generally, components are self-contained in their respective `tsx` files.
- Theming is managed by changing the values of CSS variables. Individual components should have no concept of a theme.


### Publishing a new version:
Generally we do this in three steps:

1. Make a PR titled with the version number you are upgrading to, e.g. `0.0.30` or `bump to 0.0.030`. Make sure you increment by one from the previous version.
2. Merge into master
3. Go back to master and run `npm run dist` inside the directory. This will package everything up and publish to NPM.

This creates a special `package.json` file in `/dist` specifically for publishing to npm. Ultimately, this allows us to import components individually without adding "dist" to any component's import path. For example:

`import Button from '@replit/ui/Button'`

instead of:

`import Button from '@replit/ui/dist/Button'`

We set `private: true` and added an error message `prepublishOnly` to prevent accidentally publishing from the root using `npm publish.` directly.