Commit Graph

118 Commits

Author SHA1 Message Date
dependabot[bot] 07834413f5
chore(deps-dev): bump eslint-plugin-unicorn from 64.0.0 to 65.0.0 (#22219)
* chore(deps-dev): bump eslint-plugin-unicorn from 64.0.0 to 65.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 64.0.0 to 65.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v64.0.0...v65.0.0)

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

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

* fix: no-array-from-fill

* fix: unicorn-js/no-duplicate-set-values

* fix: no-this-outside-of-class

* fix: no-unnecessary-nested-ternary

* fix: prefer-array-last-methods

* fix: prefer-queue-microtask

* fix: prefer-split-limit

* fix: no-array-from-fill

* fix: no-unused-array-method-return

* fix: prefer-single-call

* fix: prefer-includes-over-repeated-comparisons

* fix: consistent-compound-words

* fix: prefer-includes-over-repeated-comparisons

* chore: add eslint-plugin-unicorn v65 recommended preset

* fix: correct duration parsing logic in parseDuration function

* fix: update oxlint-disable

---------

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-09 00:08:15 +08:00
Tony 75d43dd086
chore: add eslint-plugin-regexp (#22189)
* chore: add eslint-plugin-regexp

* chore: autofix

* chore: fix no-useless-flag

* chore: fix optimal-lookaround-quantifier

* chore: fix no-lazy-ends

* chore: fix no-contradiction-with-assertion

* chore: fix no-useless-assertions

* chore: fix no-useless-quantifier

* chore: fix remaining regexp issues

* fix: regex for WFU news link validation
2026-06-05 20:04:39 +08:00
Tony a769e297b5 chore: enhance identify function 2026-05-13 19:17:03 +08:00
Tony 12a7918d4b chore: run check issue before call maintainers 2026-05-13 03:58:39 +08:00
Tony ef15da5f2b chore: simpler rss proposal 2026-05-13 02:53:24 +08:00
Tony c2b00f6090 chore: format description in lint-staged 2026-05-08 05:59:53 +08:00
Tony 5faaf6c2b3 chore(format): fix lifting of trailing directives from tables 2026-05-08 05:40:34 +08:00
Tony 70cd080406 chore: revive remark formatter
refs: #14040
2026-05-08 04:40:49 +08:00
Tony ecffcd3d95 chore: add vouch trust management system 2026-04-16 07:11:37 +08:00
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
Tony 0f7808f345
docs: add sports category (#21704)
* feat: add sports category

* fix: fix runyeah
2026-04-13 04:21:20 +08:00
Tony 75cb4a3fb9 chore: use mdast for route identification script 2026-03-13 19:57:27 +08: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 ba0f1ad292
style(eslint): fix `no-unassigned-vars` `no-useless-assignment` `preserve-caught-error` (#21175)
* fix: fix no-unassigned-vars

* fix: fix preserve-caught-error

* fix: fix no-useless-assignment

* fix: update variable types for better type safety

* fix: replace nullish coalescing with logical OR for limit assignment

* fix: add DataItem type import for better type safety
2026-02-18 22:25:14 +08:00
DIYgod 5417ec7f13
fix: ensure build directory exists for CF worker build (#21104)
Create output directory recursively before writing routes-worker.js to prevent ENOENT errors during Cloudflare Worker deployment
2026-02-09 17:18:08 +08:00
DIYgod d40f812563
refactor: deploy all routes to Cloudflare Workers (#20809)
- Remove Worker-specific route filtering (worker_namespaces) to include all 1537 namespaces in Worker builds
- Remove popularity analytics logic (foloAnalysisTop100) as Worker can now handle all routes
- Update node:child_process alias in tsdown config to use dedicated shim file
- Inline child_process shim in node-module.ts to avoid import cycles
- Fix tough-cookie import in telecompaper route (use named import CookieJar)
- Remove ESModule rules from wrangler.toml (not needed)

This enables full RSSHub functionality on Cloudflare Workers with no memory/size limitations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-04 17:33:55 +08:00
DIYgod e27f501643
refactor: generate JSON data for namespace-centric docs (#20807)
- Update build-docs.ts to output routes.json and categories.json
- Modify workflow to copy JSON files to rsshub-docs/src/public

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 11:50:51 +08:00
DIYgod 1131350b5f
feat: deploy RSSHub to Cloudflare Workers (#20804)
* feat: deploy RSSHub to Cloudflare Workers

- Create Worker entry point (lib/worker.ts) with polyfills
- Implement Worker-specific app configuration (lib/app.worker.tsx)
- Add automatic .worker.ts resolution plugin for cleaner config
- Simplify build configuration with only 3 essential shims
- Enable static asset serving via Cloudflare Static Assets feature
- Support dynamic route loading with proper module aliasing

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* feat(worker): add puppeteer and request-rewriter support

- Add @cloudflare/puppeteer for Browser Rendering API support
- Create puppeteer.worker.ts with Cloudflare Browser binding
- Add request-rewriter Worker version with static browser headers
- Add vm module shim to node-module.ts for JSDOM compatibility
- Configure __dirname/__filename in tsdown for CommonJS compat
- Update wrangler.toml with BROWSER binding configuration
- Dynamically extract namespaces from foloAnalysisTop100 for routes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(cache): restore synchronous initialization for tests

The async initialization caused cache tests to fail because the cache
module wasn't ready when tests ran. Restored synchronous imports while
keeping Worker-specific no-op behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(worker): add automated Worker integration tests

- Add miniflare for Worker environment simulation
- Create lib/worker.worker.test.ts with integration tests
- Test basic routes (/test/1, /, unknown routes)
- Test RSS feed routes (hackernews, v2ex)
- Test error handling for puppeteer routes without BROWSER binding
- Add worker-test npm script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(worker): use test routes for Worker integration tests

- Replace third-party routes (hackernews, v2ex, weibo) with /test/* routes
- Remove miniflare dependency (wrangler includes it internally)
- Simplify test setup using wrangler's unstable_dev API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): make header-generator test less flaky

The header-generator library may return different platform values due to
internal randomness. Update test to check for valid format instead of
exact value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): exclude worker tests from vitest coverage run

Worker tests require the dist-worker bundle to be built first,
which is not part of the regular CI test workflow. These tests
should be run separately using 'pnpm worker-test'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(worker): add automated Worker integration tests

- Add worker-build step to CI workflow before running tests
- Revert exclusion of worker tests from vitest coverage run
- Worker tests now run as part of the regular test suite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(worker): fix routes.js alias path in worker build config

Change alias key from absolute path to relative import path to match
how it's imported in lib/registry.ts. This fixes the worker build
failing with "Could not resolve '../assets/build/routes.js'" error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* ci: trigger CI re-run

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): build worker routes before worker-build

The worker build requires routes-worker.js which is generated by
running build:routes with WORKER_BUILD=true. This was missing in CI,
causing the worker build to fail with "Could not resolve routes.js".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(test): increase timeout for Worker integration tests

Worker tests need more time in CI environments. Increase individual
test timeouts from default 10s to 30s for each test case.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-04 09:22:05 +08:00
Tony b84bb92a8a
style: replace unicorn/no-for-loop w/ typescript/prefer-for-of (#20798)
* style: replace unicorn/no-for-loop w/ typescript/prefer-for-of

* style: fix typescript-eslint/prefer-for-of

* style: fix typescript/no-inferrable-types

* style: fix typescript-eslint/consistent-generic-constructors

* style: typescript-eslint/consistent-type-assertions

* style: fix typescript-eslint/array-type

* fix: revert .entries() in d96ca62d3d80806b0475a54e749decfc07b24701
2026-01-02 09:42:24 +08:00
DIYgod e6112c8c93
fix(workflow): ensure CACHE_TYPE is ignored in route generation 2025-12-22 18:48:52 +08:00
DIYgod 2822c5902a
fix(workflow): ignore redis and remote config in build-routes 2025-12-22 18:46:59 +08:00
Dzming Li dbb692462d
chore: add Nix flake and NixOS module support (#20597)
* feat(nix): add flake module and offline-friendly build

* chore(nix): upgrade to Node.js 24 and pnpm 10

Update devenv.nix to match project dependencies:
- Upgrade Node.js from 22 to 24 (aligns with Dockerfile node:24-bookworm)
- Upgrade pnpm from 9 to 10 (aligns with package.json pnpm@10.22.0)

* test: fix buffer-get test timeout

Replace external URL with mock server endpoint to prevent test timeout.
The test was trying to fetch from http://example.com which is not mocked,
causing it to timeout. Now uses http://rsshub.test/headers which is
properly mocked in the test setup.
2025-12-09 19:43:06 +08:00
Stephen Zhou 2e9976b24e
chore: fix vercel build (#20645) 2025-12-06 14:28:38 +08:00
Tony bf9f4b5961 style: fix import 2025-11-27 11:22:19 +08:00
github-actions[bot] a28890a135 style: auto format 2025-11-27 02:55:46 +00:00
Stephen Zhou 69a859ca9d
refactor(package): simple type solution 2025-11-27 01:21:20 +08:00
Stephen Zhou b4a2aa5e70
fix(core): package mode (#20580) 2025-11-26 20:44:18 +08:00
Tony 5bf337b2f3 chore: pull analytics from docs repo instead 2025-11-19 01:36:31 +08:00
dependabot[bot] 52c18b7f25
chore(deps-dev): bump eslint-plugin-unicorn from 61.0.2 to 62.0.0 (#20381)
* chore(deps-dev): bump eslint-plugin-unicorn from 61.0.2 to 62.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 61.0.2 to 62.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v61.0.2...v62.0.0)

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

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

* style: fix unicorn/prefer-string-raw

* style: fix unicorn/no-useless-collection-argument

* style: fix unicorn/no-immediate-mutation

* style: fix unicorn/no-immediate-mutation

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 01:26:56 +08:00
DIYgod 1ab16fd6f0
chore: vercel sync 2025-08-11 14:15:16 +08:00
Tony 6764a14555 fix(test): improve error handling and label management in route testing 2025-07-12 03:08:28 +08:00
Tony 45ee587316 fix(workflow): update Docker logs step to always run and add fail-build job 2025-06-22 17:28:38 +08:00
Tony d929c7a15c chore(tests): rename and handle route failure labels 2025-06-06 00:07:05 +08:00
Tony ef22a71dd6 chore: update auto label 2025-06-05 21:07:25 +08:00
DIYgod 2d7561b193
fix: popular category in build routes 2025-06-02 09:50:52 +08:00
DIYgod 2dce2e32dd
feat: docs sorting and auto popular 2025-05-31 17:10:01 +08:00
DIYgod 8520db3e13
feat: api route (#19209)
* feat: api route

* test: api route
2025-05-27 13:21:27 +08:00
Tony 81ee26fff2 chore: use jsdelivr cdn link to avoid github 429 when build docs 2025-05-09 02:16:10 +08:00
DIYgod 83e701b592
feat: compile ts through tsdown (#18908)
* feat: build ts via tsdown

* feat: exec tsdown

* fix

* fix

* fix

* feat: use tsdown shims

* chore: run rolldown lifecycle script

* fix: use shims

---------
2025-04-22 22:29:11 +08:00
Tony 905062f10c chore: fix test route in issue command 2025-02-12 01:25:55 +08:00
Tony 4fc15dcd02 chore(workflow): fix label removing
fix #16888
2025-02-06 16:00:43 +08:00
Tsuyumi 99ee9e7030
chore: escape HTML entity in route test URL display (#17592) 2024-11-15 20:19:42 +08:00
pseudoyu 52e72e2c60
fix(docs): handle duplicated routes in docs 2024-10-23 11:43:12 +08:00
Tony 2c898cf3fd chore: block PR with empty description 2024-10-21 02:01:35 +08:00
TonyRL fe683a11e2 chore: unwrap error detail in test route 2024-05-24 20:19:41 +00:00
DIYgod 6ee5d7267b
chore: add popular category 2024-05-19 23:00:43 +08:00
Tony 0893debb07
style(eslint): lint tsx (#15098) 2024-04-04 20:28:45 +08:00
DIYgod d22a63c6d0
chore: schedule test full routes 2024-03-24 22:36:21 +08:00
DIYgod 8817829e20
fix: build docs 2024-03-24 21:14:25 +08:00
DIYgod b774c60858
test: add full routes test (#14934)
* test: add critical routes test

* fix: youtube channels config

* test: add full routes test

* test: output full routes test result

* test: build routes before test

* test: use one reporter

* test: fix cache test errors

* test: fix cache test errors

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* fix: build script

* chore: puppeteerrc rename

* test: route test names

* chore: pass test result to docs
2024-03-24 19:00:03 +08:00