This PR proposes we use the `@internal` JSDoc tag, and `--stripInternal`
typescript compiler option to remove internal keys from the public
`.d.ts` files.
Docs for `stripInternal`:
https://www.typescriptlang.org/tsconfig/#stripInternal
This helps ensuring internal values aren't considered as part of the
*public API surface* by users, allowing us more flexibility in
refactoring.
> [!WARNING]
> This PR proposes we add `stripInternal` to the entire repo, not just
`router-core`. However there are already some values marked as internal
that weren't added by this PR:
> - `InferStructuralSharing` in `react-router`
> - `handleHashScroll` in `router-core > scrollRestoration`
> - many `InferFoo` types in `router-core > typePrimitives`
>
> as a result of this, we might have to switch some of those `@internal`
tags to something else (like `@private` maybe?) because they are, in
fact, necessary for the build to be correct.
Example:
```ts
export type Foo = {
a: number,
/** @internal */
b: number,
}
/** @internal */
export function hello() {
return 'world'
}
export const answer = 42
```
gets compiled as `.d.ts` to
```ts
export type Foo = {
a: number
}
export const answer = 42
```
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* test(e2e): add the derivePort utility
* test(e2e): use the utility on start-basic and start-website
* test(e2e): use the utility on the remaining start sandboxes
* test(e2e): use the utility on the react-router sandboxes
* test(e2e): remove unneeded script from `basic-esbuild-file-based`
There are many breaking changes in this release:
- The Router class no longer has many of the methods it had.
- Most of these methods have been moved to the new routerContext, which is served via the useRouter() hook
- React state is being used for all state management, which should set the stage for better transition/suspense support
- Router Context and route context has been renamed to Router Meta and Route Meta
- Loaders are gone. You can still force a route to wait for an async function via `beforeLoad`, which is serial or `load` which is parallel.
- There's a lot of other changes, but I'm too tired to think straight.
* getting started
* Fixed babel settings for solidjs
* Added in typescript conversions from react
* checkpoint
* ssr checkpoint
* wip
* get it working
* move shallow to @tanstack/store
* Got context and matches working
* Got routes loading and rerendering
* Built out example app for solidjs and added in loaders
* Ported over suspense and other hooks
* Added suspense component support
* Pulled in beta and updated to use stores
* fix: test & context requirements
* release: v0.0.1-beta.69
* fix: add redirects, better errorComponents, no trailing slash bug
* release: v0.0.1-beta.70
* Auto rank routes
* fix: oops
* fix: types
* docs: route matching
* docs: more
* Add missing Link import (#388)
* fix: move window focus refetching into tanstack/loaders
* fix: allow client-level window focus refetching config
* update quick-start.md, remove duplicate Link. (#517)
* fix: docs + force release
* fix: remove test
* test: fix em
* release: v0.0.1-beta.71
* fix: force search filters on router creation
* fix: hash history link generation
Fixes#457
* release: v0.0.1-beta.72
* fix: loaders window guards
* release: v0.0.1-beta.73
* docs: fix
* fix: apply stringifyParams to links
* release: v0.0.1-beta.74
* Pulling in branch changes
* Fixed babel settings for solidjs
* Added in typescript conversions from react
* wip
* get it working
* move shallow to @tanstack/store
* Rebasing
* Updated stores and app to match react-router and react-loader
---------
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
Co-authored-by: Tanner Linsley <tannerlinsley@users.noreply.github.com>
Co-authored-by: Mattia Malonni <mattia.malonni@gmail.com>
Co-authored-by: Ahmed Eid <a.eid@yandex.com>
Co-authored-by: Joseph Lozano <me@josephlozano.xyz>
* Added solid actions
* Fixed issue with suspense and noted it. Added TRPC and solid-query example
* Changed the store for reactivity and created kitchen sink example
* Removed console.log
* Updating reactivity fixes
* Updated store to use reconcile
---------
Co-authored-by: Joseph Lozano <me@josephlozano.xyz>
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
Co-authored-by: Tanner Linsley <tannerlinsley@users.noreply.github.com>
Co-authored-by: Mattia Malonni <mattia.malonni@gmail.com>
Co-authored-by: Ahmed Eid <a.eid@yandex.com>