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:
@@ -17,6 +17,9 @@ const here = dirname(fileURLToPath(import.meta.url));
|
||||
const lucide = join(here, '..', '..', 'node_modules', 'lucide-react');
|
||||
const { version } = JSON.parse(readFileSync(join(lucide, 'package.json'), 'utf8'));
|
||||
const declarations = readFileSync(join(lucide, 'dist', 'lucide-react.d.ts'), 'utf8');
|
||||
const legacyIcons = JSON.parse(
|
||||
readFileSync(new URL('../../client/src/components/shared/legacy-lucide-icons.json', import.meta.url), 'utf8'),
|
||||
);
|
||||
|
||||
/** The last `export { ... };` of the declarations, which names every icon and its aliases. */
|
||||
const exportLine = declarations
|
||||
@@ -37,11 +40,11 @@ const exported = exportLine
|
||||
.pop(),
|
||||
)
|
||||
.filter((name) => PASCAL_CASE.test(name));
|
||||
const present = new Set(exported);
|
||||
const present = new Set([...exported, ...Object.keys(legacyIcons)]);
|
||||
const names = [...present]
|
||||
.filter((name) => !(name.startsWith('Lucide') && present.has(name.slice(6))))
|
||||
.filter((name) => !(name.endsWith('Icon') && present.has(name.slice(0, -4))))
|
||||
.filter((name) => name !== 'Icon')
|
||||
.filter((name) => name !== 'Icon' && name !== 'LucideProvider')
|
||||
.sort();
|
||||
|
||||
/** The three files and the initials each holds, so none of them passes a thousand lines. */
|
||||
|
||||
Reference in New Issue
Block a user