diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ff9e3ba3..5aea6ce2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,6 +212,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - `codegraph sync` and the file watcher now move a React Router route to its page when the router file loads that page lazily into a value of its own, like `const Docs = lazy(() => import('./pages/Docs'))` rendered by `} />`, and the page's file is added after the router was indexed, comes back after being deleted, or gets or changes its default export in a later edit. Before, the route kept pointing at the `Docs` declaration, or at the page's old component, until the router file itself changed or the project was re-indexed, unless the page's component happened to share the declaration's name. The same now holds for a `lazy: () => import('./pages/Docs')` route whose page switches its default export to another component. Re-index React projects after upgrading to correct routes an earlier version left behind. - `codegraph sync` and the file watcher now link a component to the JSX that renders it, like ``, when the component is added in a file with no JSX of its own, as in `export default function Team() { return null; }`. Before, the link waited for an unrelated change to a file with JSX, or for a re-index, so the new component looked unused. - In JavaScript and TypeScript, a default import now links to what the module's `export default` statement exports, wherever the statement sits in the file. Before, a module that declares its default, like `export default function Vans() {…}` or `export default class Store {…}`, had its default import linked to the first function it exports instead: in a React Router data-router app, where a page exports its `loader` or `action` above the page component, `import Vans, { loader as vansLoader } from './pages/Vans'` made the route `/vans` and every use of `Vans` lead to the loader. A component file that also exports a styled or memoized component no longer hands its default import to that component, and an anonymous default, like `export default function () {…}` or `export default () => …`, is no longer linked to a function exported beside it or nested inside it. A module loaded with `require('./x').default` is read the same way. Re-index JavaScript and TypeScript projects after upgrading. +- In JavaScript and TypeScript, an import now links to what its module passes on when the module exports an import of its own, like outline's `server/presenters/index.ts`, which imports each presenter and lists it in `export { presentUser, presentPolicies, … }`, or an `index.ts` written `import Footer from './FooterCenter'; export { Footer }` or `export default Avatar`, and `export { createThing as default }` is read too. A default export written as an expression now links as well: `export default new Logger()` to the methods of that `Logger` class, and a wrapper like `export default connect(mapState)(Profile)`, `observer(DocumentNew)` or `traceFunction({ … })(accountProvisioner)` to the component or function it wraps. Before, such an import was matched by its name alone, so it could land on a namesake elsewhere in the project, as when outline's server logging calls linked to the browser app's `Logger` and excalidraw's public `Footer` to an internal component of that name, or on whichever function the module happened to export first. Re-index JavaScript and TypeScript projects after upgrading. - In React and Vue, a tag for a component the file imports from a package, like `