mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 17:03:15 +00:00
chore(deps): update npm packages and adapt major upgrades
Resolve the MikroORM packages together and use the dispatcher adapter with older built-in fetch implementations. Preserve existing Lucide names and regenerate the Studio and SDK catalogs.
This commit is contained in:
@@ -4,22 +4,26 @@
|
||||
// The SDK ships no lucide dependency of its own (it is a dependency-light CLI), so
|
||||
// the name list is a checked-in snapshot rather than a runtime lookup — same shape
|
||||
// as KNOWN_ADDONS in src/manifest.ts.
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
import { createRequire } from 'node:module';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const require = createRequire(join(here, '..', '..', 'package.json'));
|
||||
|
||||
const dynamicIconImports = require('lucide-react/dynamicIconImports.js');
|
||||
const iconsByKebabName = dynamicIconImports.default ?? dynamicIconImports;
|
||||
const { default: iconsByKebabName } = await import(
|
||||
pathToFileURL(require.resolve('lucide-react/dynamicIconImports')).href
|
||||
);
|
||||
const { version } = require('lucide-react/package.json');
|
||||
const legacyIcons = JSON.parse(readFileSync(
|
||||
new URL('../../client/src/components/shared/legacy-lucide-icons.json', import.meta.url), 'utf8',
|
||||
));
|
||||
|
||||
const toPascalCase = (kebab) =>
|
||||
kebab.split('-').map((part) => part[0].toUpperCase() + part.slice(1)).join('');
|
||||
|
||||
const names = Object.keys(iconsByKebabName).map(toPascalCase).sort();
|
||||
const names = [...new Set([...Object.keys(iconsByKebabName).map(toPascalCase), ...Object.keys(legacyIcons)])].sort();
|
||||
|
||||
const source = `// GENERATED — do not edit by hand.
|
||||
// Snapshot of every lucide icon name (lucide-react ${version}), used by
|
||||
|
||||
Reference in New Issue
Block a user