Skip to content

Commit

Permalink
chore: work?
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Apr 30, 2024
1 parent 52488c7 commit a569d33
Show file tree
Hide file tree
Showing 5 changed files with 2,889 additions and 2,079 deletions.
672 changes: 336 additions & 336 deletions .yarn/releases/yarn-4.0.2.cjs → .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
59 changes: 30 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,52 +24,53 @@
"format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src tests",
"start": "yarn cleanbuild && node .",
"test": "vitest run",
"watch": "tsc -w"
"watch": "tsc -w",
"dev": "bun ./src/bun.ts"
},
"dependencies": {
"@discordjs/builders": "^1.7.0",
"@mikro-orm/sql-highlighter": "^1.0.1",
"@prisma/client": "^5.7.1",
"@sapphire/decorators": "^6.0.3",
"@sapphire/discord-utilities": "^3.2.1",
"@sapphire/discord.js-utilities": "^7.1.5",
"@sapphire/framework": "^5.0.5",
"@sapphire/plugin-logger": "^4.0.1",
"@sapphire/plugin-subcommands": "^6.0.2",
"@sapphire/stopwatch": "^1.5.1",
"@sapphire/time-utilities": "^1.7.11",
"@sapphire/timestamp": "^1.0.2",
"@sapphire/utilities": "^3.15.1",
"@prisma/client": "^5.13.0",
"@sapphire/decorators": "^6.1.0",
"@sapphire/discord-utilities": "^3.2.3",
"@sapphire/discord.js-utilities": "^7.2.0",
"@sapphire/framework": "^5.1.0",
"@sapphire/plugin-logger": "^4.0.2",
"@sapphire/plugin-subcommands": "^6.0.3",
"@sapphire/stopwatch": "^1.5.2",
"@sapphire/time-utilities": "^1.7.12",
"@sapphire/timestamp": "^1.0.3",
"@sapphire/utilities": "^3.15.3",
"@skyra/env-utilities": "^1.3.0",
"@skyra/jaro-winkler": "^1.1.1",
"bufferutil": "^4.0.8",
"colorette": "^2.0.20",
"confusables": "^1.1.1",
"discord-api-types": "^0.37.67",
"discord-api-types": "^0.37.71",
"discord.js": "^14.14.1",
"re2": "^1.20.9",
"re2": "^1.20.10",
"tslib": "^2.6.2",
"utf-8-validate": "^6.0.3",
"zlib-sync": "^0.1.9"
},
"devDependencies": {
"@sapphire/prettier-config": "^2.0.0",
"@sapphire/ts-config": "^5.0.0",
"@sapphire/ts-config": "^5.0.1",
"@types/lodash.merge": "^4.6.9",
"@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@vitest/coverage-v8": "^1.1.0",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitest/coverage-v8": "^1.5.2",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint-config-neon": "^0.1.57",
"eslint-formatter-pretty": "^6.0.0",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.62",
"eslint-formatter-pretty": "^6.0.1",
"lodash.merge": "^4.6.2",
"prettier": "^3.1.1",
"prisma": "^5.7.1",
"prettier": "^3.2.5",
"prisma": "^5.13.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vitest": "^1.1.0"
"typescript": "^5.4.5",
"vitest": "^1.5.2"
},
"author": {
"name": "Vlad Frangu",
Expand All @@ -78,9 +79,9 @@
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@4.0.2",
"packageManager": "yarn@4.1.1",
"volta": {
"node": "20.10.0",
"yarn": "4.0.2"
"node": "20.12.2",
"yarn": "4.1.1"
}
}
22 changes: 22 additions & 0 deletions src/bun.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { readFile, writeFile } from 'node:fs/promises';
import process from 'node:process';

const pkg = JSON.parse(await readFile('package.json', 'utf8'));

pkg.main = 'src/Highlight.ts';

await writeFile('package.json', JSON.stringify(pkg, null, '\t') + '\n');

// Graceful shutdown
for (const event of [
'SIGTERM', //
'SIGINT',
] as const) {
process.on(event, async () => {
pkg.main = 'dist/Highlight.js';
await writeFile('package.json', JSON.stringify(pkg, null, '\t') + '\n');
});
}

// @ts-expect-error We are in Bun!
await import('./Highlight.ts');
Loading

0 comments on commit a569d33

Please sign in to comment.