style: pretty please (#255)

Co-authored-by: jacoobes <jacoobes@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-03-15 21:16:58 -05:00
committed by GitHub
parent 05037b5315
commit 0a53a48521
6 changed files with 2385 additions and 1687 deletions

View File

@@ -18,7 +18,7 @@
"lint": "eslint src/**/*.ts",
"format": "eslint src/**/*.ts --fix",
"build:dev": "tsup && tsup --dts-only --outDir dist",
"build:prod" : "tsup --minify && tsup --dts-only --outDir dist",
"build:prod": "tsup --minify && tsup --dts-only --outDir dist",
"publish": "npm run build:prod && npm publish",
"pretty": "prettier --write ."
},

4051
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ import SernEmitter from '../sernEmitter';
import type { EventEmitter } from 'node:events';
export function makeReadyEvent(
[sEmitter, client, errorHandler, ,moduleManager]: [
[sEmitter, client, errorHandler, , moduleManager]: [
SernEmitter,
EventEmitter,
ErrorHandling,

View File

@@ -1,6 +1,6 @@
import { readdirSync, statSync } from 'fs';
import { join } from 'path';
import { type Observable, from, mergeAll } from 'rxjs';
import { type Observable, from, mergeAll } from 'rxjs';
import { SernError } from '../structures/errors';
import { type Result, Err, Ok } from 'ts-results-es';
@@ -45,7 +45,7 @@ export function buildData<T>(commandDir: string): Observable<
/// #elif MODE === 'cjs'
= require(absPath).default;
/// #endif
if (module === undefined) {
return Err(SernError.UndefinedModule);
}

View File

@@ -1,4 +1,3 @@
/**
* Removes the first character(s) _[depending on prefix length]_ of the message
* @param msg

View File

@@ -1,6 +1,6 @@
import { defineConfig } from 'tsup';
import { writeFile } from 'fs/promises';
import ifdefPlugin from 'esbuild-ifdef'
import ifdefPlugin from 'esbuild-ifdef';
const shared = {
entry: ['src/index.ts'],
external: ['discord.js'],
@@ -15,17 +15,15 @@ export default defineConfig([
tsconfig: './tsconfig-esm.json',
outDir: './dist/esm',
treeshake: true,
esbuildPlugins: [
ifdefPlugin({ variables: { MODE: 'esm' }, verbose: true })
],
esbuildPlugins: [ifdefPlugin({ variables: { MODE: 'esm' }, verbose: true })],
outExtension() {
return {
js: '.mjs',
};
},
async onSuccess() {
console.log('writing json esm')
await writeFile('./dist/esm/package.json', JSON.stringify({ type: 'module' }))
console.log('writing json esm');
await writeFile('./dist/esm/package.json', JSON.stringify({ type: 'module' }));
},
...shared,
},
@@ -42,7 +40,7 @@ export default defineConfig([
};
},
async onSuccess() {
console.log('writing json commonjs')
console.log('writing json commonjs');
await writeFile('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }));
},
...shared,