From 74d45cbe921e1e0ba51f9926c90acb333c3b406f Mon Sep 17 00:00:00 2001 From: kodemon Date: Sat, 3 Jan 2026 01:16:25 +0100 Subject: [PATCH] feat: update check tasks --- .prettierrc | 14 ------- LICENSE | 2 +- biome.json | 16 ++------ deno.json | 28 +++++++++++--- deno.lock | 98 +++++++++++++++++++++++------------------------ eslint.config.mjs | 36 ----------------- mod.ts | 15 -------- package.json | 8 +--- src/types.ts | 11 +++--- 9 files changed, 82 insertions(+), 146 deletions(-) delete mode 100644 .prettierrc delete mode 100644 eslint.config.mjs delete mode 100644 mod.ts diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index b5afb12..0000000 --- a/.prettierrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "trailingComma": "all", - "tabWidth": 2, - "printWidth": 120, - "singleQuote": false, - "overrides": [ - { - "files": "*.ts", - "options": { - "parser": "typescript" - } - } - ] -} diff --git a/LICENSE b/LICENSE index 1174ba6..05e0506 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2025 Christoffer Rødvik, Valkyr +Copyright (c) 2020-2026 Christoffer Rødvik, Valkyr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/biome.json b/biome.json index ec51055..17d7216 100644 --- a/biome.json +++ b/biome.json @@ -1,4 +1,6 @@ { + "$schema": "https://biomejs.dev/schemas/2.0.5/schema.json", + "root": true, "formatter": { "enabled": true, "formatWithErrors": false, @@ -13,11 +15,7 @@ "rules": { "recommended": true, "suspicious": { - "noConfusingVoidType": "off", "noExplicitAny": "off" - }, - "complexity": { - "noBannedTypes": "off" } } }, @@ -28,15 +26,7 @@ "organizeImports": { "level": "on", "options": { - "groups": [ - [":BUN:", ":NODE:"], - ":BLANK_LINE:", - ":PACKAGE:", - ":BLANK_LINE:", - [":ALIAS:"], - ":BLANK_LINE:", - ":PATH:" - ] + "groups": [[":NODE:"], ":BLANK_LINE:", ":PACKAGE:", ":BLANK_LINE:", [":ALIAS:"], ":BLANK_LINE:", ":PATH:"] } } } diff --git a/deno.json b/deno.json index 3b618f5..1fa8492 100644 --- a/deno.json +++ b/deno.json @@ -9,17 +9,33 @@ }, "tasks": { "check": { - "command": "deno run -A npm:@biomejs/biome check --write ./src", - "description": "Format, lint, and organize imports of the entire project." + "description": "Run formatting/linting with Biome and type-check the source code with Deno.", + "dependencies": ["check:biome", "check:deno"] }, + + "check:biome": { + "command": "deno run -A npm:@biomejs/biome@2.3.10 check --write ./src", + "description": "Format, lint, and organize imports in the src directory using Biome." + }, + + "check:deno": { + "command": "deno check ./src", + "description": "Perform full TypeScript type-checking on the src directory." + }, + "test": { "command": "deno test --allow-all", - "description": "Runs all defined tests across the entire project." + "description": "Run all tests using Deno’s built-in test runner." }, - "test:publish": "deno publish --dry-run", + + "test:publish": { + "command": "deno publish --dry-run", + "description": "Validate that the package can be published without errors." + }, + "ncu": { - "command": "npx ncu -u -p npm", - "description": "Updates all the dependencies in package.json to their latest versions." + "command": "npx npm-check-updates -u -p npm", + "description": "Update npm dependencies in package.json to their latest compatible versions." } }, "compilerOptions": { diff --git a/deno.lock b/deno.lock index 444c583..3f4d592 100644 --- a/deno.lock +++ b/deno.lock @@ -1,11 +1,11 @@ { "version": "5", "specifiers": { - "npm:@biomejs/biome@*": "2.2.4", - "npm:@biomejs/biome@2.2.4": "2.2.4", - "npm:@jsr/std__assert@1": "1.0.13", - "npm:@jsr/std__async@1": "1.0.14", - "npm:@jsr/std__testing@1": "1.0.15", + "npm:@biomejs/biome@*": "2.3.10", + "npm:@biomejs/biome@2.3.10": "2.3.10", + "npm:@jsr/std__assert@1": "1.0.16", + "npm:@jsr/std__async@1": "1.0.16", + "npm:@jsr/std__testing@1": "1.0.16", "npm:@jsr/valkyr__testcontainers@2": "2.0.2", "npm:bson@7.0.0": "7.0.0", "npm:dot-prop@10.1.0": "10.1.0", @@ -30,8 +30,8 @@ "@babel/helper-validator-identifier@7.28.5": { "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==" }, - "@biomejs/biome@2.2.4": { - "integrity": "sha512-TBHU5bUy/Ok6m8c0y3pZiuO/BZoY/OcGxoLlrfQof5s8ISVwbVBdFINPQZyFfKwil8XibYWb7JMwnT8wT4WVPg==", + "@biomejs/biome@2.3.10": { + "integrity": "sha512-/uWSUd1MHX2fjqNLHNL6zLYWBbrJeG412/8H7ESuK8ewoRoMPUgHDebqKrPTx/5n6f17Xzqc9hdg3MEqA5hXnQ==", "optionalDependencies": [ "@biomejs/cli-darwin-arm64", "@biomejs/cli-darwin-x64", @@ -44,43 +44,43 @@ ], "bin": true }, - "@biomejs/cli-darwin-arm64@2.2.4": { - "integrity": "sha512-RJe2uiyaloN4hne4d2+qVj3d3gFJFbmrr5PYtkkjei1O9c+BjGXgpUPVbi8Pl8syumhzJjFsSIYkcLt2VlVLMA==", + "@biomejs/cli-darwin-arm64@2.3.10": { + "integrity": "sha512-M6xUjtCVnNGFfK7HMNKa593nb7fwNm43fq1Mt71kpLpb+4mE7odO8W/oWVDyBVO4ackhresy1ZYO7OJcVo/B7w==", "os": ["darwin"], "cpu": ["arm64"] }, - "@biomejs/cli-darwin-x64@2.2.4": { - "integrity": "sha512-cFsdB4ePanVWfTnPVaUX+yr8qV8ifxjBKMkZwN7gKb20qXPxd/PmwqUH8mY5wnM9+U0QwM76CxFyBRJhC9tQwg==", + "@biomejs/cli-darwin-x64@2.3.10": { + "integrity": "sha512-Vae7+V6t/Avr8tVbFNjnFSTKZogZHFYl7MMH62P/J1kZtr0tyRQ9Fe0onjqjS2Ek9lmNLmZc/VR5uSekh+p1fg==", "os": ["darwin"], "cpu": ["x64"] }, - "@biomejs/cli-linux-arm64-musl@2.2.4": { - "integrity": "sha512-7TNPkMQEWfjvJDaZRSkDCPT/2r5ESFPKx+TEev+I2BXDGIjfCZk2+b88FOhnJNHtksbOZv8ZWnxrA5gyTYhSsQ==", + "@biomejs/cli-linux-arm64-musl@2.3.10": { + "integrity": "sha512-B9DszIHkuKtOH2IFeeVkQmSMVUjss9KtHaNXquYYWCjH8IstNgXgx5B0aSBQNr6mn4RcKKRQZXn9Zu1rM3O0/A==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-arm64@2.2.4": { - "integrity": "sha512-M/Iz48p4NAzMXOuH+tsn5BvG/Jb07KOMTdSVwJpicmhN309BeEyRyQX+n1XDF0JVSlu28+hiTQ2L4rZPvu7nMw==", + "@biomejs/cli-linux-arm64@2.3.10": { + "integrity": "sha512-hhPw2V3/EpHKsileVOFynuWiKRgFEV48cLe0eA+G2wO4SzlwEhLEB9LhlSrVeu2mtSn205W283LkX7Fh48CaxA==", "os": ["linux"], "cpu": ["arm64"] }, - "@biomejs/cli-linux-x64-musl@2.2.4": { - "integrity": "sha512-m41nFDS0ksXK2gwXL6W6yZTYPMH0LughqbsxInSKetoH6morVj43szqKx79Iudkp8WRT5SxSh7qVb8KCUiewGg==", + "@biomejs/cli-linux-x64-musl@2.3.10": { + "integrity": "sha512-QTfHZQh62SDFdYc2nfmZFuTm5yYb4eO1zwfB+90YxUumRCR171tS1GoTX5OD0wrv4UsziMPmrePMtkTnNyYG3g==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-linux-x64@2.2.4": { - "integrity": "sha512-orr3nnf2Dpb2ssl6aihQtvcKtLySLta4E2UcXdp7+RTa7mfJjBgIsbS0B9GC8gVu0hjOu021aU8b3/I1tn+pVQ==", + "@biomejs/cli-linux-x64@2.3.10": { + "integrity": "sha512-wwAkWD1MR95u+J4LkWP74/vGz+tRrIQvr8kfMMJY8KOQ8+HMVleREOcPYsQX82S7uueco60L58Wc6M1I9WA9Dw==", "os": ["linux"], "cpu": ["x64"] }, - "@biomejs/cli-win32-arm64@2.2.4": { - "integrity": "sha512-NXnfTeKHDFUWfxAefa57DiGmu9VyKi0cDqFpdI+1hJWQjGJhJutHPX0b5m+eXvTKOaf+brU+P0JrQAZMb5yYaQ==", + "@biomejs/cli-win32-arm64@2.3.10": { + "integrity": "sha512-o7lYc9n+CfRbHvkjPhm8s9FgbKdYZu5HCcGVMItLjz93EhgJ8AM44W+QckDqLA9MKDNFrR8nPbO4b73VC5kGGQ==", "os": ["win32"], "cpu": ["arm64"] }, - "@biomejs/cli-win32-x64@2.2.4": { - "integrity": "sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg==", + "@biomejs/cli-win32-x64@2.3.10": { + "integrity": "sha512-pHEFgq7dUEsKnqG9mx9bXihxGI49X+ar+UBrEIj3Wqj3UCZp1rNgV+OoyjFgcXsjCWpuEAF4VJdkZr3TrWdCbQ==", "os": ["win32"], "cpu": ["x64"] }, @@ -121,16 +121,16 @@ "chalk" ] }, - "@jsr/std__assert@1.0.13": { - "integrity": "sha512-rZ44REoi2/p+gqu8OfkcNeaTOSiG1kD6v8gyA0YjkXsOkDsiGw9g8h7JuGC/OD7GgOVgTEY+9Cih49Y18rkrCQ==", + "@jsr/std__assert@1.0.16": { + "integrity": "sha512-bX9ih0nR1kQ12/cnQRCQU0ppTCV7MFkP0qjyWxJRoDI8RC5cpTAmLFH/KcFgxmdN4flKkRbub8VtLuyKq+4OxA==", "dependencies": [ "@jsr/std__internal" ], - "tarball": "https://npm.jsr.io/~/11/@jsr/std__assert/1.0.13.tgz" + "tarball": "https://npm.jsr.io/~/11/@jsr/std__assert/1.0.16.tgz" }, - "@jsr/std__async@1.0.14": { - "integrity": "sha512-aIG8W3TOmW+lKdAJA5w56qASu9EiUmBXbhW6eAlSEUBid+KVESGqQygFFg+awt/c8K+qobVM6M/u3SbIy0NyUQ==", - "tarball": "https://npm.jsr.io/~/11/@jsr/std__async/1.0.14.tgz" + "@jsr/std__async@1.0.16": { + "integrity": "sha512-WoYmNEPSh+Bs09HvVceERknVX813wQjSb2D9Z0KdxGTMYl5Pm13e5xqa3mYu9QBRlxIxpTivGhIQYaslEezrhw==", + "tarball": "https://npm.jsr.io/~/11/@jsr/std__async/1.0.16.tgz" }, "@jsr/std__data-structures@1.0.9": { "integrity": "sha512-+mT4Nll6fx+CPNqrlC+huhIOYNSMS+KUdJ4B8NujiQrh/bq++ds5PXpEsfV5EPR+YuWcuDGG0P1DE+Rednd7Wg==", @@ -139,31 +139,31 @@ ], "tarball": "https://npm.jsr.io/~/11/@jsr/std__data-structures/1.0.9.tgz" }, - "@jsr/std__fs@1.0.19": { - "integrity": "sha512-TEjyE8g+46jPlu7dJHLrwc8NMGl8zfG+JjWxyNQyDbxP0RtqZ4JmYZfR9vy4RWYWJQbLpw6Kbt2n+K/2zAO/JA==", + "@jsr/std__fs@1.0.21": { + "integrity": "sha512-k/agrcKGm6KD89ci3AEyRmu3wRWf9JZNliOF4ZUxagTHiySmxjiKU3Lk+d2ksRtwEi7oWlLGS0AVM9Lciwc/xg==", "dependencies": [ "@jsr/std__internal", "@jsr/std__path" ], - "tarball": "https://npm.jsr.io/~/11/@jsr/std__fs/1.0.19.tgz" + "tarball": "https://npm.jsr.io/~/11/@jsr/std__fs/1.0.21.tgz" }, - "@jsr/std__internal@1.0.10": { - "integrity": "sha512-fmD6yKep/sMnB2yPQU/REZG7Z4N9SZwcUBNnceo4QkXk67l3JEfxHoROQ/YHeVSOmq6x55Ra6nuMjz2ib3nj3g==", - "tarball": "https://npm.jsr.io/~/11/@jsr/std__internal/1.0.10.tgz" + "@jsr/std__internal@1.0.12": { + "integrity": "sha512-6xReMW9p+paJgqoFRpOE2nogJFvzPfaLHLIlyADYjKMUcwDyjKZxryIbgcU+gxiTygn8yCjld1HoI0ET4/iZeA==", + "tarball": "https://npm.jsr.io/~/11/@jsr/std__internal/1.0.12.tgz" }, - "@jsr/std__net@1.0.4": { - "integrity": "sha512-KJGU8ZpQ70sMW2Zk+wU3wFUkggS9lTLfRFBygnV9VaK8KI+1ggiqtB06rH4a14CNRGM9y46Mn/ZCbQUd4Q45Jg==", - "tarball": "https://npm.jsr.io/~/11/@jsr/std__net/1.0.4.tgz" + "@jsr/std__net@1.0.6": { + "integrity": "sha512-mh27Fw4UMCjGSIMoOhjia5cS5fNP9M9DZYhGB7EYSZNnzf/eguFiarii/W4oDwYMmnxCMouUzhc6Y7jFuwTzcg==", + "tarball": "https://npm.jsr.io/~/11/@jsr/std__net/1.0.6.tgz" }, - "@jsr/std__path@1.1.1": { - "integrity": "sha512-+x5LgcNUSpMzOZIRmFSjqrMTCxHlgXjWzK8ZFr7lwgHfWZxoVXeis3MFQlkR5mN5uQ61Y1P30Li1PU0yx9uluA==", + "@jsr/std__path@1.1.4": { + "integrity": "sha512-SK4u9H6NVTfolhPdlvdYXfNFefy1W04AEHWJydryYbk+xqzNiVmr5o7TLJLJFqwHXuwMRhwrn+mcYeUfS0YFaA==", "dependencies": [ "@jsr/std__internal" ], - "tarball": "https://npm.jsr.io/~/11/@jsr/std__path/1.1.1.tgz" + "tarball": "https://npm.jsr.io/~/11/@jsr/std__path/1.1.4.tgz" }, - "@jsr/std__testing@1.0.15": { - "integrity": "sha512-NgQuXxTEG4ecbh2fzYbkJWJoBgPXwbv6bdsrAYSOeLpX2d+TROEzpErbWQXHi/yxZy/FNn9IF548ZDAqMZxi/g==", + "@jsr/std__testing@1.0.16": { + "integrity": "sha512-suPk2iMICErQVuRcNj7HweRbFYsBLjqnrI0NgNEXzBAJYv8lA+/87IXMgv/rvyqSABHn3X4ciynFZgpyPCI32A==", "dependencies": [ "@jsr/std__assert", "@jsr/std__async", @@ -172,7 +172,7 @@ "@jsr/std__internal", "@jsr/std__path" ], - "tarball": "https://npm.jsr.io/~/11/@jsr/std__testing/1.0.15.tgz" + "tarball": "https://npm.jsr.io/~/11/@jsr/std__testing/1.0.16.tgz" }, "@jsr/valkyr__testcontainers@2.0.2": { "integrity": "sha512-YnmfraYFr3msoUGrIFeElm03nbQqXOaPu0QUT6JI3w6/mIYpVfzPxghkB7gn2RIc81QgrqjwKJE/AL3dltlR1w==", @@ -185,8 +185,8 @@ ], "tarball": "https://npm.jsr.io/~/11/@jsr/valkyr__testcontainers/2.0.2.tgz" }, - "@mongodb-js/saslprep@1.3.0": { - "integrity": "sha512-zlayKCsIjYb7/IdfqxorK5+xUMyi4vOKcFy10wKJYc63NSdKI8mNME+uJqfatkPmOSMMUiojrL58IePKBm3gvQ==", + "@mongodb-js/saslprep@1.4.4": { + "integrity": "sha512-p7X/ytJDIdwUfFL/CLOhKgdfJe1Fa8uw9seJYvdOmnP9JBWGWHW69HkOixXS6Wy9yvGf1MbhcS6lVmrhy4jm2g==", "dependencies": [ "sparse-bitfield" ] @@ -397,8 +397,8 @@ "whatwg-url" ] }, - "mongodb@6.18.0": { - "integrity": "sha512-fO5ttN9VC8P0F5fqtQmclAkgXZxbIkYRTUi1j8JO6IYwvamkhtYDilJr35jOPELR49zqCJgXZWwCtW7B+TM8vQ==", + "mongodb@6.21.0": { + "integrity": "sha512-URyb/VXMjJ4da46OeSXg+puO39XH9DeQpWCslifrRn9JWugy0D+DvvBvkm2WxmHe61O/H19JM66p1z7RHVkZ6A==", "dependencies": [ "@mongodb-js/saslprep", "bson@6.10.4", @@ -505,7 +505,7 @@ "workspace": { "packageJson": { "dependencies": [ - "npm:@biomejs/biome@2.2.4", + "npm:@biomejs/biome@2.3.10", "npm:@jsr/std__assert@1", "npm:@jsr/std__async@1", "npm:@jsr/std__testing@1", diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 503f24c..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import simpleImportSort from "eslint-plugin-simple-import-sort"; -import tseslint from "typescript-eslint"; - -export default [ - ...tseslint.configs.recommended, - { - plugins: { - "simple-import-sort": simpleImportSort, - }, - rules: { - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - }, - }, - { - files: ["**/*.ts"], - rules: { - "@typescript-eslint/ban-ts-comment": [ - "error", - { - "ts-expect-error": "allow-with-description", - minimumDescriptionLength: 10, - }, - ], - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_", - }, - ], - }, - }, -]; diff --git a/mod.ts b/mod.ts deleted file mode 100644 index 1594959..0000000 --- a/mod.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from "./libraries/aggregate.ts"; -export * from "./libraries/errors.ts"; -export * from "./libraries/event.ts"; -export * from "./libraries/event-factory.ts"; -export * from "./libraries/event-store.ts"; -export * from "./libraries/projector.ts"; -export * from "./libraries/queue.ts"; -export * from "./libraries/reducer.ts"; -export * from "./libraries/time.ts"; -export * from "./libraries/timestamp.ts"; -export type * from "./types/adapter.ts"; -export type * from "./types/common.ts"; -export type * from "./types/projector.ts"; -export type * from "./types/query.ts"; -export type * from "./types/utilities.ts"; diff --git a/package.json b/package.json index a8d5f30..821abdd 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,4 @@ { - "name": "@valkyr/db", - "version": "0.0.0", - "description": "Simple client side storage solution written in TypeScript.", - "repository": "https://github.com/valkyrjs/db.git", - "bugs": "https://github.com/valkyrjs/db/issues", - "license": "MIT", "dependencies": { "bson": "7.0.0", "dot-prop": "10.1.0", @@ -20,7 +14,7 @@ "@std/assert": "npm:@jsr/std__assert@1", "@std/testing": "npm:@jsr/std__testing@1", "@valkyr/testcontainers": "npm:@jsr/valkyr__testcontainers@2", - "@biomejs/biome": "2.2.4", + "@biomejs/biome": "2.3.10", "expect": "30.2.0", "fake-indexeddb": "6.2.5" } diff --git a/src/types.ts b/src/types.ts index b88a8ac..2c449f0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -125,11 +125,12 @@ type Flatten = Type extends ReadonlyArray ? Item : Type; type IsAny = true extends false & Type ? ResultIfAny : ResultIfNotAny; -type FilterOperations = T extends Record - ? { - [key in keyof T]?: FilterOperators; - } - : FilterOperators; +type FilterOperations = + T extends Record + ? { + [key in keyof T]?: FilterOperators; + } + : FilterOperators; type ArrayOperator = { $each?: Array>;