Skip to content

build(deps): bump js-routes from 2.3.7 to 2.4.1 - #8145

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/js-routes-2.4.1
Open

build(deps): bump js-routes from 2.3.7 to 2.4.1#8145
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/js-routes-2.4.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 1, 2026

Copy link
Copy Markdown
Contributor

Bumps js-routes from 2.3.7 to 2.4.1.

Release notes

Sourced from js-routes's releases.

v2.4.1

Changes

Fix camelCase TypeScript definitions for optional parameters

Fix a bug introduced in 2.4.0 where camel_case: true caused TypeScript type definitions to advertise camelCase keys for optional route parameters while the JavaScript runtime still required snake_case. Fixes #351.

Optional parameter names in .d.ts output now match what the runtime actually accepts:

// Before (broken): type advertised perPage but runtime required per_page
itemsPath({ perPage: 20 })   // → "/items?perPage=20"  ✗ (silently wrong)
itemsPath({ per_page: 20 })  // → "/items/20"          ✓ (worked but type was misleading)
// After (fixed): type and runtime agree on snake_case
itemsPath({ per_page: 20 })  // → "/items/20"          ✓

v2.4.0

Changes

Package mode

Add package option and JsRoutes.package / JsRoutes.package! API for sharing a single Router runtime across multiple route files.

Why: When an app generates several ESM route files (e.g. one per domain or engine), each file previously embedded the full js-routes runtime (~10 KB minified). With package, the runtime is extracted into one router.js and every route file imports it — the runtime is downloaded and parsed only once.

Generate the shared router package (no route definitions, just the runtime):

# config/initializers/js_routes.rb
JsRoutes.package!                   # writes app/javascript/router.js
# or with a custom path:
JsRoutes.package!("shared/router.js")

Generate consumer route files that import from it:

JsRoutes.generate!(
  "app/javascript/admin_routes.js",
  typed: true,
  package: "./router.js",   # or package: true for the default path
  include: /\Aadmin_/
)
JsRoutes.generate!(
"app/javascript/api_routes.js",
typed: true,
package: "./router.js",
</tr></table>

... (truncated)

Changelog

Sourced from js-routes's changelog.

[2.4.1]

Fix camelCase TypeScript definitions for optional parameters

Fix a bug introduced in 2.4.0 where camel_case: true caused TypeScript type definitions to advertise camelCase keys for optional route parameters while the JavaScript runtime still required snake_case. Fixes #351.

Optional parameter names in .d.ts output now match what the runtime actually accepts:

// Before (broken): type advertised perPage but runtime required per_page
itemsPath({ perPage: 20 })   // → "/items?perPage=20"  ✗ (silently wrong)
itemsPath({ per_page: 20 })  // → "/items/20"          ✓ (worked but type was misleading)
// After (fixed): type and runtime agree on snake_case
itemsPath({ per_page: 20 })  // → "/items/20"          ✓

[2.4.0]

Package mode

Add package option and JsRoutes.package / JsRoutes.package! API for sharing a single Router runtime across multiple route files.

Why: When an app generates several ESM route files (e.g. one per domain or engine), each file previously embedded the full js-routes runtime (~10 KB minified). With package, the runtime is extracted into one router.js and every route file imports it — the runtime is downloaded and parsed only once.

Generate the shared router package (no route definitions, just the runtime):

# config/initializers/js_routes.rb
JsRoutes.package!                   # writes app/javascript/router.js
# or with a custom path:
JsRoutes.package!("shared/router.js")

Generate consumer route files that import from it:

JsRoutes.generate!(
  "app/javascript/admin_routes.js",
  typed: true,
  package: "./router.js",   # or package: true for the default path
  include: /\Aadmin_/
)
JsRoutes.generate!(
"app/javascript/api_routes.js",
typed: true,
package: "./router.js",
include: /\Aapi_/
)
</tr></table>

... (truncated)

Commits
  • 1e1fa28 Update actions/checkout to v7
  • 5e3c191 Bump version to 2.4.1
  • 4311039 Fix camelCase DTS definitions for optional parameters
  • e647092 Move IMPORT_ROUTER into wrapper_variable, eliminating it as a separate RubyVa...
  • 4900762 Bump required_ruby_version to 2.7 to match CI minimum
  • 8cc0cb6 Update Ruby to 4.0.5 in release workflow
  • 6f55a36 Fix changelog extraction breaking on ### subheadings
  • 738e53d Improve workflows versions
  • 816bc96 Improve changelog 2.4.0 structure with per-feature sections and bug fixes group
  • 116e4fc Cleanup
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [js-routes](https://github.com/railsware/js-routes) from 2.3.7 to 2.4.1.
- [Release notes](https://github.com/railsware/js-routes/releases)
- [Changelog](https://github.com/railsware/js-routes/blob/main/CHANGELOG.md)
- [Commits](railsware/js-routes@v2.3.7...v2.4.1)

---
updated-dependencies:
- dependency-name: js-routes
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Sep 1, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 33495502848

Coverage decreased (-0.02%) to 90.678%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 69 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

69 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
app/javascript/routes.js 69 86.64%

Coverage Stats

Coverage Status
Relevant Lines: 52383
Covered Lines: 48530
Line Coverage: 92.64%
Relevant Branches: 2517
Covered Branches: 1252
Branch Coverage: 49.74%
Branches in Coverage %: Yes
Coverage Strength: 128.8 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant