open-index/open-npm huggingface dataset:
npm package: @researchgate/file-processor
Description: Run parallel tasks on a multiple files
Author: Sergey Tatarintsev
Latest version: 3.2.0

# file-processor

[![Build Status](https://travis-ci.com/researchgate/node-file-processor.svg?branch=master)](https://travis-ci.com/researchgate/node-file-processor)
[![codecov](https://codecov.io/gh/researchgate/node-file-processor/branch/master/graph/badge.svg)](https://codecov.io/gh/researchgate/node-file-processor)

Node.js utility for mass-processing files in parallel.

## Usage

Files are handled in parallel running workers. In order to use the library you
need 2 modules.

### Worker module

Must export single function, accepting `fileName` and `callback`. This function
must process the file and call the `callback` when it is done. Function can be
asynchronous.

```js
module.exports = function (fileName, callback) {
  const result = doExpensiveProcessing(fileName);
  callback(null, result);
};
```

### Main module

Must use `FileProcessor` class and provide a it one or more glob patterns and
path to worker module. Each file, matching the pattern will be processed by
worker module.

```js
const FileProcessor = require('@researchgate/file-processor');
const processor = new FileProcessor(
  ['path/to/some/files/*.txt', 'some/other/path/*.js'],
  require.resolve('./worker')
);

processor.on('processed', (fileName, result) => {
  console.log(`result for ${fileName}: ${result}`);
});
```

`FileProcessor` instace emits following events:

- `queued` - file is queued for processing.

  Arguments:

  - `fileName`

* `processed` - file is successfully processed by worker.

  Arguments:

  - `fileName`
  - `result` - the result, returned by worker module

* `error` - worker failed to process the file

  Arguments:

  - `error`

* `allQueued` - all files, matching the pattern are queued for processing.

  Arguments:

  - `stats` - object with the following field

    - `queuedCount` - total number of queued files
    - `processedCount` - total number of files which are already processed

* `end` - all files are processed.
npm package: @researchgate/jest-file-snapshot
Description: Jest matcher to write snapshots to a separate file instead of the default snapshot file used by Jest. Writing a snapshot to a separate file means you have proper syntax highlighting in the output file, and better readability without those pesky escape cha
Author: Satyajit Sahoo
Latest version: 0.3.8

# jest-file-snapshot

Jest matcher to write snapshots to a separate file instead of the default snapshot file used by Jest. Writing a snapshot to a separate file means you have proper syntax highlighting in the output file, and better readability without those pesky escape characters.

## Installation

```sh
npm install --save-dev jest-file-snapshot
```

or

```sh
yarn add --dev jest-file-snapshot
```

## Usage

Extend Jest's `expect`:

```js
import { toMatchFile } from 'jest-file-snapshot';

expect.extend({ toMatchFile });
```

Then use it in your tests:

```js
it('matches content of file on disk', () => {
  expect(content).toMatchFile();
});
```

The content passed can be of type String or a Buffer. Only if the Buffer is holding binary data, will the comparison be done using Buffer.equals() instead of ===.

The matcher takes two optional arguments:

- `filepath`: path to the file whose content should be matched, e.g. `expect(content).toMatchFile(path.join(__dirname, 'output.md'))`
- `options`: additional options object for the matcher, with following properties:
  - `diff`: options for [`jest-diff`](https://github.com/facebook/jest/tree/master/packages/jest-diff)

You should also [exclude the output files from Jest's watcher](https://jestjs.io/docs/en/configuration#watchpathignorepatterns-array-string) so that updating the snapshot doesn't re-run the tests again.

For example, by default `toMatchFile` uses a folder named `__file_snapshots__` which you can exclude by adding the following under the `jest` key in `package.json`:

```json
"watchPathIgnorePatterns": [
  "__file_snapshots__"
]
```

## Credits

- [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot)
npm package: @researchgate/snapshotkeeper
Description: <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Latest version: 4.0.3

# snapshotkeeper

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Usage](#usage)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

CLI tool for BitBucket Server for maintaining test snapshots in flaky
environments.

## Usage

```sh
# Install `snapshotkeeper`
yarn global add @researchgate/snapshotkeeper

# Prepare to update flaky snapshots
yarn snapshotkeeper-prepare

# Run your tests with `--updateSnapshot` flag
yarn test --updateSnapshot

# Upload changed snapshots
yarn snapshotkeeper-upload
```
npm package: @researchgate/spire-config
Description: Spire config for ResearchGate projects
Author: Sergey Bekrin
Latest version: 7.0.0

# @researchgate/spire-config

Spire preset for ResearchGate projects.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Usage](#usage)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Usage

1. Install both `@researchgate/spire-config` and `spire` as dev dependencies:

```sh
yarn add --dev @researchgate/spire-config spire
```

2. Set `spire` config in `package.json`

```json
{
  "spire": {
    "extends": "@researchgate/spire-config"
  }
}
```

## License

MIT &copy; [ResearchGate](https://github.com/researchgate)
npm package: @resee-movies/nuxt-analytics
Description: Google Analytics Opt-In integration using vanilla-cookieconsent.
Latest version: 0.2.1

# ReSee Movies Nuxt Analytics
Google Analytics integration with [vanilla-cookieconsent](https://www.npmjs.com/package/vanilla-cookieconsent).

> [!IMPORTANT]
> This package makes every attempt to adhere to privacy-focused best practices. By default, all [Consent Mode](https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced)
> configuration is strictly opt-in.


## Installation
```sh
npm i @resee-movies/nuxt-analytics
```
```ts
// nuxt.config.ts
export default defineNuxtConfig({
  // Add it to the app's modules list
  modules: [
    '@resee-movies/nuxt-analytics',
  ],
  
  // Provide configuration
  analytics: {
    id: 'G-TAG_ID', // Minimum requirement
  },
});
```


## Usage
Out of the box, the only requirements is that a gtag ID be provided in the configuration. If not provided, the
module will consider itself disabled.

With a gtag ID, most of the provided functionality is on rails - if not encountered before, the consent 
configurator will display on load, and then Analytics will be configured with the indicated consent level(s).

Additional configuration can be [seen here](src/config.ts#L7).


### Composables
Because sometimes you need to do your own thing.


#### useGtag
Exposes the [Google tag API](https://developers.google.com/tag-platform/gtagjs/reference) `gtag` method for use.

```ts
import { useGtag } from '@resee-movies/nuxt-analytics/composables';

const { gtag } = useGtag();

function signUpComplete() {
  gtag('event', 'signup', 'qr-code');
}
```


#### useCookieConsent
Exposes helper methods for the consent interface.

```vue
<script setup lang="ts">
  import { useCookieConsent } from '@resee-movies/nuxt-analytics/composables';
  const { enabled, show } = useCookieConsent();
</script>

<template>
  <button v-if="enabled" @click="show">Update Your Consent Preferences</button>
</template>
```


#### useServerAnalytics
A utility method for interacting with the Google Analytics [Measurement Protocol](https://developers.google.com/analytics/devguides/collection/protocol/ga4).

> [!IMPORTANT]
> This requires that the `apiSecret` configuration value be provided in addition to `id`. Since the `apiSecret`
> is sensitive, this value is not stored in Nuxt's [public runtimeConfig](https://nuxt.com/docs/4.x/guide/going-further/runtime-config#exposing)
> and so this utility is exclusively limited to server-side operation. If invoked in client-side code, a console
> warning will be issued and the method will effectively be a noop.

```ts
import { useServerAnalytics } from '@resee-movies/nuxt-analytics/composables';

// ...

async function recordMeasurement() {
  if (import.meta.server) {
    await useServerAnalytics({
      events: [/* ... */],
    });
  }
}
```
npm package: @resee-movies/nuxt-ux
Description: The next-gen user experience library for ReSee Movies - currently in development. 
Latest version: 1.3.0

# ReSee Movies Nuxt UX

The next-gen user experience library for [ReSee Movies](https://www.reseemovies.com) - currently in development.

[Demo](https://resee-movies.github.io/nuxt-ux/)