Skip to content

ui-dev: bump js-routes from 1.4.14 to 2.4.1 in /server/src/main/webapp/WEB-INF/rails#4044

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/server/src/main/webapp/WEB-INF/rails/js-routes-2.4.1
Open

ui-dev: bump js-routes from 1.4.14 to 2.4.1 in /server/src/main/webapp/WEB-INF/rails#4044
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/server/src/main/webapp/WEB-INF/rails/js-routes-2.4.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 26, 2026

Copy link
Copy Markdown

Bumps js-routes from 1.4.14 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 1.4.14 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@v1.4.14...v2.4.1)

---
updated-dependencies:
- dependency-name: js-routes
  dependency-version: 2.4.1
  dependency-type: indirect
  update-type: version-update:semver-major
...

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 Jun 26, 2026
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.

0 participants