forked from nrwl/nx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
versions.ts
29 lines (25 loc) · 1.03 KB
/
versions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { readJson, Tree } from '@nx/devkit';
export const nxVersion = require('../../package.json').version;
export const remixVersion = '^2.8.1';
export const isbotVersion = '^4.4.0';
export const reactVersion = '^18.2.0';
export const reactDomVersion = '^18.2.0';
export const typesReactVersion = '^18.2.0';
export const typesReactDomVersion = '^18.2.0';
export const eslintVersion = '^8.56.0';
export const typescriptVersion = '^5.3.3';
export const tailwindVersion = '^3.3.0';
export const testingLibraryReactVersion = '^14.1.2';
export const testingLibraryJestDomVersion = '^6.2.0';
export const testingLibraryUserEventsVersion = '^14.5.2';
export function getRemixVersion(tree: Tree): string {
return getPackageVersion(tree, '@remix-run/dev') ?? remixVersion;
}
export function getPackageVersion(tree: Tree, packageName: string) {
const packageJsonContents = readJson(tree, 'package.json');
return (
packageJsonContents?.['devDependencies']?.[packageName] ??
packageJsonContents?.['dependencies']?.[packageName] ??
null
);
}