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
6 changes: 3 additions & 3 deletions packages/foundations/assets/fonts/generate-eu-fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { glob } from 'glob';
import { execFile } from 'node:child_process';
import { promisify } from 'node:util';

import { dirname } from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename).replaceAll('\\', '/');
Expand All @@ -27,7 +27,7 @@ const generateFonts = async () => {
try {
const files = await glob(`${__dirname}/*.ttf`);

for (const file of files.map(f=> f.replaceAll('\\', '/'))) {
for (const file of files.map((f) => f.replaceAll('\\', '/'))) {
// Security: Validate that the file is within the expected directory
// and has the expected extension to prevent path traversal attacks
if (!file.startsWith(__dirname) || !file.endsWith('.ttf')) {
Expand Down
3 changes: 1 addition & 2 deletions storybooks/_storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { dirname, join } from 'path';
import { dirname, join } from 'node:path';

/**
* This function is used to resolve the absolute path of a package.
Expand All @@ -22,7 +22,6 @@ const config: StorybookConfig = {
async viteFinal(config) {
const { mergeConfig } = await import('vite');


return mergeConfig(config, {
// TODO: Remove `/storybook` after removing patternhub
base: `${baseUrl}/composition-storybook`
Expand Down
2 changes: 1 addition & 1 deletion storybooks/angular-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StorybookConfig } from '@storybook/angular';

import { dirname, join } from 'path';
import { dirname, join } from 'node:path';

/**
* This function is used to resolve the absolute path of a package.
Expand Down
2 changes: 1 addition & 1 deletion storybooks/react-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { dirname, join } from 'path';
import { dirname, join } from 'node:path';

/**
* This function is used to resolve the absolute path of a package.
Expand Down
2 changes: 1 addition & 1 deletion storybooks/vue-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { StorybookConfig } from '@storybook/vue3-vite';
import { dirname, join } from 'path';
import { dirname, join } from 'node:path';

/**
* This function is used to resolve the absolute path of a package.
Expand Down
Loading