Skip to content

Commit 8e1b591

Browse files
committed
fix: output and remote hashes not matching
1 parent 4b56128 commit 8e1b591

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@jotforminc/zenith",
33
"packageManager": "pnpm@7.18.0",
4-
"version": "0.6.0",
4+
"version": "0.6.1",
55
"description": "",
66
"main": "./build/index.js",
77
"files": [

src/classes/ConfigHelper.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class ConfigHelper {
88
this.buildConfigJSON = config.buildConfig;
99
this.projects = config.projects;
1010
this.ignoreFiles = config.ignore;
11-
this.ignoreDependencies = config.ignoreDependencies;
1211
this.appDirectories = config.appDirectories;
1312
}
1413

src/classes/Hasher.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Hasher {
1313
constructor() {
1414
this.hashJSON = {};
1515
this.excludeDirs = ConfigHelperInstance.ignoreFiles;
16-
this.ignoreDepsScripts = ConfigHelperInstance.ignoreDependencies;
1716
}
1817

1918
updateDebugJSON(debugJSON) {
@@ -29,8 +28,7 @@ class Hasher {
2928
if (script) hasher.update(script);
3029
const directory = readdirSync(directoryPath, { withFileTypes: true });
3130
const packageJSONPath = path.join(directoryPath, 'package.json')
32-
const ignoreDeps = this.ignoreDepsScripts.includes(script)
33-
if (existsSync(packageJSONPath) && !ignoreDeps) {
31+
if (existsSync(packageJSONPath)) {
3432
const packageJSON = JSON.parse(readFileSync(packageJSONPath, { encoding: 'utf-8' }));
3533
const dependencies = { ...(packageJSON.dependencies || {}), ...(packageJSON.devDependencies || {}) };
3634
Object.entries(dependencies).sort((a, b) => a[0] - b[0]).forEach(([key, value]) => {

src/classes/RemoteCacher.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class RemoteCacher {
6363
resolve();
6464
return;
6565
}
66-
const outputHash = Hasher.getHash(directoryPath, target);
66+
const outputHash = Hasher.getHash(directoryPath);
6767
const outputBuff = Buffer.from(outputHash);
6868
this.s3Client.putObject(
6969
{
@@ -155,14 +155,14 @@ class RemoteCacher {
155155
};
156156
}
157157

158-
pipeEnd(stream, outputPath, target) {
158+
pipeEnd(stream, outputPath) {
159159
return new Promise((resolve) => {
160160
stream
161161
.pipe(
162162
unzipper
163163
.Extract({ path: outputPath })
164164
.on("close", () => {
165-
const hash = Hasher.getHash(outputPath, target);
165+
const hash = Hasher.getHash(outputPath);
166166
resolve(hash);
167167
})
168168
.on("error", (unzipperErr) => reject(unzipperErr))
@@ -202,7 +202,7 @@ class RemoteCacher {
202202
rmSync(outputPath, { recursive: true, force: true });
203203
mkdirSync(outputPath);
204204
}
205-
return await this.pipeEnd(response.Body, outputPath, target);
205+
return await this.pipeEnd(response.Body, outputPath);
206206
} catch (error) {
207207
Logger.log(2, error);
208208
}

0 commit comments

Comments
 (0)