Skip to content

Commit

Permalink
Delete node_modules and package-lock during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
legio-vi-ferrata committed Jan 12, 2024
1 parent dab2102 commit aec3d3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pluggable-widgets-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"sass": "^1.43.4",
"semver": "^7.3.2",
"shelljs": "^0.8.4",
"shx": "^0.3.3",
"ts-jest": "^29.0.0",
"ts-node": "^9.0.0",
"typescript": "4.9.5",
Expand All @@ -115,7 +116,6 @@
"@mendix/generator-widget": ">=8.9.0",
"@types/xml2js": "^0.4.5",
"async-mutex": "^0.2.4",
"shx": "^0.3.3",
"tree-kill": "^1.2.2",
"yeoman-test": "^6.2.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/pluggable-widgets-tools/utils/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ async function checkMigration() {
}
// Writes the new package keeping the current format
await writeJson(packageJsonPath, newPackageJson, { spaces: 2 });
console.log("Deleting old dependencies...");
execSync("shx rm -rf ./{node_modules,package-lock.json}", { cwd: process.cwd(), stdio: "inherit" });
console.log("Done.");
execSync(`npm install`, { cwd: process.cwd(), stdio: "inherit" });
} catch (e) {
console.log(red("An error occurred while auto updating your dependencies"));
Expand Down

0 comments on commit aec3d3b

Please sign in to comment.