comparadise-utils 1.5.6 → 1.5.8

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/commands.js CHANGED
@@ -1 +1 @@
1
- require('./dist/match-screenshot-command');
1
+ require('./dist/match-screenshot');
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchScreenshot = exports.setupVisualTests = void 0;
3
+ exports.setupVisualTests = void 0;
4
4
  const screenshots_1 = require("./screenshots");
5
5
  function setupVisualTests(on, config) {
6
6
  on('after:screenshot', screenshots_1.onAfterScreenshot);
@@ -15,5 +15,3 @@ function setupVisualTests(on, config) {
15
15
  return config;
16
16
  }
17
17
  exports.setupVisualTests = setupVisualTests;
18
- var match_screenshot_1 = require("./match-screenshot");
19
- Object.defineProperty(exports, "matchScreenshot", { enumerable: true, get: function () { return match_screenshot_1.matchScreenshot; } });
@@ -72,3 +72,4 @@ function matchScreenshot(subject, args) {
72
72
  });
73
73
  }
74
74
  exports.matchScreenshot = matchScreenshot;
75
+ Cypress.Commands.add('matchScreenshot', { prevSubject: ['optional', 'element', 'window', 'document'] }, matchScreenshot);
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "comparadise-utils",
3
3
  "main": "dist/index.js",
4
- "types": "dist/index.d.ts",
4
+ "types": "types/index.d.ts",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
7
7
  "dist",
8
+ "types",
8
9
  "commands.js"
9
10
  ],
10
11
  "repository": {
@@ -26,8 +27,9 @@
26
27
  "@types/pngjs": "6.0.1"
27
28
  },
28
29
  "scripts": {
29
- "build": "tsc",
30
- "postbuild": "echo \"require('./dist/match-screenshot-command');\" > commands.js"
30
+ "prebuild": "rm -rf dist types",
31
+ "build": "tsc && tsc --project tsconfig.types.json",
32
+ "postbuild": "echo \"require('./dist/match-screenshot');\" > commands.js && echo \"export {};\" > types/index.js"
31
33
  },
32
- "version": "1.5.6"
34
+ "version": "1.5.8"
33
35
  }
@@ -1,4 +1,6 @@
1
+ /// <reference types="cypress" />
1
2
  import { MatchScreenshotArgs } from './match-screenshot';
3
+ export declare function setupVisualTests(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Cypress.PluginConfigOptions;
2
4
  declare global {
3
5
  namespace Cypress {
4
6
  interface Chainable {
package/types/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="cypress" />
2
- export declare function setupVisualTests(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Cypress.PluginConfigOptions;
3
- export { matchScreenshot } from './match-screenshot';
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const match_screenshot_1 = require("./match-screenshot");
4
- Cypress.Commands.add('matchScreenshot', { prevSubject: ['optional', 'element', 'window', 'document'] }, match_screenshot_1.matchScreenshot);
File without changes
File without changes
File without changes
File without changes