I have found a bug when converting my project to the flat routes format.
Issue Summary
When running npx migrate-flat-routes <sourceDir> <targetDir> [options], routes starting with an underscore _ are not converted correctly. They should be converted to an escaped underscore [_] but are instead converted to to a normal underscore _. Only routes starting with two underscores __ should be converted to a regular underscore _
Steps to Reproduce
Create a directory with at least one route file that starts with an underscore (e.g. _route.js)
Run npx migrate-flat-routes <sourceDir> <targetDir> [options] on the directory
Observe that the resulting file in the target directory is named _route.js rather than [_]route.js
Expected Result
Routes starting with an underscore should be converted to [_] in the target directory.
Actual Result
Routes starting with an underscore are not converted correctly and are instead converted to _.
Hey hey,
I have found a bug when converting my project to the flat routes format.
Issue Summary
When running
npx migrate-flat-routes <sourceDir> <targetDir> [options]
, routes starting with an underscore_
are not converted correctly. They should be converted to an escaped underscore[_]
but are instead converted to to a normal underscore_
. Only routes starting with two underscores__
should be converted to a regular underscore_
Steps to Reproduce
_route.js
)npx migrate-flat-routes <sourceDir> <targetDir> [options]
on the directory_route.js
rather than[_]route.js
Expected Result
Routes starting with an underscore should be converted to
[_]
in the target directory.Actual Result
Routes starting with an underscore are not converted correctly and are instead converted to
_
.Additional Information
Thank you for your time and help in advance!