Compare commits

..

No commits in common. "18a162c6d70eb96196a1dbe2294f21f2510ee443" and "a4c1c88138596366952fcd9cee6225ca95c3e015" have entirely different histories.

7 changed files with 9 additions and 958 deletions

View file

@ -12,5 +12,4 @@ jobs:
with:
cache: "yarn"
- run: yarn install
- run: yarn lint
- run: yarn coverage

View file

@ -1,23 +0,0 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import {defineConfig, globalIgnores} from "eslint/config";
export default defineConfig([
globalIgnores([".yarn/**", "coverage/**", "lib/**"]),
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: {js},
extends: ["js/recommended"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {globals: {...globals.browser, ...globals.node}},
},
tseslint.configs.recommended,
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
},
]);

View file

@ -26,8 +26,7 @@
"build": "tsc && vite build",
"test": "vitest",
"coverage": "vitest run --coverage",
"format": "prettier . --write",
"lint": "eslint"
"format": "prettier . --write"
},
"type": "module",
"source": "src/library.ts",
@ -37,15 +36,11 @@
"lib/**/*"
],
"devDependencies": {
"@eslint/js": "^9.30.0",
"@types/node": "^24.0.3",
"@vitest/coverage-v8": "^3.2.4",
"eslint": "^9.30.0",
"globals": "^16.2.0",
"prettier": "^3.6.0",
"ts-node": "^10.9.2",
"typescript": "^5.8.3",
"typescript-eslint": "^8.35.0",
"vite": "^6.3.5",
"vite-plugin-dts": "^4.5.4",
"vitest": "^3.2.4"

View file

@ -29,7 +29,6 @@ export type SerializedModel<T extends object, Shape extends ModelShape<T>> = {
* This is an experimental serialized model type declaration.
* @deprecated
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type ExperimentalSerializedModel<
T extends object,
Shape extends ModelShape<T>,

View file

@ -32,10 +32,7 @@ export abstract class Type<SerializedType, ModelType> {
* Reset the difference between the original value and the current one.
* @param value Value for which reset diff data.
*/
resetDiff(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
value: ModelType | null | undefined,
): void {
resetDiff(value: ModelType | null | undefined): void {
// By default, nothing to do.
}
@ -80,7 +77,6 @@ export abstract class Type<SerializedType, ModelType> {
applyPatch<T extends ModelType>(
currentValue: T | null | undefined,
patchValue: SerializedType | null | undefined,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
updateOriginals: boolean,
): T | null | undefined {
return this.deserialize(patchValue) as T;

View file

@ -1,9 +1,9 @@
import {defineConfig, UserConfig} from "vite";
import {ConfigEnv, defineConfig, UserConfig} from "vite";
import dts from "vite-plugin-dts";
// https://vitejs.dev/config/
export default defineConfig((): UserConfig => {
export default defineConfig(({mode}: ConfigEnv): UserConfig => {
return {
build: {
outDir: "lib",

925
yarn.lock

File diff suppressed because it is too large Load diff