-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(remix-dev): flat routes #4880
Merged
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
45e1669
feat: add flat routes convention
kiliman 2a0c205
chore: include future v2_routeConvention flag
kiliman 7e08ddb
fix: update readConfig test to include new v2_routeConvention flag
kiliman 30319da
fix: replace default route dir
kiliman c330861
chore: slim
mcansh 88c0cbe
chore: remove unused eslint-disable coment
mcansh 50a4393
chore(flat-routes): add support for optional and escape route segments
mcansh c525b4c
initial import
mcansh ba964ae
chore: index routes use underscores
mcansh 459030c
feat: add support for optional segments
mcansh 1db590d
chore: flat routes
mcansh c1df59d
feat: nested escaping inside optional
mcansh f6a3f94
chore: remove TODO comment
mcansh 434836f
feat: handle opting out of parent layout, but keeping url segment
mcansh 940d794
chore: use `isSegmentSeparator` to account for windows paths
mcansh fae3dfa
chore: helpers no longer need to be exported from `routesConvention`
mcansh a4b0b35
chore: don't return separators from `getRouteSegments`
mcansh bf0ba0a
chore: rename test
mcansh e64fe6a
chore: don't treat escaped separator as new segment
mcansh 34d3db5
chore: undo some unneeded changes to `routesConvention`
mcansh b9892a1
test: route hierarchy
mcansh c377df9
test: add more test cases
mcansh 5911430
fix: glob
mcansh da0716d
chore: handle opting out of layout
mcansh c8660ec
chore: lil clean
mcansh 81c83b4
chore: more tests, add substate type
mcansh 72d2790
chore: re-add lookahead/lookbehind when exiting optional/escape modes
mcansh 647b78d
chore: remove duplicate cases
mcansh 413d3f8
test: update test name
mcansh e9246d3
chore: advance char earlier, fix bugggg
mcansh 9ceb89f
chore: prevent `/` in route segments
mcansh 3afc886
test: update test name
mcansh 83cd4d8
test: add cases for splitBySegments
mcansh e00255b
test: add cases for joinByDelimiter
mcansh 0100169
Update packages/remix-dev/config/flat-routes.ts
mcansh e03efca
Update packages/remix-dev/config/flat-routes.ts
mcansh a34b7ad
Update packages/remix-dev/config/flat-routes.ts
mcansh 5ab63af
test: remove duplicate routes
mcansh 1436c31
chore: combine jacob's and kiliman's approaches
mcansh 16a97d3
chore: remove console.log
mcansh ac0cc8c
test: add tests for generically creating route paths
mcansh 7a24b9e
test: add case for skipping layouts other than the top level
mcansh 8679fa0
chore: make tests pass on windows
mcansh 388d89f
chore: use for...of to be consistent
mcansh e575458
chore: for...of on routeMap
mcansh 4f569fd
fixup! chore: for...of on routeMap
mcansh 6fc6b9f
chore: extract getRouteMap
mcansh d4d87d0
chore: address feedback
mcansh 4779e24
chore: set default parentId to "root" in defineRoutes
mcansh 0d6c4fb
test: update defineConventionalRoutes test for default root parentId
mcansh 0a8edbf
chore: remove comment
mcansh 7b54735
chore: remove unnecessary else block
mcansh be8f00c
test: update defineRoutes test per 4779e2458499d15ba31791ff785cdcdf3b…
mcansh 4c9d619
chore: add brief description of what each state/substate means
mcansh f521c20
chore: remove nesting via early return
mcansh 758a90a
chore: condense state/substate
mcansh f6e2615
chore: update routePaths to account for folders
mcansh d54ba0f
chore: error when escaping `:` or `*`
mcansh c4955a6
chore: remove console.log
mcansh 7515c19
chore: include routeId in error message
mcansh df340a4
chore: error when using `:` or `*`, not just escaping
mcansh 3f3129e
chore: normalize error messages, move tests to getRouteSegments
mcansh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Add flat routes convention |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.changeset/*.md | ||
.changeset/*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should double-check that
parentId
wasn't intentionallyundefined
for some reason. Like doesparentId
get surfaced in the route meta that is available to users? Do users rely on it beingundefined
? Or is this value solely used for defining routes internally?