UNPKG

expeditavoluptas

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

104 lines (97 loc) 3.27 kB
/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import Layout from '@theme/Layout'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import pkg from '../../../packages/core/package.json'; import versions from '../../versions.json'; function Version() { const context = useDocusaurusContext(); const {siteConfig = {}} = context; const latestVersion = [versions[0], pkg.version]; const pastVersions = versions.filter(version => version !== versions[0]).map(v => [v, v + '.0']); const repoUrl = `https://github.com/${siteConfig.organizationName}/${siteConfig.projectName}`; return ( <Layout permalink="/versions" description="MikroORM Versions page listing all documented site versions"> <div className="container margin-vert--xl"> <h1>MikroORM documentation versions</h1> <div className="margin-bottom--lg"> <h3 id="latest">Latest version (Stable)</h3> <p>Here you can find the latest documentation.</p> <table> <tbody> <tr> <th>{latestVersion[1]}</th> <td> <Link to={useBaseUrl('/docs/installation')}> Documentation </Link> </td> <td> <a href={`${repoUrl}/releases/tag/v${latestVersion[1]}`}> Release Notes </a> </td> </tr> </tbody> </table> </div> <div className="margin-bottom--lg"> <h3 id="next">Next version (Unreleased)</h3> <p>Here you can find the documentation for unreleased version.</p> <table> <tbody> <tr> <th>master</th> <td> <Link to={useBaseUrl('/docs/next/installation')}> Documentation </Link> </td> <td> <a href={repoUrl}>Source Code</a> </td> </tr> </tbody> </table> </div> {pastVersions.length > 0 && ( <div className="margin-bottom--lg"> <h3 id="archive">Past Versions</h3> <p> Here you can find documentation for previous versions of MikroORM. </p> <table> <tbody> {pastVersions.map(version => ( <tr key={version[0]}> <th>{version[0]}</th> <td> <Link to={useBaseUrl(`/docs/${version[0]}/installation`)}> Documentation </Link> </td> <td> <a href={`${repoUrl}/releases/tag/v${version[1]}`}> Release Notes </a> </td> </tr> ))} </tbody> </table> </div> )} </div> </Layout> ); } export default Version;