Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
0x80 committed Nov 17, 2024
1 parent fbbdb28 commit b3bc2d2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/lib/lockfile/helpers/generate-npm-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ export async function generateNpmLockfile({
}) {
const log = useLogger();

log.debug("Generating NPM lockfile the new way...");
log.debug("Generating NPM lockfile...");

// const nodeModulesPath = path.join(workspaceRootDir, "node_modules");

const origLockfilePath = path.join(workspaceRootDir, "package-lock.json");
const originalLockfilePath = path.join(workspaceRootDir, "package-lock.json");
const isolatedLockfilePath = path.join(isolateDir, "package-lock.json");

try {
if (!fs.existsSync(origLockfilePath)) {
if (!fs.existsSync(originalLockfilePath)) {
throw new Error(
`Failed to find package-lock.json at ${origLockfilePath}`
`Failed to find package-lock.json at ${originalLockfilePath}`
);
}

Expand All @@ -45,7 +43,7 @@ export async function generateNpmLockfile({
* original lockfile to the isolate directory and run loadVirtual before
* buildIdealTree
*/
await fs.copy(origLockfilePath, isolatedLockfilePath, {
await fs.copy(originalLockfilePath, isolatedLockfilePath, {
overwrite: true,
});

Expand Down

0 comments on commit b3bc2d2

Please sign in to comment.