ransack 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39e79c778f9eacf124a0ae2465c586d016b8fc6dd934b889d9e7ac9ede798ea7
4
- data.tar.gz: 45c34ad5656bd01fd03e9240cf60f7419c662ad0b9aba3a1340ae701844612db
3
+ metadata.gz: 6e7ffa826fc3c1a2a916cc9b110bf232dbc994a51ff82472756709870fda224b
4
+ data.tar.gz: ebb0692d5d5a77bb8453f95a9880796b36eea92f946270cd7bf81c2f7ef17125
5
5
  SHA512:
6
- metadata.gz: 7f8b2e4b1f4adaa8d1871879364d836c8a59fbc1b7342857a4d18c7406dd074d2b000380960e1b56555548968c866a109f7600090dc93cc533bc12b7cc52b6aa
7
- data.tar.gz: 6b7c84bccd3ba55de586bb2ff58c5a95da5062e4c2046d00065289260af32a5b1991b21d7acad28f7d1e20cb75cde526126f7bef7f0296fead10395b95849af0
6
+ metadata.gz: de93968c12dd7d01bdac595d9930f3ade8563ac33cad4b071dfddc97eb57b530e0a971463db88db6c6b7abd1f93ae981ca0074fe656c860319b8d876430dd887
7
+ data.tar.gz: 4d965f3bcb30285e20c26ab96d823f970f76bb7c36032c2e0eecbe7f6192f5a59079ea27ca63dc50111e9cc197dcc839837f356967c280a9b30bfcbece13a36d
@@ -6,13 +6,12 @@ on:
6
6
 
7
7
  jobs:
8
8
  sqlite3:
9
- runs-on: ubuntu-20.04
9
+ runs-on: ubuntu-22.04
10
10
  strategy:
11
11
  fail-fast: false
12
12
  matrix:
13
13
  ruby:
14
- - 3.0.2
15
- - 2.7.4
14
+ - 3.2.2
16
15
  env:
17
16
  DB: sqlite3
18
17
  RAILS: main
@@ -28,13 +27,12 @@ jobs:
28
27
  run: bundle exec rspec
29
28
 
30
29
  mysql:
31
- runs-on: ubuntu-20.04
30
+ runs-on: ubuntu-22.04
32
31
  strategy:
33
32
  fail-fast: false
34
33
  matrix:
35
34
  ruby:
36
- - 3.0.2
37
- - 2.7.4
35
+ - 3.2.2
38
36
  env:
39
37
  DB: mysql
40
38
  RAILS: main
@@ -59,13 +57,12 @@ jobs:
59
57
  run: bundle exec rspec
60
58
 
61
59
  postgres:
62
- runs-on: ubuntu-20.04
60
+ runs-on: ubuntu-22.04
63
61
  strategy:
64
62
  fail-fast: false
65
63
  matrix:
66
64
  ruby:
67
- - 3.0.2
68
- - 2.7.4
65
+ - 3.2.2
69
66
  env:
70
67
  DB: postgres
71
68
  RAILS: main
@@ -9,7 +9,7 @@ jobs:
9
9
  deploy:
10
10
  name: Deploy to GitHub Pages
11
11
 
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v3
@@ -6,14 +6,14 @@ on:
6
6
 
7
7
  jobs:
8
8
  build:
9
- runs-on: ubuntu-20.04
9
+ runs-on: ubuntu-22.04
10
10
 
11
11
  steps:
12
12
  - uses: actions/checkout@v2
13
13
  - name: Set up Ruby
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
- ruby-version: 3.0.1
16
+ ruby-version: 3.2.2
17
17
  - name: Install gems
18
18
  run: bundle install --jobs 4 --retry 3
19
19
  - name: Run RuboCop
@@ -9,7 +9,7 @@ jobs:
9
9
  test-deploy:
10
10
  name: Test deploy to GitHub Pages
11
11
 
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v3
@@ -8,17 +8,18 @@ on:
8
8
 
9
9
  jobs:
10
10
  sqlite3:
11
- runs-on: ubuntu-20.04
11
+ runs-on: ubuntu-22.04
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
15
  rails:
16
+ - v7.1.0
16
17
  - v7.0.3
17
18
  - v6.1.6
18
19
  ruby:
19
- - 3.1.2
20
- - 3.0.4
21
- - 2.7.6
20
+ - 3.2.2
21
+ - 3.1.4
22
+ - 3.0.6
22
23
  env:
23
24
  DB: sqlite3
24
25
  RAILS: ${{ matrix.rails }}
@@ -33,17 +34,18 @@ jobs:
33
34
  run: bundle exec rspec
34
35
 
35
36
  mysql:
36
- runs-on: ubuntu-20.04
37
+ runs-on: ubuntu-22.04
37
38
  strategy:
38
39
  fail-fast: false
39
40
  matrix:
40
41
  rails:
42
+ - v7.1.0
41
43
  - v7.0.3
42
44
  - v6.1.6
43
45
  ruby:
44
- - 3.1.2
45
- - 3.0.4
46
- - 2.7.6
46
+ - 3.2.2
47
+ - 3.1.4
48
+ - 3.0.6
47
49
  env:
48
50
  DB: mysql
49
51
  RAILS: ${{ matrix.rails }}
@@ -67,17 +69,18 @@ jobs:
67
69
  run: bundle exec rspec
68
70
 
69
71
  postgres:
70
- runs-on: ubuntu-20.04
72
+ runs-on: ubuntu-22.04
71
73
  strategy:
72
74
  fail-fast: false
73
75
  matrix:
74
76
  rails:
77
+ - v7.1.0
75
78
  - v7.0.3
76
79
  - v6.1.6
77
80
  ruby:
78
- - 3.1.2
79
- - 3.0.4
80
- - 2.7.6
81
+ - 3.2.2
82
+ - 3.1.4
83
+ - 3.0.6
81
84
  env:
82
85
  DB: postgres
83
86
  RAILS: ${{ matrix.rails }}
@@ -113,13 +116,13 @@ jobs:
113
116
  run: bundle exec rspec
114
117
 
115
118
  bug-report-templates:
116
- runs-on: ubuntu-20.04
119
+ runs-on: ubuntu-22.04
117
120
  steps:
118
121
  - uses: actions/checkout@v2
119
122
  - name: Set up Ruby
120
123
  uses: ruby/setup-ruby@v1
121
124
  with:
122
- ruby-version: 3.1.2
125
+ ruby-version: 3.2.2
123
126
  bundler-cache: true
124
127
  - name: Run bug report templates
125
128
  run: |
data/.rubocop.yml CHANGED
@@ -1,8 +1,11 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 3.0
3
3
 
4
4
  DisabledByDefault: true
5
5
 
6
+ Exclude:
7
+ - "docs/**/*"
8
+
6
9
  Layout/EmptyLineAfterMagicComment:
7
10
  Enabled: true
8
11
 
data/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 🚀 Features
6
+
7
+ * Add Rails 7.1.0 support by @yuki24 in https://github.com/activerecord-hackery/ransack/pull/1439
8
+
9
+ ## 🐛 Bug Fixes
10
+
11
+ * Fix wrong table aliases in Rails 6.1 by @oneiros in https://github.com/activerecord-hackery/ransack/pull/1447
12
+
13
+ ## 💦 Compatibility
14
+
15
+ * Drop Ruby 2.7 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1449
16
+
17
+ ## 📝 Documentation
18
+
19
+ * Update blog post link by @meg-gutshall in https://github.com/activerecord-hackery/ransack/pull/1425
20
+ * Add namespaced example of Polymorphic search by @craigmcnamara in https://github.com/activerecord-hackery/ransack/pull/1422
21
+ * Update sorting example to be self-contained by @kinduff in https://github.com/activerecord-hackery/ransack/pull/1442
22
+
23
+ ## 💅 Polish
24
+
25
+ * Minor updates for Rails 7.1 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1448
26
+ * Don't mention Ruby compatibility in contribution instructions by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1452
27
+
28
+ ## 🏠 Internal
29
+
30
+ * Bump @sideway/formula from 3.0.0 to 3.0.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1417
31
+ * Bump webpack from 5.74.0 to 5.76.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1412
32
+ * Bump semver from 5.7.1 to 5.7.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1431
33
+ * Bump @babel/traverse from 7.18.2 to 7.23.2 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1446
34
+ * Bump postcss from 8.4.14 to 8.4.31 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1443
35
+ * Bump dns-packet from 5.3.1 to 5.6.1 in /docs by @dependabot in https://github.com/activerecord-hackery/ransack/pull/1450
36
+ * Test with Ruby 3.2 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1451
37
+ * Misc CI bumps by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1453
38
+ * RuboCop tweaks by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1454
39
+
5
40
  ## 4.0.0 - 2023-02-09
6
41
 
7
42
  ### 💥 Breaking Changes
data/CONTRIBUTING.md CHANGED
@@ -115,35 +115,32 @@ Here's a quick guide:
115
115
  bundle exec rspec spec/ransack/search_spec.rb -e "accepts a context option"
116
116
  ```
117
117
 
118
- 5. Hack away! Please use Ruby features that are compatible down to Ruby 2.3.
119
- Since version 2.3.1, Ransack no longer maintains Ruby 2.2 compatibility.
120
-
121
- 6. Add tests for your changes. Only refactoring and documentation changes
118
+ 5. Add tests for your changes. Only refactoring and documentation changes
122
119
  require no new tests. If you are adding functionality or fixing a bug, we
123
120
  need a test!
124
121
 
125
- 7. Make the tests pass.
122
+ 6. Make the tests pass.
126
123
 
127
- 8. Update the Change Log. If you are adding new functionality, document it in
124
+ 7. Update the Change Log. If you are adding new functionality, document it in
128
125
  the README.
129
126
 
130
- 9. Make sure git knows your name and email address in your `~/.gitconfig` file:
127
+ 8. Make sure git knows your name and email address in your `~/.gitconfig` file:
131
128
 
132
129
  ```sh
133
130
  git config --global user.name "Your Name"
134
131
  git config --global user.email "contributor@example.com"
135
132
  ```
136
133
 
137
- 10. Commit your changes (`git commit -am 'Add feature/fix bug/improve docs'`).
134
+ 9. Commit your changes (`git commit -am 'Add feature/fix bug/improve docs'`).
138
135
  If your pull request only contains documentation changes, please remember
139
136
  to add `[skip ci]` to the beginning of your commit message so the CI
140
137
  test suite doesn't :runner: needlessly.
141
138
 
142
- 11. If necessary, rebase your commits into logical chunks, without errors. To
139
+ 10. If necessary, rebase your commits into logical chunks, without errors. To
143
140
  interactively rebase and cherry-pick from, say, the last 10 commits:
144
141
  `git rebase -i HEAD~10`, then `git push -f`.
145
142
 
146
- 12. Push the branch up to your fork on GitHub
143
+ 11. Push the branch up to your fork on GitHub
147
144
  (`git push origin my-new-feature`) and from GitHub submit a pull request to
148
145
  Ransack's `main` branch.
149
146
 
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ gemspec
3
3
 
4
4
  gem 'rake'
5
5
 
6
- rails = ENV['RAILS'] || '6-1-stable'
6
+ rails = ENV['RAILS'] || '7-1-stable'
7
7
 
8
8
  rails_version = case rails
9
9
  when /\// # A path
data/README.md CHANGED
@@ -13,7 +13,7 @@ There are advanced searching solutions around, like ElasticSearch or Algolia. **
13
13
 
14
14
  Ready to move beyond the basics? Use **advanced features** like i18n and extensive configuration options.
15
15
 
16
- Ransack is supported for Rails 7.0, 6.1 on Ruby 2.7 and later.
16
+ Ransack is supported for Rails 7.0, 6.1 on Ruby 3.0 and later.
17
17
 
18
18
  ## Installation
19
19
 
@@ -12,7 +12,7 @@ unless File.exist?('Gemfile')
12
12
  source 'https://rubygems.org'
13
13
 
14
14
  # Rails master
15
- gem 'rails', github: 'rails/rails', branch: '6-1-stable'
15
+ gem 'rails', github: 'rails/rails', branch: '7-1-stable'
16
16
 
17
17
  # Rails last release
18
18
  # gem 'rails'
@@ -10,7 +10,7 @@ unless File.exist?('Gemfile')
10
10
  source 'https://rubygems.org'
11
11
 
12
12
  # Rails master
13
- gem 'rails', github: 'rails/rails', branch: '6-1-stable'
13
+ gem 'rails', github: 'rails/rails', branch: '7-1-stable'
14
14
 
15
15
  # Rails last release
16
16
  # gem 'rails'
@@ -10,70 +10,62 @@ title: Sorting
10
10
  You can add a form to capture sorting and filtering options together.
11
11
 
12
12
  ```erb
13
- <div class="filters" id="filtersSidebar">
14
- <header class="filters-header">
15
- <div class="filters-header-content">
16
- <h3>Filters</h3>
17
- </div>
18
- </header>
19
-
20
- <div class="filters-content">
21
- <%= search_form_for @q,
22
- class: 'form',
23
- url: articles_path,
24
- html: { autocomplete: 'off', autocapitalize: 'none' } do |f| %>
25
-
26
- <div class="form-group">
27
- <%= f.label :title_cont, t('Filter_by_keyword') %>
28
- <%= f.search_field :title_cont %>
29
- </div>
30
-
31
- <%= render partial: 'filters/date_title_sort', locals: { f: f } %>
32
-
33
- <div class="form-group">
34
- <%= f.label :grade_level_gteq, t('Grade_level') %> >=
35
- <%= f.search_field :grade_level_gteq %>
36
- </div>
37
-
38
- <div class="form-group">
39
- <%= f.label :readability_gteq, t('Readability') %> >=
40
- <%= f.search_field :readability_gteq %>
41
- </div>
42
-
43
- <div class="form-group">
44
- <i><%= @articles.total_count %> articles</i>
45
- </div>
46
-
47
- <div class="form-group">
48
- <hr/>
49
- <div class="filters-header-content">
50
- <%= link_to request.path, class: 'form-link' do %>
51
- <i class="far fa-undo icon-l"></i><%= t('Clear_all') %>
52
- <% end %>
53
-
54
- <%= f.submit t('Filter'), class: 'btn btn-primary' %>
55
- </div>
56
- </div>
13
+ # app/views/posts/index.html.erb
14
+
15
+ <%= search_form_for @q do |f| %>
16
+ <%= f.label :title_cont %>
17
+ <%= f.search_field :title_cont %>
18
+
19
+ <%= f.submit "Search" %>
20
+ <% end %>
21
+
22
+ <table>
23
+ <thead>
24
+ <tr>
25
+ <th><%= sort_link(@q, :title, "Title") %></th>
26
+ <th><%= sort_link(@q, :category, "Category") %></th>
27
+ <th><%= sort_link(@q, :created_at, "Created at") %></th>
28
+ </tr>
29
+ </thead>
30
+
31
+ <tbody>
32
+ <% @posts.each do |post| %>
33
+ <tr>
34
+ <td><%= post.title %></td>
35
+ <td><%= post.category %></td>
36
+ <td><%= post.created_at.to_s(:long) %></td>
37
+ </tr>
57
38
  <% end %>
58
- </div>
59
- </div>
39
+ </tbody>
40
+ </table>
60
41
  ```
61
42
 
62
-
63
43
  ## Sorting in the Controller
64
44
 
65
45
  To specify a default search sort field + order in the controller `index`:
66
46
 
67
47
  ```ruby
68
- @search = Post.ransack(params[:q])
69
- @search.sorts = 'name asc' if @search.sorts.empty?
70
- @posts = @search.result.paginate(page: params[:page], per_page: 20)
48
+ # app/controllers/posts_controller.rb
49
+ class PostsController < ActionController::Base
50
+ def index
51
+ @q = Post.ransack(params[:q])
52
+ @q.sorts = 'title asc' if @q.sorts.empty?
53
+
54
+ @posts = @q.result(distinct: true)
55
+ end
56
+ end
71
57
  ```
72
58
 
73
59
  Multiple sorts can be set by:
74
60
 
75
61
  ```ruby
76
- @search = Post.ransack(params[:q])
77
- @search.sorts = ['name asc', 'created_at desc'] if @search.sorts.empty?
78
- @posts = @search.result.paginate(page: params[:page], per_page: 20)
62
+ # app/controllers/posts_controller.rb
63
+ class PostsController < ActionController::Base
64
+ def index
65
+ @q = Post.ransack(params[:q])
66
+ @q.sorts = ['title asc', 'created_at desc'] if @q.sorts.empty?
67
+
68
+ @posts = @q.result(distinct: true)
69
+ end
70
+ end
79
71
  ```
@@ -182,7 +182,7 @@ for an `auth_object` key in the options hash which can be used by your own
182
182
  overridden methods.
183
183
 
184
184
  Here is an example that puts all this together, adapted from
185
- [this blog post by Ernie Miller](http://erniemiller.org/2012/05/11/why-your-ruby-class-macros-might-suck-mine-did/).
185
+ [this blog post by Ernie Miller](https://ernie.io/2012/05/11/why-your-ruby-class-macros-might-suck-mine-did/).
186
186
  In an `Article` model, add the following `ransackable_attributes` class method
187
187
  (preferably private):
188
188
 
@@ -38,3 +38,9 @@ Location.ransack(locatable_of_House_type_number_eq: 100).result
38
38
  ```
39
39
 
40
40
  note the `_of_House_type_` added to the search key. This allows Ransack to correctly specify the table names in SQL join queries.
41
+
42
+ For namespaced models you should use a quoted string containing the standard Ruby module notation
43
+
44
+ ```ruby
45
+ Location.ransack('locatable_of_Residences::House_type_number_eq' => 100).result
46
+ ```
data/docs/yarn.lock CHANGED
@@ -152,6 +152,14 @@
152
152
  dependencies:
153
153
  "@babel/highlight" "^7.18.6"
154
154
 
155
+ "@babel/code-frame@^7.22.13":
156
+ version "7.22.13"
157
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
158
+ integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
159
+ dependencies:
160
+ "@babel/highlight" "^7.22.13"
161
+ chalk "^2.4.2"
162
+
155
163
  "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10":
156
164
  version "7.17.10"
157
165
  resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab"
@@ -235,7 +243,7 @@
235
243
  "@jridgewell/gen-mapping" "^0.3.0"
236
244
  jsesc "^2.5.1"
237
245
 
238
- "@babel/generator@^7.18.7", "@babel/generator@^7.20.1", "@babel/generator@^7.20.2":
246
+ "@babel/generator@^7.18.7", "@babel/generator@^7.20.2":
239
247
  version "7.20.4"
240
248
  resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8"
241
249
  integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==
@@ -244,6 +252,16 @@
244
252
  "@jridgewell/gen-mapping" "^0.3.2"
245
253
  jsesc "^2.5.1"
246
254
 
255
+ "@babel/generator@^7.23.0":
256
+ version "7.23.0"
257
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
258
+ integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
259
+ dependencies:
260
+ "@babel/types" "^7.23.0"
261
+ "@jridgewell/gen-mapping" "^0.3.2"
262
+ "@jridgewell/trace-mapping" "^0.3.17"
263
+ jsesc "^2.5.1"
264
+
247
265
  "@babel/helper-annotate-as-pure@^7.16.7":
248
266
  version "7.16.7"
249
267
  resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862"
@@ -372,6 +390,11 @@
372
390
  resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"
373
391
  integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==
374
392
 
393
+ "@babel/helper-environment-visitor@^7.22.20":
394
+ version "7.22.20"
395
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
396
+ integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==
397
+
375
398
  "@babel/helper-explode-assignable-expression@^7.16.7":
376
399
  version "7.16.7"
377
400
  resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a"
@@ -402,6 +425,14 @@
402
425
  "@babel/template" "^7.18.10"
403
426
  "@babel/types" "^7.19.0"
404
427
 
428
+ "@babel/helper-function-name@^7.23.0":
429
+ version "7.23.0"
430
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
431
+ integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
432
+ dependencies:
433
+ "@babel/template" "^7.22.15"
434
+ "@babel/types" "^7.23.0"
435
+
405
436
  "@babel/helper-hoist-variables@^7.16.7":
406
437
  version "7.16.7"
407
438
  resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246"
@@ -416,6 +447,13 @@
416
447
  dependencies:
417
448
  "@babel/types" "^7.18.6"
418
449
 
450
+ "@babel/helper-hoist-variables@^7.22.5":
451
+ version "7.22.5"
452
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
453
+ integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==
454
+ dependencies:
455
+ "@babel/types" "^7.22.5"
456
+
419
457
  "@babel/helper-member-expression-to-functions@^7.17.7":
420
458
  version "7.17.7"
421
459
  resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4"
@@ -584,11 +622,23 @@
584
622
  dependencies:
585
623
  "@babel/types" "^7.18.6"
586
624
 
625
+ "@babel/helper-split-export-declaration@^7.22.6":
626
+ version "7.22.6"
627
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
628
+ integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
629
+ dependencies:
630
+ "@babel/types" "^7.22.5"
631
+
587
632
  "@babel/helper-string-parser@^7.19.4":
588
633
  version "7.19.4"
589
634
  resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63"
590
635
  integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
591
636
 
637
+ "@babel/helper-string-parser@^7.22.5":
638
+ version "7.22.5"
639
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
640
+ integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
641
+
592
642
  "@babel/helper-validator-identifier@^7.16.7":
593
643
  version "7.16.7"
594
644
  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
@@ -599,6 +649,11 @@
599
649
  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
600
650
  integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
601
651
 
652
+ "@babel/helper-validator-identifier@^7.22.20":
653
+ version "7.22.20"
654
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
655
+ integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
656
+
602
657
  "@babel/helper-validator-option@^7.16.7":
603
658
  version "7.16.7"
604
659
  resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23"
@@ -665,16 +720,30 @@
665
720
  chalk "^2.0.0"
666
721
  js-tokens "^4.0.0"
667
722
 
723
+ "@babel/highlight@^7.22.13":
724
+ version "7.22.20"
725
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54"
726
+ integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==
727
+ dependencies:
728
+ "@babel/helper-validator-identifier" "^7.22.20"
729
+ chalk "^2.4.2"
730
+ js-tokens "^4.0.0"
731
+
668
732
  "@babel/parser@^7.12.7", "@babel/parser@^7.16.7", "@babel/parser@^7.18.0":
669
733
  version "7.18.4"
670
734
  resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef"
671
735
  integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==
672
736
 
673
- "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2":
737
+ "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.20.2":
674
738
  version "7.20.3"
675
739
  resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2"
676
740
  integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==
677
741
 
742
+ "@babel/parser@^7.22.15", "@babel/parser@^7.23.0":
743
+ version "7.23.0"
744
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
745
+ integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
746
+
678
747
  "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.17.12":
679
748
  version "7.17.12"
680
749
  resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.17.12.tgz#1dca338caaefca368639c9ffb095afbd4d420b1e"
@@ -1980,35 +2049,28 @@
1980
2049
  "@babel/parser" "^7.18.10"
1981
2050
  "@babel/types" "^7.18.10"
1982
2051
 
1983
- "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2":
1984
- version "7.18.2"
1985
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8"
1986
- integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==
1987
- dependencies:
1988
- "@babel/code-frame" "^7.16.7"
1989
- "@babel/generator" "^7.18.2"
1990
- "@babel/helper-environment-visitor" "^7.18.2"
1991
- "@babel/helper-function-name" "^7.17.9"
1992
- "@babel/helper-hoist-variables" "^7.16.7"
1993
- "@babel/helper-split-export-declaration" "^7.16.7"
1994
- "@babel/parser" "^7.18.0"
1995
- "@babel/types" "^7.18.2"
1996
- debug "^4.1.0"
1997
- globals "^11.1.0"
1998
-
1999
- "@babel/traverse@^7.18.8", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1":
2000
- version "7.20.1"
2001
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8"
2002
- integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==
2003
- dependencies:
2004
- "@babel/code-frame" "^7.18.6"
2005
- "@babel/generator" "^7.20.1"
2006
- "@babel/helper-environment-visitor" "^7.18.9"
2007
- "@babel/helper-function-name" "^7.19.0"
2008
- "@babel/helper-hoist-variables" "^7.18.6"
2009
- "@babel/helper-split-export-declaration" "^7.18.6"
2010
- "@babel/parser" "^7.20.1"
2011
- "@babel/types" "^7.20.0"
2052
+ "@babel/template@^7.22.15":
2053
+ version "7.22.15"
2054
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
2055
+ integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
2056
+ dependencies:
2057
+ "@babel/code-frame" "^7.22.13"
2058
+ "@babel/parser" "^7.22.15"
2059
+ "@babel/types" "^7.22.15"
2060
+
2061
+ "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.8", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1":
2062
+ version "7.23.2"
2063
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
2064
+ integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
2065
+ dependencies:
2066
+ "@babel/code-frame" "^7.22.13"
2067
+ "@babel/generator" "^7.23.0"
2068
+ "@babel/helper-environment-visitor" "^7.22.20"
2069
+ "@babel/helper-function-name" "^7.23.0"
2070
+ "@babel/helper-hoist-variables" "^7.22.5"
2071
+ "@babel/helper-split-export-declaration" "^7.22.6"
2072
+ "@babel/parser" "^7.23.0"
2073
+ "@babel/types" "^7.23.0"
2012
2074
  debug "^4.1.0"
2013
2075
  globals "^11.1.0"
2014
2076
 
@@ -2029,6 +2091,15 @@
2029
2091
  "@babel/helper-validator-identifier" "^7.19.1"
2030
2092
  to-fast-properties "^2.0.0"
2031
2093
 
2094
+ "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0":
2095
+ version "7.23.0"
2096
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
2097
+ integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==
2098
+ dependencies:
2099
+ "@babel/helper-string-parser" "^7.22.5"
2100
+ "@babel/helper-validator-identifier" "^7.22.20"
2101
+ to-fast-properties "^2.0.0"
2102
+
2032
2103
  "@colors/colors@1.5.0":
2033
2104
  version "1.5.0"
2034
2105
  resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
@@ -2510,6 +2581,11 @@
2510
2581
  resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
2511
2582
  integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
2512
2583
 
2584
+ "@jridgewell/resolve-uri@^3.1.0":
2585
+ version "3.1.1"
2586
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721"
2587
+ integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
2588
+
2513
2589
  "@jridgewell/set-array@^1.0.0":
2514
2590
  version "1.1.1"
2515
2591
  resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
@@ -2533,6 +2609,11 @@
2533
2609
  resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
2534
2610
  integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
2535
2611
 
2612
+ "@jridgewell/sourcemap-codec@^1.4.14":
2613
+ version "1.4.15"
2614
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
2615
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
2616
+
2536
2617
  "@jridgewell/trace-mapping@^0.3.14":
2537
2618
  version "0.3.17"
2538
2619
  resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985"
@@ -2541,6 +2622,14 @@
2541
2622
  "@jridgewell/resolve-uri" "3.1.0"
2542
2623
  "@jridgewell/sourcemap-codec" "1.4.14"
2543
2624
 
2625
+ "@jridgewell/trace-mapping@^0.3.17":
2626
+ version "0.3.20"
2627
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f"
2628
+ integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==
2629
+ dependencies:
2630
+ "@jridgewell/resolve-uri" "^3.1.0"
2631
+ "@jridgewell/sourcemap-codec" "^1.4.14"
2632
+
2544
2633
  "@jridgewell/trace-mapping@^0.3.7":
2545
2634
  version "0.3.13"
2546
2635
  resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
@@ -2715,9 +2804,9 @@
2715
2804
  "@hapi/hoek" "^9.0.0"
2716
2805
 
2717
2806
  "@sideway/formula@^3.0.0":
2718
- version "3.0.0"
2719
- resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c"
2720
- integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==
2807
+ version "3.0.1"
2808
+ resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f"
2809
+ integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==
2721
2810
 
2722
2811
  "@sideway/pinpoint@^2.0.0":
2723
2812
  version "2.0.0"
@@ -3766,7 +3855,7 @@ ccount@^1.0.0:
3766
3855
  resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043"
3767
3856
  integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==
3768
3857
 
3769
- chalk@^2.0.0:
3858
+ chalk@^2.0.0, chalk@^2.4.2:
3770
3859
  version "2.4.2"
3771
3860
  resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
3772
3861
  integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -4483,9 +4572,9 @@ dns-equal@^1.0.0:
4483
4572
  integrity sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==
4484
4573
 
4485
4574
  dns-packet@^5.2.2:
4486
- version "5.3.1"
4487
- resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.1.tgz#eb94413789daec0f0ebe2fcc230bdc9d7c91b43d"
4488
- integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw==
4575
+ version "5.6.1"
4576
+ resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f"
4577
+ integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==
4489
4578
  dependencies:
4490
4579
  "@leichtgewicht/ip-codec" "^2.0.1"
4491
4580
 
@@ -6222,10 +6311,10 @@ multicast-dns@^7.2.5:
6222
6311
  dns-packet "^5.2.2"
6223
6312
  thunky "^1.0.2"
6224
6313
 
6225
- nanoid@^3.3.4:
6226
- version "3.3.4"
6227
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
6228
- integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
6314
+ nanoid@^3.3.6:
6315
+ version "3.3.6"
6316
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
6317
+ integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
6229
6318
 
6230
6319
  negotiator@0.6.3:
6231
6320
  version "0.6.3"
@@ -6954,11 +7043,11 @@ postcss-zindex@^5.1.0:
6954
7043
  integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A==
6955
7044
 
6956
7045
  postcss@^8.3.11, postcss@^8.4.13, postcss@^8.4.14, postcss@^8.4.7:
6957
- version "8.4.14"
6958
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
6959
- integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
7046
+ version "8.4.31"
7047
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d"
7048
+ integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
6960
7049
  dependencies:
6961
- nanoid "^3.3.4"
7050
+ nanoid "^3.3.6"
6962
7051
  picocolors "^1.0.0"
6963
7052
  source-map-js "^1.0.2"
6964
7053
 
@@ -7689,19 +7778,19 @@ semver@7.0.0:
7689
7778
  integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
7690
7779
 
7691
7780
  semver@^5.4.1:
7692
- version "5.7.1"
7693
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
7694
- integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
7781
+ version "5.7.2"
7782
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
7783
+ integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
7695
7784
 
7696
7785
  semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
7697
- version "6.3.0"
7698
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
7699
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
7786
+ version "6.3.1"
7787
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
7788
+ integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
7700
7789
 
7701
7790
  semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7:
7702
- version "7.3.7"
7703
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
7704
- integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
7791
+ version "7.5.4"
7792
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
7793
+ integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
7705
7794
  dependencies:
7706
7795
  lru-cache "^6.0.0"
7707
7796
 
@@ -8615,9 +8704,9 @@ webpack-sources@^3.2.2, webpack-sources@^3.2.3:
8615
8704
  integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
8616
8705
 
8617
8706
  webpack@^5.73.0:
8618
- version "5.74.0"
8619
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980"
8620
- integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==
8707
+ version "5.76.1"
8708
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.1.tgz#7773de017e988bccb0f13c7d75ec245f377d295c"
8709
+ integrity sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==
8621
8710
  dependencies:
8622
8711
  "@types/eslint-scope" "^3.7.3"
8623
8712
  "@types/estree" "^0.0.51"
@@ -56,11 +56,21 @@ module Polyamorous
56
56
  private
57
57
 
58
58
  def table_aliases_for(parent, node)
59
+ @joined_tables ||= {}
59
60
  node.reflection.chain.map { |reflection|
60
- alias_tracker.aliased_table_for(reflection.klass.arel_table) do
61
- root = reflection == node.reflection
62
- name = reflection.alias_candidate(parent.table_name)
63
- root ? name : "#{name}_join"
61
+ table, terminated = @joined_tables[reflection]
62
+ root = reflection == node.reflection
63
+
64
+ if table && (!root || !terminated)
65
+ @joined_tables[reflection] = [table, true] if root
66
+ table
67
+ else
68
+ table = alias_tracker.aliased_table_for(reflection.klass.arel_table) do
69
+ name = reflection.alias_candidate(parent.table_name)
70
+ root ? name : "#{name}_join"
71
+ end
72
+ @joined_tables[reflection] ||= [table, root] if join_type == Arel::Nodes::OuterJoin
73
+ table
64
74
  end
65
75
  }
66
76
  end
@@ -12,8 +12,9 @@ module Ransack
12
12
 
13
13
  def type_for(attr)
14
14
  return nil unless attr && attr.valid?
15
+ relation = attr.arel_attribute.relation
15
16
  name = attr.arel_attribute.name.to_s
16
- table = attr.arel_attribute.relation.table_name
17
+ table = relation.respond_to?(:table_name) ? relation.table_name : relation.name
17
18
  schema_cache = self.klass.connection.schema_cache
18
19
  unless schema_cache.send(:data_source_exists?, table)
19
20
  raise "No table named #{table} exists."
@@ -1,3 +1,3 @@
1
1
  module Ransack
2
- VERSION = '4.0.0'
2
+ VERSION = '4.1.0'
3
3
  end
data/ransack.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.homepage = "https://github.com/activerecord-hackery/ransack"
13
13
  s.summary = %q{Object-based searching for Active Record.}
14
14
  s.description = %q{Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API.}
15
- s.required_ruby_version = '>= 2.7'
15
+ s.required_ruby_version = '>= 3.0'
16
16
  s.license = 'MIT'
17
17
 
18
18
  s.add_dependency 'activerecord', '>= 6.1.5'
@@ -141,6 +141,22 @@ module Ransack
141
141
  end
142
142
  end
143
143
 
144
+ context 'has_one through associations' do
145
+ let(:address) { Address.create!(city: 'Boston') }
146
+ let(:org) { Organization.create!(name: 'Testorg', address: address) }
147
+ let!(:employee) { Employee.create!(name: 'Ernie', organization: org) }
148
+
149
+ it 'works when has_one through association is first' do
150
+ s = Employee.ransack(address_city_eq: 'Boston', organization_name_eq: 'Testorg')
151
+ expect(s.result.to_a).to include(employee)
152
+ end
153
+
154
+ it 'works when has_one through association is last' do
155
+ s = Employee.ransack(organization_name_eq: 'Testorg', address_city_eq: 'Boston')
156
+ expect(s.result.to_a).to include(employee)
157
+ end
158
+ end
159
+
144
160
  context 'negative conditions on HABTM associations' do
145
161
  let(:medieval) { Tag.create!(name: 'Medieval') }
146
162
  let(:fantasy) { Tag.create!(name: 'Fantasy') }
@@ -237,6 +237,20 @@ class Account < ApplicationRecord
237
237
  belongs_to :trade_account, class_name: "Account"
238
238
  end
239
239
 
240
+ class Address < ApplicationRecord
241
+ has_one :organization
242
+ end
243
+
244
+ class Organization < ApplicationRecord
245
+ belongs_to :address
246
+ has_many :employees
247
+ end
248
+
249
+ class Employee < ApplicationRecord
250
+ belongs_to :organization
251
+ has_one :address, through: :organization
252
+ end
253
+
240
254
  module Schema
241
255
  def self.create
242
256
  ActiveRecord::Migration.verbose = false
@@ -300,6 +314,20 @@ module Schema
300
314
  t.belongs_to :agent_account
301
315
  t.belongs_to :trade_account
302
316
  end
317
+
318
+ create_table :addresses, force: true do |t|
319
+ t.string :city
320
+ end
321
+
322
+ create_table :organizations, force: true do |t|
323
+ t.string :name
324
+ t.integer :address_id
325
+ end
326
+
327
+ create_table :employees, force: true do |t|
328
+ t.string :name
329
+ t.integer :organization_id
330
+ end
303
331
  end
304
332
 
305
333
  10.times do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2023-02-09 00:00:00.000000000 Z
15
+ date: 2023-10-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
@@ -242,14 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - ">="
244
244
  - !ruby/object:Gem::Version
245
- version: '2.7'
245
+ version: '3.0'
246
246
  required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - ">="
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
251
  requirements: []
252
- rubygems_version: 3.4.6
252
+ rubygems_version: 3.4.21
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: Object-based searching for Active Record.