Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/docsite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@babel/preset-react": "^8.0.1",
"@babel/preset-typescript": "^7.29.7",
"@babel/parser": "^7.29.7",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@stylexjs/babel-plugin": "catalog:",
"@stylexjs/postcss-plugin": "catalog:",
"@types/lz-string": "^1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@astryxdesign/theme-butter": "*"
},
"devDependencies": {
"@babel/preset-react": "^8.0.1",
"@babel/preset-typescript": "^7.29.7",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@stylexjs/babel-plugin": "catalog:",
"@stylexjs/postcss-plugin": "catalog:",
"@types/node": "^25.9.3",
Expand Down
6 changes: 5 additions & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
"vega-lite": "^6.4.3"
},
"devDependencies": {
"@astryxdesign/build": "*",
"@heroicons/react": "^2.2.0",
"@lexical/headless": "^0.46.0",
"@lexical/markdown": "^0.46.0",
"@lexical/react": "^0.46.0",
"@storybook/addon-docs": "^10.4.6",
"@storybook/addon-links": "^10.4.6",
"@storybook/react": "^10.4.6",
"@storybook/react-vite": "^10.4.6",
"@stylexjs/stylex": "catalog:",
"@stylexjs/unplugin": "^0.19.0",
"@astryxdesign/build": "*",
"lexical": "^0.46.0",
"storybook": "^10.4.6"
}
}
2 changes: 1 addition & 1 deletion apps/template-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@astryxdesign/core": "*",
"@astryxdesign/theme-neutral": "*",
"@heroicons/react": "^2.2.0",
"@stylexjs/stylex": "^0.19.0",
"@stylexjs/stylex": "catalog:",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
Expand Down
4 changes: 2 additions & 2 deletions internal/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"main": "./src/index.ts",
"scripts": {},
"dependencies": {
"@testing-library/jest-dom": "^6.6.0",
"@testing-library/react": "^16.3.2",
"@testing-library/jest-dom": "catalog:",
"@testing-library/react": "catalog:",
"@testing-library/user-event": "^14.5.0"
}
}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,32 @@
},
"devDependencies": {
"@axe-core/playwright": "^4.12.1",
"@babel/core": "catalog:",
"@changesets/cli": "^2.31.0",
"@eslint-react/eslint-plugin": "^5.10.4",
"@eslint/compat": "^2.1.0",
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.61.1",
"@stylexjs/babel-plugin": "catalog:",
"@testing-library/jest-dom": "catalog:",
"@testing-library/user-event": "^14.5.0",
"@types/node": "^25.9.3",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.2.0",
"@vitest/coverage-v8": "^4.1.9",
"chokidar": "^4.0.3",
"cldr-core": "^48.2.0",
"cldr-dates-full": "^48.2.0",
"dom-accessibility-api": "^0.6.3",
"esbuild": "catalog:",
"eslint": "^10.6.0",
"eslint-plugin-react-compiler": "19.1.0-rc.2",
"glob": "^13.0.6",
"husky": "^9.1.7",
"jsdom": "^27.4.0",
"lint-staged": "^17.0.8",
"playwright": "^1.61.1",
"prettier": "catalog:",
"react": "^19.2.7",
"react-dom": "^19.2.7",
Expand Down
6 changes: 6 additions & 0 deletions packages/charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
},
"devDependencies": {
"@astryxdesign/cli": "workspace:*",
"@babel/cli": "catalog:",
"@babel/core": "catalog:",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@stylexjs/babel-plugin": "catalog:",
"@testing-library/react": "catalog:",
"@types/d3-scale": "^4.0.9",
"@types/d3-shape": "^3.1.8",
"rimraf": "^6.0.1"
Expand Down
44 changes: 29 additions & 15 deletions packages/cli/api/doctor/doctor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@

import * as fs from 'node:fs';
import * as path from 'node:path';
import {createRequire} from 'node:module';

import {MIN_NODE_VERSION, isNodeVersionSupported} from '../../foundation/env/node-version.mjs';
import {CLI_ROOT, findCoreDir} from '../../foundation/fs/paths.mjs';
import {detectPackageManager, getCliInvocation} from '../../foundation/env/package-manager.mjs';
import {findConfigPath, Project} from '../../foundation/config/project.mjs';
import {semverCompare, isValidSemver, satisfiesRange} from '../../foundation/env/semver.mjs';

const _require = createRequire(import.meta.url);

/**
* @typedef {'pass'|'warn'|'fail'|'info'} DoctorStatus
*
Expand Down Expand Up @@ -99,6 +96,31 @@ function findNodeModules(startDir) {
return null;
}

/**
* Locate a package inside the project's own node_modules chain.
*
* Deliberately not `require.resolve`: Node folds NODE_PATH and the global
* folders into resolution even when `paths` is given, so a package merely
* reachable from the ambient environment would read as installed in the
* user's project. Reading package.json off disk also sidesteps packages that
* don't export it, so the version is always available to range-check.
*
* @param {string} startDir
* @param {string} name
* @returns {string|null} the package directory, or null when not installed
*/
function findInstalledPackage(startDir, name) {
let dir = startDir;
for (let i = 0; i < 6; i++) {
const candidate = path.join(dir, 'node_modules', ...name.split('/'));
if (fs.existsSync(path.join(candidate, 'package.json'))) return candidate;
const parent = path.dirname(dir);
if (parent === dir) break;
dir = parent;
}
return null;
}

/**
* Find every installed @astryxdesign/theme-* package under node_modules.
* @param {string} cwd
Expand Down Expand Up @@ -440,23 +462,15 @@ export function checkPeerDeps(ctx) {
const mismatched = [];
for (const name of peerNames) {
const want = peers[name];
let pkgJsonPath;
try {
pkgJsonPath = _require.resolve(`${name}/package.json`, {paths: [ctx.cwd]});
} catch {
// package.json isn't exported — fall back to entry resolution for
// presence only (we then can't read the version to range-check it).
try {
_require.resolve(name, {paths: [ctx.cwd]});
} catch {
missing.push(`${name}@${want}`);
}
const installedDir = findInstalledPackage(ctx.cwd, name);
if (!installedDir) {
missing.push(`${name}@${want}`);
continue;
}
// Present and version-readable: verify it actually satisfies the range,
// not just that the package exists (a bare `npm install` can resolve an
// out-of-range version from a stale consumer range and still "look" fine).
const have = pkgVersion(path.dirname(pkgJsonPath));
const have = pkgVersion(installedDir);
if (have && !satisfiesRange(have, want)) {
mismatched.push({name, want, have});
}
Expand Down
6 changes: 5 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
"@astryxdesign/core": "*",
"@astryxdesign/lab": "*",
"@astryxdesign/theme-neutral": "*",
"gpt-tokenizer": "^3.4.0"
"@heroicons/react": "^2.2.0",
"@stylexjs/stylex": "catalog:",
"gpt-tokenizer": "^3.4.0",
"lucide-react": "^1.18.0",
"recharts": "^3.9.2"
}
}
13 changes: 7 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,15 @@
},
"devDependencies": {
"@astryxdesign/cli": "workspace:*",
"@babel/cli": "^8.0.4",
"@babel/core": "^7.29.7",
"@babel/preset-react": "^8.0.1",
"@babel/preset-typescript": "^7.29.7",
"@babel/cli": "catalog:",
"@babel/core": "catalog:",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@stylexjs/babel-plugin": "catalog:",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.6.0",
"@testing-library/react": "^16.3.2",
"@testing-library/jest-dom": "catalog:",
"@testing-library/react": "catalog:",
"@types/babel__core": "^7.20.5",
"rimraf": "^6.0.1"
},
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
},
"devDependencies": {
"@astryxdesign/cli": "workspace:*",
"@babel/cli": "catalog:",
"@babel/core": "catalog:",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@stylexjs/babel-plugin": "catalog:",
"@testing-library/react": "catalog:",
"@types/d3-array": "^3.2.2",
"@types/d3-scale": "^4.0.9",
"@types/d3-shape": "^3.1.8",
Expand Down
6 changes: 6 additions & 0 deletions packages/richtext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
},
"devDependencies": {
"@astryxdesign/cli": "workspace:*",
"@babel/cli": "catalog:",
"@babel/core": "catalog:",
"@babel/preset-react": "catalog:",
"@babel/preset-typescript": "catalog:",
"@lexical/code": "^0.46.0",
"@lexical/headless": "^0.46.0",
"@lexical/html": "^0.46.0",
Expand All @@ -122,6 +126,8 @@
"@lexical/rich-text": "^0.46.0",
"@lexical/selection": "^0.46.0",
"@lexical/utils": "^0.46.0",
"@stylexjs/babel-plugin": "catalog:",
"@testing-library/react": "catalog:",
"lexical": "^0.46.0",
"rimraf": "^6.0.1"
}
Expand Down
Loading
Loading