cypress 14.4.1 → 14.5.0
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/lib/tasks/download.js +5 -0
- package/lib/tasks/install.js +8 -2
- package/lib/util.js +3 -14
- package/package.json +4 -3
package/lib/tasks/download.js
CHANGED
@@ -53,6 +53,11 @@ const prepend = (arch, urlPath, version) => {
|
|
53
53
|
const endpoint = url.resolve(getBaseUrl(), urlPath);
|
54
54
|
const platform = os.platform();
|
55
55
|
const pathTemplate = util.getEnv('CYPRESS_DOWNLOAD_PATH_TEMPLATE', true);
|
56
|
+
if (platform === 'win32' && arch === 'arm64') {
|
57
|
+
debug(`detected platform ${platform} architecture ${arch} combination`);
|
58
|
+
arch = 'x64';
|
59
|
+
debug(`overriding to download ${platform}-${arch} instead`);
|
60
|
+
}
|
56
61
|
return pathTemplate ? pathTemplate.replace(/\\?\$\{endpoint\}/g, endpoint).replace(/\\?\$\{platform\}/g, platform).replace(/\\?\$\{arch\}/g, arch).replace(/\\?\$\{version\}/g, version) : `${endpoint}?platform=${platform}&arch=${arch}`;
|
57
62
|
};
|
58
63
|
const getUrl = (arch, version) => {
|
package/lib/tasks/install.js
CHANGED
@@ -32,7 +32,13 @@ function _getBinaryUrlFromBuildInfo(arch, {
|
|
32
32
|
commitSha,
|
33
33
|
commitBranch
|
34
34
|
}) {
|
35
|
-
|
35
|
+
const platform = os.platform();
|
36
|
+
if (platform === 'win32' && arch === 'arm64') {
|
37
|
+
debug(`detected platform ${platform} architecture ${arch} combination`);
|
38
|
+
arch = 'x64';
|
39
|
+
debug(`overriding to download ${platform}-${arch} pre-release binary instead`);
|
40
|
+
}
|
41
|
+
return `https://cdn.cypress.io/beta/binary/${version}/${platform}-${arch}/${commitBranch}-${commitSha}/cypress.zip`;
|
36
42
|
}
|
37
43
|
const alreadyInstalledMsg = () => {
|
38
44
|
if (!util.isPostInstall()) {
|
@@ -134,7 +140,7 @@ const downloadAndUnzip = ({
|
|
134
140
|
};
|
135
141
|
const validateOS = () => {
|
136
142
|
return util.getPlatformInfo().then(platformInfo => {
|
137
|
-
return platformInfo.match(/(win32-x64|linux-x64|linux-arm64|darwin-x64|darwin-arm64)/);
|
143
|
+
return platformInfo.match(/(win32-x64|win32-arm64|linux-x64|linux-arm64|darwin-x64|darwin-arm64)/);
|
138
144
|
});
|
139
145
|
};
|
140
146
|
|
package/lib/util.js
CHANGED
@@ -4,7 +4,7 @@ const _ = require('lodash');
|
|
4
4
|
const arch = require('arch');
|
5
5
|
const os = require('os');
|
6
6
|
const ospath = require('ospath');
|
7
|
-
const
|
7
|
+
const hasha = require('hasha');
|
8
8
|
const la = require('lazy-ass');
|
9
9
|
const is = require('check-more-types');
|
10
10
|
const tty = require('tty');
|
@@ -31,22 +31,11 @@ const getosAsync = Promise.promisify(getos);
|
|
31
31
|
|
32
32
|
/**
|
33
33
|
* Returns SHA512 of a file
|
34
|
-
*
|
35
|
-
* Implementation lifted from https://github.com/sindresorhus/hasha
|
36
|
-
* but without bringing that dependency (since hasha is Node v8+)
|
37
34
|
*/
|
38
35
|
const getFileChecksum = filename => {
|
39
36
|
la(is.unemptyString(filename), 'expected filename', filename);
|
40
|
-
|
41
|
-
|
42
|
-
s.setEncoding('hex');
|
43
|
-
return s;
|
44
|
-
};
|
45
|
-
return new Promise((resolve, reject) => {
|
46
|
-
const stream = fs.createReadStream(filename);
|
47
|
-
stream.on('error', reject).pipe(hashStream()).on('error', reject).on('finish', function () {
|
48
|
-
resolve(this.read());
|
49
|
-
});
|
37
|
+
return hasha.fromFile(filename, {
|
38
|
+
algorithm: 'sha512'
|
50
39
|
});
|
51
40
|
};
|
52
41
|
const getFileSize = filename => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "14.
|
3
|
+
"version": "14.5.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -33,6 +33,7 @@
|
|
33
33
|
"figures": "^3.2.0",
|
34
34
|
"fs-extra": "^9.1.0",
|
35
35
|
"getos": "^3.2.1",
|
36
|
+
"hasha": "5.2.2",
|
36
37
|
"is-installed-globally": "~0.4.0",
|
37
38
|
"lazy-ass": "^1.6.0",
|
38
39
|
"listr2": "^3.8.3",
|
@@ -123,8 +124,8 @@
|
|
123
124
|
},
|
124
125
|
"buildInfo": {
|
125
126
|
"commitBranch": "develop",
|
126
|
-
"commitSha": "
|
127
|
-
"commitDate": "2025-06-
|
127
|
+
"commitSha": "79469f56167cf85c16899b38f89a66398eced4e4",
|
128
|
+
"commitDate": "2025-06-17T17:28:10.000Z",
|
128
129
|
"stable": true
|
129
130
|
},
|
130
131
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|