-
-
Notifications
You must be signed in to change notification settings - Fork 10.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
changed native <Link to> to support objects #4483
Merged
Merged
Conversation
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
Thanks! |
Would have loved to see some tests here, but thanks @CodogoFreddie :) |
brophdawg11
pushed a commit
that referenced
this pull request
Mar 27, 2024
* feat: add flat routes convention Closes #4483 * chore: include future v2_routeConvention flag Integrates flat routes function into config * fix: update readConfig test to include new v2_routeConvention flag * fix: replace default route dir Oops! * chore: slim Signed-off-by: Logan McAnsh <[email protected]> * chore: remove unused eslint-disable coment Signed-off-by: Logan McAnsh <[email protected]> chore: use invariant instead of enforcing the type Signed-off-by: Logan McAnsh <[email protected]> chore: use for...of Signed-off-by: Logan McAnsh <[email protected]> chore: remove .route Signed-off-by: Logan McAnsh <[email protected]> chore: use _index for index routes Signed-off-by: Logan McAnsh <[email protected]> chore: replace magic characters with defined variable Signed-off-by: Logan McAnsh <[email protected]> fix: update default parentRoutePath Signed-off-by: Logan McAnsh <[email protected]> test: add test cases from old route convention Signed-off-by: Logan McAnsh <[email protected]> chore: update handling of special characters Signed-off-by: Logan McAnsh <[email protected]> chore: export route convention helpers Signed-off-by: Logan McAnsh <[email protected]> chore(flat-routes): add support for optional and escape route segments Signed-off-by: Logan McAnsh <[email protected]> chore(flat-routes): add support for optional and escape route segments Signed-off-by: Logan McAnsh <[email protected]> * chore(flat-routes): add support for optional and escape route segments Signed-off-by: Logan McAnsh <[email protected]> * initial import Signed-off-by: Logan McAnsh <[email protected]> * chore: index routes use underscores Signed-off-by: Logan McAnsh <[email protected]> * feat: add support for optional segments Signed-off-by: Logan McAnsh <[email protected]> * chore: flat routes Signed-off-by: Logan McAnsh <[email protected]> * feat: nested escaping inside optional Signed-off-by: Logan McAnsh <[email protected]> * chore: remove TODO comment Signed-off-by: Logan McAnsh <[email protected]> * feat: handle opting out of parent layout, but keeping url segment Signed-off-by: Logan McAnsh <[email protected]> * chore: use `isSegmentSeparator` to account for windows paths Signed-off-by: Logan McAnsh <[email protected]> * chore: helpers no longer need to be exported from `routesConvention` Signed-off-by: Logan McAnsh <[email protected]> * chore: don't return separators from `getRouteSegments` Signed-off-by: Logan McAnsh <[email protected]> * chore: rename test Signed-off-by: Logan McAnsh <[email protected]> * chore: don't treat escaped separator as new segment Signed-off-by: Logan McAnsh <[email protected]> * chore: undo some unneeded changes to `routesConvention` Signed-off-by: Logan McAnsh <[email protected]> chore: undo some unneeded changes to `routesConvention` Signed-off-by: Logan McAnsh <[email protected]> chore: undo some unneeded changes to `routesConvention` Signed-off-by: Logan McAnsh <[email protected]> * test: route hierarchy Signed-off-by: Logan McAnsh <[email protected]> * test: add more test cases Signed-off-by: Logan McAnsh <[email protected]> * fix: glob Signed-off-by: Logan McAnsh <[email protected]> * chore: handle opting out of layout Signed-off-by: Logan McAnsh <[email protected]> * chore: lil clean Signed-off-by: Logan McAnsh <[email protected]> * chore: more tests, add substate type Signed-off-by: Logan McAnsh <[email protected]> * chore: re-add lookahead/lookbehind when exiting optional/escape modes Signed-off-by: Logan McAnsh <[email protected]> * chore: remove duplicate cases Signed-off-by: Logan McAnsh <[email protected]> * test: update test name Signed-off-by: Logan McAnsh <[email protected]> * chore: advance char earlier, fix bugggg Signed-off-by: Logan McAnsh <[email protected]> * chore: prevent `/` in route segments Signed-off-by: Logan McAnsh <[email protected]> * test: update test name Signed-off-by: Logan McAnsh <[email protected]> * test: add cases for splitBySegments Signed-off-by: Logan McAnsh <[email protected]> * test: add cases for joinByDelimiter Signed-off-by: Logan McAnsh <[email protected]> * Update packages/remix-dev/config/flat-routes.ts Co-authored-by: Pedro Cattori <[email protected]> * Update packages/remix-dev/config/flat-routes.ts Co-authored-by: Pedro Cattori <[email protected]> * Update packages/remix-dev/config/flat-routes.ts Co-authored-by: Pedro Cattori <[email protected]> * test: remove duplicate routes should update duplicate route detection by using route path instead of fs path Signed-off-by: Logan McAnsh <[email protected]> * chore: combine jacob's and kiliman's approaches Signed-off-by: Logan McAnsh <[email protected]> * chore: remove console.log Signed-off-by: Logan McAnsh <[email protected]> * test: add tests for generically creating route paths Signed-off-by: Logan McAnsh <[email protected]> * test: add case for skipping layouts other than the top level Signed-off-by: Logan McAnsh <[email protected]> * chore: make tests pass on windows Signed-off-by: Logan McAnsh <[email protected]> * chore: use for...of to be consistent Signed-off-by: Logan McAnsh <[email protected]> * chore: for...of on routeMap Co-authored-by: Pedro Cattori <[email protected]> * fixup! chore: for...of on routeMap * chore: extract getRouteMap Signed-off-by: Logan McAnsh <[email protected]> * chore: address feedback Co-authored-by: Pedro Cattori <[email protected]> Signed-off-by: Logan McAnsh <[email protected]> * chore: set default parentId to "root" in defineRoutes Signed-off-by: Logan McAnsh <[email protected]> * test: update defineConventionalRoutes test for default root parentId Signed-off-by: Logan McAnsh <[email protected]> * chore: remove comment Signed-off-by: Logan McAnsh <[email protected]> * chore: remove unnecessary else block Co-authored-by: Pedro Cattori <[email protected]> Signed-off-by: Logan McAnsh <[email protected]> * test: update defineRoutes test per 4779e2458499d15ba31791ff785cdcdf3b8c92e9 Signed-off-by: Logan McAnsh <[email protected]> * chore: add brief description of what each state/substate means Signed-off-by: Logan McAnsh <[email protected]> * chore: remove nesting via early return Co-authored-by: Pedro Cattori <[email protected]> * chore: condense state/substate Co-authored-by: Pedro Cattori <[email protected]> Signed-off-by: Logan McAnsh <[email protected]> * chore: update routePaths to account for folders Signed-off-by: Logan McAnsh <[email protected]> * chore: error when escaping `:` or `*` Signed-off-by: Logan McAnsh <[email protected]> * chore: remove console.log Signed-off-by: Logan McAnsh <[email protected]> * chore: include routeId in error message Signed-off-by: Logan McAnsh <[email protected]> * chore: error when using `:` or `*`, not just escaping Signed-off-by: Logan McAnsh <[email protected]> * chore: normalize error messages, move tests to getRouteSegments Signed-off-by: Logan McAnsh <[email protected]> Signed-off-by: Logan McAnsh <[email protected]> Co-authored-by: kiliman <[email protected]> Co-authored-by: Pedro Cattori <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.