@atomicsmash/init-testing 1.1.0-beta.3 → 1.1.0-beta.5

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/dist/utils.js CHANGED
@@ -99,11 +99,11 @@ export class PackageManager {
99
99
  }
100
100
  if (greaterThanRange(dependencyInfo.currentVersion, packageConstraintRange)) {
101
101
  console.log(`The package ${packageName} is already installed and is newer than the requested version. You may encounter issues with your testing setup.`);
102
- return reject("NEWER_PACKAGE_FOUND");
102
+ return reject(new Error("NEWER_PACKAGE_FOUND"));
103
103
  }
104
104
  if (lessThanRange(dependencyInfo.currentVersion, packageConstraintRange)) {
105
105
  console.log(`The package ${packageName} is already installed and is older than the requested version. You should manually update the package to match the range: ${packageConstraintRange}.`);
106
- return reject("OLDER_PACKAGE_FOUND");
106
+ return reject(new Error("OLDER_PACKAGE_FOUND"));
107
107
  }
108
108
  console.log(`An acceptable version of ${packageName} is already installed, skipping...`);
109
109
  return resolve(false);
@@ -118,13 +118,13 @@ export class PackageManager {
118
118
  console.log(`The package ${packageName} is already installed and is newer than the requested version. You may encounter issues with your testing setup.${isFoundAsDevDependency
119
119
  ? ` You should also move this dependency to be a normal dependency.`
120
120
  : ""}`);
121
- return reject("NEWER_PACKAGE_FOUND");
121
+ return reject(new Error("NEWER_PACKAGE_FOUND"));
122
122
  }
123
123
  if (lessThanRange(dependencyInfo.currentVersion, packageConstraintRange)) {
124
124
  console.log(`The package ${packageName} is already installed and is older than the requested version. You should manually update the package to match the range: ${packageConstraintRange}.${isFoundAsDevDependency
125
125
  ? ` You should also move this dependency to be a normal dependency.`
126
126
  : ""}`);
127
- return reject("OLDER_PACKAGE_FOUND");
127
+ return reject(new Error("OLDER_PACKAGE_FOUND"));
128
128
  }
129
129
  if (isFoundAsDevDependency) {
130
130
  console.log(`An acceptable version of ${packageName} is already installed, updating it to a normal dependency...`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicsmash/init-testing",
3
3
  "type": "module",
4
- "version": "1.1.0-beta.3",
4
+ "version": "1.1.0-beta.5",
5
5
  "description": "Allow us to easily add automated testing setup to any npm setup.",
6
6
  "keywords": [
7
7
  "atomic",
@@ -43,7 +43,10 @@
43
43
  "lint:types": "tsc"
44
44
  },
45
45
  "dependencies": {
46
- "semver": "^7.6.0",
46
+ "semver": "^7.6.3",
47
47
  "yargs": "^17.7.2"
48
+ },
49
+ "devDependencies": {
50
+ "@types/yargs": "^17.0.33"
48
51
  }
49
52
  }
@@ -5,7 +5,7 @@ import type {
5
5
  import type { Page } from "@playwright/test";
6
6
  import { getLighthouseTest } from "@atomicsmash/test-utils";
7
7
  import { test as base } from "@playwright/test";
8
- import { testData } from "./fixtures/testData.js";
8
+ import { testData } from "./fixtures/testData.mjs";
9
9
 
10
10
  /**
11
11
  * Fixtures
File without changes