@atomicsmash/init-testing 1.1.0-beta.2 → 1.1.0-beta.4
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/cli.js +7 -0
- package/dist/utils.js +4 -4
- package/package.json +5 -2
package/dist/cli.js
CHANGED
|
@@ -130,15 +130,22 @@ await Promise.all([
|
|
|
130
130
|
if (results.some((result) => {
|
|
131
131
|
return result.status === "fulfilled" && result.value === true;
|
|
132
132
|
})) {
|
|
133
|
+
const installedPackages = [
|
|
134
|
+
...packageManager.commands.install,
|
|
135
|
+
...packageManager.commands.devInstall,
|
|
136
|
+
];
|
|
133
137
|
packageManager.runCommands();
|
|
138
|
+
console.log(`Packages installed: ${installedPackages.join(",")}.`);
|
|
134
139
|
}
|
|
135
140
|
return results[1].status === "fulfilled" && results[1].value === true;
|
|
136
141
|
})
|
|
137
142
|
.then((shouldInstallPlaywright) => {
|
|
138
143
|
if (shouldInstallPlaywright) {
|
|
144
|
+
console.log("Running playwright installer...");
|
|
139
145
|
// Run Playwright installer after package install
|
|
140
146
|
packageManager.commands.basic.push("npx playwright install");
|
|
141
147
|
packageManager.runCommands();
|
|
148
|
+
console.log("Playwright installer finished.");
|
|
142
149
|
}
|
|
143
150
|
}),
|
|
144
151
|
Promise.allSettled(fileCopies).then((results) => {
|
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.
|
|
4
|
+
"version": "1.1.0-beta.4",
|
|
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.
|
|
46
|
+
"semver": "^7.6.3",
|
|
47
47
|
"yargs": "^17.7.2"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/yargs": "^17.0.33"
|
|
48
51
|
}
|
|
49
52
|
}
|