Socket
Socket
Sign inDemoInstall

@acot/acot-runner-storybook

Package Overview
Dependencies
256
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.11 to 0.0.12

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [0.0.12](https://github.com/acot-a11y/acot/compare/v0.0.11...v0.0.12) (2021-04-18)
### Features
- **acot-runner-storybook:** add `timeout` options ([41b06f9](https://github.com/acot-a11y/acot/commit/41b06f98d7f920acc6a67a1912d32a856b357c48))
## [0.0.11](https://github.com/acot-a11y/acot/compare/v0.0.10...v0.0.11) (2021-04-12)

@@ -8,0 +14,0 @@

1

lib/index.d.ts

@@ -26,2 +26,3 @@ import type { ConfigEntry } from '@acot/types';

exclude?: string[];
timeout?: number;
};

@@ -28,0 +29,0 @@ export declare class StorybookRunner extends AcotRunner<Options> {

10

lib/index.js

@@ -16,2 +16,3 @@ "use strict";

const debug = require('debug')('acot:runner:storybook');
const DEFAULT_TIMEOUT = 60 * 1000;
const isMergeableObject = (v) => Array.isArray(v) || is_plain_object_1.isPlainObject(v);

@@ -45,2 +46,6 @@ const filterStories = (stories, include, exclude) => {

},
timeout: {
type: 'number',
minimum: 0,
},
},

@@ -52,6 +57,7 @@ required: [],

async collect() {
var _a, _b;
var _a, _b, _c;
// get stories
const browser = await puppeteer_core_1.default.launch(this.config.launchOptions);
const page = await browser.newPage();
page.setDefaultTimeout((_a = this.options.timeout) !== null && _a !== void 0 ? _a : DEFAULT_TIMEOUT);
let stories = [];

@@ -76,3 +82,3 @@ try {

debug('raw stories: %O', raw);
stories = filterStories(raw, (_a = this.options.include) !== null && _a !== void 0 ? _a : [], (_b = this.options.exclude) !== null && _b !== void 0 ? _b : []);
stories = filterStories(raw, (_b = this.options.include) !== null && _b !== void 0 ? _b : [], (_c = this.options.exclude) !== null && _c !== void 0 ? _c : []);
debug('filtered stories: %O', stories);

@@ -79,0 +85,0 @@ }

{
"name": "@acot/acot-runner-storybook",
"version": "0.0.11",
"version": "0.0.12",
"description": "An acot custom runner for Storybook.",

@@ -31,6 +31,6 @@ "keywords": [

"dependencies": {
"@acot/acot-runner": "0.0.11",
"@acot/config": "0.0.11",
"@acot/runner": "0.0.11",
"@acot/schema-validator": "0.0.11",
"@acot/acot-runner": "0.0.12",
"@acot/config": "0.0.12",
"@acot/runner": "0.0.12",
"@acot/schema-validator": "0.0.12",
"debug": "^4.3.1",

@@ -43,3 +43,3 @@ "deepmerge": "^4.2.2",

"devDependencies": {
"@acot/types": "0.0.11",
"@acot/types": "0.0.12",
"@types/micromatch": "4.0.1"

@@ -50,3 +50,3 @@ },

},
"gitHead": "f837929ac56505e646f51c1cdbdd7dd7b80a84dc"
"gitHead": "eedbde034ad1495dd489be01ae11404365ecfce6"
}

@@ -82,2 +82,21 @@ # @acot/acot-runner-storybook

### `timeout`
**Type:** `number`
**Default:** `60000`
**Required:** `false`
Maximum time in milliseconds to wait for the browser instance to collect stories.
```json
{
"runner": {
"uses": "@acot/storybook",
"with": {
"timeout": 120000
}
}
}
```
## Storybook compatibility

@@ -84,0 +103,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc