@histoire/plugin-screenshot 0.17.15 → 0.17.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,6 @@ export default defineConfig({
24
24
  If you get an error like No usable sandbox! or Running as root without --no-sandbox is not supported, you need to properly set up sandboxing on your Linux instance.
25
25
  Alternatively, if you completely trust the content, you can disable sandboxing (strongly discouraged):
26
26
 
27
-
28
27
  ref. https://github.com/sindresorhus/capture-website#faq
29
28
 
30
29
  ```
@@ -39,4 +38,3 @@ export default defineConfig({
39
38
  ],
40
39
  })
41
40
  ```
42
-
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@histoire/plugin-screenshot",
3
- "version": "0.17.15",
3
+ "type": "module",
4
+ "version": "0.17.17",
4
5
  "description": "Histoire plugin to take screenshots for visual regression testing",
5
- "license": "MIT",
6
6
  "author": {
7
7
  "name": "Guillaume Chau"
8
8
  },
9
+ "license": "MIT",
9
10
  "repository": {
10
11
  "url": "https://github.com/Akryum/histoire.git",
11
12
  "type": "git",
@@ -14,7 +15,6 @@
14
15
  "publishConfig": {
15
16
  "access": "public"
16
17
  },
17
- "type": "module",
18
18
  "exports": {
19
19
  ".": "./dist/index.js",
20
20
  "./*": "./*"
@@ -22,6 +22,9 @@
22
22
  "main": "./dist/index.js",
23
23
  "module": "./dist/index.js",
24
24
  "types": "./dist/index.d.ts",
25
+ "peerDependencies": {
26
+ "histoire": "^0.17.17"
27
+ },
25
28
  "dependencies": {
26
29
  "capture-website": "^2.4.1",
27
30
  "defu": "^6.1.3",
@@ -30,11 +33,8 @@
30
33
  },
31
34
  "devDependencies": {
32
35
  "@types/node": "^18.11.9",
33
- "typescript": "^4.9.5",
34
- "histoire": "0.17.15"
35
- },
36
- "peerDependencies": {
37
- "histoire": "^0.17.15"
36
+ "typescript": "^5.4.4",
37
+ "histoire": "0.17.17"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "rimraf dist && tsc -d",
package/src/index.ts CHANGED
@@ -39,7 +39,7 @@ const defaultOptions: ScreenshotPluginOptions = {
39
39
  presets: [],
40
40
  }
41
41
 
42
- export function HstScreenshot (options: ScreenshotPluginOptions = {}): Plugin {
42
+ export function HstScreenshot(options: ScreenshotPluginOptions = {}): Plugin {
43
43
  const finalOptions: ScreenshotPluginOptions = defu(options, defaultOptions)
44
44
  if (!finalOptions.presets.length) {
45
45
  finalOptions.presets.push({
@@ -50,7 +50,7 @@ export function HstScreenshot (options: ScreenshotPluginOptions = {}): Plugin {
50
50
  return {
51
51
  name: '@histoire/plugin-screenshot',
52
52
 
53
- onBuild: async api => {
53
+ onBuild: async (api) => {
54
54
  const { default: captureWebsite } = await import('capture-website')
55
55
  await fs.ensureDir(finalOptions.saveFolder)
56
56
 
@@ -71,8 +71,8 @@ export function HstScreenshot (options: ScreenshotPluginOptions = {}): Plugin {
71
71
  for (const preset of finalOptions.presets) {
72
72
  const launchOptions = finalOptions.launchOptionsArgs
73
73
  ? {
74
- args: finalOptions.launchOptionsArgs,
75
- }
74
+ args: finalOptions.launchOptionsArgs,
75
+ }
76
76
  : {}
77
77
  const captureWebsiteFileOptions: FileOptions = {
78
78
  overwrite: true,
package/tsconfig.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ESNext",
4
+ // Volar
5
+ "jsx": "preserve",
6
+ "lib": [
7
+ "ESNext",
8
+ "DOM"
9
+ ],
10
+ "rootDir": "src",
4
11
  "module": "ESNext",
5
12
  "moduleResolution": "node",
6
- "outDir": "dist",
7
- "rootDir": "src",
8
- "allowSyntheticDefaultImports": true,
9
- "esModuleInterop": true,
10
- "removeComments": false,
11
13
  "resolveJsonModule": true,
12
- "skipLibCheck": true,
13
14
  "types": [
14
15
  "node"
15
16
  ],
16
- "lib": [
17
- "ESNext",
18
- "DOM"
19
- ],
20
- "sourceMap": false,
21
- "preserveWatchOutput": true,
17
+ "strictBindCallApply": true,
18
+ "strictFunctionTypes": true,
19
+ "alwaysStrict": true,
22
20
  // Strict
23
21
  "noImplicitAny": false,
24
22
  "noImplicitThis": true,
25
- "alwaysStrict": true,
26
- "strictBindCallApply": true,
27
- "strictFunctionTypes": true,
28
- // Volar
29
- "jsx": "preserve",
23
+ "outDir": "dist",
24
+ "removeComments": false,
25
+ "sourceMap": false,
26
+ "allowSyntheticDefaultImports": true,
27
+ "esModuleInterop": true,
28
+ "skipLibCheck": true,
29
+ "preserveWatchOutput": true
30
30
  },
31
31
  "include": [
32
32
  "src"