js-routes 2.3.4 → 2.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/Readme.md +2 -0
- data/lib/js_routes/version.rb +1 -1
- data/lib/js_routes.rb +5 -2
- data/lib/routes.d.ts +1 -1
- data/lib/routes.ts +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5340711dfd4078cf7c63d618dbd4957f58fd79d0e3f82ca6b1f6a0b6cd0381a5
|
4
|
+
data.tar.gz: 00a7ae1424f6e61211f7bd0cc26f86542c3054c8d17ae062f026da2a44da7b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00963c11a5f95f269924111950e8a3f9b9c9fc9347d3a52e745b191de8d6550d9d2d518d32088b3e98eec2e3fe8022f585523b99c71460be2d234f02c0f02cef'
|
7
|
+
data.tar.gz: 452e998d9c85ce6a7061cf002cd8cac7e77538fd71353fb3ea359f500060628a521dbc3f2e36b0dfdf43d3a4252d59566872914901e5e931ce55c19dca45231a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.3.5]
|
4
|
+
|
5
|
+
* Support `bigint` route parameter
|
6
|
+
|
7
|
+
``` typescript
|
8
|
+
import {nft_path} from "./routes"
|
9
|
+
|
10
|
+
nft_path(123456789012345678901234567890n)
|
11
|
+
// => /nfts/123456789012345678901234567890
|
12
|
+
```
|
13
|
+
|
14
|
+
* Fix rake task for non-esm modules. [#316](https://github.com/railsware/js-routes/issues/316)
|
15
|
+
|
3
16
|
## [2.3.4]
|
4
17
|
|
5
18
|
* Fix deprecator usage in `rake js:routes:typescript` [#327](https://github.com/railsware/js-routes/issues/327)
|
@@ -118,7 +131,7 @@ end
|
|
118
131
|
|
119
132
|
## [2.2.1]
|
120
133
|
|
121
|
-
* Improve generator to update route files on `assets:precompile` and add them to `.gitignore by default
|
134
|
+
* Improve generator to update route files on `assets:precompile` and add them to `.gitignore` by default [#288](https://github.com/railsware/js-routes/issues/288#issuecomment-1012182815)
|
122
135
|
|
123
136
|
## [2.2.0]
|
124
137
|
|
data/Readme.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
[](https://github.com/railsware/js-routes/actions/workflows/ci.yml)
|
4
4
|
|
5
|
+
<img src="/logo.webp" alt="Logo" width="200" height="200">
|
6
|
+
|
5
7
|
Generates javascript file that defines all Rails named routes as javascript helpers:
|
6
8
|
|
7
9
|
``` js
|
data/lib/js_routes/version.rb
CHANGED
data/lib/js_routes.rb
CHANGED
@@ -37,8 +37,11 @@ module JsRoutes
|
|
37
37
|
|
38
38
|
sig { params(file_name: FileName, typed: T::Boolean, opts: T.untyped).void }
|
39
39
|
def generate!(file_name = configuration.file, typed: false, **opts)
|
40
|
-
Instance.new(file: file_name, **opts)
|
41
|
-
|
40
|
+
instance = Instance.new(file: file_name, **opts)
|
41
|
+
instance.generate!
|
42
|
+
if typed && instance.configuration.modern?
|
43
|
+
definitions!(file_name, **opts)
|
44
|
+
end
|
42
45
|
end
|
43
46
|
|
44
47
|
sig { params(file_name: FileName, opts: T.untyped).void }
|
data/lib/routes.d.ts
CHANGED
@@ -2,7 +2,7 @@ declare type Optional<T> = {
|
|
2
2
|
[P in keyof T]?: T[P] | null;
|
3
3
|
};
|
4
4
|
declare type Collection<T> = Record<string, T>;
|
5
|
-
declare type BaseRouteParameter = string | boolean | Date | number;
|
5
|
+
declare type BaseRouteParameter = string | boolean | Date | number | bigint;
|
6
6
|
declare type MethodRouteParameter = BaseRouteParameter | (() => BaseRouteParameter);
|
7
7
|
declare type ModelRouteParameter = {
|
8
8
|
id: MethodRouteParameter;
|
data/lib/routes.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
type Optional<T> = { [P in keyof T]?: T[P] | null };
|
2
2
|
type Collection<T> = Record<string, T>;
|
3
3
|
|
4
|
-
type BaseRouteParameter = string | boolean | Date | number;
|
4
|
+
type BaseRouteParameter = string | boolean | Date | number | bigint;
|
5
5
|
type MethodRouteParameter = BaseRouteParameter | (() => BaseRouteParameter);
|
6
6
|
type ModelRouteParameter =
|
7
7
|
| { id: MethodRouteParameter }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -144,9 +144,9 @@ licenses:
|
|
144
144
|
- MIT
|
145
145
|
metadata:
|
146
146
|
bug_tracker_uri: https://github.com/railsware/js-routes/issues
|
147
|
-
changelog_uri: https://github.com/railsware/js-routes/blob/v2.3.
|
147
|
+
changelog_uri: https://github.com/railsware/js-routes/blob/v2.3.5/CHANGELOG.md
|
148
148
|
documentation_uri: https://github.com/railsware/js-routes
|
149
|
-
source_code_uri: https://github.com/railsware/js-routes/tree/v2.3.
|
149
|
+
source_code_uri: https://github.com/railsware/js-routes/tree/v2.3.5/activerecord
|
150
150
|
rubygems_mfa_required: 'true'
|
151
151
|
github_repo: ssh://github.com/railsware/js-routes
|
152
152
|
post_install_message:
|