@percy/playwright 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +7 -7
package/index.js CHANGED
@@ -1,5 +1,3 @@
1
- const utils = require('@percy/sdk-utils');
2
-
3
1
  // Collect client and environment information
4
2
  const sdkPkg = require('./package.json');
5
3
  const playwrightPkg = require(require.resolve('./package.json', { paths: [__dirname] }));
@@ -8,6 +6,8 @@ const ENV_INFO = `${playwrightPkg.name}/${playwrightPkg.version}`;
8
6
 
9
7
  // Take a DOM snapshot and post it to the snapshot endpoint
10
8
  async function percySnapshot(page, name, options) {
9
+ let utils = await import('@percy/sdk-utils');
10
+
11
11
  if (!page) throw new Error('A Playwright `page` object is required.');
12
12
  if (!name) throw new Error('The `name` argument is required.');
13
13
  if (!(await utils.isPercyEnabled())) return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@percy/playwright",
3
3
  "description": "Playwright client library for visual testing with Percy",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "license": "MIT",
6
6
  "author": "Perceptual Inc.",
7
7
  "repository": "https://github.com/percy/percy-playwright",
@@ -17,7 +17,7 @@
17
17
  "types/index.d.ts"
18
18
  ],
19
19
  "engines": {
20
- "node": ">=12"
20
+ "node": ">=14"
21
21
  },
22
22
  "scripts": {
23
23
  "lint": "eslint --ignore-path .gitignore .",
@@ -29,14 +29,14 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@percy/sdk-utils": "^1.0.0-beta.69"
32
+ "@percy/sdk-utils": "^1.0.4"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "playwright": ">=1"
36
36
  },
37
37
  "devDependencies": {
38
- "@percy/core": "^1.0.0-beta.69",
39
- "@playwright/test": "^1.16.1",
38
+ "@percy/core": "^1.0.4",
39
+ "@playwright/test": "^1.20.0",
40
40
  "cross-env": "^7.0.2",
41
41
  "eslint": "^7.18.0",
42
42
  "eslint-config-standard": "^16.0.2",
@@ -45,7 +45,7 @@
45
45
  "eslint-plugin-promise": "^5.1.0",
46
46
  "eslint-plugin-standard": "^5.0.0",
47
47
  "nyc": "^15.1.0",
48
- "playwright": "^1.16.1",
49
- "tsd": "^0.18.0"
48
+ "playwright": "^1.20.0",
49
+ "tsd": "^0.20.0"
50
50
  }
51
51
  }