36 Commits

Author SHA1 Message Date
DIYgod b4ae78140d fix(routes): integrate reviewed fixes with current source APIs
Merge current master while retaining the completed route review and retired
service removals. Keep upstream source migrations and new feed functionality,
including the ACEA API, Xiaomi data helpers, Yahoo Finance topic helper,
Bilibili list URLs, Douban IP locations, and Douyin live-stream handling.

Resolve overlapping changes without losing existing limit validation, bounded
detail requests, stable item metadata, or route configuration corrections.
Keep RSS image MIME inference and explicit media precedence alongside upstream
attachment extraction, emitting a single enclosure per item.
2026-10-14 16:04:51 +08:00
DIYgod 525efe953c fix(core): preserve ordering and validate common entry limits
Affected files:
- lib/middleware/parameter.test.ts
- lib/middleware/parameter.ts
- lib/utils/route-limit.test.ts
- lib/utils/route-limit.ts
2026-10-14 15:07:45 +08:00
DIYgod d05930b3ae feat(enclosures): expose Atom attachments and optional media extraction
Closes #20503
2026-10-09 13:49:12 +08:00
DIYgod 63e97d9396 feat(parameters): support hiding feed images
Closes #11418
2026-10-09 03:04:15 +08:00
Tony 3bc1cc248d chore: bump to msw v3 (#23463)
* chore: bump to msw v3

* refactor: anti-slop

* test: use vi.stubEnv for REDIS_URL in redis error test

* refactor: move remote debugging registration into a conditional block

* chore: add code coverage upload for github
2026-10-03 06:36:19 +08:00
dependabot[bot] 372cca9932 chore(deps): bump the oxc group across 1 directory with 5 updates (#23380)
* chore(deps): bump the oxc group across 1 directory with 5 updates

Bumps the oxc group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [oxc-parser](https://github.com/oxc-project/oxc/tree/HEAD/napi/parser) | `0.150.0` | `0.151.0` |
| [@oxlint/plugins](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint-plugins) | `1.83.0` | `1.85.0` |
| [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) | `0.68.0` | `0.70.0` |
| [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint) | `1.83.0` | `1.85.0` |
| [oxlint-plugin-eslint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint-plugin-eslint) | `1.83.0` | `1.85.0` |



Updates `oxc-parser` from 0.150.0 to 0.151.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/napi/parser/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/crates_v0.151.0/napi/parser)

Updates `@oxlint/plugins` from 1.83.0 to 1.85.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.85.0/npm/oxlint-plugins)

Updates `oxfmt` from 0.68.0 to 0.70.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.70.0/npm/oxfmt)

Updates `oxlint` from 1.83.0 to 1.85.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.85.0/npm/oxlint)

Updates `oxlint-plugin-eslint` from 1.83.0 to 1.85.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint-plugin-eslint/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.85.0/npm/oxlint-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@oxlint/plugins"
  dependency-version: 1.85.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: oxc
- dependency-name: oxc-parser
  dependency-version: 0.151.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: oxc
- dependency-name: oxfmt
  dependency-version: 0.70.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: oxc
- dependency-name: oxlint
  dependency-version: 1.85.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: oxc
- dependency-name: oxlint-plugin-eslint
  dependency-version: 1.85.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: oxc
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: disable unicorn rules that overlaps with oxc native one

* style: fix no-unnecessary-boolean-literal-compare

* style: fix no-unnecessary-type-conversion

* style: add all oxc/* correctness rules

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-09-26 00:34:54 +08:00
Tony 89d6390a96 refactor: replace entities.decodeXML with decodeHTMLStrict (#23370) 2026-09-23 23:32:12 +08:00
DIYgod 46d98fb383 fix(worker): restore feed processing and API routes 2026-09-06 18:36:20 +08:00
Tony 08a38f0a5e refactor: typing house-keeping (#23074)
* refactor: typing house-keeping

* fix: fix parse date not accepting strict mode

* refactor: use npm package

* fix: address review
2026-08-22 23:58:30 +08:00
Serhii Hospodarchuk c92f107e35 feat(core): normalize fallback logic for content.text and content.html in Atom, RSS and JSON Feed (#22852)
* feat(core): add content type fallback for Atom feed items

* feat(core): add content type fallback for RSS feed items

* fix(core): use title as fallback only for content_text in JSON Feed

* fix(core): add content fallback directly in middleware

* test: fix failing test by restoring fallback content.html for json

* refactor(json): drop content.html fallback, add item.description to test
2026-08-06 22:50:12 +08:00
Tony bb12119123 refactor: enforce typecheck (#22917)
* feat(types): add upvotes, downvotes, and comments to DataItem

* refactor: fix TS2339

* refactor: fix TS2322

* refactor: fix TS2322

* refactor: fix TS2345

* refactor: fix TS2339

* refactor: fix TS2322

* refactor: fix TS2345

* refactor: fix TS2531/2532/18048/18047

* refactor: fix TS18046/TS2571

* refactor: fix TS2538

* refactor: fix TS2554/2769/2558

* refactor: fix TS2362/2363

* refactor: fix TS2353/TS2561

* refactor: fix TS2741/2739/2740

* refactor: fix TS2304 TS2307 TS2305 TS2614 TS2552 TS2551

* refactor: fix TS2352

* refactor: fix TS2604 TS17001

* refactor: fix TS2367 TS2366

* refactor: fix TS2493

* refactor: fix TS2454

* refactor: fix TS2790

* refactor: fix TS2488

* refactor: fix TS2677

* refactor: fix TS18048/18049/2532

* refactor: fix TS2322

* refactor: fix TS2344

* refactor: fix TS2339

* refactor: fix TS2339

* refactor: fix TS2365

* refactor: fix TS1117

* refactor: fix  TS2561

* refactor: fix TS2555

* refactor: fix TS2503

* refactor: fix TS2339

mobile api no longer work

* fix: clean slop

* fix: use Context instead of any

* fix: fix more typing after merge

* fix: add void return for ctx.redirect in handler

* chore: add type check to lint and husky

* fix: remove ts ignore

* chore: add oxlint rule

* fix: suppress build artifact

* fix: update getArticles to use cache

* fix: codeql

* fix(route/typeless): use async gunzip

* fix: address review

* fix: address review

* fix: double quotes escape
2026-08-04 09:00:41 +08:00
Tony cb0791cb41 perf: dx (#22478)
* perf: use only one WASM alloc for xxhash

* perf(deps): lazy load mercury-parser and use googleapis/youtube instead of heavy googleapis

* perf(dx): lazy load dev registry

speed up npm dev script

* perf: close playwright browser on destroy

* fix: show exception msg in prod

* revert: "perf: use only one WASM alloc for xxhash"

This reverts commit 01ecdd48d0.

* perf: use only one WASM alloc for xxhash

* test: add claim for worker

* fix: missing piece from 8dd9c9a

* feat: add namespace to the chunkfilename

* fix: keep var naming
2026-07-09 02:37:41 +08:00
dependabot[bot] 417ab04f06 chore(deps-dev): bump eslint-plugin-unicorn from 66.0.0 to 68.0.0 (#22310)
* chore(deps-dev): bump eslint-plugin-unicorn from 66.0.0 to 68.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 66.0.0 to 68.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v66.0.0...v68.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 68.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix no-useless-coercion

* style: fix prefer-boolean-return

* style: fix no-useless-logical-operand

* style: fix prefer-single-replace

* style: fix consistent-conditional-object-spread

* style: fix no-useless-else

* style: fix prefer-unicode-code-point-escapes

* style: fix operator-assignment

* style: fix prefer-continue

* style: fix prefer-math-constants

* style: fix prefer-hoisting-branch-code

* style: fix prefer-array-slice

* style: fix consistent-class-member-order

* style: fix no-return-array-push

* style: fix prefer-promise-with-resolvers

* style: fix no-array-concat-in-loop

* style: fix no-loop-iterable-mutation

* style: fix no-invalid-argument-count

* style: fix no-duplicate-if-branches

* style: fix prefer-else-if

* style: fix no-unreadable-for-of-expression

* style: fix logical-assignment-operators

* style: fix default-export-style

* style: revert false positve in prefer-type-literal-last in #22274

* style: fix arrow-body-style

* style: add v68 recommended preset

* style: refactor GraphQL queries to use template literals for better readability

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-06-20 23:11:27 +08:00
dependabot[bot] 873618e99d chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274)
* chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 65.0.1 to 66.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v65.0.1...v66.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 66.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix unicorn-js/prefer-url-href

* style: oxlint disable

* style: fix unicorn-js/no-useless-else

* style: no-unsafe-string-replacement

* style: fix no-duplicate-loops

* style: fix prefer-number-is-safe-integer

* style: fix prefer-single-array-predicate

* style: fix no-object-methods-with-collections

* style: fix no-useless-boolean-cast

* style: fix no-useless-template-literals

* style: fix no-negated-array-predicate

* style: fix prefer-direct-iteration

* style: fix consistent-optional-chaining

* style: fix prefer-simple-sort-comparator

* style: fix prefer-global-number-constants

* style: fix prefer-type-literal-last

* style: fix require-array-sort-compare.

* style: fix prefer-early-return

* style: fix prefer-short-arrow-method

* style: fix prefer-array-from-map

* style: fix prefer-scoped-selector

* style: fix no-global-object-property-assignment

* style: fix no-unnecessary-global-this

* style: fix no-unreadable-object-destructuring

* style: fix no-invalid-argument-count

* style: fix prefer-smaller-scope

* style: fix prefer-iterator-to-array.

* style: fix prefer-object-iterable-methods

* style: fix typo

* style: fix max-nested-calls

* style: fix no-incorrect-template-string-interpolation

* style: fix no-break-in-nested-loop

* style: fix prefer-await

* style: fix no-computed-property-existence-check

* style: fix prefer-number-coercion

* style: fix no-empty-file

* style: update eslint unicorn v66 recommended preset

* style: add unicorn/prefer-spread to oxlint-disable comments

* style: fix no-array-reduce

* style: delete github/no-then as it's covered by unicorn/prefer-await

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-06-16 14:43:42 +08:00
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
Tony 1acb805799 style: migrate eslint to oxlint (#21224)
* chore: add oxlint support

* style: apply autofix

* style: apply autofix for toSorted

* style: use alternative api for nsfw-flag jsPlugins

* fix: git diff

* fix: codeql

* test: console.log

* style: update lint workflow to use Checkstyle SARIF converter

* style: remove debug log from extractDateFromURL function

* chore: use oxlint-json-to-sarif

* test: console.log

* test: remove console.log

* test: update cookie data expectation in getCookies test

https://github.com/mccutchen/go-httpbin/pull/235 breaks this

* style: type-aware linting

* style: enable type-aware linting for oxlint
2026-02-28 21:23:11 +08:00
Tony da15d11d1d chore: replace postlight/parser with jocmp/mercury-parser (#21152) 2026-02-15 01:27:25 +08:00
github-actions[bot] edfac9f24c style: auto format 2025-11-27 05:54:33 +00:00
github-actions[bot] 838eb3c7ff style: auto format 2025-11-27 05:49:33 +00:00
github-actions[bot] a28890a135 style: auto format 2025-11-27 02:55:46 +00:00
Tony e6cef5ad4c fix(middleware): ensure referrerpolicy is set only if not already defined (#20394) 2025-10-30 04:40:05 +08:00
dependabot[bot] 802cbf95d2 chore(deps-dev): bump eslint-plugin-unicorn from 60.0.0 to 61.0.2 (#19998)
* chore(deps-dev): bump eslint-plugin-unicorn from 60.0.0 to 61.0.1

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 60.0.0 to 61.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v60.0.0...v61.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 61.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: replace `replace(/regex/g)` with replaceAll

* refactor: replace sort() with toSorted() for immutability in various routes and utilities

* refactor: fix unicorn/prefer-array-find

* refactor: fix unicorn/prefer-at

* refactor: add unicorn/no-array-sort rule to ESLint configuration

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 23:03:48 +08:00
Tony 8faec7fbfd refactor: fix Element type import 2025-05-07 04:18:23 +08:00
Tony 03969f3867 refactor: fix lint issue (#18963)
* fix: unicorn/no-empty-file

* fix: unicorn/prefer-node-protocol

* fix: unicorn/prefer-number-properties

* fix: unicorn/consistent-destructuring

* fix: unicorn/no-array-callback-reference

* fix: unicorn/new-for-builtins

* fix: set checkNaN to false in unicorn/prefer-number-properties

* fix: unicorn/prefer-string-slice

* fix: update eslint ignore
2025-04-29 03:00:16 +08:00
COxDE 2962c6f64f feat(middleware): process feed title and description using LLM (#16464)
* feat(middleware): add title translation using LLM

* refactor: combine title and description

* fix: camelCase for variables

* refactor: try to update the test case

---------
2024-08-22 02:15:00 +08:00
DIYgod 50d194ef3d Merge remote-tracking branch 'origin/master' into feature/ofetch 2024-03-31 23:37:37 +08:00
DIYgod bf4e5dd78f test: fix caces 2024-03-31 23:13:22 +08:00
wudifeixue c086c62acd fix(core): fix documentation link path and error message links (#15023)
* fix: all broken sponsor links

* fix: all broken deployment links

* fix: other broken links
2024-03-30 08:12:12 +00:00
DIYgod 8c0534393f feat: use ofetch in parameter common-config wechat-mp 2024-03-27 14:40:42 +08:00
DIYgod e3df4f4673 refactor: eslint warning 2024-02-27 00:57:51 +08:00
DIYgod ecbbea0ae0 fix: filterout and chatgpt 2024-02-26 19:35:27 +08:00
DIYgod d1a4e19c62 fix: typescript build errors 2024-02-25 23:43:34 +08:00
DIYgod 174752fef5 refactor: format 2024-01-29 23:28:17 +08:00
DIYgod 8530611723 Merge branch 'master' into feature/hono 2024-01-29 22:09:28 +08:00
DIYgod 8e0154552c feat: welcome page 2024-01-21 15:18:42 +08:00
DIYgod 847724cad1 feat: work with hono and typescript 2024-01-21 11:55:18 +08:00