diff --git a/scripts/collect-changelog.ts b/scripts/collect-changelog.ts index 3a20324d2c..ab9000f479 100644 --- a/scripts/collect-changelog.ts +++ b/scripts/collect-changelog.ts @@ -2,6 +2,9 @@ import { execSync } from 'child_process' import chalk from 'chalk' import * as fs from 'fs' import * as path from 'path' +import { fileURLToPath } from 'url' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) type Product = 'web' | 'app' | 'hosting' diff --git a/scripts/i18n-import-check.ts b/scripts/i18n-import-check.ts index c66f761bf9..8af8abdc54 100644 --- a/scripts/i18n-import-check.ts +++ b/scripts/i18n-import-check.ts @@ -4,6 +4,9 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree' import chalk from 'chalk' import * as fs from 'fs' import * as path from 'path' +import { fileURLToPath } from 'url' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) // i18n symbols that should be imported from @modrinth/ui const I18N_SYMBOLS = ['useVIntl', 'defineMessage', 'defineMessages', 'IntlFormatted'] as const