Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed May 31, 2024
1 parent 9b6df89 commit fc9cfde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176209,12 +176209,12 @@ function bundleNPMArtifacts() {
const mainPackageJsonPath = external_fs_.existsSync(possibleEsyJsonPath)
? possibleEsyJsonPath
: possiblePackageJsonPath;
const exists = external_fs_.existsSync(external_path_.join(mainPackageJsonPath));
const exists = external_fs_.existsSync(mainPackageJsonPath);
if (!exists) {
console.error("No package.json or esy.json at " + mainPackageJsonPath);
process.exit(1);
}
const mainPackageJson = JSON.parse(external_fs_.readFileSync(`./${mainPackageJsonPath}`).toString());
const mainPackageJson = JSON.parse(external_fs_.readFileSync(`${mainPackageJsonPath}`).toString());
const bins = Array.isArray(mainPackageJson.esy.release.bin)
? mainPackageJson.esy.release.bin.reduce((acc, curr) => Object.assign({ [curr]: "bin/" + curr }, acc), {})
: Object.keys(mainPackageJson.esy.release.bin).reduce((acc, currKey) => Object.assign({ [currKey]: "bin/" + mainPackageJson.esy.release.bin[currKey] }, acc), {});
Expand Down
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ async function bundleNPMArtifacts() {
const mainPackageJsonPath = fs.existsSync(possibleEsyJsonPath)
? possibleEsyJsonPath
: possiblePackageJsonPath;
const exists = fs.existsSync(path.join(mainPackageJsonPath));
const exists = fs.existsSync(mainPackageJsonPath);
if (!exists) {
console.error("No package.json or esy.json at " + mainPackageJsonPath);
process.exit(1);
}
const mainPackageJson = JSON.parse(
fs.readFileSync(`./${mainPackageJsonPath}`).toString()
fs.readFileSync(`${mainPackageJsonPath}`).toString()
);
const bins = Array.isArray(mainPackageJson.esy.release.bin)
? mainPackageJson.esy.release.bin.reduce(
Expand Down

0 comments on commit fc9cfde

Please sign in to comment.