chore(deps): upgrade TypeScript to v5.5 and enable isolatedDeclarations

This commit is contained in:
Joakim Carlstein 2024-06-27 13:18:31 +02:00 committed by Joakim Carlstein
parent ef848a0553
commit d779286084
31 changed files with 512 additions and 458 deletions

View file

@ -0,0 +1,10 @@
---
'@emigrate/reporter-pino': patch
'@emigrate/plugin-tools': patch
'@emigrate/postgres': patch
'@emigrate/tsconfig': patch
'@emigrate/mysql': patch
'@emigrate/cli': patch
---
Upgrade TypeScript to v5.5 and enable [isolatedDeclarations](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#isolated-declarations)

View file

@ -80,9 +80,9 @@
"lint-staged": "15.2.0", "lint-staged": "15.2.0",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"prettier": "3.1.1", "prettier": "3.1.1",
"tsx": "4.7.0", "tsx": "4.15.7",
"turbo": "1.10.16", "turbo": "1.10.16",
"typescript": "5.3.3", "typescript": "5.5.2",
"xo": "0.56.0" "xo": "0.56.0"
} }
} }

View file

@ -1,12 +1,12 @@
import { type MigrationHistoryEntry, type MigrationMetadata, type MigrationMetadataFinished } from '@emigrate/types'; import { type MigrationHistoryEntry, type MigrationMetadata, type MigrationMetadataFinished } from '@emigrate/types';
import { toMigrationMetadata } from './to-migration-metadata.js'; import { toMigrationMetadata } from './to-migration-metadata.js';
import { getMigrations as getMigrationsOriginal } from './get-migrations.js'; import { getMigrations as getMigrationsOriginal, type GetMigrationsFunction } from './get-migrations.js';
export async function* collectMigrations( export async function* collectMigrations(
cwd: string, cwd: string,
directory: string, directory: string,
history: AsyncIterable<MigrationHistoryEntry>, history: AsyncIterable<MigrationHistoryEntry>,
getMigrations = getMigrationsOriginal, getMigrations: GetMigrationsFunction = getMigrationsOriginal,
): AsyncIterable<MigrationMetadata | MigrationMetadataFinished> { ): AsyncIterable<MigrationMetadata | MigrationMetadataFinished> {
const allMigrations = await getMigrations(cwd, directory); const allMigrations = await getMigrations(cwd, directory);
const seen = new Set<string>(); const seen = new Set<string>();

View file

@ -17,7 +17,7 @@ export default async function listCommand({
storage: storageConfig, storage: storageConfig,
color, color,
cwd, cwd,
}: Config & ExtraFlags) { }: Config & ExtraFlags): Promise<number> {
if (!directory) { if (!directory) {
throw MissingOptionError.fromOption('directory'); throw MissingOptionError.fromOption('directory');
} }

View file

@ -24,7 +24,7 @@ type ExtraFlags = {
export default async function newCommand( export default async function newCommand(
{ directory, template, reporter: reporterConfig, plugins = [], cwd, extension, color }: Config & ExtraFlags, { directory, template, reporter: reporterConfig, plugins = [], cwd, extension, color }: Config & ExtraFlags,
name: string, name: string,
) { ): Promise<void> {
if (!directory) { if (!directory) {
throw MissingOptionError.fromOption('directory'); throw MissingOptionError.fromOption('directory');
} }

View file

@ -39,7 +39,7 @@ export default async function removeCommand(
getMigrations, getMigrations,
}: Config & ExtraFlags, }: Config & ExtraFlags,
name: string, name: string,
) { ): Promise<number> {
if (!directory) { if (!directory) {
throw MissingOptionError.fromOption('directory'); throw MissingOptionError.fromOption('directory');
} }

View file

@ -8,7 +8,7 @@ import { serializeError, errorConstructors, deserializeError } from 'serialize-e
const formatter = new Intl.ListFormat('en', { style: 'long', type: 'disjunction' }); const formatter = new Intl.ListFormat('en', { style: 'long', type: 'disjunction' });
export const toError = (error: unknown) => (error instanceof Error ? error : new Error(String(error))); export const toError = (error: unknown): Error => (error instanceof Error ? error : new Error(String(error)));
export const toSerializedError = (error: unknown) => { export const toSerializedError = (error: unknown) => {
const errorInstance = toError(error); const errorInstance = toError(error);
@ -30,7 +30,7 @@ export class EmigrateError extends Error {
export class ShowUsageError extends EmigrateError {} export class ShowUsageError extends EmigrateError {}
export class MissingOptionError extends ShowUsageError { export class MissingOptionError extends ShowUsageError {
static fromOption(option: string | string[]) { static fromOption(option: string | string[]): MissingOptionError {
return new MissingOptionError( return new MissingOptionError(
`Missing required option: ${Array.isArray(option) ? formatter.format(option) : option}`, `Missing required option: ${Array.isArray(option) ? formatter.format(option) : option}`,
undefined, undefined,
@ -48,7 +48,7 @@ export class MissingOptionError extends ShowUsageError {
} }
export class MissingArgumentsError extends ShowUsageError { export class MissingArgumentsError extends ShowUsageError {
static fromArgument(argument: string) { static fromArgument(argument: string): MissingArgumentsError {
return new MissingArgumentsError(`Missing required argument: ${argument}`, undefined, argument); return new MissingArgumentsError(`Missing required argument: ${argument}`, undefined, argument);
} }
@ -62,7 +62,7 @@ export class MissingArgumentsError extends ShowUsageError {
} }
export class OptionNeededError extends ShowUsageError { export class OptionNeededError extends ShowUsageError {
static fromOption(option: string, message: string) { static fromOption(option: string, message: string): OptionNeededError {
return new OptionNeededError(message, undefined, option); return new OptionNeededError(message, undefined, option);
} }
@ -76,7 +76,7 @@ export class OptionNeededError extends ShowUsageError {
} }
export class BadOptionError extends ShowUsageError { export class BadOptionError extends ShowUsageError {
static fromOption(option: string, message: string) { static fromOption(option: string, message: string): BadOptionError {
return new BadOptionError(message, undefined, option); return new BadOptionError(message, undefined, option);
} }
@ -96,7 +96,7 @@ export class UnexpectedError extends EmigrateError {
} }
export class MigrationHistoryError extends EmigrateError { export class MigrationHistoryError extends EmigrateError {
static fromHistoryEntry(entry: FailedMigrationHistoryEntry) { static fromHistoryEntry(entry: FailedMigrationHistoryEntry): MigrationHistoryError {
return new MigrationHistoryError(`Migration ${entry.name} is in a failed state, it should be fixed and removed`, { return new MigrationHistoryError(`Migration ${entry.name} is in a failed state, it should be fixed and removed`, {
cause: deserializeError(entry.error), cause: deserializeError(entry.error),
}); });
@ -108,7 +108,7 @@ export class MigrationHistoryError extends EmigrateError {
} }
export class MigrationLoadError extends EmigrateError { export class MigrationLoadError extends EmigrateError {
static fromMetadata(metadata: MigrationMetadata, cause?: Error) { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationLoadError {
return new MigrationLoadError(`Failed to load migration file: ${metadata.relativeFilePath}`, { cause }); return new MigrationLoadError(`Failed to load migration file: ${metadata.relativeFilePath}`, { cause });
} }
@ -118,7 +118,7 @@ export class MigrationLoadError extends EmigrateError {
} }
export class MigrationRunError extends EmigrateError { export class MigrationRunError extends EmigrateError {
static fromMetadata(metadata: FailedMigrationMetadata) { static fromMetadata(metadata: FailedMigrationMetadata): MigrationRunError {
return new MigrationRunError(`Failed to run migration: ${metadata.relativeFilePath}`, { cause: metadata.error }); return new MigrationRunError(`Failed to run migration: ${metadata.relativeFilePath}`, { cause: metadata.error });
} }
@ -128,7 +128,7 @@ export class MigrationRunError extends EmigrateError {
} }
export class MigrationNotRunError extends EmigrateError { export class MigrationNotRunError extends EmigrateError {
static fromMetadata(metadata: MigrationMetadata, cause?: Error) { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationNotRunError {
return new MigrationNotRunError(`Migration "${metadata.name}" is not in the migration history`, { cause }); return new MigrationNotRunError(`Migration "${metadata.name}" is not in the migration history`, { cause });
} }
@ -138,7 +138,7 @@ export class MigrationNotRunError extends EmigrateError {
} }
export class MigrationRemovalError extends EmigrateError { export class MigrationRemovalError extends EmigrateError {
static fromMetadata(metadata: MigrationMetadata, cause?: Error) { static fromMetadata(metadata: MigrationMetadata, cause?: Error): MigrationRemovalError {
return new MigrationRemovalError(`Failed to remove migration: ${metadata.relativeFilePath}`, { cause }); return new MigrationRemovalError(`Failed to remove migration: ${metadata.relativeFilePath}`, { cause });
} }
@ -148,7 +148,7 @@ export class MigrationRemovalError extends EmigrateError {
} }
export class StorageInitError extends EmigrateError { export class StorageInitError extends EmigrateError {
static fromError(error: Error) { static fromError(error: Error): StorageInitError {
return new StorageInitError('Could not initialize storage', { cause: error }); return new StorageInitError('Could not initialize storage', { cause: error });
} }
@ -158,11 +158,11 @@ export class StorageInitError extends EmigrateError {
} }
export class CommandAbortError extends EmigrateError { export class CommandAbortError extends EmigrateError {
static fromSignal(signal: NodeJS.Signals) { static fromSignal(signal: NodeJS.Signals): CommandAbortError {
return new CommandAbortError(`Command aborted due to signal: ${signal}`); return new CommandAbortError(`Command aborted due to signal: ${signal}`);
} }
static fromReason(reason: string, cause?: unknown) { static fromReason(reason: string, cause?: unknown): CommandAbortError {
return new CommandAbortError(`Command aborted: ${reason}`, { cause }); return new CommandAbortError(`Command aborted: ${reason}`, { cause });
} }
@ -172,7 +172,7 @@ export class CommandAbortError extends EmigrateError {
} }
export class ExecutionDesertedError extends EmigrateError { export class ExecutionDesertedError extends EmigrateError {
static fromReason(reason: string, cause?: Error) { static fromReason(reason: string, cause?: Error): ExecutionDesertedError {
return new ExecutionDesertedError(`Execution deserted: ${reason}`, { cause }); return new ExecutionDesertedError(`Execution deserted: ${reason}`, { cause });
} }

View file

@ -1,6 +1,6 @@
import process from 'node:process'; import process from 'node:process';
export const getDuration = (start: [number, number]) => { export const getDuration = (start: [number, number]): number => {
const [seconds, nanoseconds] = process.hrtime(start); const [seconds, nanoseconds] = process.hrtime(start);
return seconds * 1000 + nanoseconds / 1_000_000; return seconds * 1000 + nanoseconds / 1_000_000;
}; };

View file

@ -39,6 +39,6 @@ export const getMigrations = async (cwd: string, directory: string): Promise<Mig
extension: withLeadingPeriod(path.extname(name)), extension: withLeadingPeriod(path.extname(name)),
directory, directory,
cwd, cwd,
} satisfies MigrationMetadata; };
}); });
}; };

View file

@ -28,4 +28,7 @@ const getPackageInfo = async () => {
throw new UnexpectedError(`Could not read package info from: ${packageInfoPath}`); throw new UnexpectedError(`Could not read package info from: ${packageInfoPath}`);
}; };
export const { version } = await getPackageInfo(); const packageInfo = await getPackageInfo();
// eslint-disable-next-line prefer-destructuring
export const version: string = packageInfo.version;

View file

@ -1,5 +1,5 @@
export * from './types.js'; export * from './types.js';
export const emigrate = () => { export const emigrate = (): void => {
// console.log('Done!'); // console.log('Done!');
}; };

View file

@ -471,6 +471,6 @@ class DefaultReporter implements Required<EmigrateReporter> {
} }
} }
const reporterDefault = interactive ? new DefaultFancyReporter() : new DefaultReporter(); const reporterDefault: EmigrateReporter = interactive ? new DefaultFancyReporter() : new DefaultReporter();
export default reporterDefault; export default reporterDefault;

View file

@ -1,7 +1,8 @@
import type { EmigrateReporter } from '@emigrate/types';
import { type Config } from '../types.js'; import { type Config } from '../types.js';
import * as reporters from './index.js'; import * as reporters from './index.js';
export const getStandardReporter = (reporter?: Config['reporter']) => { export const getStandardReporter = (reporter?: Config['reporter']): EmigrateReporter | undefined => {
if (!reporter) { if (!reporter) {
return reporters.pretty; return reporters.pretty;
} }
@ -10,5 +11,5 @@ export const getStandardReporter = (reporter?: Config['reporter']) => {
return reporters[reporter as keyof typeof reporters]; return reporters[reporter as keyof typeof reporters];
} }
return; // eslint-disable-line no-useless-return return undefined;
}; };

View file

@ -55,6 +55,6 @@ class JsonReporter implements EmigrateReporter {
} }
} }
const jsonReporter = new JsonReporter() as EmigrateReporter; const jsonReporter: EmigrateReporter = new JsonReporter();
export default jsonReporter; export default jsonReporter;

View file

@ -15,7 +15,7 @@ export type Mocked<T> = {
[K in keyof T]: Mock<T[K]>; [K in keyof T]: Mock<T[K]>;
}; };
export async function noop() { export async function noop(): Promise<void> {
// noop // noop
} }
@ -31,8 +31,8 @@ export function getErrorCause(error: Error | undefined): Error | SerializedError
return undefined; return undefined;
} }
export function getMockedStorage(historyEntries: Array<string | MigrationHistoryEntry>) { export function getMockedStorage(historyEntries: Array<string | MigrationHistoryEntry>): Mocked<Storage> {
const storage: Mocked<Storage> = { return {
lock: mock.fn(async (migrations) => migrations), lock: mock.fn(async (migrations) => migrations),
unlock: mock.fn(async () => { unlock: mock.fn(async () => {
// void // void
@ -45,8 +45,6 @@ export function getMockedStorage(historyEntries: Array<string | MigrationHistory
onError: mock.fn(), onError: mock.fn(),
end: mock.fn(), end: mock.fn(),
}; };
return storage;
} }
export function getMockedReporter(): Mocked<Required<EmigrateReporter>> { export function getMockedReporter(): Mocked<Required<EmigrateReporter>> {

View file

@ -1 +1 @@
export const withLeadingPeriod = (string: string) => (string.startsWith('.') ? string : `.${string}`); export const withLeadingPeriod = (string: string): string => (string.startsWith('.') ? string : `.${string}`);

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -13,7 +13,9 @@ import {
} from 'mysql2/promise'; } from 'mysql2/promise';
import { getTimestampPrefix, sanitizeMigrationName } from '@emigrate/plugin-tools'; import { getTimestampPrefix, sanitizeMigrationName } from '@emigrate/plugin-tools';
import { import {
type Awaitable,
type MigrationMetadata, type MigrationMetadata,
type MigrationFunction,
type EmigrateStorage, type EmigrateStorage,
type LoaderPlugin, type LoaderPlugin,
type Storage, type Storage,
@ -345,17 +347,6 @@ export const createMysqlStorage = ({ table = defaultTable, connection }: MysqlSt
}; };
}; };
export const { initializeStorage } = createMysqlStorage({
table: process.env['MYSQL_TABLE'],
connection: process.env['MYSQL_URL'] ?? {
host: process.env['MYSQL_HOST'],
port: process.env['MYSQL_PORT'] ? Number.parseInt(process.env['MYSQL_PORT'], 10) : undefined,
user: process.env['MYSQL_USER'],
password: process.env['MYSQL_PASSWORD'],
database: process.env['MYSQL_DATABASE'],
},
});
export const createMysqlLoader = ({ connection }: MysqlLoaderOptions): LoaderPlugin => { export const createMysqlLoader = ({ connection }: MysqlLoaderOptions): LoaderPlugin => {
return { return {
loadableExtensions: ['.sql'], loadableExtensions: ['.sql'],
@ -374,7 +365,16 @@ export const createMysqlLoader = ({ connection }: MysqlLoaderOptions): LoaderPlu
}; };
}; };
export const { loadableExtensions, loadMigration } = createMysqlLoader({ export const generateMigration: GenerateMigrationFunction = async (name) => {
return {
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.sql`,
content: `-- Migration: ${name}
`,
};
};
const storage = createMysqlStorage({
table: process.env['MYSQL_TABLE'],
connection: process.env['MYSQL_URL'] ?? { connection: process.env['MYSQL_URL'] ?? {
host: process.env['MYSQL_HOST'], host: process.env['MYSQL_HOST'],
port: process.env['MYSQL_PORT'] ? Number.parseInt(process.env['MYSQL_PORT'], 10) : undefined, port: process.env['MYSQL_PORT'] ? Number.parseInt(process.env['MYSQL_PORT'], 10) : undefined,
@ -384,13 +384,22 @@ export const { loadableExtensions, loadMigration } = createMysqlLoader({
}, },
}); });
export const generateMigration: GenerateMigrationFunction = async (name) => { const loader = createMysqlLoader({
return { connection: process.env['MYSQL_URL'] ?? {
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.sql`, host: process.env['MYSQL_HOST'],
content: `-- Migration: ${name} port: process.env['MYSQL_PORT'] ? Number.parseInt(process.env['MYSQL_PORT'], 10) : undefined,
`, user: process.env['MYSQL_USER'],
}; password: process.env['MYSQL_PASSWORD'],
}; database: process.env['MYSQL_DATABASE'],
},
});
// eslint-disable-next-line prefer-destructuring
export const initializeStorage: () => Promise<Storage> = storage.initializeStorage;
// eslint-disable-next-line prefer-destructuring
export const loadableExtensions: string[] = loader.loadableExtensions;
// eslint-disable-next-line prefer-destructuring
export const loadMigration: (migration: MigrationMetadata) => Awaitable<MigrationFunction> = loader.loadMigration;
const defaultExport: EmigrateStorage & LoaderPlugin & GeneratorPlugin = { const defaultExport: EmigrateStorage & LoaderPlugin & GeneratorPlugin = {
initializeStorage, initializeStorage,

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -204,7 +204,7 @@ const load = async <T>(
* *
* @returns A timestamp string in the format YYYYMMDDHHmmssmmm * @returns A timestamp string in the format YYYYMMDDHHmmssmmm
*/ */
export const getTimestampPrefix = () => new Date().toISOString().replaceAll(/[-:ZT.]/g, ''); export const getTimestampPrefix = (): string => new Date().toISOString().replaceAll(/[-:ZT.]/g, '');
/** /**
* A utility function to sanitize a migration name so that it can be used as a filename * A utility function to sanitize a migration name so that it can be used as a filename
@ -212,7 +212,7 @@ export const getTimestampPrefix = () => new Date().toISOString().replaceAll(/[-:
* @param name A migration name to sanitize * @param name A migration name to sanitize
* @returns A sanitized migration name that can be used as a filename * @returns A sanitized migration name that can be used as a filename
*/ */
export const sanitizeMigrationName = (name: string) => export const sanitizeMigrationName = (name: string): string =>
name name
.replaceAll(/[\W/\\:|*?'"<>_]+/g, '_') .replaceAll(/[\W/\\:|*?'"<>_]+/g, '_')
.trim() .trim()

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -11,6 +11,8 @@ import {
type GeneratorPlugin, type GeneratorPlugin,
type SerializedError, type SerializedError,
type MigrationHistoryEntry, type MigrationHistoryEntry,
type Awaitable,
type MigrationFunction,
} from '@emigrate/types'; } from '@emigrate/types';
const defaultTable = 'migrations'; const defaultTable = 'migrations';
@ -255,17 +257,6 @@ export const createPostgresStorage = ({
}; };
}; };
export const { initializeStorage } = createPostgresStorage({
table: process.env['POSTGRES_TABLE'],
connection: process.env['POSTGRES_URL'] ?? {
host: process.env['POSTGRES_HOST'],
port: process.env['POSTGRES_PORT'] ? Number.parseInt(process.env['POSTGRES_PORT'], 10) : undefined,
user: process.env['POSTGRES_USER'],
password: process.env['POSTGRES_PASSWORD'],
database: process.env['POSTGRES_DB'],
},
});
export const createPostgresLoader = ({ connection }: PostgresLoaderOptions): LoaderPlugin => { export const createPostgresLoader = ({ connection }: PostgresLoaderOptions): LoaderPlugin => {
return { return {
loadableExtensions: ['.sql'], loadableExtensions: ['.sql'],
@ -284,7 +275,16 @@ export const createPostgresLoader = ({ connection }: PostgresLoaderOptions): Loa
}; };
}; };
export const { loadableExtensions, loadMigration } = createPostgresLoader({ export const generateMigration: GenerateMigrationFunction = async (name) => {
return {
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.sql`,
content: `-- Migration: ${name}
`,
};
};
const storage = createPostgresStorage({
table: process.env['POSTGRES_TABLE'],
connection: process.env['POSTGRES_URL'] ?? { connection: process.env['POSTGRES_URL'] ?? {
host: process.env['POSTGRES_HOST'], host: process.env['POSTGRES_HOST'],
port: process.env['POSTGRES_PORT'] ? Number.parseInt(process.env['POSTGRES_PORT'], 10) : undefined, port: process.env['POSTGRES_PORT'] ? Number.parseInt(process.env['POSTGRES_PORT'], 10) : undefined,
@ -294,13 +294,22 @@ export const { loadableExtensions, loadMigration } = createPostgresLoader({
}, },
}); });
export const generateMigration: GenerateMigrationFunction = async (name) => { const loader = createPostgresLoader({
return { connection: process.env['POSTGRES_URL'] ?? {
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.sql`, host: process.env['POSTGRES_HOST'],
content: `-- Migration: ${name} port: process.env['POSTGRES_PORT'] ? Number.parseInt(process.env['POSTGRES_PORT'], 10) : undefined,
`, user: process.env['POSTGRES_USER'],
}; password: process.env['POSTGRES_PASSWORD'],
}; database: process.env['POSTGRES_DB'],
},
});
// eslint-disable-next-line prefer-destructuring
export const initializeStorage: () => Promise<Storage> = storage.initializeStorage;
// eslint-disable-next-line prefer-destructuring
export const loadableExtensions: string[] = loader.loadableExtensions;
// eslint-disable-next-line prefer-destructuring
export const loadMigration: (migration: MigrationMetadata) => Awaitable<MigrationFunction> = loader.loadMigration;
const defaultExport: EmigrateStorage & LoaderPlugin & GeneratorPlugin = { const defaultExport: EmigrateStorage & LoaderPlugin & GeneratorPlugin = {
initializeStorage, initializeStorage,

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -204,6 +204,8 @@ export const createPinoReporter = (options: PinoReporterOptions = {}): EmigrateR
return new PinoReporter(options); return new PinoReporter(options);
}; };
export default createPinoReporter({ const defaultExport: EmigrateReporter = createPinoReporter({
level: process.env['LOG_LEVEL'], level: process.env['LOG_LEVEL'],
}); });
export default defaultExport;

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

View file

@ -11,6 +11,7 @@
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"inlineSources": false, "inlineSources": false,
"isolatedModules": true, "isolatedModules": true,
"isolatedDeclarations": true,
"incremental": true, "incremental": true,
"module": "NodeNext", "module": "NodeNext",
"moduleResolution": "NodeNext", "moduleResolution": "NodeNext",
@ -31,5 +32,7 @@
"strict": true, "strict": true,
"target": "ES2022", "target": "ES2022",
"lib": ["ESNext", "DOM", "DOM.Iterable"] "lib": ["ESNext", "DOM", "DOM.Iterable"]
} },
"include": ["${configDir}/src"],
"exclude": ["${configDir}/dist"]
} }

View file

@ -3,6 +3,7 @@
"display": "Build", "display": "Build",
"extends": "./base.json", "extends": "./base.json",
"compilerOptions": { "compilerOptions": {
"noEmit": false "noEmit": false,
"outDir": "${configDir}/dist"
} }
} }

View file

@ -1,8 +1,3 @@
{ {
"extends": "@emigrate/tsconfig/build.json", "extends": "@emigrate/tsconfig/build.json"
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
} }

722
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff