Skip to content

Commit

Permalink
ExpirableRedisAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
MARCROCK22 committed Sep 17, 2024
1 parent 07dff61 commit dfff823
Show file tree
Hide file tree
Showing 31 changed files with 925 additions and 708 deletions.
186 changes: 85 additions & 101 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,101 +1,85 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"linter": {
"enabled": true,
"rules": {
"all": true,
"security": {
"noGlobalEval": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noAssignInExpressions": "off",
"noUnsafeDeclarationMerging": "off",
"noEmptyInterface": "off",
"noConfusingVoidType": "off",
"noImplicitAnyLet": "off",
"noEmptyBlockStatements": "off",
"useAwait": "off",
"noConsoleLog": "off",
"noAsyncPromiseExecutor": "off",
"noThenProperty": "off"
},
"style": {
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useExportType": "error",
"useImportType": "error",
"useNodejsImportProtocol": "error",
"useNamingConvention": "off",
"noParameterProperties": "off",
"useFilenamingConvention": "off",
"noNamespaceImport": "off",
"useSingleCaseStatement": "off",
"useBlockStatements": "off",
"useEnumInitializers": "off",
"noArguments": "off",
"useForOf": "off"
},
"correctness": {
"noUnusedVariables": "off",
"noNodejsModules": "off"
},
"nursery": {
"useImportRestrictions": "off"
},
"complexity": {
"noUselessLoneBlockStatements": "warn",
"noBannedTypes": "off",
"noForEach": "off",
"noUselessConstructor": "off",
"noExcessiveCognitiveComplexity": "off",
"noStaticOnlyClass": "off"
},
"a11y": {
"all": false
},
"performance": {
"noDelete": "off",
"noBarrelFile": "off",
"noReExportAll": "off"
}
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"lineWidth": 80
}
},
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "tab",
"lineWidth": 120,
"lineEnding": "crlf",
"formatWithErrors": true
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"arrowParentheses": "asNeeded",
"bracketSameLine": true,
"semicolons": "always"
}
},
"files": {
"ignoreUnknown": true,
"ignore": [
"node_modules/",
"build",
"lib",
"__test__",
"package.json",
"tsconfig.json"
]
},
"organizeImports": {
"enabled": false
}
}
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": true,
"ignore": ["node_modules/", "build", "lib", "__test__", "package.json", "tsconfig.json", ".vscode"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 120,
"lineEnding": "crlf",
"formatWithErrors": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"all": true,
"security": {
"noGlobalEval": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noAssignInExpressions": "off",
"useAwait": "off",
"noConfusingVoidType": "off",
"noAsyncPromiseExecutor": "off",
"noUnsafeDeclarationMerging": "off",
"noEmptyInterface": "off",
"noThenProperty": "off"
},
"correctness": {
"noNodejsModules": "off",
"useImportExtensions": "off",
"noUnusedFunctionParameters": "off",
"noUnusedVariables": "off",
"noUndeclaredDependencies": "off"
},
"style": {
"noDefaultExport": "off",
"useBlockStatements": "off",
"noParameterProperties": "off",
"useNamingConvention": "off",
"noNonNullAssertion": "off",
"useForOf": "off",
"useDefaultSwitchClause": "off",
"noParameterAssign": "off",
"useFilenamingConvention": "off",
"useEnumInitializers": "off",
"useExplicitLengthCheck": "off",
"noNamespaceImport": "off"
},
"complexity": {
"noForEach": "off",
"noExcessiveCognitiveComplexity": "off",
"noUselessConstructor": "off",
"noBannedTypes": "off"
},
"performance": {
"noBarrelFile": "off",
"noDelete": "off",
"noReExportAll": "off",
"useTopLevelRegex": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"arrowParentheses": "asNeeded",
"bracketSameLine": true
}
}
}
44 changes: 23 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"name": "seyfert",
"private": true,
"workspaces": ["packages/*"],
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "turbo format",
"test": "turbo test",
"check": "turbo run lint format build test"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"turbo": "^2.0.13"
},
"packageManager": "pnpm@9.7.0",
"engines": {
"node": ">=18"
}
}
{
"name": "seyfert",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "turbo format",
"test": "turbo test",
"check": "turbo run --concurrency 32 lint format build test checkb"
},
"devDependencies": {
"@biomejs/biome": "1.9.1",
"turbo": "^2.0.13"
},
"packageManager": "pnpm@9.7.0",
"engines": {
"node": ">=18"
}
}
4 changes: 4 additions & 0 deletions packages/chartjs/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"extends": ["../../biome.json"]
}
59 changes: 30 additions & 29 deletions packages/chartjs/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
{
"name": "@slipher/chartjs",
"version": "0.0.1",
"private": false,
"license": "MIT",
"publishConfig": {
"access": "public"
},
"files": [
"lib/**"
],
"main": "./lib/index.js",
"module": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"lint": "biome lint --write ./src",
"format": "biome format --write ./src"
},
"devDependencies": {
"@types/node": "^22.3.0",
"typescript": "^5.5.4"
},
"dependencies": {
"@napi-rs/canvas": "^0.1.54",
"chart.js": "^4.4.4"
}
}
{
"name": "@slipher/chartjs",
"version": "0.0.1",
"private": false,
"license": "MIT",
"publishConfig": {
"access": "public"
},
"files": [
"lib/**"
],
"main": "./lib/index.js",
"module": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"lint": "biome lint --write ./src",
"format": "biome format --write ./src",
"checkb": "biome check --write --no-errors-on-unmatched ./src"
},
"devDependencies": {
"@types/node": "^22.3.0",
"typescript": "^5.5.4"
},
"dependencies": {
"@napi-rs/canvas": "^0.1.54",
"chart.js": "^4.4.4"
}
}
2 changes: 1 addition & 1 deletion packages/chartjs/src/backgroundcolorplugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Plugin as ChartJSPlugin, Chart as ChartJS } from 'chart.js';
import type { Chart as ChartJS, Plugin as ChartJSPlugin } from 'chart.js';

export class BackgroundColourPlugin implements ChartJSPlugin {
public readonly id: string = 'chartjs-plugin-chartjs-napirs-canvas-background-colour';
Expand Down
4 changes: 2 additions & 2 deletions packages/chartjs/src/napichart.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ChartConfiguration, Chart as ChartJS } from 'chart.js/auto';
import { type Canvas, createCanvas } from '@napi-rs/canvas';
import { freshRequire } from './freshRequire';
import type { ChartConfiguration, Chart as ChartJS } from 'chart.js/auto';
import { BackgroundColourPlugin } from './backgroundcolorplugin';
import { freshRequire } from './freshRequire';
import type { ChartJSNapiRSCanvasOptions } from './options';

export class NapiChartjsCanvas {
Expand Down
8 changes: 4 additions & 4 deletions packages/chartjs/src/options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Chart as ChartJS, ChartComponentLike } from 'chart.js';
import type { ChartComponentLike, Chart as ChartJS } from 'chart.js';

export type ChartCallback = (chartJS: typeof ChartJS) => void | Promise<void>;

Expand Down Expand Up @@ -38,13 +38,13 @@ export type ChartJSNapiRSCanvasPlugins = {
/**
* This will work for plugins that `require` ChartJS themselves.
*/
readonly requireChartJSLegacy?: ReadonlyArray<string>;
readonly requireChartJSLegacy?: readonly string[];
/**
* This should work for any plugin that expects a global Chart variable.
*/
readonly globalVariableLegacy?: ReadonlyArray<string>;
readonly globalVariableLegacy?: readonly string[];
/**
* This will work with plugins that just return a plugin object and do no specific loading themselves.
*/
readonly requireLegacy?: ReadonlyArray<string>;
readonly requireLegacy?: readonly string[];
};
4 changes: 4 additions & 0 deletions packages/cooldown/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"extends": ["../../biome.json"]
}
Loading

0 comments on commit dfff823

Please sign in to comment.