Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ updates:
patterns:
- "resvg"
- "fontdb"
cargo-minor-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"

- package-ecosystem: npm
directory: /
Expand All @@ -42,4 +48,11 @@ updates:
oxc:
patterns:
- "oxlint"
- "oxlint-tsgolint"
- "oxfmt"
npm-minor-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
13 changes: 13 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"singleQuote": true,
"sortImports": true,
"ignorePatterns": [
"**/node_modules/**",
"**/dist/**",
"**/target/**",
"**/pkg/**",
"**/src/js/**",
"**/*.min.js",
"**/pnpm-lock.yaml"
]
}
44 changes: 44 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"plugins": ["eslint", "typescript", "oxc", "unicorn", "import", "promise"],
"categories": {
"correctness": "error",
"suspicious": "warn",
"perf": "warn"
},
"env": {
"browser": true,
"es2024": true
},
"options": {
"reportUnusedDisableDirectives": "warn",
"typeAware": true,
"denyWarnings": true
},
"ignorePatterns": [
"node_modules/**",
"dist/**",
"playground/dist/**",
"crates/relune-render-html/src/js/**"
],
"rules": {
"no-console": "warn",
"eqeqeq": ["error", "smart"],
"no-underscore-dangle": "off",
"import/no-cycle": "warn",
"typescript/consistent-type-imports": "warn",
"typescript/no-unsafe-type-assertion": "off",
"unicorn/consistent-function-scoping": "off"
},
"overrides": [
{
"files": ["**/esbuild.config.mjs"],
"env": {
"node": true,
"browser": false
},
"rules": {
"no-console": "off"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ expression: "fixture_audit_snapshot(\"cyclic_fk.sql\")"
},
"surfaces": {
"html": {
"bytes": 452945,
"bytes": 453018,
"contains_embedded_svg": true,
"contains_metadata": true,
"contains_viewport": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ expression: "fixture_audit_snapshot(\"ecommerce.sql\")"
},
"surfaces": {
"html": {
"bytes": 426839,
"bytes": 426912,
"contains_embedded_svg": true,
"contains_metadata": true,
"contains_viewport": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ expression: "fixture_audit_snapshot(\"join_heavy.sql\")"
},
"surfaces": {
"html": {
"bytes": 608271,
"bytes": 608344,
"contains_embedded_svg": true,
"contains_metadata": true,
"contains_viewport": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ expression: "fixture_audit_snapshot(\"multi_schema.sql\")"
},
"surfaces": {
"html": {
"bytes": 419866,
"bytes": 419939,
"contains_embedded_svg": true,
"contains_metadata": true,
"contains_viewport": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ expression: "fixture_audit_snapshot(\"simple_blog.sql\")"
},
"surfaces": {
"html": {
"bytes": 380036,
"bytes": 380109,
"contains_embedded_svg": true,
"contains_metadata": true,
"contains_viewport": true
Expand Down
7 changes: 0 additions & 7 deletions crates/relune-render-html/.oxfmtrc.jsonc

This file was deleted.

37 changes: 19 additions & 18 deletions crates/relune-render-html/esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
import * as esbuild from "esbuild";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

import * as esbuild from 'esbuild';

const __dirname = dirname(fileURLToPath(import.meta.url));
const outDir = join(__dirname, "src", "js");
const outDir = join(__dirname, 'src', 'js');

const entries = [
"pan_zoom",
"search",
"filter_engine",
"group_toggle",
"collapse",
"highlight",
"minimap",
"shortcuts",
"load_motion",
"url_state",
'pan_zoom',
'search',
'filter_engine',
'group_toggle',
'collapse',
'highlight',
'minimap',
'shortcuts',
'load_motion',
'url_state',
];

await Promise.all(
entries.map((name) =>
esbuild.build({
absWorkingDir: __dirname,
entryPoints: [join(__dirname, "ts", `${name}.ts`)],
entryPoints: [join(__dirname, 'ts', `${name}.ts`)],
bundle: true,
format: "iife",
platform: "browser",
target: ["chrome120", "firefox120", "safari17"],
format: 'iife',
platform: 'browser',
target: ['chrome120', 'firefox120', 'safari17'],
outfile: join(outDir, `${name}.js`),
}),
),
Expand Down
9 changes: 5 additions & 4 deletions crates/relune-render-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "TypeScript sources for embedded HTML viewer scripts (build outputs to src/js/)",
"scripts": {
"build": "node esbuild.config.mjs",
"fmt": "oxfmt ts",
"fmt:check": "oxfmt --check ts",
"lint": "oxlint ts",
"fmt": "oxfmt -c ../../.oxfmtrc.json",
"fmt:check": "oxfmt -c ../../.oxfmtrc.json --check",
"lint": "oxlint -c ../../.oxlintrc.json ts esbuild.config.mjs",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"check": "pnpm fmt:check && pnpm lint && pnpm typecheck"
},
Expand All @@ -15,6 +15,7 @@
"@typescript/native-preview": "catalog:",
"esbuild": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:"
"oxlint": "catalog:",
"oxlint-tsgolint": "catalog:"
}
}
128 changes: 64 additions & 64 deletions crates/relune-render-html/src/js/filter_engine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading