Skip to content

Commit

Permalink
Merge pull request #940 from pmcelhaney/paths-to-routes-migration-fix
Browse files Browse the repository at this point in the history
fix: Update counterfact script to correctly call pathsToRoutes
  • Loading branch information
dethell authored Jun 6, 2024
2 parents d498c99 + 4339e42 commit 6dc44ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-spoons-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"counterfact": patch
---

Fix paths to routes migration
2 changes: 2 additions & 0 deletions bin/counterfact.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import createDebug from "debug";
import open from "open";

import { counterfact } from "../dist/app.js";
import { pathsToRoutes } from "../dist/migrate/paths-to-routes.js";

const MIN_NODE_VERSION = 17;

Expand Down Expand Up @@ -170,6 +171,7 @@ async function main(source, destination) {

// eslint-disable-next-line n/no-sync
if (fs.existsSync(nodePath.join(config.basePath, "paths"))) {
await pathsToRoutes(config.basePath);
await fs.promises.rmdir(nodePath.join(config.basePath, "paths"), {
recursive: true,
});
Expand Down

0 comments on commit 6dc44ac

Please sign in to comment.