diff --git a/.all-contributorsrc b/.all-contributorsrc
deleted file mode 100644
index b682e125..00000000
--- a/.all-contributorsrc
+++ /dev/null
@@ -1,488 +0,0 @@
-{
- "projectName": "plugin-ruby",
- "projectOwner": "prettier",
- "repoType": "github",
- "repoHost": "https://github.com",
- "files": [
- "README.md"
- ],
- "imageSize": 100,
- "commit": true,
- "contributors": [
- {
- "login": "kddeisz",
- "name": "Kevin Deisz",
- "avatar_url": "https://avatars2.githubusercontent.com/u/5093358?v=4",
- "profile": "https://kevindeisz.com",
- "contributions": [
- "code",
- "doc",
- "test",
- "bug"
- ]
- },
- {
- "login": "AlanFoster",
- "name": "Alan Foster",
- "avatar_url": "https://avatars2.githubusercontent.com/u/1271782?v=4",
- "profile": "https://www.alanfoster.me/",
- "contributions": [
- "code",
- "doc",
- "test",
- "bug"
- ]
- },
- {
- "login": "johnschoeman",
- "name": "johnschoeman",
- "avatar_url": "https://avatars0.githubusercontent.com/u/16049495?v=4",
- "profile": "https://github.com/johnschoeman",
- "contributions": [
- "test"
- ]
- },
- {
- "login": "aaronjensen",
- "name": "Aaron Jensen",
- "avatar_url": "https://avatars3.githubusercontent.com/u/8588?v=4",
- "profile": "https://twitter.com/aaronjensen",
- "contributions": [
- "doc"
- ]
- },
- {
- "login": "cbothner",
- "name": "Cameron Bothner",
- "avatar_url": "https://avatars1.githubusercontent.com/u/4642599?v=4",
- "profile": "http://cameronbothner.com",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "localhostdotdev",
- "name": "localhost.dev",
- "avatar_url": "https://avatars3.githubusercontent.com/u/47308085?v=4",
- "profile": "https://localhost.dev",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "deecewan",
- "name": "David Buchan-Swanson",
- "avatar_url": "https://avatars0.githubusercontent.com/u/4755785?v=4",
- "profile": "https://deecewan.github.io",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "jpickwell",
- "name": "Jordan Pickwell",
- "avatar_url": "https://avatars1.githubusercontent.com/u/4682321?v=4",
- "profile": "https://github.com/jpickwell",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "CodingItWrong",
- "name": "Josh Justice",
- "avatar_url": "https://avatars0.githubusercontent.com/u/15832198?v=4",
- "profile": "http://codingitwrong.com",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "xipgroc",
- "name": "xipgroc",
- "avatar_url": "https://avatars0.githubusercontent.com/u/28561131?v=4",
- "profile": "https://github.com/xipgroc",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "glejeune",
- "name": "Gregoire Lejeune",
- "avatar_url": "https://avatars1.githubusercontent.com/u/15168?v=4",
- "profile": "http://lejeun.es",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "petevk",
- "name": "Pete Van Klaveren",
- "avatar_url": "https://avatars3.githubusercontent.com/u/5108627?v=4",
- "profile": "https://github.com/petevk",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "meleyal",
- "name": "meleyal",
- "avatar_url": "https://avatars3.githubusercontent.com/u/15045?v=4",
- "profile": "https://github.com/meleyal",
- "contributions": [
- "doc"
- ]
- },
- {
- "login": "lipis",
- "name": "Lipis",
- "avatar_url": "https://avatars1.githubusercontent.com/u/125676?v=4",
- "profile": "https://lip.is",
- "contributions": [
- "doc"
- ]
- },
- {
- "login": "janpio",
- "name": "Jan Piotrowski",
- "avatar_url": "https://avatars0.githubusercontent.com/u/183673?v=4",
- "profile": "https://janpiotrowski.de",
- "contributions": [
- "doc"
- ]
- },
- {
- "login": "andyw8",
- "name": "Andy Waite",
- "avatar_url": "https://avatars1.githubusercontent.com/u/13400?v=4",
- "profile": "https://www.andywaite.com",
- "contributions": [
- "doc",
- "bug"
- ]
- },
- {
- "login": "jviney",
- "name": "Jonathan Viney",
- "avatar_url": "https://avatars3.githubusercontent.com/u/7051?v=4",
- "profile": "https://github.com/jviney",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "acrewdson",
- "name": "acrewdson",
- "avatar_url": "https://avatars0.githubusercontent.com/u/10353074?v=4",
- "profile": "https://github.com/acrewdson",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "dudeofawesome",
- "name": "Louis Orleans",
- "avatar_url": "https://avatars0.githubusercontent.com/u/1683595?v=4",
- "profile": "https://orleans.io",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "cvoege",
- "name": "Colton Voege",
- "avatar_url": "https://avatars2.githubusercontent.com/u/6777709?v=4",
- "profile": "https://github.com/cvoege",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "krachtstefan",
- "name": "Stefan Kracht",
- "avatar_url": "https://avatars1.githubusercontent.com/u/529711?v=4",
- "profile": "https://stefankracht.de",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "jakeprime",
- "name": "jakeprime",
- "avatar_url": "https://avatars1.githubusercontent.com/u/1019036?v=4",
- "profile": "https://github.com/jakeprime",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "mmainz",
- "name": "Mario Mainz",
- "avatar_url": "https://avatars2.githubusercontent.com/u/5417714?v=4",
- "profile": "http://mmainz.github.io",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "cldevs",
- "name": "CL Web Developers",
- "avatar_url": "https://avatars3.githubusercontent.com/u/38632061?v=4",
- "profile": "http://www.cldevs.com",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "github0013",
- "name": "github0013",
- "avatar_url": "https://avatars0.githubusercontent.com/u/809378?v=4",
- "profile": "https://twitter.com/github0013",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "jamescostian",
- "name": "James Costian",
- "avatar_url": "https://avatars1.githubusercontent.com/u/1456118?v=4",
- "profile": "https://jami.am",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "joeyjoejoejr",
- "name": "Joe Jackson",
- "avatar_url": "https://avatars0.githubusercontent.com/u/1141502?v=4",
- "profile": "https://github.com/joeyjoejoejr",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "eins78",
- "name": "Max Albrecht",
- "avatar_url": "https://avatars3.githubusercontent.com/u/134942?v=4",
- "profile": "http://178.is",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "matt-wratt",
- "name": "Matt",
- "avatar_url": "https://avatars0.githubusercontent.com/u/570030?v=4",
- "profile": "https://github.com/matt-wratt",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "valscion",
- "name": "Vesa Laakso",
- "avatar_url": "https://avatars2.githubusercontent.com/u/482561?v=4",
- "profile": "http://vesalaakso.com",
- "contributions": [
- "doc"
- ]
- },
- {
- "login": "jrdioko",
- "name": "jrdioko",
- "avatar_url": "https://avatars0.githubusercontent.com/u/405288?v=4",
- "profile": "https://github.com/jrdioko",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "gin0606",
- "name": "gin0606",
- "avatar_url": "https://avatars2.githubusercontent.com/u/795891?v=4",
- "profile": "http://gin0606.hatenablog.com",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "tobyndockerill",
- "name": "Tobyn",
- "avatar_url": "https://avatars1.githubusercontent.com/u/5688326?v=4",
- "profile": "https://github.com/tobyndockerill",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "ianks",
- "name": "Ian Ker-Seymer",
- "avatar_url": "https://avatars0.githubusercontent.com/u/3303032?v=4",
- "profile": "http://ianks.com",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "flyerhzm",
- "name": "Richard Huang",
- "avatar_url": "https://avatars2.githubusercontent.com/u/66836?v=4",
- "profile": "https://huangzhimin.com",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "pje",
- "name": "Patrick Ellis",
- "avatar_url": "https://avatars1.githubusercontent.com/u/319655?v=4",
- "profile": "https://github.com/pje",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "masqita",
- "name": "Peter De Berdt",
- "avatar_url": "https://avatars0.githubusercontent.com/u/161271?v=4",
- "profile": "https://www.piesync.com/",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "hafley66",
- "name": "Chris Hafley",
- "avatar_url": "https://avatars0.githubusercontent.com/u/6750483?v=4",
- "profile": "https://github.com/hafley66",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "Fruetel",
- "name": "Thomas Frütel",
- "avatar_url": "https://avatars1.githubusercontent.com/u/8015212?v=4",
- "profile": "http://fruetel.de",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "alse",
- "name": "Alex Serban",
- "avatar_url": "https://avatars1.githubusercontent.com/u/1160249?v=4",
- "profile": "https://github.com/alse",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "SViccari",
- "name": "Stephanie",
- "avatar_url": "https://avatars3.githubusercontent.com/u/4016985?v=4",
- "profile": "http://sviccari.github.io",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "ShayDavidson",
- "name": "Shay Davidson",
- "avatar_url": "https://avatars1.githubusercontent.com/u/1366521?v=4",
- "profile": "https://github.com/ShayDavidson",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "ryan-hunter-pc",
- "name": "Ryan Hunter",
- "avatar_url": "https://avatars2.githubusercontent.com/u/13044512?v=4",
- "profile": "https://github.com/ryan-hunter-pc",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "janklimo",
- "name": "Jan Klimo",
- "avatar_url": "https://avatars1.githubusercontent.com/u/7811733?v=4",
- "profile": "https://www.locksteplabs.com/",
- "contributions": [
- "code"
- ]
- },
- {
- "login": "Rsullivan00",
- "name": "Rick Sullivan",
- "avatar_url": "https://avatars0.githubusercontent.com/u/3654176?v=4",
- "profile": "http://ricksullivan.net",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "steobrien",
- "name": "Stephen O'Brien",
- "avatar_url": "https://avatars3.githubusercontent.com/u/1694410?v=4",
- "profile": "https://twitter.com/steobrien",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "nimish-mehta",
- "name": "Nimish Mehta",
- "avatar_url": "https://avatars2.githubusercontent.com/u/2488470?v=4",
- "profile": "https://github.com/nimish-mehta",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "jbielick",
- "name": "Josh Bielick",
- "avatar_url": "https://avatars2.githubusercontent.com/u/1413330?v=4",
- "profile": "https://joshbielick.com/",
- "contributions": [
- "bug",
- "code"
- ]
- },
- {
- "login": "coiti",
- "name": "Román Coitiño",
- "avatar_url": "https://avatars3.githubusercontent.com/u/27384706?v=4",
- "profile": "https://github.com/coiti",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "mmcnl",
- "name": "Matt McNeil",
- "avatar_url": "https://avatars2.githubusercontent.com/u/1498727?v=4",
- "profile": "https://github.com/mmcnl",
- "contributions": [
- "bug"
- ]
- },
- {
- "login": "johncsnyder",
- "name": "John Snyder",
- "avatar_url": "https://avatars2.githubusercontent.com/u/9882099?v=4",
- "profile": "https://github.com/johncsnyder",
- "contributions": [
- "bug"
- ]
- }
- ],
- "contributorsPerLine": 7,
- "commitConvention": "none"
-}
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 7053dc17..00000000
--- a/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-/coverage/
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
deleted file mode 100644
index 9ef85bea..00000000
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: 🐛 Bug
-about: Issues with prettier crashing
----
-
-## Metadata
-
-* Ruby version: ...
-* `@prettier/plugin-ruby` or `prettier` gem version: ...
-* Options:
- * [x] `rubyHashLabel`
- * [x] `rubyModifier`
- * [x] `rubySingleQuote`
- * [ ] `rubyToProc`
- * [ ] `trailingComma`
-
-## Input
-
-```ruby
-# Code snippet
-```
diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md
deleted file mode 100644
index 91e868da..00000000
--- a/.github/ISSUE_TEMPLATE/formatting.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: ✨ Formatting
-about: Issues for ugly or incorrect code
----
-
-## Metadata
-
-* Ruby version: ...
-* `@prettier/plugin-ruby` or `prettier` gem version: ...
-* Options:
- * [x] `rubyHashLabel`
- * [x] `rubyModifier`
- * [x] `rubySingleQuote`
- * [ ] `rubyToProc`
- * [ ] `trailingComma`
-
-## Input
-
-```ruby
-# Code snippet
-```
-
-## Current output
-
-```ruby
-# Code snippet
-```
-
-## Expected output
-
-```ruby
-# Code snippet
-```
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..29fe4b24
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,14 @@
+version: 2
+updates:
+ - package-ecosystem: "npm"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "bundler"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
new file mode 100644
index 00000000..44908aae
--- /dev/null
+++ b/.github/workflows/auto-merge.yml
@@ -0,0 +1,22 @@
+name: Dependabot auto-merge
+on: pull_request
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ dependabot:
+ runs-on: ubuntu-latest
+ if: ${{ github.actor == 'dependabot[bot]' }}
+ steps:
+ - name: Dependabot metadata
+ id: metadata
+ uses: dependabot/fetch-metadata@v2.0.0
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+ - name: Enable auto-merge for Dependabot PRs
+ run: gh pr merge --auto --merge "$PR_URL"
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index cdfaf443..7c247608 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,72 +1,68 @@
name: Main
on:
-- push
-- pull_request
+ - push
+ - pull_request
+
jobs:
ci:
name: CI
- runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
+ platform:
+ - macos-latest
+ - ubuntu-latest
+ - windows-latest
ruby:
- - "2.5"
- - "2.6"
- - "2.7"
- env:
- CI: true
+ - "3.0"
+ - "3.1"
+ - "3.2"
+ runs-on: ${{ matrix.platform }}
steps:
- - uses: actions/checkout@master
-
- # Setup ruby dependencies
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby }}
- - uses: actions/cache@v1
- with:
- path: vendor/bundle
- key: ${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
- restore-keys: |
- ${{ runner.os }}-${{ matrix.ruby }}-
- - name: bundle install
- run: |
- bundle config path vendor/bundle
- bundle install --jobs 4 --retry 3
-
- # Setup node dependencies
- - uses: actions/setup-node@v2-beta
- with:
- node-version: 12.x
- - id: yarn-cache
- run: echo "::set-output name=directory::$(yarn cache dir)"
- - uses: actions/cache@v1
- with:
- path: ${{ steps.yarn-cache.outputs.directory }}
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- ${{ runner.os }}-yarn-
- - run: yarn install --frozen-lockfile
+ - uses: actions/checkout@main
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: ${{ matrix.ruby }}
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20.x
+ cache: yarn
+ - run: yarn install --frozen-lockfile
+ - run: yarn test
+ - run: bundle exec rake test
- # Actually run tests and lint
- - name: Lint and test
- run: |
- yarn check-format
- yarn lint
- yarn test
- bundle exec rake test
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@main
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: "3.0"
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20.x
+ cache: yarn
+ - run: yarn install --frozen-lockfile
+ - run: yarn checkFormat
+ - run: yarn lint
- automerge:
- name: AutoMerge
- needs: ci
+ gem:
+ name: Gem
runs-on: ubuntu-latest
- if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
steps:
- - uses: actions/github-script@v3
+ - uses: actions/checkout@main
+ - uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: "3.2"
+ - uses: actions/setup-node@v4
with:
- script: |
- github.pulls.merge({
- owner: context.payload.repository.owner.login,
- repo: context.payload.repository.name,
- pull_number: context.payload.pull_request.number
- })
-
\ No newline at end of file
+ node-version: 20.x
+ cache: yarn
+ - run: yarn install --frozen-lockfile
+ - run: gem build -o prettier.gem
+ - run: gem unpack prettier.gem
+ - run: prettier/exe/rbprettier --help
diff --git a/.gitignore b/.gitignore
index 55e5178a..1a035cd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,8 @@
/yarn-error.log
/pkg/
/test.rb
+/test.rbs
+/test.haml
*.gem
# This is to better support the GitHub actions checking - since bundler changes
diff --git a/.npmignore b/.npmignore
index 263e5d6b..7a1a86d7 100644
--- a/.npmignore
+++ b/.npmignore
@@ -5,8 +5,9 @@
/node_modules/
/lib/
/pkg/
-/playground/
/test/
+/vendor/
+/*.gem
/.*
/Gemfile*
@@ -14,3 +15,5 @@
/prettier-*.gem
/yarn-error.log
/test.rb
+/test.rbs
+/test.haml
diff --git a/.prettierignore b/.prettierignore
index 7c430821..f430e82a 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,14 +1,18 @@
/.bundle/
-/.github/
/coverage/
/pkg/
/playground/
/vendor/
-/.all-contributorsrc
/.eslintcache
/.*ignore
+/bin/port
/docs/logo.png
/*.lock
/LICENSE
/test.rb
+/test.rbs
+/test.haml
+
+*.txt
+*.gem
diff --git a/CHANGELOG.md b/CHANGELOG.md
index feb9efe7..0e310a26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,47 +6,394 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [Unreleased]
+## [4.0.4] - 2023-12-12
+
+### Changed
+
+- [#1413](https://github.com/prettier/plugin-ruby/pull/1413) - hrabe - Fix the cwd detection for mono-repos.
+
+## [4.0.3] - 2023-11-27
+
+### Changed
+
+- [#1406](https://github.com/prettier/plugin-ruby/pull/1406) - mikesea - Support running without the RBS or Haml plugins loaded.
+- [#1407](https://github.com/prettier/plugin-ruby/pull/1407) - hrabe - Support shimmed Ruby versions.
+
+## [4.0.2] - 2023-07-14
+
+### Changed
+
+- [#1367](https://github.com/prettier/plugin-ruby/pull/1367) - kddnewton - Specify `prettier` as a peer dependency and not a runtime dependency.
+
+## [4.0.1] - 2023-07-08
+
+### Changed
+
+- [#1363](https://github.com/prettier/plugin-ruby/pull/1363) - mscrivo, kddnewton - Ensure all data is read from socket before attempting to parse to JSON.
+
+## [4.0.0] - 2023-07-06
+
+### Added
+
+- [#1283](https://github.com/prettier/plugin-ruby/pull/1283) - oriolgual - Use `process.execPath` instead of `"node"`.
+- [#1358](https://github.com/prettier/plugin-ruby/pull/1358) - davidalejandroaguilar - Add the `rubyExecutablePath` option.
+- [#1359](https://github.com/prettier/plugin-ruby/pull/1359) - kddnewton - Inherit stderr from the parser process in order to provide better error messages when failing to spawn parser server. This will put out missing gem errors, for example.
+
+### Changed
+
+- [#1360](https://github.com/prettier/plugin-ruby/pull/1360) - kddnewton - Require prettier v3.0.0+.
+
+## [3.2.2] - 2022-09-20
+
+### Changed
+
+- [#1276](https://github.com/prettier/plugin-ruby/pull/1276) - kddnewton - Fix the parsing for options being passed to the server process.
+
+## [3.2.1] - 2022-09-19
+
+### Changed
+
+- [#1274](https://github.com/prettier/plugin-ruby/pull/1274) - kddnewton - Support the next version of `syntax_tree-haml`.
+
+## [3.2.0] - 2022-07-22
+
+### Added
+
+- [#1250](https://github.com/prettier/plugin-ruby/issues/1250) - alexf101, kddnewton - Respect the `tabWidth` option.
+
+### Changed
+
+- [#1255](https://github.com/prettier/plugin-ruby/pull/1255) - soberstadt - The rake task now runs check if write is false.
+- [#1237](https://github.com/prettier/plugin-ruby/issues/1237) - boris-petrov - Disable the style rules associated with quotes.
+- [#1248](https://github.com/prettier/plugin-ruby/pull/1248) - mhssmnn - Fix process waiting on STDIN.
+
+## [3.1.2] - 2022-05-13
+
+### Changed
+
+- [#1127](https://github.com/prettier/plugin-ruby/issues/1227) - mscrivo, kddnewton - Support passing the `printWidth` option.
+
+## [3.1.1] - 2022-05-12
+
+### Changed
+
+- [#1125](https://github.com/prettier/plugin-ruby/pull/1225) - kddnewton - Update the bundled rubocop config to be in sync with Syntax Tree.
+
+## [3.1.0] - 2022-05-12
+
+### Added
+
+- [#1224](https://github.com/prettier/plugin-ruby/pull/1224) - kddnewton - Support passing the `rubyPlugins` option to configure Syntax Tree.
+
+## [3.0.0] - 2022-05-04
+
+### Added
+
+- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - Encoding for source files is now guessed in a much better way.
+
+### Changed
+
+- [#1198](https://github.com/prettier/plugin-ruby/issues/1198) - pas-f, kddnewton - Fix crashes on JRuby with do blocks.
+- [#1131](https://github.com/prettier/plugin-ruby/issues/1131) - hyrious, kddnewton - Ensure zombie processes are not left around when the server exits.
+- [#1206](https://github.com/prettier/plugin-ruby/pull/1206) - kddnewton - Switch back to plain JavaScript for development.
+- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - Switch over to using Syntax Tree for the backend. This now requires that users install the necessary gems.
+
+### Removed
+
+- [#1190](https://github.com/prettier/plugin-ruby/pull/1190) - kddnewton - The configuration options have been removed. Instead, configuration is to be done through modifying Syntax Tree.
+
+## [2.1.0] - 2022-04-04
+
+### Added
+
+- [#1065](https://github.com/prettier/plugin-ruby/issues/1065) - langalex, kddnewton - The ability to set the `PRETTIER_RUBY_TIMEOUT_MS` environment variable to control how long to wait for the parser server to spin up.
+- [#1173](https://github.com/prettier/plugin-ruby/pull/1173) - dleavitt - Support for RBS 2.x on Ruby 3.1.
+
+### Changed
+
+- [#1028](https://github.com/prettier/plugin-ruby/issues/1028) - levymetal, kddnewton - Fix up some nested formatting with very complicated RSpec assertions.
+- [#1035](https://github.com/prettier/plugin-ruby/issues/1035) - qcn, kddnewton - Ensure we don't try to print `return` incorrectly when multiple statements are contained within parentheses.
+- [#1048](https://github.com/prettier/plugin-ruby/pull/1048) - kddnewton - Completely refactor the Ruby parser to use classes instead of hashes. Also remove a lot of the `body` keys are replace them with actual names.
+- [#1042](https://github.com/prettier/plugin-ruby/issues/1042) - JoshuaKGoldberg, kddnewton - Ensure blocks are printed correctly when there are trailing comments on the `do` keyword.
+- [#1134](https://github.com/prettier/plugin-ruby/pull/1134) - mhssmnn - Fix piping for STDIN to the gem process.
+- [#1167](https://github.com/prettier/plugin-ruby/pull/1167) - dleavitt - More consistent assignment indentation.
+- [#1074](https://github.com/prettier/plugin-ruby/issues/1074) - wagenet, kddnewton - Fix up `return` when nodes return arrays of docs.
+
+### Removed
+
+- [#1048](https://github.com/prettier/plugin-ruby/pull/1048) - kddnewton - Drop support for Ruby 2.5.
+
+## [2.0.0] - 2021-10-28
+
+### Changed
+
+- [#1018](https://github.com/prettier/plugin-ruby/issues/1018) - rindek, kddnewton - Ensure brackets are used when matching an array pattern with a single element.
+- [#906](https://github.com/prettier/plugin-ruby/issues/906) - Hansenq, kddnewton - Turn off the `Style/MultilineBlockChain` rubocop rule in our shipped configuration because multiple chained method calls with blocks can potentially conflict with rubocop's desired output.
+
+## [2.0.0-rc4] - 2021-10-18
+
+### Added
+
+- [#993](https://github.com/prettier/plugin-ruby/pull/993) - kddnewton - Nicer error message if you don't have the necessary JavaScript files to run prettier.
+- [#996](https://github.com/prettier/plugin-ruby/pull/996) - nbudin - Allow `@prettier/plugin-ruby` to run in yarn's plug'n'play mode.
+
+### Changed
+
+- [#1000](https://github.com/prettier/plugin-ruby/pull/1000) - nbudin, kddnewton - Fix for rescuing single top-level exceptions in `rescue` clauses.
+
+## [2.0.0-rc3] - 2021-10-01
+
+### Changed
+
+- [#987](https://github.com/prettier/plugin-ruby/pull/9870) - valscion - Ignore stderr when checking for node <-> ruby connection clients, restoring the behavior of v1.x
+- [#989](https://github.com/prettier/plugin-ruby/issues/989) - hubertjakubiak, kddnewton - Make sure comments after the keyword/lbrace are not moved inside the body of the statements of do and brace blocks.
+
+## [2.0.0-rc2] - 2021-09-30
+
+### Added
+
+- [#979](https://github.com/prettier/plugin-ruby/issues/979) - ronocod, kddnewton - Alignment of `to_not` is explicitly allowed to not indent to better support rspec.
+- [#894](https://github.com/prettier/plugin-ruby/issues/894) - mister-what, kddnewton - Add a warning that this plugin will not function with the plug'n'play filesystem provided by yarn berry.
+
+### Changed
+
+- [#943](https://github.com/prettier/plugin-ruby/issues/943) - valscion, kddnewton - Trailing call operators that are followed by comments should stay on the first line.
+
+## [2.0.0-rc1] - 2021-09-30
+
+### Added
+
+- [#949](https://github.com/prettier/plugin-ruby/pull/949) - kddnewton - Converted over to using TypeScript for development.
+
+### Changed
+
+- [#958](https://github.com/prettier/plugin-ruby/issues/958) - mharris-figma, kddnewton - Handle optional `do` keyword in `for` loop expressions.
+- [#926](https://github.com/prettier/plugin-ruby/issues/926) - jscheid, kddnewton - Better error handling in case certain expected keywords or operators are missing.
+- [#819](https://github.com/prettier/plugin-ruby/issues/819) - coisnepe, kddnewton - Ensure that comments placed immediately after the left parenthesis of a method definition are not moved into the body of the methods.
+- [#957](https://github.com/prettier/plugin-ruby/issues/957) - azz, kddnewton - Make it so that the format pragma does not have to be on the first line of the file.
+- [#895](https://github.com/prettier/plugin-ruby/issues/895) - rsslldnphy, kddnewton - Ensure quotes are properly escaped in the content of a hash value for HAML attributes.
+- [#900](https://github.com/prettier/plugin-ruby/issues/900) - rsslldnphy, kddnewton - Ensure that in a HAML line where you have interpolation inside of a tag content that you print it properly.
+- [#929](https://github.com/prettier/plugin-ruby/issues/929) - ryanb, kddnewton - Deeply nested blocks should not break their call chains.
+- [#935](https://github.com/prettier/plugin-ruby/pull/935) - nbudin, mlauter - Ensure embedded formatting heredocs are properly indented.
+- [#975](https://github.com/prettier/plugin-ruby/pull/975) - kddnewton - Refactor the way we determine how to connect to the parser server.
+
+### Removed
+
+- [#976](https://github.com/prettier/plugin-ruby/pull/976) - kddnewton - Remove the `rubyNetcatCommand` option, as it should no longer be necessary.
+
+## [1.6.1] - 2021-06-30
+
+### Changed
+
+- [#862](https://github.com/prettier/plugin-ruby/issues/862) - azz, kddnewton - Group together `.where.not` calls in method chains.
+- [#863](https://github.com/prettier/plugin-ruby/issues/863) - azz, kddnewton - Fix up Sorbet `sig` block formatting when chaining method calls.
+- [#908](https://github.com/prettier/plugin-ruby/issues/908) - Hansenq, kddnewton - Method chains with blocks should be properly indented.
+- [#916](https://github.com/prettier/plugin-ruby/issues/916) - pbrisbin, kddnewton - Ensure all of the necessary files are present in the gem.
+- [#917](https://github.com/prettier/plugin-ruby/issues/917) - jscheid, kddnewton - Ensure hash keys with dynamic symbols don't strip their quotes.
+
+## [1.6.0] - 2021-06-23
+
+### Added
+
+- [#859](https://github.com/prettier/plugin-ruby/issues/859) - azz, kddnewton - Support the `--insert-pragma` option for the incremental adoption workflow.
+- [#904](https://github.com/prettier/plugin-ruby/issues/904) - Hansenq, kddnewton - Support the `%s` symbol literal syntax.
+- [#833](https://github.com/prettier/plugin-ruby/issues/883) - kddnewton - Support for prettier >= v2.3.0.
+
+### Changed
+
+- [#854](https://github.com/prettier/plugin-ruby/issues/854) - jflinter, kddnewton - Parentheses should not be stripped from optional RBS union types.
+- [#888](https://github.com/prettier/plugin-ruby/issues/888) - MaxNotarangelo, kddnewton - Ensure parentheses wrap conditionals that get transformed into the modifier form when they're used within a binary node.
+- [#874](https://github.com/prettier/plugin-ruby/issues/874) - yratanov, kddnewton - Ensure that method calls chained onto the ends of blocks still print their arguments.
+- [#897](https://github.com/prettier/plugin-ruby/pull/897) - Hansenq - Reenable the `Layout/LineLength` rubocop rule in our shipped config so that line lengths for other cops are calculated correctly.
+
+## [1.5.5] - 2021-03-25
+
+### Changed
+
+- [#841](https://github.com/prettier/plugin-ruby/issues/841) - LoganBarnett, kddnewton - Better error messaging for when unix sockets are not supported by netcat.
+- [#844](https://github.com/prettier/plugin-ruby/issues/844) - andyw8, kddnewton - Ensure we ship all of the parsers with the prettier gem so that `rbprettier` can parse other languages as well.
+- [#847](https://github.com/prettier/plugin-ruby/issues/847) - jflinter, kddnewton - Ensure parentheses are present on union return types in RBS.
+- [#850](https://github.com/prettier/plugin-ruby/issues/850) - maethub, kddnewton - Ensure double quotes are used even when single quotes are requested for HAML attribute values.
+- [#849](https://github.com/prettier/plugin-ruby/issues/849) - indirect, kddnewton - Support HAML version <= 5.1 multi-line attributes.
+- [#810](https://github.com/prettier/plugin-ruby/issues/810) - valscion, kddnewton - Make it so that brace blocks containing heredocs have the correct end line so that they format subsequent statements correctly.
+
+## [1.5.4] - 2021-03-17
+
+### Changed
+
+- [#835](https://github.com/prettier/plugin-ruby/issues/835) - valscion, kddnewton - Array splat operator should not get moved by leading comments.
+- [#836](https://github.com/prettier/plugin-ruby/issues/836) - valscion, kddnewton - Array splat operator should not get moved by trailing comments.
+- [#821](https://github.com/prettier/plugin-ruby/issues/821) - jscheid, kddnewton - Better error handling when using GNU netcat.
+
+## [1.5.3] - 2021-02-28
+
+### Changed
+
+- [#812](https://github.com/prettier/plugin-ruby/issues/812) - valscion, kddnewton - Splats and blocks within args that have comments attached should place their respective operators in the right place.
+- [#816](https://github.com/prettier/plugin-ruby/pull/816) - valscion - Document RuboCop's Style/Lambda should be disabled
+- [#814](https://github.com/prettier/plugin-ruby/issues/814) - jscheid, kddnewton - Provide better errors when the source location of the error is known.
+
+## [1.5.2] - 2021-02-03
+
+### Changed
+
+- kddnewton - Fix up `binary` node comparison operators so that it will handle either Symbol literals or the `@op` nodes which are incorrectly coming from JRuby (https://github.com/jruby/jruby/issues/6548).
+
+## [1.5.1] - 2021-01-27
+
+### Changed
+
+- [#799](https://github.com/prettier/plugin-ruby/issues/799) - jscheid, kddnewton - Multi-byte characters shouldn't give invalid source string bounds.
+- [#801](https://github.com/prettier/plugin-ruby/issues/801) - jscheid, kddnewton - When converting a conditional to the modifier form, make sure to add parentheses if there is a chained method call.
+- [#803](https://github.com/prettier/plugin-ruby/issues/803) - jscheid, kddnewton - Fix `formatWithCursor` support to match new parser format.
+
+## [1.5.0] - 2021-01-21
+
+### Added
+
+- kddnewton - Add `.rbi` as a file type that we support.
+
+### Changed
+
+- [#795](https://github.com/prettier/plugin-ruby/issues/795) djrodgerspryor, kddnewton - Trailing comments attached to empty arrays should not multiply.
+- [#794](https://github.com/prettier/plugin-ruby/issues/794) djrodgerspryor, kddnewton - Fix embedded parser parsing by stripping common leading whitespace before passing on the content.
+- [#793](https://github.com/prettier/plugin-ruby/issues/793) djrodgerspryor, kddnewton - Do not include trailing commas on arguments within `arg_paren` nodes if they could not be parsed with them (`command` and `command_call`).
+- [#788](https://github.com/prettier/plugin-ruby/issues/788) clarkdave, kddnewton - Break child hashes within a multi-line hash regardless of whether or not they can fit on one line.
+- kddnewton - Stop using `;` to separate empty class definitions, module definitions, and loops.
+
+## [1.4.0] - 2021-01-15
+
+### Added
+
+- ianks, kddnewton - Use `netcat` to communicate to a parser server for better performance when formatting multiple files.
+
+### Changed
+
+- jeffcarbs, kddnewton - Long strings with interpolated expressions should only break if the contents in the original source is broken.
+- johannesluedke, kddnewton - Fix for rescues with inline comments.
+- johncsnyder, kddnewton - Comments should not attach to nodes beyond a double newline.
+- blampe, kddnewton - Comments inside of a broken method chain get dropped.
+- clarkdave, kddnewton - Don't ignore Sorbet `sig` transformations.
+
+## [1.3.0] - 2021-01-05
+
+### Added
+
+- kddnewton - Handling of the RBS language.
+- kddnewton - Incorporate the HAML plugin.
+
+## [1.2.5] - 2021-01-04
+
+### Changed
+
+- nruth, kddnewton - Ensure unary operators on method calls that are sending operators get the correct scanner events.
+- cvoege, kddnewton - Do not add parentheses when they're not needed to non-breaking command_calls with ternary arguments.
+- valscion, kddnewton - Print method chains more nicely off array and hash literals.
+
+## [1.2.4] - 2021-01-03
+
+### Added
+
+- andyw8 - Explain usage with Rubocop, as well as shipping a rubocop.yml config.
+
+### Changed
+
+- kddnewton - Reduce JSON size passing from Ruby process to node process by changing `char_start` -> `sc`, `char_end` -> `ec`, `start` -> `sl`, `end` -> `el`.
+- kddnewton - Up the max buffer size between the Ruby and node processes to 15K.
+
+## [1.2.3] - 2021-01-02
+
+### Changed
+
+- lukyth, kddnewton - Ensure if a ternary breaks into an `if..else..end` within a `command_call` node that parentheses are added.
+- AlanFoster, kddnewton - Ensure you consume the optional `do` keyword on `while` and `until` loops so that it doesn't confuse the parser.
+- AlanFoster, kddnewton - Ensure key-value pairs split on line when the key has a comment attached within a hash.
+- AlanFoster, kddnewton - Fix for `for` loops that have multiple index variables.
+- AlanFoster, kddnewton - Fix parsing very large files by reducing the size of the JSON output from the parser.
+- AlanFoster, kddnewton - Ensure you don't skip parentheses if you're returning a value with the `not` unary operator.
+
+## [1.2.2] - 2021-01-01
+
+### Changed
+
+- nathan-beam - Gem does not work with CMD/Powershell.
+- blampe, kddnewton - Comments inside keyword parameters in method declarations are not printed.
+- blampe, kddnewton - `command_call` nodes with unary operators incorrectly parse their operator.
+- blampe, kddnewton - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
+- johncsnyder, kddnewton - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.
+
+## [1.2.1] - 2020-12-27
+
+### Changed
+
+- kddnewton - Handle single-line method definitions with parameters.
+- kddnewton - Handle hash and array patterns nested within find patterns.
+- kddnewton - Handle rightward assignment.
+- kddnewton - Handle find patterns with named boundaries.
+- kddnewton - Handle rightward assignment in conditionals.
+
+## [1.2.0] - 2020-12-26
+
+### Added
+
+- kddnewton - Support for the `fndptn` node for Ruby 3.0 pattern matching.
+- kddnewton - Support for Ruby 3.0+ single-line method definitions.
+
+## [1.1.0] - 2020-12-20
+
+### Added
+
+- kddnewton - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
+
+### Changed
+
+- rindek, kddnewton - Do not remove parentheses when receiver looks like a constant.
+- rindek, kddnewton - Do not remove parentheses when using the special `call` syntax with no arguments.
+- ykpythemind - Do not change regexp bounds if the body has certain content.
+- karanmandal, kddnewton - Correctly print for loops.
+- rafbm, kddnewton - If there are method chains with arguments only at the end, we should group the method chain and the method args.
+
## [1.0.1] - 2020-12-12
### Changed
-- [@steobrien], [@kddeisz] - Ensure leading comments in empty array and hash literals do not duplicate.
+- steobrien, kddnewton - Ensure leading comments in empty array and hash literals do not duplicate.
## [1.0.0] - 2020-12-11
### Changed
-- [@kddeisz] - Do not unescape double quotes in a single quote string.
-- [@kddeisz] - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
-- [@kddeisz] - Leave Sorbet type annotations in place.
-- [@kddeisz] - Don't group hash contents, just allow them to break with their parent node.
-- [@kddeisz] - Honor the UTF-8 lang passed in through ENV vars.
+- kddnewton - Do not unescape double quotes in a single quote string.
+- kddnewton - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
+- kddnewton - Leave Sorbet type annotations in place.
+- kddnewton - Don't group hash contents, just allow them to break with their parent node.
+- kddnewton - Honor the UTF-8 lang passed in through ENV vars.
## [1.0.0-rc2] - 2020-12-10
### Changed
-- [@kddeisz] - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
-- [@kddeisz] - Respect using `o` or not using `o` for octal numbers.
-- [@kddeisz] - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
-- [@kddeisz] - Ensure hash literal is split correctly when only its contents would fit on one line.
-- [@kddeisz] - Simplify `toProc` checks by not calling if the option is disabled.
-- [@johncsnyder], [@kddeisz] - Add `method_add_block` to the potential like of method calls that can be chained.
-- [@kddeisz] - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
+- kddnewton - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
+- kddnewton - Respect using `o` or not using `o` for octal numbers.
+- kddnewton - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
+- kddnewton - Ensure hash literal is split correctly when only its contents would fit on one line.
+- kddnewton - Simplify `toProc` checks by not calling if the option is disabled.
+- johncsnyder, kddnewton - Add `method_add_block` to the potential like of method calls that can be chained.
+- kddnewton - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
## [1.0.0-rc1] - 2020-12-09
### Changed
-- [@kddeisz] - Rename options to prep for v1.0 release.
+- kddnewton - Rename options to prep for v1.0 release.
- `addTrailingCommas` -> `trailingComma`, `"es5"` means `true`
- `inlineConditionals` and `inlineLoops` -> `rubyModifier`
- `preferHashLabels` -> `rubyHashLabel`
- `preferSingleQuotes` -> `rubySingleQuote`
- `toProcTransform` -> `rubyToProc`
-- [@andyw8], [@kddeisz] - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
-- [@andyw8], [@kddeisz] - Fix for plain `rescue` nodes with only comments in the body.
-- [@andyw8], [@kddeisz] - Move declaration-type comments up to the line in the original source, as in:
+- andyw8, kddnewton - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
+- andyw8, kddnewton - Fix for plain `rescue` nodes with only comments in the body.
+- andyw8, kddnewton - Move declaration-type comments up to the line in the original source, as in:
```ruby
def foo # :nodoc:
@@ -56,79 +403,78 @@ end
The comment in the above example should stay in place.
-- [@janklimo] - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
-- [@kddeisz] - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
-- [@kddeisz] - Fix up a bug with negative ranges, e.g., `-4..-3`.
-- [@kddeisz] - Fix up a bug with operator aliases, e.g., `alias << push`.
-- [@kddeisz] - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
-- [@kddeisz] - Fix up a bug with multiple rescue clauses and comments, e.g.,
+- janklimo - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
+- kddnewton - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
+- kddnewton - Fix up a bug with negative ranges, e.g., `-4..-3`.
+- kddnewton - Fix up a bug with operator aliases, e.g., `alias << push`.
+- kddnewton - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
+- kddnewton - Fix up a bug with multiple rescue clauses and comments, e.g.,
```ruby
begin
-
rescue Foo, Bar
# comment
end
```
-- [@kddeisz] - Handle string literals that start with `%Q`.
-- [@kddeisz] - Handle question method methods in the predicate of an if with a comment in the body.
-- [@kddeisz] - Fix bare `break` with comments immediately after.
-- [@kddeisz] - Fix for heredocs with comments immediately after the declaration.
-- [@kddeisz] - Fix for comments when you're defining a method whose name overlaps with a keyword.
-- [@kddeisz] - Don't automatically indent inside interpolated expressions from within a heredoc.
-- [@kddeisz] - Don't convert into string literal arrays if the elements have brackets.
-- [@kddeisz] - Ensure you break the parent when there is an assignment in the predicate of a loop.
-- [@kddeisz] - Fix up a bug with keyword aliases, e.g., `alias in within`.
-- [@kddeisz] - Force using braces for regex if a regex starts with a blank space.
-- [@kddeisz] - Force using braces for regex if a regex starts with an equals sign.
-- [@kddeisz] - Fix up a bug with constant aliases, e.g., `alias in IN`.
-- [@andyw8], [@kddeisz] - Ensure `rescue` comments stay on the same line as their declaration.
-
-# [0.22.0] - 2020-12-08
-
-### Changed
-
-- [@flyerhzm] - Print method chains by one indentation.
-- [@mmcnl], [@kddeisz] - Handle heredocs and blocks being passed to the same method.
-- [@johncsnyder], [@kddeisz] - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
-- [@Rsullivan00] - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
-- [@jbielick] - Maintain parse order during if/unless modifier expressions
-- [@flyerhzm] - Slight prettifying of wrapped args if doc length is under a certain value.
-- [@github0013], [@kddeisz] - Ensure `not` keeps parentheses if they are being used.
-- [@jbielick] - Print heredocs consistently.
-- [@kddeisz] - Completely revamp the way we handle comments.
-- [@kddeisz] - Support `hshptn` and the remaining missing pattern matching syntax.
+- kddnewton - Handle string literals that start with `%Q`.
+- kddnewton - Handle question method methods in the predicate of an if with a comment in the body.
+- kddnewton - Fix bare `break` with comments immediately after.
+- kddnewton - Fix for heredocs with comments immediately after the declaration.
+- kddnewton - Fix for comments when you're defining a method whose name overlaps with a keyword.
+- kddnewton - Don't automatically indent inside interpolated expressions from within a heredoc.
+- kddnewton - Don't convert into string literal arrays if the elements have brackets.
+- kddnewton - Ensure you break the parent when there is an assignment in the predicate of a loop.
+- kddnewton - Fix up a bug with keyword aliases, e.g., `alias in within`.
+- kddnewton - Force using braces for regex if a regex starts with a blank space.
+- kddnewton - Force using braces for regex if a regex starts with an equals sign.
+- kddnewton - Fix up a bug with constant aliases, e.g., `alias in IN`.
+- andyw8, kddnewton - Ensure `rescue` comments stay on the same line as their declaration.
+
+## [0.22.0] - 2020-12-08
+
+### Changed
+
+- flyerhzm - Print method chains by one indentation.
+- mmcnl, kddnewton - Handle heredocs and blocks being passed to the same method.
+- johncsnyder, kddnewton - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
+- Rsullivan00 - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
+- jbielick - Maintain parse order during if/unless modifier expressions
+- flyerhzm - Slight prettifying of wrapped args if doc length is under a certain value.
+- github0013, kddnewton - Ensure `not` keeps parentheses if they are being used.
+- jbielick - Print heredocs consistently.
+- kddnewton - Completely revamp the way we handle comments.
+- kddnewton - Support `hshptn` and the remaining missing pattern matching syntax.
## [0.21.0] - 2020-12-02
### Changed
-- [@kddeisz], [@ryan-hunter-pc] - Explicitly handle `break` and `next` keyword parentheses.
-- [@jbielick], [@kddeisz] - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
-- [@kddeisz] - Turn off the `Symbol#to_proc` transform by default.
-- [@janklimo], [@kddeisz] - Properly handle trailing commas on hash arguments.
-- [@coiti], [@kddeisz] - Properly handle parentheses when necessary on if/unless statements and while/until loops.
-- [@Rsullivan00] - Prevent `command` and `command_call` nodes from being turned into ternaries.
-- [@kddeisz] - Better handling of the `alias` node with and without comments.
-- [@kddeisz] - Better handling of the `BEGIN` and `END` nodes with and without comments.
-- [@kddeisz] - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
+- kddnewton, ryan-hunter-pc - Explicitly handle `break` and `next` keyword parentheses.
+- jbielick, kddnewton - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
+- kddnewton - Turn off the `Symbol#to_proc` transform by default.
+- janklimo, kddnewton - Properly handle trailing commas on hash arguments.
+- coiti, kddnewton - Properly handle parentheses when necessary on if/unless statements and while/until loops.
+- Rsullivan00 - Prevent `command` and `command_call` nodes from being turned into ternaries.
+- kddnewton - Better handling of the `alias` node with and without comments.
+- kddnewton - Better handling of the `BEGIN` and `END` nodes with and without comments.
+- kddnewton - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
## [0.20.1] - 2020-09-04
### Changed
-- [@ftes], [@kddeisz] - Properly escape HAML plain text statements that start with special HAML characters.
+- ftes, kddnewton - Properly escape HAML plain text statements that start with special HAML characters.
### Removed
-- [@kddeisz] - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.
+- kddnewton - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.
## [0.20.0] - 2020-08-28
### Added
-- [@kddeisz] - Allow embedded formatting on heredocs by the name placed at the start. For example,
+- kddnewton - Allow embedded formatting on heredocs by the name placed at the start. For example,
```ruby
@@ -141,37 +487,37 @@ JAVASCRIPT
### Changed
-- [@mmainz] - Fix the encoding setting such that we're not overwriting the entire set of environment variables.
+- mmainz - Fix the encoding setting such that we're not overwriting the entire set of environment variables.
## [0.19.1] - 2020-08-21
### Changed
-- [@Rsullivan00] - Do not tranform word-literal arrays when there is an escape sequence.
-- [@steobrien], [@kddeisz] - Do not indent heredocs with calls more than they should be.
-- [@jpickwell] - Include .simplecov in filenames
-- [@github0013], [@kddeisz] - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
+- Rsullivan00 - Do not tranform word-literal arrays when there is an escape sequence.
+- steobrien, kddnewton - Do not indent heredocs with calls more than they should be.
+- jpickwell - Include .simplecov in filenames
+- github0013, kddnewton - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
## [0.19.0] - 2020-07-03
### Added
-- [@ryan-hunter-pc] - Add the option to disable the `Symbol#to_proc` transform.
-- [@ryan-hunter-pc], [@SViccari], [@kddeisz] - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.
+- ryan-hunter-pc - Add the option to disable the `Symbol#to_proc` transform.
+- ryan-hunter-pc], [@SViccari, kddnewton - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.
## [0.18.2] - 2020-05-01
### Changed
-- [@alse] - Support `vscodeLanguageIds` for HAML.
-- [@ShayDavidson], [@kddeisz] - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
-- [@janklimo] - Do not add an empty line after `rescue` when the block is empty.
+- alse - Support `vscodeLanguageIds` for HAML.
+- ShayDavidson, kddnewton - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
+- janklimo - Do not add an empty line after `rescue` when the block is empty.
## [0.18.1] - 2020-04-05
### Changed
-- [@petevk], [@kddeisz] - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
+- petevk, kddnewton - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
```ruby
@@ -184,7 +530,7 @@ end.to raise_error
should maintain its `do...end` and not switch to inline braces otherwise the brace might get associated with the `1`.
-- [@flyerhzm] - Rewrite operators binary parser, as in:
+- flyerhzm - Rewrite operators binary parser, as in:
```ruby
@@ -195,10 +541,10 @@ should maintain its `do...end` and not switch to inline braces otherwise the bra
[1]
```
-- [@ftes], [@kddeisz] - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
-- [@ftes], [@kddeisz] - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
-- [@ftes], [@kddeisz] - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
-- [@mmainz], [@kddeisz] - Handle heredocs as the receivers of call nodes, as in:
+- ftes, kddnewton - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
+- ftes, kddnewton - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
+- ftes, kddnewton - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
+- mmainz, kddnewton - Handle heredocs as the receivers of call nodes, as in:
```ruby
@@ -207,7 +553,7 @@ foo = <<~TEXT.strip
TEXT
```
-- [@github0013], [@kddeisz] - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
+- github0013, kddnewton - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
```ruby
@@ -218,13 +564,14 @@ return (a or b) if c?
### Added
-- [@kddeisz] - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
+- kddnewton - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
```ruby
-def foo(**nil); end
+def foo(**nil)
+end
```
-- [@kddeisz] - Support for the `args_forward` node for forwarding all types of arguments, as in:
+- kddnewton - Support for the `args_forward` node for forwarding all types of arguments, as in:
```ruby
def foo(...)
@@ -234,13 +581,13 @@ end
### Changed
-- [@ftes], [@kddeisz] - Handled 3 or more classes on a node in HAML, as in:
+- ftes, kddnewton - Handled 3 or more classes on a node in HAML, as in:
```haml
%table.table.is-striped.is-hoverable
```
-- [@ftes], [@kddeisz] - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
+- ftes, kddnewton - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
```haml
.column.is-12
@@ -250,9 +597,9 @@ end
FALSE
```
-- [@tobyndockerill] - Format numbers with underscores after 4 digits, as opposed to 3.
-- [@ianks] - Improve performance by using `--disable-gems`.
-- [@flyerhzm] - Calls are grouped such that after an end parenthesis the following call will not be indented, as in:
+- tobyndockerill - Format numbers with underscores after 4 digits, as opposed to 3.
+- ianks - Improve performance by using `--disable-gems`.
+- flyerhzm - Calls are grouped such that after an end parenthesis the following call will not be indented, as in:
```ruby
@@ -267,13 +614,13 @@ will now be printed as:
```ruby
Config::Download.new(
- 'prettier',
- filename: 'prettier.yml',
- url: 'https://raw.githubusercontent.com/...'
+ "prettier",
+ filename: "prettier.yml",
+ url: "https://raw.githubusercontent.com/..."
).perform
```
-- [@pje], [@kddeisz] - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
+- pje, kddnewton - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
```ruby
@@ -291,7 +638,7 @@ private def self.foo
end
```
-- [@masqita], [@kddeisz] - Inline variable assignment within a predicate should force the conditional to break, as in:
+- masqita, kddnewton - Inline variable assignment within a predicate should force the conditional to break, as in:
```ruby
array.each do |element|
@@ -301,26 +648,26 @@ array.each do |element|
end
```
-- [@hafley66], [@kddeisz] - Handle empty `while` and `until` blocks.
-- [@Fruetel], [@kddeisz] - Simplify string escape pattern by locking on any escape sequence.
-- [@flyerhzm], [@kddeisz] - Properly handle string quotes on symbols in hash keys.
+- hafley66, kddnewton - Handle empty `while` and `until` blocks.
+- Fruetel, kddnewton - Simplify string escape pattern by locking on any escape sequence.
+- flyerhzm, kddnewton - Properly handle string quotes on symbols in hash keys.
## [0.17.0] - 2019-12-12
### Added
-- [@matt-wratt] - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
-- [@jrdioko], [@kddeisz] - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
+- matt-wratt - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
+- jrdioko, kddnewton - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
### Changed
-- [@gin0606] - The max buffer being passed into the Ruby process is now up to 10MB.
+- gin0606 - The max buffer being passed into the Ruby process is now up to 10MB.
## [0.16.0] - 2019-11-14
### Added
-- [@mmainz], [@kddeisz] - Support for extra commas in multiple assignment, as it changes the meaning. For example,
+- mmainz, kddnewton - Support for extra commas in multiple assignment, as it changes the meaning. For example,
```ruby
@@ -329,12 +676,12 @@ a, = [1, 2, 3]
would previously get printed as `a = [1, 2, 3]`, which changes the value of `a` from `1` to the value of the entire array.
-- [@kddeisz] - Experimental support for the HAMtemplate language.
+- kddnewton - Experimental support for the HAMtemplate language.
### Changed
-- [@github0013], [@kddeisz] - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
-- [@jamescostian], [@kddeisz] - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
+- github0013, kddnewton - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
+- jamescostian, kddnewton - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
```ruby
@@ -347,7 +694,7 @@ end
the previous expression was being transformed into a ternary which was invalid ruby. Instead it now stays broken out into an if/else block.
-- [@localhostdotdev], [@joeyjoejoejr], [@eins78], [@kddeisz] - Better support for embedded expressions inside heredocs. For example,
+- localhostdotdev], [@joeyjoejoejr], [@eins78, kddnewton - Better support for embedded expressions inside heredocs. For example,
```ruby
@@ -360,14 +707,14 @@ HERE
should remain formatted as it is. Whereas previously due to the way the lines were split, you would sometimes end up with it breaking after `#{`.
-- [@jamescostian], [@kddeisz] - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
+- jamescostian, kddnewton - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
## [0.15.1] - 2019-11-05
### Changed
-- [@AlanFoster] - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
-- [@jakeprime], [@kddeisz] - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
+- AlanFoster - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
+- jakeprime, kddnewton - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
```ruby
@@ -386,7 +733,7 @@ if foooooo ||
end
```
-- [@jamescostian], [@AlanFoster] - Empty `if`, and `unless` conditionals are now handled gracefully:
+- jamescostian], [@AlanFoster - Empty `if`, and `unless` conditionals are now handled gracefully:
```ruby
@@ -394,7 +741,7 @@ if foo?
end
```
-- [@mmainz], [@kddeisz] - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
+- mmainz, kddnewton - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
```ruby
@@ -403,9 +750,9 @@ end
cannot be translated into `[]:` as that is an invalid symbol. Instead, it stays with the hash rocket syntax.
-- [@cldevs], [@kddeisz] - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
-- [@cldevs], [@kddeisz] - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
-- [@MarcManiez], [@kddeisz] - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:
+- cldevs, kddnewton - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
+- cldevs, kddnewton - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
+- MarcManiez, kddnewton - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:
```ruby
@@ -422,14 +769,14 @@ hash[:key] = (break :value while false)
That will guarantee that the expressions are equivalent.
-- [@AlanFoster] - Fix crashes that were happening with `ignored_nl` nodes.
+- AlanFoster - Fix crashes that were happening with `ignored_nl` nodes.
## [0.15.0] - 2019-08-06
### Changed
-- [@dudeofawesome], [@kddeisz] - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
-- [@krachtstefan], [@kddeisz] - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,
+- dudeofawesome, kddnewton - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
+- krachtstefan, kddnewton - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,
```ruby
@@ -449,8 +796,8 @@ end
because that would never execute `foo` if `bar` is falsy, whereas in the initial example it would have.
-- [@jviney], [@kddeisz] - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar].each`), we can't put the block syntax inside the brackets.
-- [@jakeprime], [@kddeisz] - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,
+- jviney], kddnewton - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar.each`), we can't put the block syntax inside the brackets.
+- jakeprime, kddnewton - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,
```ruby
@@ -481,7 +828,7 @@ return(
)
```
-- [@jakeprime], [@kddeisz] - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:
+- jakeprime, kddnewton - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:
```ruby
@@ -506,11 +853,11 @@ but now gets formatted as:
### Added
-- [@kddeisz] - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
+- kddnewton - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
### Changed
-- [@jviney], [@kddeisz] - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,
+- jviney, kddnewton - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,
```ruby
@@ -528,8 +875,8 @@ now correctly gets transformed into:
(foo ? 1 : 2).to_s
```
-- [@acrewdson], [@kddeisz] - Fixed a bug where multiple newlines at the end of the file would cause a crash.
-- [@jviney], [@kddeisz] - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,
+- acrewdson, kddnewton - Fixed a bug where multiple newlines at the end of the file would cause a crash.
+- jviney, kddnewton - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,
```ruby
@@ -544,11 +891,11 @@ must stay the same.
### Added
-- [@kddeisz] - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
+- kddnewton - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
### Changed
-- [@xipgroc], [@kddeisz] - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,
+- xipgroc, kddnewton - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,
```ruby
@@ -573,7 +920,7 @@ end
but now gets printed correctly.
-- [@petevk], [@kddeisz] - Double splats inside a hash were previously failing to print. For example,
+- petevk, kddnewton - Double splats inside a hash were previously failing to print. For example,
```ruby
@@ -586,12 +933,12 @@ would fail to print, but now works.
### Changed
-- [@kddeisz] - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
-- [@kddeisz] - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
-- [@kddeisz] - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
-- [@kddeisz] - Add a lot more documentation to the parser.
-- [@glejeune], [@kddeisz] - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
-- [@kddeisz] - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
+- kddnewton - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
+- kddnewton - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
+- kddnewton - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
+- kddnewton - Add a lot more documentation to the parser.
+- glejeune, kddnewton - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
+- kddnewton - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
```ruby
@@ -609,7 +956,7 @@ would get printed as
Now the `if` and `unless` printers check for the presence of single comments.
-- [@JoshuaKGoldberg], [@kddeisz] - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
+- JoshuaKGoldberg, kddnewton - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
```ruby
@@ -620,7 +967,7 @@ end
would fail, but now works.
-- [@xipgroc], [@kddeisz] - Comments on lines with array references were previously deleting the array references entirely. For example,
+- xipgroc, kddnewton - Comments on lines with array references were previously deleting the array references entirely. For example,
```ruby
@@ -633,323 +980,323 @@ would previously result in `array[]`, but now prints properly.
### Changed
-- [@kddeisz] - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
-- [@xipgroc], [@kddeisz] - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
+- kddnewton - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
+- xipgroc, kddnewton - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
## [0.12.1] - 2019-04-22
### Changed
-- [@kddeisz] - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
-- [@jpickwell], [@kddeisz] - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
-- [@kddeisz] - Support better breaking within interpolation by grouping the interpolated content.
+- kddnewton - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
+- jpickwell, kddnewton - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
+- kddnewton - Support better breaking within interpolation by grouping the interpolated content.
## [0.12.0] - 2019-04-18
### Added
-- [@kddeisz] - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
+- kddnewton - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
## [0.11.0] - 2019-04-18
### Added
-- [@kddeisz] - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
-- [@kddeisz] - Big tests refactor.
-- [@kddeisz] - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
-- [@kddeisz] - Automatically add underscores in large numbers that aren't already formatted.
-- [@AlanFoster] - Better support for inline access control modifiers.
-- [@jpickwell], [@kddeisz] - Better support for heredocs in hash literals.
-- [@kddeisz] - Better support for heredocs in array literals.
-- [@kddeisz] - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
+- kddnewton - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
+- kddnewton - Big tests refactor.
+- kddnewton - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
+- kddnewton - Automatically add underscores in large numbers that aren't already formatted.
+- AlanFoster - Better support for inline access control modifiers.
+- jpickwell, kddnewton - Better support for heredocs in hash literals.
+- kddnewton - Better support for heredocs in array literals.
+- kddnewton - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
### Changed
-- [@deecewan] - Fixed support for dynamic string hash keys.
-- [@kddeisz] - Moved `case/when` into its own file and added better documentation.
-- [@kddeisz] - Moved `begin/rescue` into its own file.
-- [@AlanFoster] - Automatically add newlines around access modifiers.
-- [@kddeisz] - Alignment of command calls with arguments is fixed.
-- [@aaronjensen], [@kddeisz] - Alignment of `to` is explicitly allowed to not indent to better support rspec.
-- [@kddeisz] - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
-- [@kddeisz] - Fixed regression on regexp comments.
-- [@CodingItWrong], [@kddeisz] - Fix up block delimiters when nested inside a `command` or `command_call` node.
-- [@kddeisz] - Moved hashes into its own file.
+- deecewan - Fixed support for dynamic string hash keys.
+- kddnewton - Moved `case/when` into its own file and added better documentation.
+- kddnewton - Moved `begin/rescue` into its own file.
+- AlanFoster - Automatically add newlines around access modifiers.
+- kddnewton - Alignment of command calls with arguments is fixed.
+- aaronjensen, kddnewton - Alignment of `to` is explicitly allowed to not indent to better support rspec.
+- kddnewton - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
+- kddnewton - Fixed regression on regexp comments.
+- CodingItWrong, kddnewton - Fix up block delimiters when nested inside a `command` or `command_call` node.
+- kddnewton - Moved hashes into its own file.
## [0.10.0] - 2019-03-25
### Added
-- [@kddeisz] - Support for block-local variables.
-- [@kddeisz] - Support for dyna-symbols that are using single quotes.
+- kddnewton - Support for block-local variables.
+- kddnewton - Support for dyna-symbols that are using single quotes.
### Changed
-- [@kddeisz] - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
-- [@kddeisz] - Check before anything else for an invalid ruby version.
+- kddnewton - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
+- kddnewton - Check before anything else for an invalid ruby version.
## [0.9.1] - 2019-03-24
### Changed
-- [@kddeisz] - Better support string quotes by favoring what the user chose if the string contains escape patterns.
-- [@kddeisz] - Better support heredocs within method calls.
+- kddnewton - Better support string quotes by favoring what the user chose if the string contains escape patterns.
+- kddnewton - Better support heredocs within method calls.
## [0.9.0] - 2019-03-18
### Added
-- [@kddeisz] - Support the `hasPragma` function.
-- [@kddeisz] - Support the new `number_arg` node type in Ruby 2.7.
+- kddnewton - Support the `hasPragma` function.
+- kddnewton - Support the new `number_arg` node type in Ruby 2.7.
### Changed
-- [@kddeisz] - Limit the number of nodes that are allowed to turn into ternary expressions.
+- kddnewton - Limit the number of nodes that are allowed to turn into ternary expressions.
## [0.8.0] - 2019-03-08
### Added
-- [@kddeisz] - Add `eslint` and fix up existing violations.
-- [@AlanFoster] - Add the infra for the `prettier` ruby gem.
-- [@kddeisz] - Add a `rake` task for easier process integration for the ruby gem.
-- [@kddeisz] - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
+- kddnewton - Add `eslint` and fix up existing violations.
+- AlanFoster - Add the infra for the `prettier` ruby gem.
+- kddnewton - Add a `rake` task for easier process integration for the ruby gem.
+- kddnewton - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
### Changed
-- [@kddeisz] - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
-- [@AlanFoster] - Don't allow line breaks between brace block params.
-- [@johnschoeman] - Switch over the array.rb test case to minitest.
-- [@AlanFoster] - Test improvements to allow running in parallel.
-- [@johnschoeman] - Switch over assign.rb test case to minitest.
-- [@AlanFoster] - Add a contributing guide.
-- [@AlanFoster] - Handle longer command nodes.
-- [@kddeisz] - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
+- kddnewton - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
+- AlanFoster - Don't allow line breaks between brace block params.
+- johnschoeman - Switch over the array.rb test case to minitest.
+- AlanFoster - Test improvements to allow running in parallel.
+- johnschoeman - Switch over assign.rb test case to minitest.
+- AlanFoster - Add a contributing guide.
+- AlanFoster - Handle longer command nodes.
+- kddnewton - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
### Removed
-- [@kddeisz] - All instances of the spread (`...`) operator so that we can support older versions of node.
+- kddnewton - All instances of the spread (`...`) operator so that we can support older versions of node.
## [0.7.0] - 2019-02-24
### Changed
-- [@kddeisz] - Support checking for escaping within strings to force double quotes (e.g., "\n").
-- [@RossKinsella], [@kddeisz] - Handle cases with empty class and module declarations that need to break.
-- [@AlanFoster] - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
-- [@AndrewRayCode], [@kddeisz] - Support lambdas that don't break and are inline.
-- [@AlanFoster] - Switch over the numbers.rb test to minitest.
-- [@AlanFoster] - Switch over the kwargs.rb test to minitest.
-- [@AlanFoster] - Bail out early if the Ruby input is invalid.
-- [@kddeisz] - Support `__END__` content.
-- [@AlanFoster] - Fix up issue with whitespace being added within regexp that are multiline.
-- [@AlanFoster] - Better support for destructuring within multi assignment.
-- [@kddeisz] - Switch `next` test over to minitest.
-- [@kddeisz] - Handle multiple arguments to `next` with a space between.
-- [@AndrewRayCode], [@kddeisz] - Handle multi-line conditional predicate (should align with keyword).
-- [@aaronjensen], [@kddeisz] - Properly support adding trailing commas with and without blocks.
-- [@AlanFoster], [@kddeisz] - Fix regression of handling comments within arrays on array literals.
-- [@AlanFoster] - Support multiple arguments to `undef`.
+- kddnewton - Support checking for escaping within strings to force double quotes (e.g., "\n").
+- RossKinsella, kddnewton - Handle cases with empty class and module declarations that need to break.
+- AlanFoster - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
+- AndrewRayCode, kddnewton - Support lambdas that don't break and are inline.
+- AlanFoster - Switch over the numbers.rb test to minitest.
+- AlanFoster - Switch over the kwargs.rb test to minitest.
+- AlanFoster - Bail out early if the Ruby input is invalid.
+- kddnewton - Support `__END__` content.
+- AlanFoster - Fix up issue with whitespace being added within regexp that are multiline.
+- AlanFoster - Better support for destructuring within multi assignment.
+- kddnewton - Switch `next` test over to minitest.
+- kddnewton - Handle multiple arguments to `next` with a space between.
+- AndrewRayCode, kddnewton - Handle multi-line conditional predicate (should align with keyword).
+- aaronjensen, kddnewton - Properly support adding trailing commas with and without blocks.
+- AlanFoster, kddnewton - Fix regression of handling comments within arrays on array literals.
+- AlanFoster - Support multiple arguments to `undef`.
## [0.6.3] - 2019-02-18
### Changed
-- [@kddeisz] - Switch over `binary` fixture to minitest.
-- [@kddeisz] - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
-- [@kddeisz] - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
-- [@kddeisz] - Properly indent heredocs without taking into account current indentation level.
+- kddnewton - Switch over `binary` fixture to minitest.
+- kddnewton - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
+- kddnewton - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
+- kddnewton - Properly indent heredocs without taking into account current indentation level.
## [0.6.2] - 2019-02-17
### Changed
-- [@AlanFoster] - Handle regexp suffixes.
-- [@kddeisz] - Add support for testing the test fixtures with minitest.
-- [@kddeisz] - Switch over `alias` and `regexp` tests to minitest.
-- [@aaronjensen], [@kddeisz] - Break up method args to split into multiple lines.
-- [@christoomey], [@kddeisz] - Handle blocks args when trailing commas are on.
+- AlanFoster - Handle regexp suffixes.
+- kddnewton - Add support for testing the test fixtures with minitest.
+- kddnewton - Switch over `alias` and `regexp` tests to minitest.
+- aaronjensen, kddnewton - Break up method args to split into multiple lines.
+- christoomey, kddnewton - Handle blocks args when trailing commas are on.
## [0.6.1] - 2019-02-15
### Changed
-- [@meleyal], [@kddeisz] - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
-- [@meleyal], [@kddeisz] - Support passing `super()` explicitly with no arguments.
+- meleyal, kddnewton - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
+- meleyal, kddnewton - Support passing `super()` explicitly with no arguments.
## [0.6.0] - 2019-02-14
### Added
-- [@kddeisz] - Handle non UTF-8 comments.
-- [@kddeisz] - Handle non UTF-8 identifiers.
-- [@kddeisz] - Handle non UTF-8 strings.
-- [@kddeisz] - Handle empty parens.
-- [@kddeisz] - Handle rescue with splats preceeding the exception names.
+- kddnewton - Handle non UTF-8 comments.
+- kddnewton - Handle non UTF-8 identifiers.
+- kddnewton - Handle non UTF-8 strings.
+- kddnewton - Handle empty parens.
+- kddnewton - Handle rescue with splats preceeding the exception names.
### Changed
-- [@kddeisz] - Use `JSON::fast_generate` to get the s-expressions back from the parser.
-- [@NoahTheDuke], [@kddeisz] - Handle broken lambdas from within `command` and `command_call` nodes.
+- kddnewton - Use `JSON::fast_generate` to get the s-expressions back from the parser.
+- NoahTheDuke, kddnewton - Handle broken lambdas from within `command` and `command_call` nodes.
## [0.5.2] - 2019-02-13
### Changed
-- [@kddeisz] - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
+- kddnewton - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
## [0.5.1] - 2019-02-13
### Changed
-- [@yuki24], [@kddeisz] - Force `do` blocks that we know have to be `do` blocks to break.
-- [@kmcq], [@kddeisz] - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
-- [@ashfurrow], [@kddeisz] - Attach comments to full hash association nodes, not just the value.
+- yuki24, kddnewton - Force `do` blocks that we know have to be `do` blocks to break.
+- kmcq, kddnewton - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
+- ashfurrow, kddnewton - Attach comments to full hash association nodes, not just the value.
## [0.5.0] - 2019-02-13
### Added
-- [@kddeisz] - Automatically convert arrays of all string literals to %w arrays.
-- [@kddeisz] - Automatically convert arrays of all symbol literals to %i arrays.
+- kddnewton - Automatically convert arrays of all string literals to %w arrays.
+- kddnewton - Automatically convert arrays of all symbol literals to %i arrays.
### Changed
-- [@kddeisz] - Move the `args_add` and `args_new` handling into the parser.
-- [@uri], [@kddeisz] - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
-- [@kddeisz] - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
+- kddnewton - Move the `args_add` and `args_new` handling into the parser.
+- uri, kddnewton - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
+- kddnewton - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
## [0.4.1] - 2019-02-12
### Changed
-- [@kddeisz] - Provide the `makeList` utility for the nodes that are lists from within ripper.
-- [@awinograd], [@kddeisz] - Again, this time for real, properly escape strings.
-- [@kddeisz] - Fix up trailing commas on command calls.
+- kddnewton - Provide the `makeList` utility for the nodes that are lists from within ripper.
+- awinograd, kddnewton - Again, this time for real, properly escape strings.
+- kddnewton - Fix up trailing commas on command calls.
## [0.4.0] - 2019-02-12
### Added
-- [@Overload119], [@kddeisz] - Support the `trailingComma` configuration option (defaults to `false`).
+- Overload119, kddnewton - Support the `trailingComma` configuration option (defaults to `false`).
### Changed
-- [@NoahTheDuke], [@kddeisz] - Pass the code to be formatted over `stdin`.
+- NoahTheDuke, kddnewton - Pass the code to be formatted over `stdin`.
## [0.3.7] - 2019-02-11
### Changed
-- [@kddeisz] - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
-- [@kddeisz] - Properly handle escaped quotes within strings.
+- kddnewton - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
+- kddnewton - Properly handle escaped quotes within strings.
## [0.3.6] - 2019-02-10
### Changed
-- [@AlanFoster], [@kddeisz] - Support the `not` operator properly.
-- [@AlanFoster], [@kddeisz] - Handle comments properly inside `if`, `unless`, and `when` nodes.
+- AlanFoster, kddnewton - Support the `not` operator properly.
+- AlanFoster, kddnewton - Handle comments properly inside `if`, `unless`, and `when` nodes.
## [0.3.5] - 2019-02-09
### Changed
-- [@kddeisz] - Handle lonely operators in Ruby `2.5`.
+- kddnewton - Handle lonely operators in Ruby `2.5`.
## [0.3.4] - 2019-02-09
### Changed
-- [@kddeisz] - Comments are now properly attached inside `defs` nodes.
-- [@kddeisz] - Support multiple inline comments on nodes.
-- [@kddeisz] - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
-- [@cbothner] - Stop transforming multistatement blocks with `to_proc`.
-- [@kddeisz] - `do` blocks necessarily need to break their parent nodes.
-- [@eins78], [@kddeisz] - Handle `next` node edge case with `args_add` as the body.
+- kddnewton - Comments are now properly attached inside `defs` nodes.
+- kddnewton - Support multiple inline comments on nodes.
+- kddnewton - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
+- cbothner - Stop transforming multistatement blocks with `to_proc`.
+- kddnewton - `do` blocks necessarily need to break their parent nodes.
+- eins78, kddnewton - Handle `next` node edge case with `args_add` as the body.
## [0.3.3] - 2019-02-09
### Changed
-- [@bugthing], [@kddeisz] - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
-- [@awinograd], [@kddeisz] - Properly escape double quotes when using `preferSingleQuotes: false`.
+- bugthing, kddnewton - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
+- awinograd, kddnewton - Properly escape double quotes when using `preferSingleQuotes: false`.
## [0.3.2] - 2019-02-09
### Changed
-- [@kddeisz] - Don't define duplicated methods in the parser.
-- [@kddeisz] - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
-- [@kddeisz] - Renamed the package to @prettier/plugin-ruby.
+- kddnewton - Don't define duplicated methods in the parser.
+- kddnewton - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
+- kddnewton - Renamed the package to @prettier/plugin-ruby.
## [0.3.1] - 2019-02-07
### Changed
-- [@kddeisz] - Automatically add parens to method declarations.
-- [@kddeisz] - Handle comments on bare hash assocs.
-- [@kddeisz] - Handle `method_add_block` nodes where the statements may be nested one more level.
-- [@kddeisz] - Handle heredocs nested no matter how many levels deep.
+- kddnewton - Automatically add parens to method declarations.
+- kddnewton - Handle comments on bare hash assocs.
+- kddnewton - Handle `method_add_block` nodes where the statements may be nested one more level.
+- kddnewton - Handle heredocs nested no matter how many levels deep.
## [0.3.0] - 2019-02-07
### Added
-- [@kddeisz] - Support squiggly heredocs.
-- [@kddeisz] - Support straight heredocs.
+- kddnewton - Support squiggly heredocs.
+- kddnewton - Support straight heredocs.
### Changed
-- [@kddeisz] - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
-- [@kddeisz] - Move `regexp_add` and `regexp_new` handling into the parser.
-- [@kddeisz] - Move `xstring_add` and `xstring_new` handling into the parser.
-- [@kddeisz] - Move `string_add` and `string_content` handling into the parser.
-- [@kddeisz] - Move `mrhs_add` and `mrhs_new` handling into the parser.
-- [@kddeisz] - Move `mlhs_add` and `mlhs_new` handling into the parser.
+- kddnewton - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
+- kddnewton - Move `regexp_add` and `regexp_new` handling into the parser.
+- kddnewton - Move `xstring_add` and `xstring_new` handling into the parser.
+- kddnewton - Move `string_add` and `string_content` handling into the parser.
+- kddnewton - Move `mrhs_add` and `mrhs_new` handling into the parser.
+- kddnewton - Move `mlhs_add` and `mlhs_new` handling into the parser.
## [0.2.1] - 2019-02-06
### Changed
-- [@kddeisz] - Handle brace blocks on commands properly.
-- [@kddeisz] - Break parent and return `do` blocks when called from a `command` node.
-- [@kddeisz] - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
+- kddnewton - Handle brace blocks on commands properly.
+- kddnewton - Break parent and return `do` blocks when called from a `command` node.
+- kddnewton - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
## [0.2.0] - 2019-02-06
### Added
-- [@kddeisz] - Handle `methref` nodes from Ruby `2.7`.
-- [@kddeisz] - Allow `module` nodes to shorten using `;` when the block is empty.
+- kddnewton - Handle `methref` nodes from Ruby `2.7`.
+- kddnewton - Allow `module` nodes to shorten using `;` when the block is empty.
### Changed
-- [@kddeisz] - Handle splat within an array, as in `[1, 2, *foo]`.
-- [@kddeisz] - Disallow comments from being attached to intermediary regex nodes.
-- [@kddeisz] - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
-- [@kddeisz] - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
-- [@kddeisz] - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
-- [@kddeisz] - Allow comments to be attached to `CHAR` nodes.
-- [@kddeisz] - Disallow comments from being attached to `args_new` nodes.
-- [@kddeisz] - Track start and end lines so we can better insert block comments.
-- [@kddeisz] - Handle intermediary array nodes in the parse for better comment handling.
+- kddnewton - Handle splat within an array, as in `[1, 2, *foo]`.
+- kddnewton - Disallow comments from being attached to intermediary regex nodes.
+- kddnewton - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
+- kddnewton - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
+- kddnewton - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
+- kddnewton - Allow comments to be attached to `CHAR` nodes.
+- kddnewton - Disallow comments from being attached to `args_new` nodes.
+- kddnewton - Track start and end lines so we can better insert block comments.
+- kddnewton - Handle intermediary array nodes in the parse for better comment handling.
## [0.1.2] - 2019-02-05
### Changed
-- [@kddeisz] - Handle guard clauses that return with no parens.
+- kddnewton - Handle guard clauses that return with no parens.
## [0.1.1] - 2019-02-05
### Changed
-- [@kddeisz] - Handle class method calls with the `::` operator.
-- [@kddeisz] - Handle strings with apostrophes when using `preferSingleQuote`.
-- [@kddeisz] - Have travis run multiple ruby versions.
-- [@kddeisz] - Explicitly fail if ruby version is < `2.5`.
-- [@kddeisz] - Disallow comments from being attached to intermediary string nodes.
+- kddnewton - Handle class method calls with the `::` operator.
+- kddnewton - Handle strings with apostrophes when using `preferSingleQuote`.
+- kddnewton - Have travis run multiple ruby versions.
+- kddnewton - Explicitly fail if ruby version is < `2.5`.
+- kddnewton - Disallow comments from being attached to intermediary string nodes.
## [0.1.0] - 2019-02-04
@@ -957,7 +1304,42 @@ would previously result in `array[]`, but now prints properly.
- Initial release 🎉
-[unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.0.1...HEAD
+[unreleased]: https://github.com/prettier/plugin-ruby/compare/v4.0.4...HEAD
+[4.0.4]: https://github.com/prettier/plugin-ruby/compare/v4.0.3...v4.0.4
+[4.0.3]: https://github.com/prettier/plugin-ruby/compare/v4.0.2...v4.0.3
+[4.0.2]: https://github.com/prettier/plugin-ruby/compare/v4.0.1...v4.0.2
+[4.0.1]: https://github.com/prettier/plugin-ruby/compare/v4.0.0...v4.0.1
+[4.0.0]: https://github.com/prettier/plugin-ruby/compare/v3.2.2...v4.0.0
+[3.2.2]: https://github.com/prettier/plugin-ruby/compare/v3.2.1...v3.2.2
+[3.2.1]: https://github.com/prettier/plugin-ruby/compare/v3.2.0...v3.2.1
+[3.2.0]: https://github.com/prettier/plugin-ruby/compare/v3.1.2...v3.2.0
+[3.1.2]: https://github.com/prettier/plugin-ruby/compare/v3.1.1...v3.1.2
+[3.1.1]: https://github.com/prettier/plugin-ruby/compare/v3.1.0...v3.1.1
+[3.1.0]: https://github.com/prettier/plugin-ruby/compare/v3.0.0...v3.1.0
+[3.0.0]: https://github.com/prettier/plugin-ruby/compare/v2.1.0...v3.0.0
+[2.1.0]: https://github.com/prettier/plugin-ruby/compare/v2.0.0...v2.1.0
+[2.0.0]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc4...v2.0.0
+[2.0.0-rc4]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc3...v2.0.0-rc4
+[2.0.0-rc3]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc2...v2.0.0-rc3
+[2.0.0-rc2]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc1...v2.0.0-rc2
+[2.0.0-rc1]: https://github.com/prettier/plugin-ruby/compare/v1.6.1...v2.0.0-rc1
+[1.6.1]: https://github.com/prettier/plugin-ruby/compare/v1.6.0...v1.6.1
+[1.6.0]: https://github.com/prettier/plugin-ruby/compare/v1.5.5...v1.6.0
+[1.5.5]: https://github.com/prettier/plugin-ruby/compare/v1.5.4...v1.5.5
+[1.5.4]: https://github.com/prettier/plugin-ruby/compare/v1.5.3...v1.5.4
+[1.5.3]: https://github.com/prettier/plugin-ruby/compare/v1.5.2...v1.5.3
+[1.5.2]: https://github.com/prettier/plugin-ruby/compare/v1.5.1...v1.5.2
+[1.5.1]: https://github.com/prettier/plugin-ruby/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/prettier/plugin-ruby/compare/v1.4.0...v1.5.0
+[1.4.0]: https://github.com/prettier/plugin-ruby/compare/v1.3.0...v1.4.0
+[1.3.0]: https://github.com/prettier/plugin-ruby/compare/v1.2.5...v1.3.0
+[1.2.5]: https://github.com/prettier/plugin-ruby/compare/v1.2.4...v1.2.5
+[1.2.4]: https://github.com/prettier/plugin-ruby/compare/v1.2.3...v1.2.4
+[1.2.3]: https://github.com/prettier/plugin-ruby/compare/v1.2.2...v1.2.3
+[1.2.2]: https://github.com/prettier/plugin-ruby/compare/v1.2.1...v1.2.2
+[1.2.1]: https://github.com/prettier/plugin-ruby/compare/v1.2.0...v1.2.1
+[1.2.0]: https://github.com/prettier/plugin-ruby/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/prettier/plugin-ruby/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/prettier/plugin-ruby/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/prettier/plugin-ruby/compare/v1.0.0-rc2...v1.0.0
[1.0.0-rc2]: https://github.com/prettier/plugin-ruby/compare/v1.0.0-rc1...v1.0.0-rc2
@@ -1009,63 +1391,3 @@ would previously result in `array[]`, but now prints properly.
[0.1.2]: https://github.com/prettier/plugin-ruby/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/prettier/plugin-ruby/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/prettier/plugin-ruby/compare/61f675...v0.1.0
-[@aaronjensen]: https://github.com/aaronjensen
-[@acrewdson]: https://github.com/acrewdson
-[@alanfoster]: https://github.com/AlanFoster
-[@alse]: https://github.com/alse
-[@andrewraycode]: https://github.com/AndrewRayCode
-[@andyw8]: https://github.com/andyw8
-[@ashfurrow]: https://github.com/ashfurrow
-[@awinograd]: https://github.com/awinograd
-[@bugthing]: https://github.com/bugthing
-[@cbothner]: https://github.com/cbothner
-[@christoomey]: https://github.com/christoomey
-[@cldevs]: https://github.com/cldevs
-[@codingitwrong]: https://github.com/CodingItWrong
-[@coiti]: https://github.com/coiti
-[@deecewan]: https://github.com/deecewan
-[@dudeofawesome]: https://github.com/dudeofawesome
-[@eins78]: https://github.com/eins78
-[@flyerhzm]: https://github.com/flyerhzm
-[@fruetel]: https://github.com/Fruetel
-[@ftes]: https://github.com/ftes
-[@gin0606]: https://github.com/gin0606
-[@github0013]: https://github.com/github0013
-[@glejeune]: https://github.com/glejeune
-[@hafley66]: https://github.com/hafley66
-[@ianks]: https://github.com/ianks
-[@jakeprime]: https://github.com/jakeprime
-[@jamescostian]: https://github.com/jamescostian
-[@janklimo]: https://github.com/janklimo
-[@jbielick]: https://github.com/jbielick
-[@joeyjoejoejr]: https://github.com/joeyjoejoejr
-[@johncsnyder]: https://github.com/johncsnyder
-[@johnschoeman]: https://github.com/johnschoeman
-[@joshuakgoldberg]: https://github.com/JoshuaKGoldberg
-[@jpickwell]: https://github.com/jpickwell
-[@jrdioko]: https://github.com/jrdioko
-[@jviney]: https://github.com/jviney
-[@kddeisz]: https://github.com/kddeisz
-[@kmcq]: https://github.com/kmcq
-[@krachtstefan]: https://github.com/krachtstefan
-[@localhostdotdev]: https://github.com/localhostdotdev
-[@marcmaniez]: https://github.com/MarcManiez
-[@masqita]: https://github.com/masqita
-[@matt-wratt]: https://github.com/matt-wratt
-[@meleyal]: https://github.com/meleyal
-[@mmainz]: https://github.com/mmainz
-[@mmcnl]: https://github.com/mmcnl
-[@noahtheduke]: https://github.com/NoahTheDuke
-[@overload119]: https://github.com/Overload119
-[@petevk]: https://github.com/petevk
-[@pje]: https://github.com/pje
-[@rosskinsella]: https://github.com/RossKinsella
-[@rsullivan00]: https://github.com/Rsullivan00
-[@ryan-hunter-pc]: https://github.com/ryan-hunter-pc
-[@shaydavidson]: https://github.com/ShayDavidson
-[@steobrien]: https://github.com/steobrien
-[@sviccari]: https://github.com/SViccari
-[@tobyndockerill]: https://github.com/tobyndockerill
-[@uri]: https://github.com/uri
-[@xipgroc]: https://github.com/xipgroc
-[@yuki24]: https://github.com/yuki24
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 173c2bf2..00000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,188 +0,0 @@
-# Contributing
-
-Thanks so much for your interest in contributing! This page provides background on how prettier and this plugin work, links for understanding each step that prettier executes, various helpful utilities for analyzing the tree structures being manipulated, and frequently asked questions.
-
-Armed with the knowledge below, we would love to see your contribution! Please open an issue or a pull request at https://github.com/prettier/plugin-ruby.
-
-- [How it works](#how-it-works)
- - [Text to AST](#text-to-ast)
- - [AST to Doc](#ast-to-doc)
- - [Doc to text](#doc-to-text)
-- [FAQ](#faq)
-- [Useful links](#useful-links)
- - [Ruby](#ruby)
- - [Ripper](#ripper)
- - [Prettier](#prettier)
-- [Useful commands](#useful-commands)
-- [Testing](#testing)
-
-## How it works
-
-In order to get printed, the code goes through a couple of transformations. The first is taking the entire file as text and parsing it into an abstract syntax tree (AST). The second is taking the AST and transforming it into prettier's intermediate representation, internally referred to as Docs. The final is taking the Doc nodes and converting them back into plain text, taking into account printing rules like max line length. Each of those steps is details below.
-
-### Text to AST
-
-When the prettier process first spins up, it examines which files it's going to print and selects an appropriate plugin for each one. Once selected, it runs that plugin's `parse` function, seen [here](src/parser.js). For the case of the Ruby plugin, that entails spawning a Ruby process that runs [parser.rb](src/parser.rb) with the input code preloaded on stdin.
-
-`parser.rb` will read the text off of stdin and then feed it to a new `Ripper` instance, which is a Ruby standard library recursive-descent parser. Briefly, the way that `Ripper` works is by tokenizing the input and then matching those tokens against a grammar to form s-expressions. To extend `Ripper`, you overwrite the methods that control how those s-expressions are formed, e.g., to modify the s-expression that is formed when `Ripper` encounters a string literal, you would override the `#on_string_literal` method. Below is an example for seeing that in action.
-
-Let's assume you have the following code:
-
-```ruby
-1 + 1
-```
-
-First, `Ripper` will tokenize:
-
-
-```ruby
-require 'ripper'
-
-pp Ripper.lex('1 + 1')
-
-=begin
-[[[1, 0], :on_int, "1", EXPR_END],
- [[1, 1], :on_sp, " ", EXPR_END],
- [[1, 2], :on_op, "+", EXPR_BEG],
- [[1, 3], :on_sp, " ", EXPR_BEG],
- [[1, 4], :on_int, "1", EXPR_END]]
-=end
-```
-
-You can see it has location metadata (row and column), the token type, the value associated with that token type, and the lexer state when that token was encountered. Then, it will convert those tokens into s-expressions:
-
-
-```ruby
-require 'ripper'
-
-pp Ripper.sexp_raw('1 + 1')
-
-=begin
-[:program,
- [:stmts_add,
- [:stmts_new],
- [:binary, [:@int, "1", [1, 0]], :+, [:@int, "1", [1, 4]]]]]
-=end
-```
-
-As you can see above, the resulting s-expressions will call the following methods in order on the instantiated `Ripper` instance: `on_int`, `on_int`, `on_stmts_new`, `on_binary`, `on_stmts_add`, `on_program`. You can hook into any part of this process by overriding any of those methods (we override all of them).
-
-Now that the text has been transformed into an AST that we can work with, `parser.rb` will serialize the result to JSON, write it back to stdout, and exit. The `parse` function will then parse that JSON by reading off the child process once it has exited, and return that value back to prettier.
-
-### AST to Doc
-
-Once prettier has a working AST, it will take it and call the selected plugin's [`printNode` function](src/printer.js), whose purpose is to convert that AST into prettier's intermediate representation called Docs. It does this by handing the print function a `FastPath` object that keeps track of the state of the printing as it goes, and allows accessing various parts of the AST quickly.
-
-Effectively, it walks the AST in the reverse direction from the way `Ripper` built it (top-down instead of bottom-up). The first node that gets passed into the `print` function is the `program` node as that's always on top. Then it is the `program` node's responsibility to recursively call print on its child nodes as it best sees fit.
-
-As the nodes are printing themselves and their children, they're additionally building up a second AST. That AST is built using the `builder` commands from prettier core, described [here](https://github.com/prettier/prettier/blob/master/commands.md). As an example, below is how a `binary` node (like the one representing the `1 + 1` above) would handle printing itself:
-
-```javascript
-const { concat, group, indent, line } = require("prettier").doc.builders;
-
-const printBinary = (path, opts, print) =>
- group(
- concat([
- concat([path.call(print, "body", 0), " "]),
- path.getValue().body[1],
- indent(concat([line, path.call(print, "body", 2)]))
- ])
- );
-```
-
-Recall that the `binary` node looks like this:
-
-```
-[:binary, [:@int, "1", [1, 0]], :+, [:@int, "1", [1, 4]]]
-```
-
-This means that there is a node in the `0` position of the array that represents the left-hand operand, and a node in the `2` position of the array that represents the right-hand operand. The operator is represented as a string literal in the `1` position of the array.
-
-So, the `printBinary` function is going to use the following `prettier` builders to build up the intermediate represention:
-
-- `concat` - puts multiple nodes together and prints them without breaking them apart
-- `group` - marks places where `prettier` could split text if the line gets too long; if the max line length is hit, `prettier` will break apart the outermost `group` node first
-- `indent` - increases the current print indent for the contents of the node if the parent node is broken, e.g., if the `binary` node is too long to fit on one line, it will indent the right-hand operand
-- `line` - puts a space if the group is not broken, otherwise puts a newline
-
-Once every node has been printed like the `binary` node above, the `print` node returns the intermediate representation to `prettier`.
-
-### Doc to text
-
-At this point, this is where `prettier`'s printer takes over. Because the remainder of the process is language-agnostic and `prettier` knows how to handle its own `Doc` representation, the Ruby plugin no longer has a job to do. `prettier` will walk its own `Doc` nodes and print them out according to the rules established by the structure.
-
-## FAQ
-
-Below are a couple of questions frequently asked about the prettier Ruby plugin.
-
-### Why Ripper over the other available Ruby parsers?
-
-I've been asked this question a lot, and there are a lot of reasons for this:
-
-1. Ripper is stdlib, and when the node process running prettier spawns the Ruby process performing the parsing, it's a lot easier to just require ripper than to worry about inconsistent environments having gems installed in myriad places.
-2. Ripper is fast, which is nice as we need that to give the developer a good experience.
-3. It was originally written in Ripper. Changing the parser at this point would entail an entire rewrite of the system, as the project is inextricably tied to the AST.
-
-### Why are the Ruby options distinct from the JavaScript options?
-
-In order to support all preferences, the Ruby options need to be distinct from the JavaScript options, otherwise you would not be able to, for example, have single quotes in Ruby and double quotes in JavaScript. They also indicate somewhat different things. In JavaScript, nothing changes when you use single versus double quotes, whereas in Ruby single and doubles quotes change interpolation behavior.
-
-### What versions of Ruby are supported?
-
-We support all Ruby versions that are under security maintenance or better (https://www.ruby-lang.org/en/downloads/branches/). This means at the moment we support back to Ruby 2.5. This is not to say that prettier can't parse and print code that was written while running earlier versions of Ruby, it's just that the Ruby process running prettier (whatever `ruby` resolves to when the process runs) must be >= 2.5.
-
-### Do you support ERB files (.html.erb, .js.erb, etc.)?
-
-At the moment, prettier doesn't have baked-in support for template languages. The way it is accomplished in prettier core is to extend each of the individual parsers to have special placeholder AST nodes that then switch the printer over to the necessarily language. This is certainly possible to support ERB, but the work is still being investigated. See [this issue](https://github.com/prettier/plugin-ruby/issues/371) for more detail.
-
-## Useful links
-
-For further understanding, below is a list of helpful resources.
-
-### Ruby
-
-Links contained within the Ruby source that are relevant to this plugin.
-
-- [parse.y](https://github.com/ruby/ruby/blob/trunk/parse.y) - the parser generator within Ruby that gives you the names of the nodes as well as their structure
-- [test_parser_events.rb](https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb) - the parser test file that gives you code examples of each kind of node
-
-### Ripper
-
-Links relating to `ripper` and how it parses Ruby source.
-
-- [Ripper preview](https://ripper-preview.herokuapp.com) - a visualization of `ripper` and how it parses Ruby source
-- [How ripper parses variables](https://rmosolgo.github.io/blog/2018/05/21/how-ripper-parses-variables/) - blog post neatly explaining how `ripper` parses variables
-- [Ripper events](https://rmosolgo.github.io/ripper_events/) - documentation for each type of `ripper` node
-
-### Prettier
-
-Links relating to `prettier` and its plugins.
-
-- [Prettier plugin documentation](https://prettier.io/docs/en/plugins.html) - documentation around `prettier`'s plugin system
-- [Builder commands](https://github.com/prettier/prettier/blob/master/commands.md) - the functions used to build the `prettier` IR
-- [Writing a Prettier plugin](https://medium.com/@fvictorio/how-to-write-a-plugin-for-prettier-a0d98c845e70) - a nice tutorial on how to build a `prettier` plugin
-
-## Useful commands
-
-While developing, we've built a couple of small utilities for debugging the `prettier` printing process. To use them, first run `yarn` and `bundle` to install dependencies.
-
-- `bin/lex [file|source]` - outputs the tokens as ripper sees them
-- `bin/sexp [file|source]` - outputs the AST that ripper builds before it gets passed back to `prettier`
-- `bin/pragma [file]` - runs the `hasPragma` function against the given input file
-- `bin/print [file|source]` - outputs the printed source of a Ruby file after running it through `prettier`
-
-## Testing
-
-There are two kinds of tests contained within this repository.
-
-The first are JavaScript tests (run with `jest`) that test the formatting against preconfigured fixtures to protect against regressions. They live in [test/js](test/js). To run them, run:
-
-```
-$ yarn test
-```
-
-The second are Ruby tests (run with `minitest`) that test the gem the wraps the `prettier` plugin as well as testing the various metadata attached to the AST nodes that `ripper` generates. They live in [test/rb](test/rb). To run them, run:
-
-```
-$ bundle exec rake
-```
diff --git a/Gemfile b/Gemfile
index f365da50..be173b20 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,9 +1,5 @@
# frozen_string_literal: true
-source 'https://rubygems.org'
+source "https://rubygems.org"
gemspec
-
-gem 'bundler', '~> 2.1'
-gem 'minitest', '~> 5.14'
-gem 'rake', '~> 13.0'
diff --git a/LICENSE b/LICENSE
index 9f1c9555..1d229424 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2019-present Kevin Deisz
+Copyright (c) 2019-present Kevin Newton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index a94be194..a0db67ff 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
-
+
@@ -59,187 +59,126 @@ d = [
30_643_069_058
]
a, s = [], $*[0]
-s.each_byte { |b| a << ('%036b' % d[b.chr.to_i]).scan(/\d{6}/) }
+s.each_byte { |b| a << ("%036b" % d[b.chr.to_i]).scan(/\d{6}/) }
a.transpose.each do |a|
- a.join.each_byte { |i| print i == 49 ? ($*[1] || '#') : 32.chr }
+ a.join.each_byte { |i| print i == 49 ? ($*[1] || "#") : 32.chr }
puts
end
```
## Getting started
-To run `prettier` with the Ruby plugin, you're going to need [`ruby`](https://www.ruby-lang.org/en/documentation/installation/) (version `2.5` or newer) and [`node`](https://nodejs.org/en/download/) (version `8.3` or newer). If you're integrating with a project that is not already using `prettier`, you should use the Ruby gem. Otherwise you can use the `npm` package directly.
+The `@prettier/plugin-ruby` plugin for `prettier` is a small wrapper around the [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree) gem that provides a Ruby formatter for `prettier`. It does this by keeping a Ruby server running in that background that `prettier` can communicate with when it needs to format a Ruby file. This means that in order to function, you will need to have both the requisite `node` and `ruby` dependencies installed. Because of this configuration, there are a couple of ways that you can get setup to use this plugin.
-Note that currently the editor integrations work best with the `npm` package, as most of the major editor plugins expect a `node_modules` directory. You can get them to work with the Ruby gem, but it requires manually configuring the paths.
+- If you're already using `prettier` in your project to format other files in your project and want to install this as a plugin, you can install it using `npm`.
+- If you're not using `prettier` yet in your project, then we recommend using the [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree) gem directly instead of using this plugin.
+- Note that this plugin also ships a gem named `prettier` which is a wrapper around the `prettier` CLI and includes this plugin by default, but _we no longer recommend its use_. If you're using that gem, you should migrate to using [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree) instead.
-### Ruby gem
+To run `prettier` with the Ruby plugin as an `npm` package, you're going to need [`ruby`](https://www.ruby-lang.org/en/documentation/installation/) (version `2.7` or newer) and [`node`](https://nodejs.org/en/download/) (version `16` or newer).
-Add this line to your application's Gemfile:
-
-```ruby
-gem 'prettier'
-```
-
-And then execute:
+If you're using the `npm` CLI, then add the plugin by:
```bash
-bundle
+npm install --save-dev prettier @prettier/plugin-ruby
```
-Or install it yourself as:
+Or if you're using `yarn`, then add the plugin by:
```bash
-gem install prettier
+yarn add --dev prettier @prettier/plugin-ruby
```
-The `rbprettier` executable is now installed and ready for use:
+You'll also need to add the necessary Ruby dependencies. You can do this by running:
```bash
-bundle exec rbprettier --write '**/*.rb'
+gem install bundler prettier_print syntax_tree syntax_tree-haml syntax_tree-rbs
```
-### `npm` package
-
-If you're using the `npm` CLI, then add the plugin by:
+The `prettier` executable is now installed and ready for use:
```bash
-npm install --save-dev prettier @prettier/plugin-ruby
+./node_modules/.bin/prettier --plugin=@prettier/plugin-ruby --write '**/*'
```
-Or if you're using `yarn`, then add the plugin by:
+### Using Prettier >= 3.0
-```bash
-yarn add --dev prettier @prettier/plugin-ruby
-```
-
-The `prettier` executable is now installed and ready for use:
+You need to tell Prettier to use the plugin, add the following to your existing [prettier configuration
+file](https://prettier.io/docs/en/configuration.html).
-```bash
-./node_modules/.bin/prettier --write '**/*.rb'
+```json
+{
+ "plugins": ["@prettier/plugin-ruby"]
+}
```
## Configuration
-Below are the options (from [`src/ruby.js`](src/ruby.js)) that `@prettier/plugin-ruby` currently supports:
+Below are the options (from [`src/plugin.js`](src/plugin.js)) that `@prettier/plugin-ruby` currently supports:
-| API Option | CLI Option | Default | Description |
-| ------------------ | ---------------------- | :-----: | ------------------------------------------------------------------------------------------------------------------------------------ |
-| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
-| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
-| `rubyArrayLiteral` | `--ruby-array-literal` | `true` | When possible, favor the use of string and symbol array literals. |
-| `rubyHashLabel` | `--ruby-hash-label` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
-| `rubyModifier` | `--ruby-modifier` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
-| `rubySingleQuote` | `--ruby-single-quote` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
-| `rubyToProc` | `--ruby-to-proc` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
-| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
-| `trailingComma` | `--trailing-comma` | `"es5"` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-comma)). `"es5"` is equivalent to `true`. |
+| API Option | CLI Option | Default | Description |
+| -------------------- | --------------------- | :------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
+| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
+| `rubyExecutablePath` | `"ruby"` | Allows you to configure your Ruby executable path. |
+| `rubyPlugins` | `--ruby-plugins` | `""` | The comma-separated list of plugins to require. See [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree#plugins). |
+| `rubySingleQuote` | `--ruby-single-quote` | `false` | Whether or not to default to single quotes for Ruby code. See [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree#plugins). |
+| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
+| `trailingComma` | `--trailing-comma` | `es5` | Almost same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-commas)). Will be on for any value except `none`. |
Any of these can be added to your existing [prettier configuration
file](https://prettier.io/docs/en/configuration.html). For example:
```json
{
- "rubySingleQuote": false
+ "tabWidth": 4
}
```
Or, they can be passed to `prettier` as arguments:
```bash
-prettier --ruby-single-quote false --write '**/*.rb'
+bundle exec rbprettier --tab-width 4 --write '**/*'
```
-## Contributing
+### Ignoring code
-Check out our [contributing guide](CONTRIBUTING.md). Bug reports and pull requests are welcome on GitHub at https://github.com/prettier/plugin-ruby.
+Sometimes you want to leave your formatting in place and have `prettier` not format it, but continue to format the rest of the file. `prettier` has the ability to do this with `prettier-ignore` comments, but because the underlying formatter for this plugin is [Syntax Tree](https://github.com/ruby-syntax-tree/syntax_tree), you instead would use a `stree-ignore` comment.
-### Code
+### Usage with RuboCop
-Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+RuboCop and Prettier for Ruby serve different purposes, but there is overlap with some of RuboCop's functionality. Prettier provides a RuboCop configuration file to disable the rules which would clash. To enable this file, add the following configuration at the top of your project's `.rubocop.yml`:
-
-
-
-
-
-
-
+```yaml
+inherit_from:
+ - node_modules/@prettier/plugin-ruby/rubocop.yml
+```
-
+### Usage with an editor
-This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
+For [supported editor integrations](https://github.com/prettier/prettier/blob/main/website/data/editors.yml), you should follow the instructions for installing the integration, then install the npm version of this plugin as a development dependency of your project. For most integrations, that should be sufficient. For convenience, the instructions for integrating with VSCode are used as an example below:
+
+- Install the [Prettier - Code Formatter](https://github.com/prettier/prettier-vscode) extension.
+- Add the npm `@prettier/plugin-ruby` package to your project as described above.
+- Configure in your `settings.json` (`formatOnSave` is optional):
+
+```json
+{
+ "[ruby]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ }
+}
+```
+
+Refer to [this issue](https://github.com/prettier/plugin-ruby/issues/113#issuecomment-783426539) if you're having difficulties.
+
+## Contributing
-### Financial
+Thanks so much for your interest in contributing! You can contribute in many ways, including:
-You can support `prettier/plugin-ruby` [on OpenCollective](https://opencollective.com/prettier-ruby/contribute). Your organization's logo will show up here with a link to your website.
+- Contributing code to fix any bugs on [GitHub](https://github.com/prettier/plugin-ruby).
+- Reporting issues on [GitHub](https://github.com/prettier/plugin-ruby/issues/new).
+- Supporting `prettier/plugin-ruby` on [OpenCollective](https://opencollective.com/prettier-ruby/contribute). Your organization's logo will show up here with a link to your website.
diff --git a/Rakefile b/Rakefile
index b2132881..a4eb3b0f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,12 +1,12 @@
# frozen_string_literal: true
-require 'bundler/gem_tasks'
-require 'rake/testtask'
+require "bundler/gem_tasks"
+require "rake/testtask"
Rake::TestTask.new(:test) do |t|
- t.libs << 'test/rb'
- t.libs << 'lib'
- t.test_files = FileList['test/rb/**/*_test.rb']
+ t.libs << "test/rb"
+ t.libs << "lib"
+ t.test_files = FileList["test/rb/**/*_test.rb"]
end
task default: :test
diff --git a/bin/console b/bin/console
deleted file mode 100755
index 5d2f5a89..00000000
--- a/bin/console
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'bundler/setup'
-require 'prettier'
-
-require 'irb'
-IRB.start(__FILE__)
diff --git a/bin/debug b/bin/debug
deleted file mode 100755
index 936f8856..00000000
--- a/bin/debug
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'bundler/inline'
-
-gemfile do
- source 'https://rubygems.org'
- gem 'sinatra', require: 'sinatra/base'
-end
-
-require_relative '../src/parser'
-
-class App < Sinatra::Base
- HTML = DATA.read
-
- get '/' do
- HTML
- end
-
- post '/ast' do
- builder = Prettier::Parser.new(request.body.read)
- response = builder.parse
-
- if !response || builder.error?
- halt 422
- else
- JSON.fast_generate(response)
- end
- end
-
- start!
-end
-
-__END__
-
-
-
-
-
-
- @prettier/plugin-ruby
-
-
-
- @prettier/plugin-ruby
-
-
-
-
-
-
diff --git a/bin/doc b/bin/doc
deleted file mode 100755
index 54411c6f..00000000
--- a/bin/doc
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env node
-
-const fs = require("fs");
-const prettier = require("prettier");
-
-const code = fs.existsSync(process.argv[2])
- ? fs.readFileSync(process.argv[2], "utf-8")
- : process.argv.slice(2).join(" ").replace(/\\n/g, "\n");
-
-const doc = prettier.__debug.printToDoc(code, {
- parser: "ruby",
- plugins: ["."]
-});
-console.log(prettier.__debug.formatDoc(doc));
diff --git a/bin/lex b/bin/lex
deleted file mode 100755
index b0fdc359..00000000
--- a/bin/lex
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'ripper'
-
-source = File.file?(ARGV[0]) ? File.read(ARGV[0]) : ARGV[0].gsub('\\n', "\n")
-pp Ripper.lex(source)
diff --git a/bin/pragma b/bin/pragma
deleted file mode 100755
index 26c0c235..00000000
--- a/bin/pragma
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env node
-
-const fs = require("fs");
-const { hasPragma } = require("../src/ruby").parsers.ruby;
-
-console.log(hasPragma(fs.readFileSync(process.argv[2], "utf-8")));
diff --git a/bin/print b/bin/print
deleted file mode 100755
index b7cbb645..00000000
--- a/bin/print
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-
-const fs = require("fs");
-const prettier = require("prettier");
-
-const code = fs.existsSync(process.argv[2])
- ? fs.readFileSync(process.argv[2], "utf-8")
- : process.argv.slice(2).join(" ").replace(/\\n/g, "\n");
-
-console.log(prettier.format(code, { parser: "ruby", plugins: ["."] }));
diff --git a/bin/print.js b/bin/print.js
new file mode 100755
index 00000000..51a3d1e9
--- /dev/null
+++ b/bin/print.js
@@ -0,0 +1,31 @@
+#!/usr/bin/env node
+
+import { existsSync, readFileSync } from "fs";
+import { formatWithCursor } from "prettier";
+
+import plugin from "../src/plugin.js";
+
+let parser = "ruby";
+let contentIdx = 2;
+
+if (["rbs", "haml"].includes(process.argv[contentIdx])) {
+ parser = process.argv[contentIdx];
+ contentIdx += 1;
+}
+
+let content;
+
+if (existsSync(process.argv[contentIdx])) {
+ content = readFileSync(process.argv[contentIdx], "utf-8");
+} else if (process.argv.length === contentIdx) {
+ const extension = parser === "ruby" ? "rb" : parser;
+ content = readFileSync(`test.${extension}`, "utf-8");
+} else {
+ content = process.argv.slice(contentIdx).join(" ").replace(/\\n/g, "\n");
+}
+
+formatWithCursor(content, {
+ parser,
+ plugins: [plugin],
+ cursorOffset: 1
+}).then(({ formatted }) => console.log(formatted));
diff --git a/bin/sexp b/bin/sexp
deleted file mode 100755
index c187442e..00000000
--- a/bin/sexp
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.expand_path(File.join('..', 'src', 'parser.rb'), __dir__)
-
-require 'pp'
-
-PP.prepend(
- Module.new do
- def pp_hash(obj)
- group(1, '{', '}') do
- text obj[:type]
- text ""
-
- group(1) do
- breakable ' '
- pp obj[:body]
- end
- end
- end
- end
-)
-
-source = File.file?(ARGV[0]) ? File.read(ARGV[0]) : ARGV[0].gsub('\\n', "\n")
-parsed = Prettier::Parser.new(source).parse
-
-puts '=== SOURCE === '
-puts source
-
-puts "\n=== COMMENTS ==="
-puts parsed[:comments]
-
-puts "\n=== S-EXPS ==="
-pp parsed
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 00000000..5f507d16
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,21 @@
+import eslintJs from "@eslint/js";
+import eslintConfigPrettier from "eslint-config-prettier";
+import globals from "globals";
+
+export default [
+ eslintJs.configs.recommended,
+ eslintConfigPrettier,
+ {
+ languageOptions: {
+ globals: {
+ ...globals.builtin,
+ ...globals.jest,
+ ...globals.node
+ }
+ },
+ rules: {
+ "no-unused-vars": "off"
+ }
+ },
+ { ignores: ["coverage"] }
+];
diff --git a/exe/rbprettier b/exe/rbprettier
index a5b550e0..f5b653a3 100755
--- a/exe/rbprettier
+++ b/exe/rbprettier
@@ -1,8 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
-$:.unshift(File.expand_path(File.join('..', 'lib'), __dir__))
-require 'prettier'
+$:.unshift(File.expand_path(File.join("..", "lib"), __dir__))
+require "prettier"
-Prettier.run(ARGV)
-exit($?.exitstatus) if $?.exited?
+exit(Prettier.run(ARGV))
diff --git a/lib/prettier.rb b/lib/prettier.rb
index 4b4ed058..fa68dceb 100644
--- a/lib/prettier.rb
+++ b/lib/prettier.rb
@@ -1,18 +1,53 @@
# frozen_string_literal: true
-require 'json' unless defined?(JSON)
+require "json" unless defined?(JSON)
+require "open3"
module Prettier
- PLUGIN = -File.expand_path('..', __dir__)
- BINARY = -File.join(PLUGIN, 'node_modules', 'prettier', 'bin-prettier.js')
- VERSION = -JSON.parse(File.read(File.join(PLUGIN, 'package.json')))['version']
+ directory = -File.expand_path("..", __dir__)
+ package = File.read(File.join(directory, "package.json"))
- class << self
- def run(args)
- quoted = args.map { |arg| arg.start_with?('-') ? arg : "'#{arg}'" }
- command = "node #{BINARY} --plugin '#{PLUGIN}' #{quoted.join(' ')}"
+ PLUGIN = -File.join(directory, "src/plugin.js")
+ BINARY = -File.join(directory, "node_modules/prettier/bin/prettier.cjs")
+ VERSION = -JSON.parse(package)["version"]
- system({ 'RBPRETTIER' => '1' }, command)
+ def self.run(args)
+ quoted = args.map { |arg| arg.start_with?("-") ? arg : "\"#{arg}\"" }
+ command = "node #{BINARY} --plugin \"#{PLUGIN}\" #{quoted.join(" ")}"
+ opts = STDIN.tty? ? {} : { stdin_data: STDIN }
+
+ stdout, stderr, status = Open3.capture3({}, command, opts)
+ STDOUT.puts(stdout)
+
+ # If we completed successfully, then just exit out.
+ exitstatus = status.exitstatus
+ return exitstatus if exitstatus == 0
+
+ if stderr.match?(%r{Cannot find module '/.+?/bin-prettier.js'})
+ # If we're missing bin-prettier.js, then it's possible the user installed
+ # the gem through git, which wouldn't have installed the requisite
+ # JavaScript files.
+ STDERR.puts(<<~MSG)
+ Could not find the JavaScript files necessary to run prettier.
+
+ If you installed this dependency through git instead of from rubygems,
+ it does not install the necessary files by default. To fix this you can
+ either install them yourself by cd-ing into the directory where this gem
+ is located (#{File.expand_path("..", __dir__)}) and running:
+
+ `yarn install`
+ or
+ `npm install`
+ or
+ you can change the source in your Gemfile to point directly to rubygems.
+ MSG
+ else
+ # Otherwise, just print out the same error that prettier emitted, as it's
+ # unknown to us.
+ STDERR.puts(stderr)
end
+
+ # Make sure we still exit with the same status code the prettier emitted.
+ exitstatus
end
end
diff --git a/lib/prettier/rake/task.rb b/lib/prettier/rake/task.rb
index a5591297..0da0fc9e 100644
--- a/lib/prettier/rake/task.rb
+++ b/lib/prettier/rake/task.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require 'rake'
-require 'rake/tasklib'
+require "rake"
+require "rake/tasklib"
module Prettier
module Rake
@@ -35,7 +35,7 @@ class Task < ::Rake::TaskLib
def initialize(name = :prettier)
@name = name
@write = true
- @source_files = 'lib/**/*.rb'
+ @source_files = "lib/**/*.rb"
yield self if block_given?
define_task
@@ -44,12 +44,12 @@ def initialize(name = :prettier)
private
def define_task
- desc 'Runs prettier over source files'
+ desc "Runs prettier over source files"
task(name) { run_task }
end
def run_task
- Prettier.run([('--write' if write), source_files].compact)
+ Prettier.run([write ? "--write" : "--check", source_files].compact)
exit($?.exitstatus) if $?&.exited?
end
end
diff --git a/package.json b/package.json
index d4fc7684..69dea870 100644
--- a/package.json
+++ b/package.json
@@ -1,59 +1,45 @@
{
"name": "@prettier/plugin-ruby",
- "version": "1.0.1",
+ "version": "4.0.4",
"description": "prettier plugin for the Ruby programming language",
- "main": "src/ruby.js",
+ "type": "module",
+ "main": "src/plugin.js",
"scripts": {
- "check-format": "prettier --check '**/*'",
+ "checkFormat": "prettier . --check",
"lint": "eslint --cache .",
- "test": "jest"
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/prettier/plugin-ruby.git"
},
- "author": "Kevin Deisz",
+ "author": "Kevin Newton",
"license": "MIT",
"bugs": {
"url": "https://github.com/prettier/plugin-ruby/issues"
},
"homepage": "https://github.com/prettier/plugin-ruby#readme",
- "dependencies": {
- "prettier": ">=1.10"
+ "peerDependencies": {
+ "prettier": "^3.0.0"
},
"devDependencies": {
- "all-contributors-cli": "^6.14.1",
- "eslint": "^7.8.1",
- "eslint-config-prettier": "^7.0.0",
- "husky": "^4.3.5",
- "jest": "^26.0.0",
- "pretty-quick": "^3.1.0"
- },
- "eslintConfig": {
- "extends": [
- "eslint:recommended",
- "prettier"
- ],
- "env": {
- "es6": true,
- "jest": true,
- "node": true
- },
- "rules": {
- "no-unused-vars": [
- "error",
- {
- "argsIgnorePattern": "^_",
- "varsIgnorePattern": "^_"
- }
- ]
- }
+ "@eslint/js": "^9.21.0",
+ "eslint": "^9.21.0",
+ "eslint-config-prettier": "^10.0.2",
+ "globals": "^16.0.0",
+ "husky": "^9.1.7",
+ "jest": "^29.7.0",
+ "prettier": "^3.5.3",
+ "pretty-quick": "^4.1.1"
},
"jest": {
+ "globalSetup": "./test/js/globalSetup.js",
+ "globalTeardown": "./test/js/globalTeardown.js",
"setupFilesAfterEnv": [
"./test/js/setupTests.js"
],
- "testRegex": ".test.js$"
+ "testRegex": ".test.js$",
+ "transform": {}
},
"husky": {
"hooks": {
@@ -63,7 +49,7 @@
"prettier": {
"trailingComma": "none",
"plugins": [
- "."
+ "./src/plugin.js"
]
}
}
diff --git a/prettier.gemspec b/prettier.gemspec
index b07538af..5cc3cf5a 100644
--- a/prettier.gemspec
+++ b/prettier.gemspec
@@ -1,30 +1,34 @@
# frozen_string_literal: true
-require 'json' unless defined?(JSON)
-package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
+require "json" unless defined?(JSON)
+package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Gem::Specification.new do |spec|
- spec.name = 'prettier'
- spec.version = package['version']
- spec.authors = [package['author']]
+ spec.name = "prettier"
+ spec.version = package.fetch("version")
+ spec.authors = [package.fetch("author")]
- spec.summary = package['description']
- spec.homepage = package['homepage']
- spec.license = package['license']
+ spec.summary = package.fetch("description")
+ spec.homepage = package.fetch("homepage")
+ spec.license = package.fetch("license")
spec.files =
Dir.chdir(__dir__) do
- Dir['{{exe,lib,src}/**/*,*.md}'] + %w[
- bin/console
- LICENSE
- node_modules/prettier/bin-prettier.js
- node_modules/prettier/index.js
- node_modules/prettier/third-party.js
- package.json
- ]
+ %w[LICENSE package.json rubocop.yml] + Dir["{{exe,lib,src}/**/*,*.md}"] +
+ Dir["node_modules/prettier/**/*"]
end
- spec.bindir = 'exe'
- spec.executables = 'rbprettier'
+ spec.required_ruby_version = ">= 2.7.0"
+
+ spec.bindir = "exe"
+ spec.executables = "rbprettier"
spec.require_paths = %w[lib]
+
+ spec.add_dependency "syntax_tree", ">= 4.0.1"
+ spec.add_dependency "syntax_tree-haml", ">= 2.0.0"
+ spec.add_dependency "syntax_tree-rbs", ">= 0.2.0"
+
+ spec.add_development_dependency "bundler"
+ spec.add_development_dependency "minitest"
+ spec.add_development_dependency "rake"
end
diff --git a/rubocop.yml b/rubocop.yml
new file mode 100644
index 00000000..64316d0c
--- /dev/null
+++ b/rubocop.yml
@@ -0,0 +1,64 @@
+# Disabling all Layout/* rules, as they're unnecessary when the user is using
+# Syntax Tree to handle all of the formatting.
+Layout:
+ Enabled: false
+
+# Re-enable Layout/LineLength because certain cops that most projects use
+# (e.g. Style/IfUnlessModifier) require Layout/LineLength to be enabled.
+# By leaving it disabled, those rules will mis-fire.
+#
+# Users can always override these defaults in their own rubocop.yml files.
+# https://github.com/prettier/plugin-ruby/issues/825
+Layout/LineLength:
+ Enabled: true
+
+Style/MultilineIfModifier:
+ Enabled: false
+
+# Syntax Tree will expand empty methods to put the end keyword on the subsequent
+# line to reduce git diff noise.
+Style/EmptyMethod:
+ EnforcedStyle: expanded
+
+# lambdas that are constructed with the lambda method call cannot be safely
+# turned into lambda literals without removing a method call.
+Style/Lambda:
+ Enabled: false
+
+# When method chains with multiple blocks are chained together, rubocop will let
+# them pass if they're using braces but not if they're using do and end
+# keywords. Because we will break individual blocks down to using keywords if
+# they are multiline, this conflicts with rubocop.
+Style/MultilineBlockChain:
+ Enabled: false
+
+# Disable the single- vs double-quotes rules as these depend on whether the user
+# has added or not `plugin/single_quotes` for `syntax_tree`
+Style/StringLiterals:
+ Enabled: false
+
+Style/StringLiteralsInInterpolation:
+ Enabled: false
+
+Style/QuotedSymbols:
+ Enabled: false
+
+# We let users have a little more freedom with symbol and words arrays. If the
+# user only has an individual item like ["value"] then we don't bother
+# converting it because it ends up being just noise.
+Style/SymbolArray:
+ Enabled: false
+
+Style/WordArray:
+ Enabled: false
+
+# Disable the trailing-comma rules as these depend on whether the user has added
+# or not `plugin/trailing_comma` for `syntax_tree`
+Style/TrailingCommaInArguments:
+ Enabled: false
+
+Style/TrailingCommaInArrayLiteral:
+ Enabled: false
+
+Style/TrailingCommaInHashLiteral:
+ Enabled: false
diff --git a/src/embed.js b/src/embed.js
deleted file mode 100644
index 6b4e3ef5..00000000
--- a/src/embed.js
+++ /dev/null
@@ -1,90 +0,0 @@
-const {
- concat,
- group,
- indent,
- lineSuffix,
- mapDoc,
- markAsRoot,
- stripTrailingHardline
-} = require("./prettier");
-
-const { literalLineNoBreak } = require("./utils");
-
-const parsers = {
- css: "css",
- javascript: "babel",
- js: "babel",
- less: "less",
- markdown: "markdown",
- ruby: "ruby",
- scss: "scss"
-};
-
-const replaceNewlines = (doc) =>
- mapDoc(doc, (currentDoc) =>
- typeof currentDoc === "string" && currentDoc.includes("\n")
- ? concat(
- currentDoc
- .split(/(\n)/g)
- .map((v, i) => (i % 2 === 0 ? v : literalLineNoBreak))
- )
- : currentDoc
- );
-
-const embed = (path, print, textToDoc, _opts) => {
- const node = path.getValue();
-
- // Currently we only support embedded formatting on heredoc nodes
- if (node.type !== "heredoc") {
- return null;
- }
-
- // First, ensure that we don't have any interpolation
- const { beging, body, ending } = node;
- if (body.some((part) => part.type !== "@tstring_content")) {
- return null;
- }
-
- // Next, find the parser associated with this heredoc (if there is one). For
- // example, if you use <<~CSS, we'd hook it up to the css parser.
- const parser = parsers[beging.body.slice(3).toLowerCase()];
- if (!parser) {
- return null;
- }
-
- // Get the content as if it were a source string, and then pass that content
- // into the embedded parser. Get back the doc node.
- const content = body.map((part) => part.body).join("");
- const formatted = concat([
- literalLineNoBreak,
- replaceNewlines(stripTrailingHardline(textToDoc(content, { parser })))
- ]);
-
- // If we're using a squiggly heredoc, then we can properly handle indentation
- // ourselves.
- if (beging.body[2] === "~") {
- return concat([
- path.call(print, "beging"),
- lineSuffix(
- group(
- concat([
- indent(markAsRoot(formatted)),
- literalLineNoBreak,
- ending.trim()
- ])
- )
- )
- ]);
- }
-
- // Otherwise, we need to just assume it's formatted correctly and return the
- // content as it is.
- return markAsRoot(
- concat([
- path.call(print, "beging"),
- lineSuffix(group(concat([formatted, literalLineNoBreak, ending.trim()])))
- ])
- );
-};
-
-module.exports = embed;
diff --git a/src/nodes.js b/src/nodes.js
deleted file mode 100644
index 12de34af..00000000
--- a/src/nodes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-module.exports = Object.assign(
- {},
- require("./nodes/alias"),
- require("./nodes/aref"),
- require("./nodes/args"),
- require("./nodes/arrays"),
- require("./nodes/assign"),
- require("./nodes/blocks"),
- require("./nodes/calls"),
- require("./nodes/case"),
- require("./nodes/class"),
- require("./nodes/commands"),
- require("./nodes/conditionals"),
- require("./nodes/constants"),
- require("./nodes/flow"),
- require("./nodes/hashes"),
- require("./nodes/heredocs"),
- require("./nodes/hooks"),
- require("./nodes/ints"),
- require("./nodes/lambdas"),
- require("./nodes/loops"),
- require("./nodes/massign"),
- require("./nodes/methods"),
- require("./nodes/operators"),
- require("./nodes/params"),
- require("./nodes/patterns"),
- require("./nodes/regexp"),
- require("./nodes/rescue"),
- require("./nodes/return"),
- require("./nodes/statements"),
- require("./nodes/strings"),
- require("./nodes/super"),
- require("./nodes/undef")
-);
diff --git a/src/nodes/alias.js b/src/nodes/alias.js
deleted file mode 100644
index b7239eba..00000000
--- a/src/nodes/alias.js
+++ /dev/null
@@ -1,73 +0,0 @@
-const {
- addTrailingComment,
- align,
- concat,
- group,
- hardline,
- line
-} = require("../prettier");
-
-// In general, return the printed doc of the argument at the provided index.
-// Special handling is given for symbol literals that are not bare words, as we
-// convert those into bare words by just pulling out the ident node.
-function printAliasArgument(path, print, argIndex) {
- const node = path.getValue().body[argIndex];
-
- if (node.type === "symbol_literal") {
- // If we're going to descend into the symbol literal to grab out the ident
- // node, then we need to make sure we copy over any comments as well,
- // otherwise we could accidentally skip printing them.
- if (node.comments) {
- node.comments.forEach((comment) => {
- addTrailingComment(node.body[0], comment);
- });
- }
-
- return path.call(print, "body", argIndex, "body", 0);
- }
-
- return path.call(print, "body", argIndex);
-}
-
-// The `alias` keyword is used to make a method respond to another name as well
-// as the current one. For example, to get the method `foo` to also respond to
-// `bar`, you would:
-//
-// alias bar foo
-//
-// Now, in the current context you can call `bar` and it will execute the `foo`
-// method.
-//
-// When you're aliasing two methods, you can either provide bare words (like the
-// example above) or you can provide symbols (note that this includes dynamic
-// symbols like :"foo-#{bar}-baz"). In general, to be consistent with the ruby
-// style guide, we prefer bare words:
-//
-// https://github.com/rubocop-hq/ruby-style-guide#alias-method-lexically
-//
-// The `alias` node contains two children. The left and right align with the
-// arguments passed to the keyword. So, for the above example the left would be
-// the symbol literal `bar` and the right could be the symbol literal `foo`.
-function printAlias(path, opts, print) {
- const keyword = "alias ";
-
- const rightSide = concat([
- // If the left child has any comments, then we need to explicitly break this
- // into two lines
- path.getValue().body[0].comments ? hardline : line,
- printAliasArgument(path, print, 1)
- ]);
-
- return group(
- concat([
- keyword,
- printAliasArgument(path, print, 0),
- group(align(keyword.length, rightSide))
- ])
- );
-}
-
-module.exports = {
- alias: printAlias,
- var_alias: printAlias
-};
diff --git a/src/nodes/aref.js b/src/nodes/aref.js
deleted file mode 100644
index 5adbf495..00000000
--- a/src/nodes/aref.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const { concat, group, indent, join, line, softline } = require("../prettier");
-
-// `aref` nodes are when you're pulling a value out of a collection at a
-// specific index. Put another way, it's any time you're calling the method
-// `#[]`.
-//
-// The nodes usually contains two children, details below in the
-// `printArefField` function. In some cases, you don't necessarily have the
-// second child node, because you can call procs with a pretty esoteric syntax.
-// In the following example, you wouldn't have a second child, and `"foo"` would
-// be the first child.
-//
-// foo[]
-//
-function printAref(path, opts, print) {
- const indexNode = path.getValue().body[1];
-
- if (!indexNode) {
- return concat([path.call(print, "body", 0), "[]"]);
- }
-
- return printArefField(path, opts, print);
-}
-
-// `aref_field` nodes are for assigning values into collections at specific
-// indices. Put another way, it's any time you're calling the method `#[]=`.
-// The `aref_field` node itself is just the left side of the assignment, and
-// they're always wrapped in `assign` nodes.
-//
-// The nodes always contain two children, the name of the array (usually a
-// `vcall` node and the index (usually an `args_add_block` node). The
-// `args_add_block` is one of a couple nodes that has special handling where its
-// printed form is actually an array to make joining easier.
-//
-// So in the following example, `"foo"` is the array and `["bar"]` is the index.
-//
-// foo[bar] = baz
-//
-function printArefField(path, opts, print) {
- const [printedArray, printedIndex] = path.map(print, "body");
-
- return group(
- concat([
- printedArray,
- "[",
- indent(concat([softline, join(concat([",", line]), printedIndex)])),
- concat([softline, "]"])
- ])
- );
-}
-
-module.exports = {
- aref: printAref,
- aref_field: printArefField
-};
diff --git a/src/nodes/args.js b/src/nodes/args.js
deleted file mode 100644
index 341caf4f..00000000
--- a/src/nodes/args.js
+++ /dev/null
@@ -1,116 +0,0 @@
-const {
- concat,
- group,
- ifBreak,
- indent,
- join,
- line,
- softline
-} = require("../prettier");
-
-const toProc = require("../toProc");
-const { getTrailingComma } = require("../utils");
-
-function printArgParen(path, opts, print) {
- const argsNode = path.getValue().body[0];
-
- if (argsNode === null) {
- return "";
- }
-
- // Here we can skip the entire rest of the method by just checking if it's
- // an args_forward node, as we're guaranteed that there are no other arg
- // nodes.
- if (argsNode.type === "args_forward") {
- return group(
- concat([
- "(",
- indent(concat([softline, path.call(print, "body", 0)])),
- softline,
- ")"
- ])
- );
- }
-
- const args = path.call(print, "body", 0);
- const hasBlock = argsNode.type === "args_add_block" && argsNode.body[1];
-
- // Now here we return a doc that represents the whole grouped expression,
- // including the surrouding parentheses.
- return group(
- concat([
- "(",
- indent(
- concat([
- softline,
- join(concat([",", line]), args),
- getTrailingComma(opts) && !hasBlock ? ifBreak(",", "") : ""
- ])
- ),
- softline,
- ")"
- ])
- );
-}
-
-function printArgs(path, { rubyToProc }, print) {
- const args = path.map(print, "body");
-
- // Don't bother trying to do any kind of fancy toProc transform if the
- // option is disabled.
- if (rubyToProc) {
- let blockNode = null;
-
- // Look up the chain to see if these arguments are contained within a
- // method_add_block node, and if they are that that node has a block
- // associated with it. If it does, we're going to attempt to transform it
- // into the to_proc shorthand and add it to the list of arguments.
- [1, 2, 3].find((parent) => {
- const parentNode = path.getParentNode(parent);
- blockNode =
- parentNode &&
- parentNode.type === "method_add_block" &&
- parentNode.body[1];
-
- return blockNode;
- });
-
- const proc = blockNode && toProc(path, blockNode);
-
- // If we have a successful to_proc transformation, but we're part of an
- // aref node, that means it's something to the effect of
- //
- // foo[:bar].each(&:to_s)
- //
- // In this case we need to just return regular arguments, otherwise we
- // would end up putting &:to_s inside the brackets accidentally.
- if (proc && path.getParentNode(1).type !== "aref") {
- args.push(proc);
- }
- }
-
- return args;
-}
-
-module.exports = {
- arg_paren: printArgParen,
- args: printArgs,
- args_add_block: (path, opts, print) => {
- const parts = path.call(print, "body", 0);
-
- if (path.getValue().body[1]) {
- parts.push(concat(["&", path.call(print, "body", 1)]));
- }
-
- return parts;
- },
- args_add_star: (path, opts, print) => {
- const printed = path.map(print, "body");
- const parts = printed[0]
- .concat([concat(["*", printed[1]])])
- .concat(printed.slice(2));
-
- return parts;
- },
- blockarg: (path, opts, print) => concat(["&", path.call(print, "body", 0)])
-};
diff --git a/src/nodes/arrays.js b/src/nodes/arrays.js
deleted file mode 100644
index 03fcc654..00000000
--- a/src/nodes/arrays.js
+++ /dev/null
@@ -1,160 +0,0 @@
-const {
- concat,
- group,
- ifBreak,
- indent,
- join,
- line,
- softline
-} = require("../prettier");
-
-const { getTrailingComma, printEmptyCollection } = require("../utils");
-
-// Checks that every argument within this args node is a string_literal node
-// that has no spaces or interpolations. This means we're dealing with an array
-// that looks something like:
-//
-// ['a', 'b', 'c']
-//
-function isStringArray(args) {
- return (
- args.body.length > 1 &&
- args.body.every((arg) => {
- // We want to verify that every node inside of this array is a string
- // literal. We also want to make sure none of them have comments attached.
- if (arg.type !== "string_literal" || arg.comments) {
- return false;
- }
-
- // If the string has multiple parts (meaning plain string content but also
- // interpolated content) then we know it's not a simple string.
- if (arg.body.length !== 1) {
- return false;
- }
-
- const part = arg.body[0];
-
- // If the only part of this string is not @tstring_content then it's
- // interpolated, so again we can return false.
- if (part.type !== "@tstring_content") {
- return false;
- }
-
- // Finally, verify that the string doesn't contain a space, an escape
- // character, or brackets so that we know it can be put into a string
- // literal array.
- return !/[\s\\[\]]/.test(part.body);
- })
- );
-}
-
-// Checks that every argument within this args node is a symbol_literal node (as
-// opposed to a dyna_symbol) so it has no interpolation. This means we're
-// dealing with an array that looks something like:
-//
-// [:a, :b, :c]
-//
-function isSymbolArray(args) {
- return (
- args.body.length > 1 &&
- args.body.every((arg) => arg.type === "symbol_literal" && !arg.comments)
- );
-}
-
-// Prints out a word that is a part of a special array literal that accepts
-// interpolation. The body is an array of either plain strings or interpolated
-// expressions.
-function printSpecialArrayWord(path, opts, print) {
- return concat(path.map(print, "body"));
-}
-
-// Prints out a special array literal. Accepts the parts of the array literal as
-// an argument, where the first element of the parts array is a string that
-// contains the special start.
-function printSpecialArrayParts(parts) {
- return group(
- concat([
- parts[0],
- "[",
- indent(concat([softline, join(line, parts.slice(1))])),
- concat([softline, "]"])
- ])
- );
-}
-
-// Generates a print function with an embedded special start character for the
-// specific type of array literal that we're dealing with. The print function
-// returns an array as it expects to eventually be handed off to
-// printSpecialArrayParts.
-function printSpecialArray(start) {
- return function printSpecialArrayWithStart(path, opts, print) {
- return [start].concat(path.map(print, "body"));
- };
-}
-
-// An array node is any literal array in Ruby. This includes all of the special
-// array literals as well as regular arrays. If it is a special array literal
-// then it will have one child that represents the special array, otherwise it
-// will have one child that contains all of the elements of the array.
-function printArray(path, opts, print) {
- const array = path.getValue();
- const args = array.body[0];
-
- // If there is no inner arguments node, then we're dealing with an empty
- // array, so we can go ahead and return.
- if (args === null) {
- return printEmptyCollection(path, opts, "[", "]");
- }
-
- // If we have an array that contains only simple string literals with no
- // spaces or interpolation, then we're going to print a %w array.
- if (opts.rubyArrayLiteral && isStringArray(args)) {
- const printString = (stringPath) => stringPath.call(print, "body", 0);
- const parts = path.map(printString, "body", 0, "body");
-
- return printSpecialArrayParts(["%w"].concat(parts));
- }
-
- // If we have an array that contains only simple symbol literals with no
- // interpolation, then we're going to print a %i array.
- if (opts.rubyArrayLiteral && isSymbolArray(args)) {
- const printSymbol = (symbolPath) => symbolPath.call(print, "body", 0);
- const parts = path.map(printSymbol, "body", 0, "body");
-
- return printSpecialArrayParts(["%i"].concat(parts));
- }
-
- // If we don't have a regular args node at this point then we have a special
- // array literal. In that case we're going to print out the body (which will
- // return to us an array with the first one being the start of the array) and
- // send that over to the printSpecialArrayParts function.
- if (!["args", "args_add_star"].includes(args.type)) {
- return printSpecialArrayParts(path.call(print, "body", 0));
- }
-
- // Here we have a normal array of any type of object with no special literal
- // types or anything.
- return group(
- concat([
- "[",
- indent(
- concat([
- softline,
- join(concat([",", line]), path.call(print, "body", 0)),
- getTrailingComma(opts) ? ifBreak(",", "") : ""
- ])
- ),
- softline,
- "]"
- ])
- );
-}
-
-module.exports = {
- array: printArray,
- qsymbols: printSpecialArray("%i"),
- qwords: printSpecialArray("%w"),
- symbols: printSpecialArray("%I"),
- word: printSpecialArrayWord,
- words: printSpecialArray("%W")
-};
diff --git a/src/nodes/assign.js b/src/nodes/assign.js
deleted file mode 100644
index a2f5e572..00000000
--- a/src/nodes/assign.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const { concat, group, indent, join, line } = require("../prettier");
-const { first, skipAssignIndent } = require("../utils");
-
-function printAssign(path, opts, print) {
- const [_targetNode, valueNode] = path.getValue().body;
- const [targetDoc, valueDoc] = path.map(print, "body");
-
- let rightSideDoc = valueDoc;
-
- // If the right side of this assignment is a multiple assignment, then we need
- // to join it together with commas.
- if (["mrhs_add_star", "mrhs_new_from_args"].includes(valueNode.type)) {
- rightSideDoc = group(join(concat([",", line]), valueDoc));
- }
-
- if (skipAssignIndent(valueNode)) {
- return group(concat([targetDoc, " = ", rightSideDoc]));
- }
-
- return group(concat([targetDoc, " =", indent(concat([line, rightSideDoc]))]));
-}
-
-function printOpAssign(path, opts, print) {
- return group(
- concat([
- path.call(print, "body", 0),
- " ",
- path.call(print, "body", 1),
- indent(concat([line, path.call(print, "body", 2)]))
- ])
- );
-}
-
-module.exports = {
- assign: printAssign,
- opassign: printOpAssign,
- var_field: first,
- var_ref: first
-};
diff --git a/src/nodes/blocks.js b/src/nodes/blocks.js
deleted file mode 100644
index ceea9277..00000000
--- a/src/nodes/blocks.js
+++ /dev/null
@@ -1,85 +0,0 @@
-const {
- breakParent,
- concat,
- group,
- ifBreak,
- indent,
- join,
- removeLines,
- softline
-} = require("../prettier");
-const { empty, hasAncestor } = require("../utils");
-
-const printBlock = (braces) => (path, opts, print) => {
- const [variables, statements] = path.getValue().body;
- const stmts =
- statements.type === "stmts" ? statements.body : statements.body[0].body;
-
- let doBlockBody = "";
- if (
- stmts.length !== 1 ||
- stmts[0].type !== "void_stmt" ||
- stmts[0].comments
- ) {
- doBlockBody = indent(concat([softline, path.call(print, "body", 1)]));
- }
-
- // If this block is nested underneath a command or command_call node, then we
- // can't use `do...end` because that will get associated with the parent node
- // as opposed to the current node (because of the difference in operator
- // precedence). Instead, we still use a multi-line format but switch to using
- // braces instead.
- const useBraces = braces && hasAncestor(path, ["command", "command_call"]);
-
- const doBlock = concat([
- useBraces ? " {" : " do",
- variables ? concat([" ", path.call(print, "body", 0)]) : "",
- doBlockBody,
- concat([softline, useBraces ? "}" : "end"])
- ]);
-
- // We can hit this next pattern if within the block the only statement is a
- // comment.
- if (
- stmts.length === 1 &&
- stmts[0].type === "void_stmt" &&
- stmts[0].comments
- ) {
- return concat([breakParent, doBlock]);
- }
-
- // If the parent node is a command node, then there are no parentheses around
- // the arguments to that command, so we need to break the block
- if (["command", "command_call"].includes(path.getParentNode().body[0].type)) {
- return concat([breakParent, doBlock]);
- }
-
- const hasBody = stmts.some(({ type }) => type !== "void_stmt");
- const braceBlock = concat([
- " {",
- hasBody || variables ? " " : "",
- variables ? path.call(print, "body", 0) : "",
- path.call(print, "body", 1),
- hasBody ? " " : "",
- "}"
- ]);
-
- return group(ifBreak(doBlock, braceBlock));
-};
-
-module.exports = {
- block_var: (path, opts, print) => {
- const parts = ["|", removeLines(path.call(print, "body", 0))];
-
- // The second part of this node is a list of optional block-local variables
- if (path.getValue().body[1]) {
- parts.push("; ", join(", ", path.map(print, "body", 1)));
- }
-
- parts.push("| ");
- return concat(parts);
- },
- brace_block: printBlock(true),
- do_block: printBlock(false),
- excessed_comma: empty
-};
diff --git a/src/nodes/calls.js b/src/nodes/calls.js
deleted file mode 100644
index 1ec3a7fd..00000000
--- a/src/nodes/calls.js
+++ /dev/null
@@ -1,187 +0,0 @@
-const {
- concat,
- group,
- hardline,
- ifBreak,
- indent,
- softline
-} = require("../prettier");
-const { first, makeCall, noIndent } = require("../utils");
-
-const toProc = require("../toProc");
-
-const chained = ["call", "method_add_arg", "method_add_block"];
-
-function printCall(path, opts, print) {
- const node = path.getValue();
- const [receiverNode, _operatorNode, messageNode] = node.body;
-
- const receiverDoc = path.call(print, "body", 0);
- const operatorDoc = makeCall(path, opts, print);
-
- // You can call lambdas with a special syntax that looks like func.(*args).
- // In this case, "call" is returned for the 3rd child node. We don't alter
- // call syntax so if `call` is implicit, we don't print it out.
- const messageDoc = messageNode === "call" ? "" : path.call(print, "body", 2);
-
- // The right side of the call node, as in everything including the operator
- // and beyond.
- const rightSideDoc = concat([
- receiverNode.comments ? hardline : softline,
- operatorDoc,
- messageDoc
- ]);
-
- // Get a reference to the parent node so we can check if we're inside a chain
- const parentNode = path.getParentNode();
-
- // If our parent node is a chained node then we're not going to group the
- // right side of the expression, as we want to have a nice multi-line layout.
- if (chained.includes(parentNode.type)) {
- parentNode.chain = (node.chain || 0) + 1;
- parentNode.breakDoc = (node.breakDoc || [receiverDoc]).concat(rightSideDoc);
- }
-
- // If we're at the top of a chain, then we're going to print out a nice
- // multi-line layout if this doesn't break into multiple lines.
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
- return ifBreak(
- group(indent(concat(node.breakDoc.concat(rightSideDoc)))),
- concat([receiverDoc, group(rightSideDoc)])
- );
- }
-
- // For certain left sides of the call nodes, we want to attach directly to
- // the } or end.
- if (noIndent.includes(receiverNode.type)) {
- return concat([receiverDoc, operatorDoc, messageDoc]);
- }
-
- return group(concat([receiverDoc, group(indent(rightSideDoc))]));
-}
-
-function printMethodAddArg(path, opts, print) {
- const node = path.getValue();
- const argNode = node.body[1];
-
- const [methodDoc, argsDoc] = path.map(print, "body");
-
- // You can end up here if you have a method with a ? ending, presumably
- // because the parser knows that it cannot be a local variable.
- if (argsDoc.length === 0) {
- return methodDoc;
- }
-
- // This case will ONLY be hit if we can successfully turn the block into a
- // to_proc call. In that case, we just explicitly add the parens around it.
- if (argNode.type === "args" && argsDoc.length > 0) {
- return concat([methodDoc, "("].concat(argsDoc).concat(")"));
- }
-
- // Get a reference to the parent node so we can check if we're inside a chain
- const parentNode = path.getParentNode();
-
- // If our parent node is a chained node then we're not going to group the
- // right side of the expression, as we want to have a nice multi-line layout.
- if (chained.includes(parentNode.type)) {
- parentNode.chain = (node.chain || 0) + 1;
- parentNode.breakDoc = (node.breakDoc || [methodDoc]).concat(argsDoc);
- }
-
- // If we're at the top of a chain, then we're going to print out a nice
- // multi-line layout if this doesn't break into multiple lines.
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
- return ifBreak(
- group(indent(concat(node.breakDoc.concat(argsDoc)))),
- concat([methodDoc, argsDoc])
- );
- }
-
- return concat([methodDoc, argsDoc]);
-}
-
-// Sorbet type annotations look like the following:
-//
-// {method_add_block
-// [{method_add_arg
-// [{fcall
-// [{@ident "sig"}]},
-// {args []}]},
-// {brace_block [nil, {stmts}]}}]}
-//
-function isSorbetTypeAnnotation(node) {
- const [callNode, blockNode] = node.body;
-
- return (
- callNode.type === "method_add_arg" &&
- callNode.body[0].type === "fcall" &&
- callNode.body[0].body[0].body === "sig" &&
- callNode.body[1].type === "args" &&
- callNode.body[1].body.length === 0 &&
- blockNode.type === "brace_block"
- );
-}
-
-function printMethodAddBlock(path, opts, print) {
- const node = path.getValue();
-
- const [callNode, blockNode] = node.body;
- const [callDoc, blockDoc] = path.map(print, "body");
-
- // Very special handling here for sorbet type annotations. They look like Ruby
- // code, but they're not actually Ruby code, so we're not going to mess with
- // them at all.
- if (isSorbetTypeAnnotation(node)) {
- return opts.originalText.slice(opts.locStart(node), opts.locEnd(node));
- }
-
- // Don't bother trying to do any kind of fancy toProc transform if the option
- // is disabled.
- if (opts.rubyToProc) {
- const proc = toProc(path, blockNode);
-
- if (proc && callNode.type === "call") {
- return group(
- concat([
- path.call(print, "body", 0),
- "(",
- indent(concat([softline, proc])),
- concat([softline, ")"])
- ])
- );
- }
-
- if (proc) {
- return path.call(print, "body", 0);
- }
- }
-
- // Get a reference to the parent node so we can check if we're inside a chain
- const parentNode = path.getParentNode();
-
- // If our parent node is a chained node then we're not going to group the
- // right side of the expression, as we want to have a nice multi-line layout.
- if (chained.includes(parentNode.type)) {
- parentNode.chain = (node.chain || 0) + 1;
- parentNode.breakDoc = (node.breakDoc || [callDoc]).concat(blockDoc);
- }
-
- // If we're at the top of a chain, then we're going to print out a nice
- // multi-line layout if this doesn't break into multiple lines.
- if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
- return ifBreak(
- group(indent(concat(node.breakDoc.concat(blockDoc)))),
- concat([callDoc, blockDoc])
- );
- }
-
- return concat([callDoc, blockDoc]);
-}
-
-module.exports = {
- call: printCall,
- fcall: first,
- method_add_arg: printMethodAddArg,
- method_add_block: printMethodAddBlock,
- vcall: first
-};
diff --git a/src/nodes/case.js b/src/nodes/case.js
deleted file mode 100644
index 8e25dea2..00000000
--- a/src/nodes/case.js
+++ /dev/null
@@ -1,61 +0,0 @@
-const {
- align,
- concat,
- fill,
- group,
- hardline,
- indent,
- line
-} = require("../prettier");
-
-module.exports = {
- case: (path, opts, print) => {
- const statement = ["case"];
-
- // You don't need to explicitly have something to test against in a case
- // statement (without it it effectively becomes an if/elsif chain).
- if (path.getValue().body[0]) {
- statement.push(" ", path.call(print, "body", 0));
- }
-
- return concat(
- statement.concat([hardline, path.call(print, "body", 1), hardline, "end"])
- );
- },
- when: (path, opts, print) => {
- const [_preds, _stmts, addition] = path.getValue().body;
-
- // The `fill` builder command expects an array of docs alternating with
- // line breaks. This is so it can loop through and determine where to break.
- const preds = fill(
- path.call(print, "body", 0).reduce((accum, pred, index) => {
- if (index === 0) {
- return [pred];
- }
-
- // Pull off the last element and make it concat with a comma so that
- // we can maintain alternating lines and docs.
- return accum
- .slice(0, -1)
- .concat([concat([accum[accum.length - 1], ","]), line, pred]);
- }, null)
- );
-
- const stmts = path.call(print, "body", 1);
- const parts = [concat(["when ", align("when ".length, preds)])];
-
- // It's possible in a when to just have empty void statements, in which case
- // we would skip adding the body.
- if (!stmts.parts.every((part) => !part)) {
- parts.push(indent(concat([hardline, stmts])));
- }
-
- // This is the next clause on the case statement, either another `when` or
- // an `else` clause.
- if (addition) {
- parts.push(hardline, path.call(print, "body", 2));
- }
-
- return group(concat(parts));
- }
-};
diff --git a/src/nodes/class.js b/src/nodes/class.js
deleted file mode 100644
index 0e7bcf9c..00000000
--- a/src/nodes/class.js
+++ /dev/null
@@ -1,74 +0,0 @@
-const {
- concat,
- group,
- hardline,
- ifBreak,
- indent,
- line
-} = require("../prettier");
-
-function printClass(path, opts, print) {
- const [_constant, superclass, bodystmt] = path.getValue().body;
- const stmts = bodystmt.body[0];
-
- const parts = ["class ", path.call(print, "body", 0)];
- if (superclass) {
- parts.push(" < ", path.call(print, "body", 1));
- }
-
- // If the body is empty and does not contain any comments, we can just
- // replace the body with a semi-colon.
- if (
- stmts.body.length === 1 &&
- stmts.body[0].type === "void_stmt" &&
- !stmts.body[0].comments
- ) {
- return group(concat([concat(parts), ifBreak(line, "; "), "end"]));
- }
-
- return group(
- concat([
- concat(parts),
- indent(concat([hardline, path.call(print, "body", 2)])),
- concat([hardline, "end"])
- ])
- );
-}
-
-function printModule(path, opts, print) {
- const declaration = group(concat(["module ", path.call(print, "body", 0)]));
-
- // If the body is empty, we can replace with a ;
- const stmts = path.getValue().body[1].body[0];
- if (
- stmts.body.length === 1 &&
- stmts.body[0].type === "void_stmt" &&
- !stmts.body[0].comments
- ) {
- return group(concat([declaration, ifBreak(line, "; "), "end"]));
- }
-
- return group(
- concat([
- declaration,
- indent(concat([hardline, path.call(print, "body", 1)])),
- concat([hardline, "end"])
- ])
- );
-}
-
-function printSClass(path, opts, print) {
- return group(
- concat([
- concat(["class << ", path.call(print, "body", 0)]),
- indent(concat([hardline, path.call(print, "body", 1)])),
- concat([hardline, "end"])
- ])
- );
-}
-
-module.exports = {
- class: printClass,
- module: printModule,
- sclass: printSClass
-};
diff --git a/src/nodes/commands.js b/src/nodes/commands.js
deleted file mode 100644
index d5df3ae9..00000000
--- a/src/nodes/commands.js
+++ /dev/null
@@ -1,91 +0,0 @@
-const {
- align,
- concat,
- group,
- ifBreak,
- indent,
- join,
- line,
- softline
-} = require("../prettier");
-const { docLength, makeCall } = require("../utils");
-
-const hasDef = (node) =>
- node.body[1].type === "args_add_block" &&
- node.body[1].body[0].type === "args" &&
- node.body[1].body[0].body[0] &&
- ["def", "defs"].includes(node.body[1].body[0].body[0].type);
-
-// Very special handling case for rspec matchers. In general with rspec matchers
-// you expect to see something like:
-//
-// expect(foo).to receive(:bar).with(
-// 'one',
-// 'two',
-// 'three',
-// 'four',
-// 'five'
-// )
-//
-// In this case the arguments are aligned to the left side as opposed to being
-// aligned with the `receive` call.
-const skipArgsAlign = (path) =>
- ["to", "not_to"].includes(path.getValue().body[2].body);
-
-// If there is a ternary argument to a command and it's going to get broken
-// into multiple lines, then we're going to have to use parentheses around the
-// command in order to make sure operator precedence doesn't get messed up.
-const hasTernaryArg = (path) =>
- path.getValue().body[1].body[0].body.some((node) => node.type === "ifop");
-
-module.exports = {
- command: (path, opts, print) => {
- const command = path.call(print, "body", 0);
- const joinedArgs = join(concat([",", line]), path.call(print, "body", 1));
-
- const hasTernary = hasTernaryArg(path);
- let breakArgs;
-
- if (hasTernary) {
- breakArgs = indent(concat([softline, joinedArgs]));
- } else if (hasDef(path.getValue())) {
- breakArgs = joinedArgs;
- } else {
- breakArgs = align(command.length + 1, joinedArgs);
- }
-
- return group(
- ifBreak(
- concat([
- command,
- hasTernary ? "(" : " ",
- breakArgs,
- hasTernary ? concat([softline, ")"]) : ""
- ]),
- concat([command, " ", joinedArgs])
- )
- );
- },
- command_call: (path, opts, print) => {
- const parts = [
- path.call(print, "body", 0),
- makeCall(path, opts, print),
- path.call(print, "body", 2)
- ];
-
- if (!path.getValue().body[3]) {
- return concat(parts);
- }
-
- parts.push(" ");
-
- const joinedArgs = join(concat([",", line]), path.call(print, "body", 3));
- const breakArgs = skipArgsAlign(path)
- ? joinedArgs
- : align(docLength(concat(parts)), joinedArgs);
-
- return group(
- ifBreak(concat(parts.concat(breakArgs)), concat(parts.concat(joinedArgs)))
- );
- }
-};
diff --git a/src/nodes/conditionals.js b/src/nodes/conditionals.js
deleted file mode 100644
index 61a2b1f9..00000000
--- a/src/nodes/conditionals.js
+++ /dev/null
@@ -1,280 +0,0 @@
-const {
- align,
- breakParent,
- concat,
- hardline,
- group,
- ifBreak,
- indent,
- softline
-} = require("../prettier");
-
-const { containsAssignment, isEmptyStmts } = require("../utils");
-const inlineEnsureParens = require("../utils/inlineEnsureParens");
-
-const printWithAddition = (keyword, path, print, { breaking = false } = {}) =>
- concat([
- `${keyword} `,
- align(keyword.length + 1, path.call(print, "body", 0)),
- indent(concat([softline, path.call(print, "body", 1)])),
- concat([softline, path.call(print, "body", 2)]),
- concat([softline, "end"]),
- breaking ? breakParent : ""
- ]);
-
-// For the unary `not` operator, we need to explicitly add parentheses to it in
-// order for it to be valid from within a ternary. Otherwise if the clause of
-// the ternary isn't a unary `not`, we can just pass it along.
-const printTernaryClause = (clause) => {
- if (clause.type === "concat") {
- const [part] = clause.parts;
-
- if (part.type === "concat" && part.parts[0] === "not") {
- // We are inside of a statements list and the statement is a unary `not`.
- return concat(["not(", part.parts[2], ")"]);
- }
-
- if (clause.parts[0] === "not") {
- // We are inside a ternary condition and the clause is a unary `not`.
- return concat(["not(", clause.parts[2], ")"]);
- }
- }
-
- return clause;
-};
-
-// The conditions for a ternary look like `foo : bar` where `foo` represents
-// the truthy clause and `bar` represents the falsy clause. In the case that the
-// parent node is an `unless`, these have to flip in order.
-const printTernaryClauses = (keyword, truthyClause, falsyClause) => {
- const parts = [
- printTernaryClause(truthyClause),
- " : ",
- printTernaryClause(falsyClause)
- ];
-
- return keyword === "if" ? parts : parts.reverse();
-};
-
-// Handles ternary nodes. If it does not fit on one line, then we break out into
-// an if/else statement. Otherwise we remain as a ternary.
-const printTernary = (path, _opts, print) => {
- const [predicate, truthyClause, falsyClause] = path.map(print, "body");
- const ternaryClauses = printTernaryClauses("if", truthyClause, falsyClause);
-
- return group(
- ifBreak(
- concat([
- "if ",
- align(3, predicate),
- indent(concat([softline, truthyClause])),
- concat([softline, "else"]),
- indent(concat([softline, falsyClause])),
- concat([softline, "end"])
- ]),
- concat([predicate, " ? "].concat(ternaryClauses))
- )
- );
-};
-
-// Prints an `if_mod` or `unless_mod` node. Because it was previously in the
-// modifier form, we're guaranteed to not have an additional node, so we can
-// just work with the predicate and the body.
-function printSingle(keyword, modifier = false) {
- return function printSingleWithKeyword(path, { rubyModifier }, print) {
- const [_predicateNode, statementsNode] = path.getValue().body;
- const predicateDoc = path.call(print, "body", 0);
- const statementsDoc = path.call(print, "body", 1);
-
- const multilineParts = [
- `${keyword} `,
- align(keyword.length + 1, predicateDoc),
- indent(concat([softline, statementsDoc])),
- softline,
- "end"
- ];
-
- // If we do not allow modifier form conditionals or there are comments
- // inside of the body of the conditional, then we must print in the
- // multiline form.
- if (!rubyModifier || (!modifier && statementsNode.body[0].comments)) {
- return concat([concat(multilineParts), breakParent]);
- }
-
- const inline = concat(
- inlineEnsureParens(path, [
- path.call(print, "body", 1),
- ` ${keyword} `,
- path.call(print, "body", 0)
- ])
- );
-
- // An expression with a conditional modifier (expression if true), the
- // conditional body is parsed before the predicate expression, meaning that
- // if the parser encountered a variable declaration, it would initialize
- // that variable first before evaluating the predicate expression. That
- // parse order means the difference between a NameError or not. #591
- // https://docs.ruby-lang.org/en/2.0.0/syntax/control_expressions_rdoc.html#label-Modifier+if+and+unless
- if (modifier && containsAssignment(statementsNode)) {
- return inline;
- }
-
- return group(ifBreak(concat(multilineParts), inline));
- };
-}
-
-const noTernary = [
- "alias",
- "assign",
- "break",
- "command",
- "command_call",
- "if_mod",
- "ifop",
- "lambda",
- "massign",
- "next",
- "opassign",
- "rescue_mod",
- "return",
- "return0",
- "super",
- "undef",
- "unless_mod",
- "until_mod",
- "var_alias",
- "void_stmt",
- "while_mod",
- "yield",
- "yield0",
- "zsuper"
-];
-
-// Certain expressions cannot be reduced to a ternary without adding parens
-// around them. In this case we say they cannot be ternaried and default instead
-// to breaking them into multiple lines.
-const canTernaryStmts = (stmts) => {
- if (stmts.body.length !== 1) {
- return false;
- }
-
- const stmt = stmts.body[0];
-
- // If the user is using one of the lower precedence "and" or "or" operators,
- // then we can't use a ternary expression as it would break the flow control.
- if (stmt.type === "binary" && ["and", "or"].includes(stmt.body[1])) {
- return false;
- }
-
- // Check against the blocklist of statement types that are not allowed to be
- // a part of a ternary expression.
- return !noTernary.includes(stmt.type);
-};
-
-// In order for an `if` or `unless` expression to be shortened to a ternary,
-// there has to be one and only one "addition" (another clause attached) which
-// is of the "else" type. Both the body of the main node and the body of the
-// additional node must have only one statement, and that statement list must
-// pass the `canTernaryStmts` check.
-const canTernary = (path) => {
- const [predicate, stmts, addition] = path.getValue().body;
-
- return (
- !["assign", "opassign", "command_call", "command"].includes(
- predicate.type
- ) &&
- addition &&
- addition.type === "else" &&
- [stmts, addition.body[0]].every(canTernaryStmts)
- );
-};
-
-// A normalized print function for both `if` and `unless` nodes.
-const printConditional = (keyword) => (path, { rubyModifier }, print) => {
- if (canTernary(path)) {
- let ternaryParts = [path.call(print, "body", 0), " ? "].concat(
- printTernaryClauses(
- keyword,
- path.call(print, "body", 1),
- path.call(print, "body", 2, "body", 0)
- )
- );
-
- if (["binary", "call"].includes(path.getParentNode().type)) {
- ternaryParts = ["("].concat(ternaryParts).concat(")");
- }
-
- return group(
- ifBreak(printWithAddition(keyword, path, print), concat(ternaryParts))
- );
- }
-
- const [predicate, statements, addition] = path.getValue().body;
-
- // If there's an additional clause that wasn't matched earlier, we know we
- // can't go for the inline option.
- if (addition) {
- return group(printWithAddition(keyword, path, print, { breaking: true }));
- }
-
- // If the body of the conditional is empty, then we explicitly have to use the
- // block form.
- if (isEmptyStmts(statements) && !statements.body[0].comments) {
- return concat([
- `${keyword} `,
- align(keyword.length + 1, path.call(print, "body", 0)),
- concat([hardline, "end"])
- ]);
- }
-
- // If the predicate of the conditional contains an assignment, then we can't
- // know for sure that it doesn't impact the body of the conditional, so we
- // have to default to the block form.
- if (containsAssignment(predicate)) {
- return concat([
- `${keyword} `,
- align(keyword.length + 1, path.call(print, "body", 0)),
- indent(concat([hardline, path.call(print, "body", 1)])),
- concat([hardline, "end"])
- ]);
- }
-
- return printSingle(keyword)(path, { rubyModifier }, print);
-};
-
-module.exports = {
- else: (path, opts, print) => {
- const stmts = path.getValue().body[0];
-
- return concat([
- stmts.body.length === 1 && stmts.body[0].type === "command"
- ? breakParent
- : "",
- "else",
- indent(concat([softline, path.call(print, "body", 0)]))
- ]);
- },
- elsif: (path, opts, print) => {
- const [_predicate, _statements, addition] = path.getValue().body;
- const parts = [
- group(
- concat([
- "elsif ",
- align("elsif".length - 1, path.call(print, "body", 0))
- ])
- ),
- indent(concat([hardline, path.call(print, "body", 1)]))
- ];
-
- if (addition) {
- parts.push(group(concat([hardline, path.call(print, "body", 2)])));
- }
-
- return group(concat(parts));
- },
- if: printConditional("if"),
- ifop: printTernary,
- if_mod: printSingle("if", true),
- unless: printConditional("unless"),
- unless_mod: printSingle("unless", true)
-};
diff --git a/src/nodes/constants.js b/src/nodes/constants.js
deleted file mode 100644
index 8dcca56a..00000000
--- a/src/nodes/constants.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const { concat, group, indent, join, softline } = require("../prettier");
-const { makeCall } = require("../utils");
-
-function printConstPath(path, opts, print) {
- return join("::", path.map(print, "body"));
-}
-
-function printConstRef(path, opts, print) {
- return path.call(print, "body", 0);
-}
-
-function printDefined(path, opts, print) {
- return group(
- concat([
- "defined?(",
- indent(concat([softline, path.call(print, "body", 0)])),
- concat([softline, ")"])
- ])
- );
-}
-
-function printField(path, opts, print) {
- return group(
- concat([
- path.call(print, "body", 0),
- concat([makeCall(path, opts, print), path.call(print, "body", 2)])
- ])
- );
-}
-
-function printTopConst(path, opts, print) {
- return concat(["::", path.call(print, "body", 0)]);
-}
-
-module.exports = {
- const_path_field: printConstPath,
- const_path_ref: printConstPath,
- const_ref: printConstRef,
- defined: printDefined,
- field: printField,
- top_const_field: printTopConst,
- top_const_ref: printTopConst
-};
diff --git a/src/nodes/flow.js b/src/nodes/flow.js
deleted file mode 100644
index c3fe3da8..00000000
--- a/src/nodes/flow.js
+++ /dev/null
@@ -1,74 +0,0 @@
-const { concat, join } = require("../prettier");
-const { literal } = require("../utils");
-
-const nodeDive = (node, steps) => {
- let current = node;
-
- steps.forEach((step) => {
- current = current[step];
- });
-
- return current;
-};
-
-const unskippableParens = [
- "if_mod",
- "rescue_mod",
- "unless_mod",
- "until_mod",
- "while_mod"
-];
-
-const maybeHandleParens = (path, print, keyword, steps) => {
- const node = nodeDive(path.getValue(), steps);
- if (node.type !== "paren") {
- return null;
- }
-
- const stmts = node.body[0].body;
- if (stmts.length === 1 && !unskippableParens.includes(stmts[0].type)) {
- return concat([
- `${keyword} `,
- path.call.apply(path, [print].concat(steps).concat("body", 0))
- ]);
- }
-
- return concat([keyword, path.call.apply(path, [print].concat(steps))]);
-};
-
-module.exports = {
- break: (path, opts, print) => {
- const content = path.getValue().body[0];
-
- if (content.body.length === 0) {
- return "break";
- }
-
- const steps = ["body", 0, "body", 0, "body", 0];
- return (
- maybeHandleParens(path, print, "break", steps) ||
- concat(["break ", join(", ", path.call(print, "body", 0))])
- );
- },
- next: (path, opts, print) => {
- const args = path.getValue().body[0].body[0];
-
- if (!args) {
- return "next";
- }
-
- const steps = ["body", 0, "body", 0, "body", 0];
- return (
- maybeHandleParens(path, print, "next", steps) ||
- concat(["next ", join(", ", path.call(print, "body", 0))])
- );
- },
- yield: (path, opts, print) => {
- if (path.getValue().body[0].type === "paren") {
- return concat(["yield", path.call(print, "body", 0)]);
- }
-
- return concat(["yield ", join(", ", path.call(print, "body", 0))]);
- },
- yield0: literal("yield")
-};
diff --git a/src/nodes/hashes.js b/src/nodes/hashes.js
deleted file mode 100644
index 8688bb14..00000000
--- a/src/nodes/hashes.js
+++ /dev/null
@@ -1,128 +0,0 @@
-const { concat, group, ifBreak, indent, join, line } = require("../prettier");
-
-const {
- getTrailingComma,
- prefix,
- printEmptyCollection,
- skipAssignIndent
-} = require("../utils");
-
-// When attempting to convert a hash rocket into a hash label, you need to take
-// care because only certain patterns are allowed. Ruby source says that they
-// have to match keyword arguments to methods, but don't specify what that is.
-// After some experimentation, it looks like it's:
-//
-// * Starts with a letter (either case) or an underscore
-// * Does not end in equal
-//
-// This function represents that check, as it determines if it can convert the
-// symbol node into a hash label.
-function isValidHashLabel(symbolLiteral) {
- const label = symbolLiteral.body[0].body;
- return label.match(/^[_A-Za-z]/) && !label.endsWith("=");
-}
-
-function canUseHashLabels(contentsNode) {
- return contentsNode.body.every((assocNode) => {
- if (assocNode.type === "assoc_splat") {
- return true;
- }
-
- switch (assocNode.body[0].type) {
- case "@label":
- return true;
- case "symbol_literal":
- return isValidHashLabel(assocNode.body[0]);
- case "dyna_symbol":
- return true;
- default:
- return false;
- }
- });
-}
-
-function printHashKeyLabel(path, print) {
- const node = path.getValue();
-
- switch (node.type) {
- case "@label":
- return print(path);
- case "symbol_literal":
- return concat([path.call(print, "body", 0), ":"]);
- case "dyna_symbol":
- return concat(print(path).parts.slice(1).concat(":"));
- }
-}
-
-function printHashKeyRocket(path, print) {
- const node = path.getValue();
- const doc = print(path);
-
- if (node.type === "@label") {
- return `:${doc.slice(0, doc.length - 1)} =>`;
- }
-
- return concat([doc, " =>"]);
-}
-
-function printAssocNew(path, opts, print) {
- const { keyPrinter } = path.getParentNode();
-
- const parts = [path.call((keyPath) => keyPrinter(keyPath, print), "body", 0)];
- const valueDoc = path.call(print, "body", 1);
-
- if (skipAssignIndent(path.getValue().body[1])) {
- parts.push(" ", valueDoc);
- } else {
- parts.push(indent(concat([line, valueDoc])));
- }
-
- return group(concat(parts));
-}
-
-function printHashContents(path, opts, print) {
- const node = path.getValue();
-
- // First determine which key printer we're going to use, so that the child
- // nodes can reference it when they go to get printed.
- node.keyPrinter =
- opts.rubyHashLabel && canUseHashLabels(path.getValue())
- ? printHashKeyLabel
- : printHashKeyRocket;
-
- return join(concat([",", line]), path.map(print, "body"));
-}
-
-function printHash(path, opts, print) {
- const hashNode = path.getValue();
-
- // Hashes normally have a single assoclist_from_args child node. If it's
- // missing, then it means we're dealing with an empty hash, so we can just
- // exit here and print.
- if (hashNode.body[0] === null) {
- return printEmptyCollection(path, opts, "{", "}");
- }
-
- return group(
- concat([
- "{",
- indent(
- concat([
- line,
- path.call(print, "body", 0),
- getTrailingComma(opts) ? ifBreak(",", "") : ""
- ])
- ),
- line,
- "}"
- ])
- );
-}
-
-module.exports = {
- assoc_new: printAssocNew,
- assoc_splat: prefix("**"),
- assoclist_from_args: printHashContents,
- bare_assoc_hash: printHashContents,
- hash: printHash
-};
diff --git a/src/nodes/heredocs.js b/src/nodes/heredocs.js
deleted file mode 100644
index 356bd032..00000000
--- a/src/nodes/heredocs.js
+++ /dev/null
@@ -1,34 +0,0 @@
-const { concat, group, lineSuffix, join } = require("../prettier");
-const { literalLineNoBreak } = require("../utils");
-
-function printHeredoc(path, opts, print) {
- const { body, ending } = path.getValue();
-
- const parts = body.map((part, index) => {
- if (part.type !== "@tstring_content") {
- // In this case, the part of the string is an embedded expression
- return path.call(print, "body", index);
- }
-
- // In this case, the part of the string is just regular string content
- return join(literalLineNoBreak, part.body.split("\n"));
- });
-
- // We use a literalline break because matching indentation is required
- // for the heredoc contents and ending. If the line suffix contains a
- // break-parent, all ancestral groups are broken, and heredocs automatically
- // break lines in groups they appear in. We prefer them to appear in-line if
- // possible, so we use a literalline without the break-parent.
- return group(
- concat([
- path.call(print, "beging"),
- lineSuffix(
- group(concat([literalLineNoBreak].concat(parts).concat(ending)))
- )
- ])
- );
-}
-
-module.exports = {
- heredoc: printHeredoc
-};
diff --git a/src/nodes/hooks.js b/src/nodes/hooks.js
deleted file mode 100644
index 58be9d57..00000000
--- a/src/nodes/hooks.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const { concat, group, indent, line } = require("../prettier");
-const { isEmptyStmts } = require("../utils");
-
-// The `BEGIN` and `END` keywords are used to hook into the Ruby process. Any
-// `BEGIN` blocks are executed right when the process starts up, and the `END`
-// blocks are executed right before exiting.
-//
-// BEGIN {
-// # content goes here
-// }
-//
-// END {
-// # content goes here
-// }
-//
-// Interesting side note, you don't use `do...end` blocks with these hooks. Both
-// nodes contain one child which is a `stmts` node.
-function printHook(name) {
- return function printHookWithName(path, opts, print) {
- const stmtsNode = path.getValue().body[1];
- const printedStmts = path.call(print, "body", 1);
-
- const parts = [
- name,
- " ",
- path.call(print, "body", 0),
- indent(concat([line, printedStmts])),
- concat([line, "}"])
- ];
-
- // If there are no statements but there are comments, then we want to skip
- // printing the newline so that we don't end up with multiple spaces.
- if (isEmptyStmts(stmtsNode) && stmtsNode.comments) {
- parts[1] = indent(printedStmts);
- }
-
- return group(concat(parts));
- };
-}
-
-module.exports = {
- BEGIN: printHook("BEGIN"),
- END: printHook("END")
-};
diff --git a/src/nodes/ints.js b/src/nodes/ints.js
deleted file mode 100644
index 6092546a..00000000
--- a/src/nodes/ints.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// An @int node is any literal integer in Ruby. They can come in a number of
-// bases, and look like the following:
-//
-// Binary (2) - 0b0110
-// Octal (8) - 0o34 or 034
-// Decimal (10) - a normal number like 159
-// Hexidecimal (16) - 0xac5
-//
-// If it's a decimal number, it can be optional separated by any number of
-// arbitrarily places underscores. This can be useful for dollars and cents
-// (34_99), dates (2020_11_30), and normal 3 digit separation (1_222_333).
-function printInt(path, _opts, _print) {
- const { body } = path.getValue();
-
- // If the number is a base 10 number, is sufficiently large, and is not
- // already formatted with underscores, then add them in in between the
- // numbers every three characters starting from the right.
- if (!body.startsWith("0") && body.length >= 5 && !body.includes("_")) {
- return ` ${body}`
- .slice((body.length + 2) % 3)
- .match(/.{3}/g)
- .join("_")
- .trim();
- }
-
- return body;
-}
-
-module.exports = {
- "@int": printInt
-};
diff --git a/src/nodes/lambdas.js b/src/nodes/lambdas.js
deleted file mode 100644
index 9beadbe8..00000000
--- a/src/nodes/lambdas.js
+++ /dev/null
@@ -1,76 +0,0 @@
-const { concat, group, ifBreak, indent, line } = require("../prettier");
-const { hasAncestor } = require("../utils");
-
-// We can have our params coming in as the first child of the main lambda node,
-// or if we have them wrapped in parens then they'll be one level deeper. Even
-// though it's possible to omit the parens if you only have one argument, we're
-// going to keep them in no matter what for consistency.
-function printLambdaParams(path, print) {
- let node = path.getValue().body[0];
-
- // In this case we had something like -> (foo) { bar } which would mean that
- // we're looking at a paren node, so we'll descend one level deeper to get at
- // the actual params node.
- if (node.type !== "params") {
- node = node.body[0];
- }
-
- // If we don't have any params at all, then we're just going to bail out and
- // print nothing. This is to avoid printing an empty set of parentheses.
- if (node.body.every((type) => !type)) {
- return "";
- }
-
- return path.call(print, "body", 0);
-}
-
-// Lambda nodes represent stabby lambda literals, which can come in a couple of
-// flavors. They can use either braces or do...end for their block, and their
-// arguments can be not present, have no parentheses for a single argument, or
-// have parentheses for multiple arguments. Below are a couple of examples:
-//
-// -> { 1 }
-// -> a { a + 1 }
-// ->(a) { a + 1 }
-// ->(a, b) { a + b }
-// ->(a, b = 1) { a + b }
-//
-// -> do
-// 1
-// end
-//
-// -> a do
-// a + 1
-// end
-//
-// ->(a, b) do
-// a + b
-// end
-//
-// Generally, we're going to favor do...end for the multi-line form and braces
-// for the single-line form. However, if we have an ancestor that is a command
-// or command_call node, then we'll need to use braces either way because of
-// operator precendence.
-function printLambda(path, opts, print) {
- const params = printLambdaParams(path, print);
- const inCommand = hasAncestor(path, ["command", "command_call"]);
-
- return group(
- ifBreak(
- concat([
- "->",
- params,
- " ",
- inCommand ? "{" : "do",
- indent(concat([line, path.call(print, "body", 1)])),
- line,
- inCommand ? "}" : "end"
- ]),
- concat(["->", params, " { ", path.call(print, "body", 1), " }"])
- )
- );
-}
-
-module.exports = {
- lambda: printLambda
-};
diff --git a/src/nodes/loops.js b/src/nodes/loops.js
deleted file mode 100644
index cf93167d..00000000
--- a/src/nodes/loops.js
+++ /dev/null
@@ -1,101 +0,0 @@
-const {
- align,
- breakParent,
- concat,
- group,
- hardline,
- ifBreak,
- indent,
- softline
-} = require("../prettier");
-
-const { containsAssignment } = require("../utils");
-const inlineEnsureParens = require("../utils/inlineEnsureParens");
-
-const printLoop = (keyword, modifier) => (path, { rubyModifier }, print) => {
- const [_predicate, stmts] = path.getValue().body;
-
- // If the only statement inside this while loop is a void statement, then we
- // can shorten to just displaying the predicate and then a semicolon.
- if (
- stmts.body.length === 1 &&
- stmts.body[0].type === "void_stmt" &&
- !stmts.body[0].comments
- ) {
- return group(
- concat([
- keyword,
- " ",
- path.call(print, "body", 0),
- ifBreak(softline, "; "),
- "end"
- ])
- );
- }
-
- const inlineLoop = concat(
- inlineEnsureParens(path, [
- path.call(print, "body", 1),
- ` ${keyword} `,
- path.call(print, "body", 0)
- ])
- );
-
- // If we're in the modifier form and we're modifying a `begin`, then this is a
- // special case where we need to explicitly use the modifier form because
- // otherwise the semantic meaning changes. This looks like:
- //
- // begin
- // foo
- // end while bar
- //
- // The above is effectively a `do...while` loop (which we don't have in ruby).
- if (modifier && path.getValue().body[1].type === "begin") {
- return inlineLoop;
- }
-
- const blockLoop = concat([
- concat([
- `${keyword} `,
- align(keyword.length + 1, path.call(print, "body", 0))
- ]),
- indent(concat([softline, path.call(print, "body", 1)])),
- concat([softline, "end"])
- ]);
-
- // If we're disallowing inline loops or if the predicate of the loop contains
- // an assignment (in which case we can't know for certain that that
- // assignment doesn't impact the statements inside the loop) then we can't
- // use the modifier form and we must use the block form.
- if (!rubyModifier || containsAssignment(path.getValue().body[0])) {
- return concat([breakParent, blockLoop]);
- }
-
- return group(ifBreak(blockLoop, inlineLoop));
-};
-
-// Technically this is incorrect. A `for` loop actually introduces and modifies
-// a local variable that then remains in the outer scope. Additionally, if the
-// `each` method was somehow missing from the enumerable (it's possible...),
-// then this transformation would fail. However - I've never actually seen a
-// `for` loop used in production. If someone actually calls me on it, I'll fix
-// this, but for now I'm leaving it.
-const printFor = (path, opts, print) =>
- group(
- concat([
- path.call(print, "body", 1),
- ".each do |",
- path.call(print, "body", 0),
- "|",
- indent(concat([hardline, path.call(print, "body", 2)])),
- concat([hardline, "end"])
- ])
- );
-
-module.exports = {
- while: printLoop("while", false),
- while_mod: printLoop("while", true),
- until: printLoop("until", false),
- until_mod: printLoop("until", true),
- for: printFor
-};
diff --git a/src/nodes/massign.js b/src/nodes/massign.js
deleted file mode 100644
index 6e37c642..00000000
--- a/src/nodes/massign.js
+++ /dev/null
@@ -1,91 +0,0 @@
-const { concat, group, indent, join, line, softline } = require("../prettier");
-
-function printMAssign(path, opts, print) {
- let right = path.call(print, "body", 1);
-
- if (
- ["mrhs_add_star", "mrhs_new_from_args"].includes(
- path.getValue().body[1].type
- )
- ) {
- right = group(join(concat([",", line]), right));
- }
-
- const parts = [join(concat([",", line]), path.call(print, "body", 0))];
- if (path.getValue().body[0].comma) {
- parts.push(",");
- }
-
- return group(
- concat([group(concat(parts)), " =", indent(concat([line, right]))])
- );
-}
-
-function printMLHS(path, opts, print) {
- return path.map(print, "body");
-}
-
-function printMLHSAddPost(path, opts, print) {
- return path.call(print, "body", 0).concat(path.call(print, "body", 1));
-}
-
-function printMLHSAddStar(path, opts, print) {
- const rightParts = ["*"];
-
- if (path.getValue().body[1]) {
- rightParts.push(path.call(print, "body", 1));
- }
-
- return path.call(print, "body", 0).concat(concat(rightParts));
-}
-
-function printMLHSParen(path, opts, print) {
- if (["massign", "mlhs_paren"].includes(path.getParentNode().type)) {
- // If we're nested in brackets as part of the left hand side of an
- // assignment, i.e., (a, b, c) = 1, 2, 3
- // ignore the current node and just go straight to the content
- return path.call(print, "body", 0);
- }
-
- const parts = [
- softline,
- join(concat([",", line]), path.call(print, "body", 0))
- ];
-
- if (path.getValue().body[0].comma) {
- parts.push(",");
- }
-
- return group(concat(["(", indent(concat(parts)), concat([softline, ")"])]));
-}
-
-function printMRHS(path, opts, print) {
- return path.map(print, "body");
-}
-
-function printMRHSAddStar(path, opts, print) {
- const [leftDoc, rightDoc] = path.map(print, "body");
-
- return leftDoc.concat([concat(["*", rightDoc])]);
-}
-
-function printMRHSNewFromArgs(path, opts, print) {
- const parts = path.call(print, "body", 0);
-
- if (path.getValue().body[1]) {
- parts.push(path.call(print, "body", 1));
- }
-
- return parts;
-}
-
-module.exports = {
- massign: printMAssign,
- mlhs: printMLHS,
- mlhs_add_post: printMLHSAddPost,
- mlhs_add_star: printMLHSAddStar,
- mlhs_paren: printMLHSParen,
- mrhs: printMRHS,
- mrhs_add_star: printMRHSAddStar,
- mrhs_new_from_args: printMRHSNewFromArgs
-};
diff --git a/src/nodes/methods.js b/src/nodes/methods.js
deleted file mode 100644
index bd63be3a..00000000
--- a/src/nodes/methods.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const { concat, group, hardline, indent } = require("../prettier");
-const { first } = require("../utils");
-
-function printMethod(offset) {
- return function printMethodWithOffset(path, opts, print) {
- const [_name, params, body] = path.getValue().body.slice(offset);
- const declaration = ["def "];
-
- // In this case, we're printing a method that's defined as a singleton, so
- // we need to include the target and the operator
- if (offset > 0) {
- declaration.push(
- path.call(print, "body", 0),
- path.call(print, "body", 1)
- );
- }
-
- // In case there are no parens but there are arguments
- const parens =
- params.type === "params" && params.body.some((paramType) => paramType);
-
- declaration.push(
- path.call(print, "body", offset),
- parens ? "(" : "",
- path.call(print, "body", offset + 1),
- parens ? ")" : ""
- );
-
- // If the body is empty, we can replace with a ;
- const stmts = body.body[0].body;
-
- if (
- !body.body.slice(1).some((node) => node) &&
- stmts.length === 1 &&
- stmts[0].type === "void_stmt" &&
- !stmts[0].comments
- ) {
- return group(concat(declaration.concat(["; end"])));
- }
-
- return group(
- concat([
- group(concat(declaration)),
- indent(concat([hardline, path.call(print, "body", offset + 2)])),
- group(concat([hardline, "end"]))
- ])
- );
- };
-}
-
-module.exports = {
- access_ctrl: first,
- def: printMethod(0),
- defs: printMethod(2)
-};
diff --git a/src/nodes/operators.js b/src/nodes/operators.js
deleted file mode 100644
index 3b99651b..00000000
--- a/src/nodes/operators.js
+++ /dev/null
@@ -1,83 +0,0 @@
-const { concat, group, indent, line, softline } = require("../prettier");
-const { noIndent } = require("../utils");
-
-function printBinary(path, opts, print) {
- const [_leftNode, operator, rightNode] = path.getValue().body;
- const space = operator === "**" ? "" : " ";
-
- if (noIndent.includes(rightNode.type)) {
- return group(
- concat([
- group(path.call(print, "body", 0)),
- space,
- operator,
- space,
- group(path.call(print, "body", 2))
- ])
- );
- }
-
- return group(
- concat([
- group(path.call(print, "body", 0)),
- space,
- group(
- indent(
- concat([
- operator,
- space === "" ? softline : line,
- path.call(print, "body", 2)
- ])
- )
- )
- ])
- );
-}
-
-// dot2 nodes are used with ranges (or flip-flops). They can optionally drop
-// their left side for beginless ranges or their right side for endless ranges.
-function printDot2(path, opts, print) {
- const [leftNode, rightNode] = path.getValue().body;
-
- return concat([
- leftNode ? path.call(print, "body", 0) : "",
- "..",
- rightNode ? path.call(print, "body", 1) : ""
- ]);
-}
-
-// dot3 nodes are used with ranges (or flip-flops). They can optionally drop
-// their left side for beginless ranges or their right side for endless ranges.
-function printDot3(path, opts, print) {
- const [leftNode, rightNode] = path.getValue().body;
-
- return concat([
- leftNode ? path.call(print, "body", 0) : "",
- "...",
- rightNode ? path.call(print, "body", 1) : ""
- ]);
-}
-
-function printUnary(path, opts, print) {
- const node = path.getValue();
- const contentsDoc = path.call(print, "body", 0);
-
- if (node.oper === "not") {
- // Here we defer to the original source, as it's kind of difficult to
- // determine if we can actually remove the parentheses being used.
- if (node.paren) {
- return concat(["not", "(", contentsDoc, ")"]);
- } else {
- return concat(["not", " ", contentsDoc]);
- }
- }
-
- return concat([node.oper, contentsDoc]);
-}
-
-module.exports = {
- binary: printBinary,
- dot2: printDot2,
- dot3: printDot3,
- unary: printUnary
-};
diff --git a/src/nodes/params.js b/src/nodes/params.js
deleted file mode 100644
index 4aa498be..00000000
--- a/src/nodes/params.js
+++ /dev/null
@@ -1,98 +0,0 @@
-const { concat, group, join, indent, line, softline } = require("../prettier");
-const { literal } = require("../utils");
-
-function printRestParam(symbol) {
- return function printRestParamWithSymbol(path, opts, print) {
- return path.getValue().body[0]
- ? concat([symbol, path.call(print, "body", 0)])
- : symbol;
- };
-}
-
-function printParams(path, opts, print) {
- const [
- reqs,
- optls,
- rest,
- post,
- kwargs,
- kwargRest,
- block
- ] = path.getValue().body;
- let parts = [];
-
- if (reqs) {
- parts = parts.concat(path.map(print, "body", 0));
- }
-
- if (optls) {
- parts = parts.concat(
- optls.map((_, index) =>
- concat([
- path.call(print, "body", 1, index, 0),
- " = ",
- path.call(print, "body", 1, index, 1)
- ])
- )
- );
- }
-
- if (rest && rest.type !== "excessed_comma") {
- parts.push(path.call(print, "body", 2));
- }
-
- if (post) {
- parts = parts.concat(path.map(print, "body", 3));
- }
-
- if (kwargs) {
- parts = parts.concat(
- kwargs.map(([, value], index) => {
- if (!value) {
- return path.call(print, "body", 4, index, 0);
- }
- return group(join(" ", path.map(print, "body", 4, index)));
- })
- );
- }
-
- if (kwargRest) {
- parts.push(kwargRest === "nil" ? "**nil" : path.call(print, "body", 5));
- }
-
- if (block) {
- parts.push(path.call(print, "body", 6));
- }
-
- const contents = [join(concat([",", line]), parts)];
-
- // You can put an extra comma at the end of block args between pipes to
- // change what it does. Below is the difference:
- //
- // [[1, 2], [3, 4]].each { |x| p x } # prints [1, 2] then [3, 4]
- // [[1, 2], [3, 4]].each { |x,| p x } # prints 1 then 3
- //
- // In ruby 2.5, the excessed comma is indicated by having a 0 in the rest
- // param position. In ruby 2.6+ it's indicated by having an "excessed_comma"
- // node in the rest position. Seems odd, but it's true.
- if (rest === 0 || (rest && rest.type === "excessed_comma")) {
- contents.push(",");
- }
-
- // If the parent node is a paren then we skipped printing the parentheses so
- // that we could handle them here and get nicer formatting.
- if (["lambda", "paren"].includes(path.getParentNode().type)) {
- return group(
- concat(["(", indent(concat([softline].concat(contents))), softline, ")"])
- );
- }
-
- return group(concat(contents));
-}
-
-module.exports = {
- args_forward: literal("..."),
- kwrest_param: printRestParam("**"),
- rest_param: printRestParam("*"),
- params: printParams
-};
diff --git a/src/nodes/patterns.js b/src/nodes/patterns.js
deleted file mode 100644
index e88141d5..00000000
--- a/src/nodes/patterns.js
+++ /dev/null
@@ -1,118 +0,0 @@
-const { concat, group, hardline, indent, join, line } = require("../prettier");
-
-function printPatternArg(path, opts, print) {
- // Pinning is a really special syntax in pattern matching that's not really
- // all that well supported in ripper. Here we're just going to the original
- // source to see if the variable is pinned.
- if (
- opts.originalText &&
- opts.originalText[opts.locStart(path.getValue()) - 1] === "^"
- ) {
- return concat(["^", path.call(print)]);
- }
-
- return path.call(print);
-}
-
-function printAryPtn(path, opts, print) {
- const [constant, preargs, splatarg, postargs] = path.getValue().body;
- let args = [];
-
- if (preargs) {
- args = args.concat(
- path.map((argPath) => printPatternArg(argPath, opts, print), "body", 1)
- );
- }
-
- if (splatarg) {
- args.push(concat(["*", path.call(print, "body", 2)]));
- }
-
- if (postargs) {
- args = args.concat(path.map(print, "body", 3));
- }
-
- args = group(join(concat([",", line]), args));
-
- if (
- constant ||
- ["aryptn", "binary", "hshptn"].includes(path.getParentNode().type)
- ) {
- args = concat(["[", args, "]"]);
- }
-
- if (constant) {
- return concat([path.call(print, "body", 0), args]);
- }
-
- return args;
-}
-
-function printHshPtn(path, opts, print) {
- const [constant, keyValuePairs, keyValueRest] = path.getValue().body;
- let args = [];
-
- if (keyValuePairs) {
- const printPair = (pairPath) => {
- const parts = [pairPath.call(print, 0)];
-
- if (pairPath.getValue()[1]) {
- parts.push(
- " ",
- pairPath.call(
- (pairValuePath) => printPatternArg(pairValuePath, opts, print),
- 1
- )
- );
- }
-
- return concat(parts);
- };
-
- args = args.concat(path.map(printPair, "body", 1));
- }
-
- if (keyValueRest) {
- args.push(concat(["**", path.call(print, "body", 2)]));
- }
-
- args = group(join(concat([",", line]), args));
-
- if (constant) {
- args = concat(["[", args, "]"]);
- } else if (
- ["aryptn", "binary", "hshptn"].includes(path.getParentNode().type)
- ) {
- args = concat(["{", args, "}"]);
- }
-
- if (constant) {
- return concat([path.call(print, "body", 0), args]);
- }
-
- return args;
-}
-
-function printIn(path, opts, print) {
- const parts = [
- "in ",
- path.call(
- (valuePath) => printPatternArg(valuePath, opts, print),
- "body",
- 0
- ),
- indent(concat([hardline, path.call(print, "body", 1)]))
- ];
-
- if (path.getValue().body[2]) {
- parts.push(hardline, path.call(print, "body", 2));
- }
-
- return group(concat(parts));
-}
-
-module.exports = {
- aryptn: printAryPtn,
- hshptn: printHshPtn,
- in: printIn
-};
diff --git a/src/nodes/regexp.js b/src/nodes/regexp.js
deleted file mode 100644
index 39927ab6..00000000
--- a/src/nodes/regexp.js
+++ /dev/null
@@ -1,49 +0,0 @@
-const { concat } = require("../prettier");
-const { hasAncestor } = require("../utils");
-
-function isStringContent(node) {
- return node.type === "@tstring_content";
-}
-
-function shouldUseBraces(path) {
- const node = path.getValue();
- const first = node.body[0];
-
- // If the first part of this regex is plain string content and we have a
- // space or an =, then we want to use braces because otherwise we could end up
- // with an ambiguous operator, e.g. foo / bar/ or foo /=bar/
- if (
- first &&
- isStringContent(first) &&
- [" ", "="].includes(first.body[0]) &&
- hasAncestor(path, ["command", "command_call"])
- ) {
- return true;
- }
-
- return node.body.some(
- (child) => isStringContent(child) && child.body.includes("/")
- );
-}
-
-// This function is responsible for printing out regexp_literal nodes. They can
-// either use the special %r literal syntax or they can use forward slashes. At
-// the end of either of those they can have modifiers like m or x that have
-// special meaning for the regex engine.
-//
-// We favor the use of forward slashes unless the regex contains a forward slash
-// itself. In that case we switch over to using %r with braces.
-function printRegexpLiteral(path, opts, print) {
- const node = path.getValue();
- const useBraces = shouldUseBraces(path);
-
- const parts = [useBraces ? "%r{" : "/"]
- .concat(path.map(print, "body"))
- .concat([useBraces ? "}" : "/", node.ending.slice(1)]);
-
- return concat(parts);
-}
-
-module.exports = {
- regexp_literal: printRegexpLiteral
-};
diff --git a/src/nodes/rescue.js b/src/nodes/rescue.js
deleted file mode 100644
index 76948f4a..00000000
--- a/src/nodes/rescue.js
+++ /dev/null
@@ -1,94 +0,0 @@
-const {
- align,
- concat,
- group,
- hardline,
- indent,
- join,
- line
-} = require("../prettier");
-const { literal } = require("../utils");
-
-function printBegin(path, opts, print) {
- return concat([
- "begin",
- indent(concat([hardline, concat(path.map(print, "body"))])),
- hardline,
- "end"
- ]);
-}
-
-function printEnsure(path, opts, print) {
- return concat([
- path.call(print, "body", 0),
- indent(concat([hardline, path.call(print, "body", 1)]))
- ]);
-}
-
-function printRescue(path, opts, print) {
- const [exception, variable, _stmts, addition] = path.getValue().body;
- const parts = ["rescue"];
-
- if (exception || variable) {
- if (exception) {
- if (Array.isArray(exception)) {
- // In this case, it's actually only the one exception (it's an array
- // of length 1).
- parts.push(" ", path.call(print, "body", 0, 0));
- } else {
- // Here we have multiple exceptions from which we're rescuing, so we
- // need to align them and join them together.
- const joiner = concat([",", line]);
- const exceptions = group(join(joiner, path.call(print, "body", 0)));
-
- parts.push(" ", align("rescue ".length, exceptions));
- }
- }
-
- if (variable) {
- parts.push(" => ", path.call(print, "body", 1));
- }
- } else {
- // If you don't specify an error to rescue in a `begin/rescue` block, then
- // implicitly you're rescuing from `StandardError`. In this case, we're
- // just going to explicitly add it.
- parts.push(" StandardError");
- }
-
- const rescueBody = path.call(print, "body", 2);
-
- if (rescueBody.parts.length > 0) {
- parts.push(indent(concat([hardline, rescueBody])));
- }
-
- // This is the next clause on the `begin` statement, either another
- // `rescue`, and `ensure`, or an `else` clause.
- if (addition) {
- parts.push(concat([hardline, path.call(print, "body", 3)]));
- }
-
- return group(concat(parts));
-}
-
-function printRescueMod(path, opts, print) {
- const [statementDoc, valueDoc] = path.map(print, "body");
-
- return concat([
- "begin",
- indent(concat([hardline, statementDoc])),
- hardline,
- "rescue StandardError",
- indent(concat([hardline, valueDoc])),
- hardline,
- "end"
- ]);
-}
-
-module.exports = {
- begin: printBegin,
- ensure: printEnsure,
- redo: literal("redo"),
- rescue: printRescue,
- rescue_mod: printRescueMod,
- retry: literal("retry")
-};
diff --git a/src/nodes/return.js b/src/nodes/return.js
deleted file mode 100644
index 749ce75c..00000000
--- a/src/nodes/return.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const {
- concat,
- group,
- ifBreak,
- indent,
- line,
- join,
- softline
-} = require("../prettier");
-const { literal } = require("../utils");
-
-// You can't skip the parentheses if you have the `and` or `or` operator,
-// because they have low enough operator precedence that you need to explicitly
-// keep them in there.
-const canSkipParens = (args) => {
- const statement = args.body[0].body[0].body[0];
- return (
- statement.type !== "binary" || !["and", "or"].includes(statement.body[1])
- );
-};
-
-const printReturn = (path, opts, print) => {
- let args = path.getValue().body[0].body[0];
- let steps = ["body", 0, "body", 0];
-
- if (!args) {
- return "return";
- }
-
- // If the body of the return contains parens, then just skip directly to the
- // content of the parens so that we can skip printing parens if we don't
- // want them.
- if (args.body[0] && args.body[0].type === "paren" && canSkipParens(args)) {
- args = args.body[0].body[0];
- steps = steps.concat("body", 0, "body", 0);
- }
-
- // If we're returning an array literal that isn't a special array, single
- // element array, or an empty array, then we want to grab the arguments so
- // that we can print them out as if they were normal return arguments.
- if (
- args.body[0] &&
- args.body[0].type === "array" &&
- args.body[0].body[0] &&
- args.body[0].body[0].body.length > 1 &&
- ["args", "args_add_star"].includes(args.body[0].body[0].type)
- ) {
- steps = steps.concat("body", 0, "body", 0);
- }
-
- // Now that we've established which actual node is the arguments to return,
- // we grab it out of the path by diving down the steps that we've set up.
- const parts = path.call.apply(path, [print].concat(steps));
-
- // If we got the value straight out of the parens, then `parts` would only
- // be a singular doc as opposed to an array.
- const value = Array.isArray(parts) ? join(concat([",", line]), parts) : parts;
-
- return group(
- concat([
- "return",
- ifBreak(parts.length > 1 ? " [" : "(", " "),
- indent(concat([softline, value])),
- concat([softline, ifBreak(parts.length > 1 ? "]" : ")", "")])
- ])
- );
-};
-
-module.exports = {
- return: printReturn,
- return0: literal("return")
-};
diff --git a/src/nodes/statements.js b/src/nodes/statements.js
deleted file mode 100644
index e255b9b1..00000000
--- a/src/nodes/statements.js
+++ /dev/null
@@ -1,144 +0,0 @@
-const {
- breakParent,
- concat,
- dedent,
- group,
- hardline,
- indent,
- join,
- line,
- literalline,
- softline,
- trim
-} = require("../prettier");
-
-function printBodyStmt(path, opts, print) {
- const [stmts, rescue, elseClause, ensure] = path.getValue().body;
- const parts = [];
-
- if (
- stmts.body.length > 1 ||
- stmts.body[0].type != "void_stmt" ||
- stmts.body[0].comments
- ) {
- parts.push(path.call(print, "body", 0));
- }
-
- if (rescue) {
- parts.push(dedent(concat([hardline, path.call(print, "body", 1)])));
- }
-
- if (elseClause) {
- // Before Ruby 2.6, this piece of bodystmt was an explicit "else" node
- const stmts =
- elseClause.type === "else"
- ? path.call(print, "body", 2, "body", 0)
- : path.call(print, "body", 2);
-
- parts.push(concat([dedent(concat([hardline, "else"])), hardline, stmts]));
- }
-
- if (ensure) {
- parts.push(dedent(concat([hardline, path.call(print, "body", 3)])));
- }
-
- return group(concat(parts));
-}
-
-const argNodeTypes = ["args", "args_add_star", "args_add_block"];
-
-function printParen(path, opts, print) {
- const contentNode = path.getValue().body[0];
-
- if (!contentNode) {
- return "()";
- }
-
- let contentDoc = path.call(print, "body", 0);
-
- // If the content is params, we're going to let it handle its own parentheses
- // so that it breaks nicely.
- if (contentNode.type === "params") {
- return contentDoc;
- }
-
- // If we have an arg type node as the contents, then it's going to return an
- // array, so we need to explicitly join that content here.
- if (argNodeTypes.includes(contentNode.type)) {
- contentDoc = join(concat([",", line]), contentDoc);
- }
-
- return group(
- concat([
- "(",
- indent(concat([softline, contentDoc])),
- concat([softline, ")"])
- ])
- );
-}
-
-module.exports = {
- "@__end__": (path, _opts, _print) => {
- const { body } = path.getValue();
- return concat([trim, "__END__", literalline, body]);
- },
- bodystmt: printBodyStmt,
- paren: printParen,
- program: (path, opts, print) =>
- concat([join(hardline, path.map(print, "body")), hardline]),
- stmts: (path, opts, print) => {
- const stmts = path.getValue().body;
-
- // This is a special case where we have only comments inside a statement
- // list. In this case we want to avoid doing any kind of line number
- // tracking and just print out the comments.
- if (
- stmts.length === 1 &&
- stmts[0].type === "void_stmt" &&
- stmts[0].comments
- ) {
- const comments = path.map(
- (commentPath) => {
- commentPath.getValue().printed = true;
- return opts.printer.printComment(commentPath);
- },
- "body",
- 0,
- "comments"
- );
-
- return concat([breakParent, join(hardline, comments)]);
- }
-
- const parts = [];
- let lineNo = null;
-
- stmts.forEach((stmt, index) => {
- if (stmt.type === "void_stmt") {
- return;
- }
-
- const printed = path.call(print, "body", index);
-
- if (lineNo === null) {
- parts.push(printed);
- } else if (
- stmt.start - lineNo > 1 ||
- [stmt.type, stmts[index - 1].type].includes("access_ctrl")
- ) {
- parts.push(hardline, hardline, printed);
- } else if (
- stmt.start !== lineNo ||
- path.getParentNode().type !== "string_embexpr"
- ) {
- parts.push(hardline, printed);
- } else {
- parts.push("; ", printed);
- }
-
- lineNo = stmt.end;
- });
-
- return concat(parts);
- }
-};
diff --git a/src/nodes/strings.js b/src/nodes/strings.js
deleted file mode 100644
index 8f3493a8..00000000
--- a/src/nodes/strings.js
+++ /dev/null
@@ -1,185 +0,0 @@
-const {
- concat,
- group,
- hardline,
- indent,
- literalline,
- softline,
- join
-} = require("../prettier");
-
-// If there is some part of this string that matches an escape sequence or that
-// contains the interpolation pattern ("#{"), then we are locked into whichever
-// quote the user chose. (If they chose single quotes, then double quoting
-// would activate the escape sequence, and if they chose double quotes, then
-// single quotes would deactivate it.)
-function isQuoteLocked(node) {
- return node.body.some(
- (part) =>
- part.type === "@tstring_content" &&
- (part.body.includes("#{") || part.body.includes("\\"))
- );
-}
-
-// A string is considered to be able to use single quotes if it contains only
-// plain string content and that content does not contain a single quote.
-function isSingleQuotable(node) {
- return node.body.every(
- (part) => part.type === "@tstring_content" && !part.body.includes("'")
- );
-}
-
-const quotePattern = new RegExp("\\\\([\\s\\S])|(['\"])", "g");
-
-function normalizeQuotes(content, enclosingQuote, originalQuote) {
- const replaceOther = originalQuote === '"';
- const otherQuote = enclosingQuote === '"' ? "'" : '"';
-
- // Escape and unescape single and double quotes as needed to be able to
- // enclose `content` with `enclosingQuote`.
- return content.replace(quotePattern, (match, escaped, quote) => {
- if (replaceOther && escaped === otherQuote) {
- return escaped;
- }
-
- if (quote === enclosingQuote) {
- return `\\${quote}`;
- }
-
- if (quote) {
- return quote;
- }
-
- return `\\${escaped}`;
- });
-}
-
-const quotePairs = {
- "(": ")",
- "[": "]",
- "{": "}",
- "<": ">"
-};
-
-function getClosingQuote(quote) {
- if (!quote.startsWith("%")) {
- return quote;
- }
-
- const boundary = /%[Qq]?(.)/.exec(quote)[1];
- if (boundary in quotePairs) {
- return quotePairs[boundary];
- }
-
- return boundary;
-}
-
-// Prints a @CHAR node. @CHAR nodes are special character strings that usually
-// are strings of length 1. If they're any longer than we'll try to apply the
-// correct quotes.
-function printChar(path, { rubySingleQuote }, _print) {
- const { body } = path.getValue();
-
- if (body.length !== 2) {
- return body;
- }
-
- const quote = rubySingleQuote ? "'" : '"';
- return concat([quote, body.slice(1), quote]);
-}
-
-// Prints a dynamic symbol. Assumes there's a quote property attached to the
-// node that will tell us which quote to use when printing. We're just going to
-// use whatever quote was provided.
-function printDynaSymbol(path, opts, print) {
- const { quote } = path.getValue();
-
- return concat([":", quote].concat(path.map(print, "body")).concat(quote));
-}
-
-// Prints out an interpolated variable in the string by converting it into an
-// embedded expression.
-function printStringDVar(path, opts, print) {
- return concat(["#{", path.call(print, "body", 0), "}"]);
-}
-
-// Prints out a literal string. This function does its best to respect the
-// wishes of the user with regards to single versus double quotes, but if the
-// string contains any escape expressions then it will just keep the original
-// quotes.
-function printStringLiteral(path, { rubySingleQuote }, print) {
- const node = path.getValue();
-
- // If the string is empty, it will not have any parts, so just print out the
- // quotes corresponding to the config
- if (node.body.length === 0) {
- return rubySingleQuote ? "''" : '""';
- }
-
- // Determine the quote that should enclose the new string
- let quote;
- if (isQuoteLocked(node)) {
- quote = node.quote;
- } else {
- quote = rubySingleQuote && isSingleQuotable(node) ? "'" : '"';
- }
-
- const parts = node.body.map((part, index) => {
- if (part.type !== "@tstring_content") {
- // In this case, the part of the string is an embedded expression
- return path.call(print, "body", index);
- }
-
- // In this case, the part of the string is just regular string content
- return join(
- literalline,
- normalizeQuotes(part.body, quote, node.quote).split("\n")
- );
- });
-
- return concat([quote].concat(parts).concat(getClosingQuote(quote)));
-}
-
-// Prints out a symbol literal. Its child will always be the ident that
-// represents the string content of the symbol.
-function printSymbolLiteral(path, opts, print) {
- return concat([":", path.call(print, "body", 0)]);
-}
-
-// Prints out an xstring literal. Its child is an array of string parts,
-// including plain string content and interpolated content.
-function printXStringLiteral(path, opts, print) {
- return concat(["`"].concat(path.map(print, "body")).concat("`"));
-}
-
-module.exports = {
- "@CHAR": printChar,
- dyna_symbol: printDynaSymbol,
- string_concat: (path, opts, print) =>
- group(
- concat([
- path.call(print, "body", 0),
- " \\",
- indent(concat([hardline, path.call(print, "body", 1)]))
- ])
- ),
- string_dvar: printStringDVar,
- string_embexpr: (path, opts, print) => {
- const parts = path.call(print, "body", 0);
-
- // If the interpolated expression is inside of a heredoc or an xstring
- // literal (a string that gets sent to the command line) then we don't want
- // to automatically indent, as this can lead to some very odd looking
- // expressions
- if (["heredoc", "xstring_literal"].includes(path.getParentNode().type)) {
- return concat(["#{", parts, "}"]);
- }
-
- return group(
- concat(["#{", indent(concat([softline, parts])), concat([softline, "}"])])
- );
- },
- string_literal: printStringLiteral,
- symbol_literal: printSymbolLiteral,
- xstring_literal: printXStringLiteral
-};
diff --git a/src/nodes/super.js b/src/nodes/super.js
deleted file mode 100644
index d189dbd7..00000000
--- a/src/nodes/super.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const { align, concat, group, join, line } = require("../prettier");
-const { literal } = require("../utils");
-
-function printSuper(path, opts, print) {
- const args = path.getValue().body[0];
-
- if (args.type === "arg_paren") {
- // In case there are explicitly no arguments but they are using parens,
- // we assume they are attempting to override the initializer and pass no
- // arguments up.
- if (args.body[0] === null) {
- return "super()";
- }
-
- return concat(["super", path.call(print, "body", 0)]);
- }
-
- const keyword = "super ";
- const argsDocs = path.call(print, "body", 0);
-
- return group(
- concat([
- keyword,
- align(keyword.length, group(join(concat([",", line]), argsDocs)))
- ])
- );
-}
-
-// Version of super without any parens or args.
-const printZSuper = literal("super");
-
-module.exports = {
- super: printSuper,
- zsuper: printZSuper
-};
diff --git a/src/nodes/undef.js b/src/nodes/undef.js
deleted file mode 100644
index 63ef092c..00000000
--- a/src/nodes/undef.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const {
- addTrailingComment,
- align,
- concat,
- group,
- join,
- line
-} = require("../prettier");
-
-function printUndefSymbol(path, opts, print) {
- const node = path.getValue();
-
- // Since we're going to descend into the symbol literal to grab out the ident
- // node, then we need to make sure we copy over any comments as well,
- // otherwise we could accidentally skip printing them.
- if (node.comments) {
- node.comments.forEach((comment) => {
- addTrailingComment(node.body[0], comment);
- });
- }
-
- return path.call(print, "body", 0);
-}
-
-function printUndef(path, opts, print) {
- const keyword = "undef ";
- const argNodes = path.map(
- (symbolPath) => printUndefSymbol(symbolPath, opts, print),
- "body"
- );
-
- return group(
- concat([
- keyword,
- align(keyword.length, join(concat([",", line]), argNodes))
- ])
- );
-}
-
-module.exports = {
- undef: printUndef
-};
diff --git a/src/parser.js b/src/parser.js
deleted file mode 100644
index 28efd366..00000000
--- a/src/parser.js
+++ /dev/null
@@ -1,86 +0,0 @@
-const { spawnSync } = require("child_process");
-const path = require("path");
-
-// In order to properly parse ruby code, we need to tell the ruby process to
-// parse using UTF-8. Unfortunately, the way that you accomplish this looks
-// differently depending on your platform.
-const LANG = (() => {
- const { env, platform } = process;
- const envValue = env.LC_ALL || env.LC_CTYPE || env.LANG;
-
- // If an env var is set for the locale that already includes UTF-8 in the
- // name, then assume we can go with that.
- if (envValue && envValue.includes("UTF-8")) {
- return envValue;
- }
-
- // Otherwise, we're going to guess which encoding to use based on the system.
- // This is probably not the best approach in the world, as you could be on
- // linux and not have C.UTF-8, but in that case you're probably passing an env
- // var for it. This object below represents all of the possible values of
- // process.platform per:
- // https://nodejs.org/api/process.html#process_process_platform
- return {
- aix: "C.UTF-8",
- darwin: "en_US.UTF-8",
- freebsd: "C.UTF-8",
- linux: "C.UTF-8",
- openbsd: "C.UTF-8",
- sunos: "C.UTF-8",
- win32: ".UTF-8"
- }[platform];
-})();
-
-// This function is responsible for taking an input string of text and returning
-// to prettier a JavaScript object that is the equivalent AST that represents
-// the code stored in that string. We accomplish this by spawning a new Ruby
-// process of parser.rb and reading JSON off STDOUT.
-function parse(text, _parsers, _opts) {
- const child = spawnSync(
- "ruby",
- ["--disable-gems", path.join(__dirname, "./parser.rb")],
- {
- env: Object.assign({}, process.env, { LANG }),
- input: text,
- maxBuffer: 10 * 1024 * 1024 // 10MB
- }
- );
-
- const error = child.stderr.toString();
- if (error) {
- throw new Error(error);
- }
-
- const response = child.stdout.toString();
- return JSON.parse(response);
-}
-
-const pragmaPattern = /#\s*@(prettier|format)/;
-
-// This function handles checking whether or not the source string has the
-// pragma for prettier. This is an optional workflow for incremental adoption.
-function hasPragma(text) {
- return pragmaPattern.test(text);
-}
-
-// This function is critical for comments and cursor support, and is responsible
-// for returning the index of the character within the source string that is the
-// beginning of the given node.
-function locStart(node) {
- return node.char_start;
-}
-
-// This function is critical for comments and cursor support, and is responsible
-// for returning the index of the character within the source string that is the
-// ending of the given node.
-function locEnd(node) {
- return node.char_end;
-}
-
-module.exports = {
- parse,
- astFormat: "ruby",
- hasPragma,
- locStart,
- locEnd
-};
diff --git a/src/parser.rb b/src/parser.rb
deleted file mode 100755
index c39ceacd..00000000
--- a/src/parser.rb
+++ /dev/null
@@ -1,2567 +0,0 @@
-#!/usr/bin/env ruby
-
-# We implement our own version checking here instead of using Gem::Version so
-# that we can use the --disable-gems flag.
-RUBY_MAJOR, RUBY_MINOR, RUBY_PATCH, * = RUBY_VERSION.split('.').map(&:to_i)
-
-if (RUBY_MAJOR < 2) || ((RUBY_MAJOR == 2) && (RUBY_MINOR < 5))
- warn(
- "Ruby version #{RUBY_VERSION} not supported. " \
- 'Please upgrade to 2.5.0 or above.'
- )
-
- exit 1
-end
-
-require 'delegate'
-require 'json' unless defined?(JSON)
-require 'ripper'
-
-module Prettier; end
-
-class Prettier::Parser < Ripper
- attr_reader :source, :lines, :scanner_events, :line_counts
-
- def initialize(source, *args)
- super(source, *args)
-
- @source = source
- @lines = source.split("\n")
-
- @comments = []
- @embdoc = nil
- @__end__ = nil
-
- @heredocs = []
-
- @scanner_events = []
- @line_counts = [0]
-
- @source.lines.each { |line| @line_counts << @line_counts.last + line.size }
- end
-
- private
-
- # This represents the current place in the source string that we've gotten to
- # so far. We have a memoized line_counts object that we can use to get the
- # number of characters that we've had to go through to get to the beginning of
- # this line, then we add the number of columns into this line that we've gone
- # through.
- def char_pos
- line_counts[lineno - 1] + column
- end
-
- # As we build up a list of scanner events, we'll periodically need to go
- # backwards and find the ones that we've already hit in order to determine the
- # location information for nodes that use them. For example, if you have a
- # module node then you'll look backward for a @module scanner event to
- # determine your start location.
- #
- # This works with nesting since we're deleting scanner events from the list
- # once they've been used up. For example if you had nested module declarations
- # then the innermost declaration would grab the last @module event (which
- # would happen to be the innermost keyword). Then the outer one would only be
- # able to grab the first one. In this way all of the scanner events act as
- # their own stack.
- def find_scanner_event(type, body = :any)
- index =
- scanner_events.rindex do |scanner_event|
- scanner_event[:type] == type &&
- (body == :any || (scanner_event[:body] == body))
- end
-
- scanner_events.delete_at(index)
- end
-
- # Scanner events occur when the lexer hits a new token, like a keyword or an
- # end. These nodes always contain just one argument which is a string
- # representing the content. For the most part these can just be printed
- # directly, which very few exceptions.
- defined = %i[
- comment
- embdoc
- embdoc_beg
- embdoc_end
- heredoc_beg
- heredoc_end
- ignored_nl
- ]
-
- (SCANNER_EVENTS - defined).each do |event|
- define_method(:"on_#{event}") do |value|
- char_end = char_pos + value.size
- node = {
- type: :"@#{event}",
- body: value,
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_end
- }
-
- scanner_events << node
- node
- end
- end
-
- # We keep track of each comment as it comes in and then eventually add
- # them to the top of the generated AST so that prettier can start adding
- # them back into the final representation. Comments come in including
- # their starting pound sign and the newline at the end, so we also chop
- # those off.
- #
- # If there is an encoding magic comment at the top of the file, ripper
- # will actually change into that encoding for the storage of the string.
- # This will break everything, so we need to force the encoding back into
- # UTF-8 so that the JSON library won't break.
- def on_comment(value)
- @comments << {
- type: :@comment,
- value: value[1..-1].chomp.force_encoding('UTF-8'),
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos + value.length - 1
- }
- end
-
- # ignored_nl is a special kind of scanner event that passes nil as the value,
- # so we can't do our normal tracking of value.size. Instead of adding a
- # condition to the main SCANNER_EVENTS loop above, we'll just explicitly
- # define the method here. You can trigger the ignored_nl event with the
- # following snippet:
- #
- # foo.bar
- # .baz
- #
- def on_ignored_nl(value)
- {
- type: :ignored_nl,
- body: nil,
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos
- }
- end
-
- prepend(
- Module.new do
- private
-
- # Handles __END__ syntax, which allows individual scripts to keep content
- # after the main ruby code that can be read through DATA. It looks like:
- #
- # foo.bar
- #
- # __END__
- # some other content that isn't normally read by ripper
- def on___end__(*)
- @__end__ = super(lines[lineno..-1].join("\n"))
- end
-
- # Like comments, we need to force the encoding here so JSON doesn't break.
- def on_ident(value)
- super(value.force_encoding('UTF-8'))
- end
-
- # Like comments, we need to force the encoding here so JSON doesn't break.
- def on_tstring_content(value)
- super(value.force_encoding('UTF-8'))
- end
- end
- )
-
- # A BEGIN node is a parser event that represents the use of the BEGIN
- # keyword, which hooks into the lifecycle of the interpreter. It's a bit
- # of a legacy from the stream operating days, and gets its inspiration
- # from tools like awk. Whatever is inside the "block" will get executed
- # when the program starts. The syntax looks like the following:
- #
- # BEGIN {
- # # execute stuff here
- # }
- #
- def on_BEGIN(stmts)
- beging = find_scanner_event(:@lbrace)
- ending = find_scanner_event(:@rbrace)
-
- stmts.bind(
- find_next_statement_start(beging[:char_end]),
- ending[:char_start]
- )
-
- find_scanner_event(:@kw, 'BEGIN').merge!(
- type: :BEGIN,
- body: [beging, stmts],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # A END node is a parser event that represents the use of the END keyword,
- # which hooks into the lifecycle of the interpreter. It's a bit of a
- # legacy from the stream operating days, and gets its inspiration from
- # tools like awk. Whatever is inside the "block" will get executed when
- # the program ends. The syntax looks like the following:
- #
- # END {
- # # execute stuff here
- # }
- #
- def on_END(stmts)
- beging = find_scanner_event(:@lbrace)
- ending = find_scanner_event(:@rbrace)
-
- stmts.bind(
- find_next_statement_start(beging[:char_end]),
- ending[:char_start]
- )
-
- find_scanner_event(:@kw, 'END').merge!(
- type: :END,
- body: [beging, stmts],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # alias is a parser event that represents when you're using the alias
- # keyword with regular arguments. This can be either symbol literals or
- # bare words. You can optionally use parentheses with this keyword, so we
- # either track the location information based on those or the final
- # argument to the alias method.
- def on_alias(left, right)
- beging = find_scanner_event(:@kw, 'alias')
-
- paren = source[beging[:char_end]...left[:char_start]].include?('(')
- ending = paren ? find_scanner_event(:@rparen) : right
-
- {
- type: :alias,
- body: [left, right],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # aref nodes are when you're pulling a value out of a collection at a
- # specific index. Put another way, it's any time you're calling the method
- # #[]. As an example:
- #
- # foo[index]
- #
- # The nodes usually contains two children, the collection and the index.
- # In some cases, you don't necessarily have the second child node, because
- # you can call procs with a pretty esoteric syntax. In the following
- # example, you wouldn't have a second child, and "foo" would be the first
- # child:
- #
- # foo[]
- #
- def on_aref(collection, index)
- find_scanner_event(:@lbracket)
- ending = find_scanner_event(:@rbracket)
-
- {
- type: :aref,
- body: [collection, index],
- start: collection[:start],
- char_start: collection[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # aref_field is a parser event that is very similar to aref except that it
- # is being used inside of an assignment.
- def on_aref_field(collection, index)
- find_scanner_event(:@lbracket)
- ending = find_scanner_event(:@rbracket)
-
- {
- type: :aref_field,
- body: [collection, index],
- start: collection[:start],
- char_start: collection[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # args_new is a parser event that represents the beginning of a list of
- # arguments to any method call or an array. It can be followed by any
- # number of args_add events, which we'll append onto an array body.
- def on_args_new
- {
- type: :args,
- body: [],
- start: lineno,
- char_start: char_pos,
- end: lineno,
- char_end: char_pos
- }
- end
-
- # args_add is a parser event that represents a single argument inside a
- # list of arguments to any method call or an array. It accepts as
- # arguments the parent args node as well as an arg which can be anything
- # that could be passed as an argument.
- def on_args_add(args, arg)
- if args[:body].empty?
- arg.merge(type: :args, body: [arg])
- else
- args.merge!(
- body: args[:body] << arg,
- end: arg[:end],
- char_end: arg[:char_end]
- )
- end
- end
-
- # args_add_block is a parser event that represents a list of arguments and
- # potentially a block argument. If no block is passed, then the second
- # argument will be false.
- def on_args_add_block(args, block)
- ending = block || args
-
- args.merge(
- type: :args_add_block,
- body: [args, block],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # args_add_star is a parser event that represents adding a splat of values
- # to a list of arguments. If accepts as arguments the parent args node as
- # well as the part that is being splatted.
- def on_args_add_star(args, part)
- beging = find_scanner_event(:@op, '*')
- ending = part || beging
-
- {
- type: :args_add_star,
- body: [args, part],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # args_forward is a parser event that represents forwarding all kinds of
- # arguments onto another method call.
- def on_args_forward
- find_scanner_event(:@op, '...').merge!(type: :args_forward)
- end
-
- # arg_paren is a parser event that represents wrapping arguments to a
- # method inside a set of parentheses.
- def on_arg_paren(args)
- beging = find_scanner_event(:@lparen)
- rparen = find_scanner_event(:@rparen)
-
- # If the arguments exceed the ending of the parentheses, then we know we
- # have a heredoc in the arguments, and we need to use the bounds of the
- # arguments to determine how large the arg_paren is.
- ending = (args && args[:end] > rparen[:end]) ? args : rparen
-
- {
- type: :arg_paren,
- body: [args],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # Array nodes can contain a myriad of subnodes because of the special
- # array literal syntax like %w and %i. As a result, we may be looking for
- # an left bracket, or we may be just looking at the children to get the
- # bounds.
- def on_array(contents)
- if !contents || %i[args args_add_star].include?(contents[:type])
- beging = find_scanner_event(:@lbracket)
- ending = find_scanner_event(:@rbracket)
-
- {
- type: :array,
- body: [contents],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- else
- ending = find_scanner_event(:@tstring_end)
- contents[:char_end] = ending[:char_end]
-
- ending.merge!(
- type: :array,
- body: [contents],
- start: contents[:start],
- char_start: contents[:char_start]
- )
- end
- end
-
- # aryptn is a parser event that represents matching against an array pattern
- # using the Ruby 2.7+ pattern matching syntax.
- def on_aryptn(const, preargs, splatarg, postargs)
- pieces = [const, *preargs, splatarg, *postargs].compact
-
- {
- type: :aryptn,
- body: [const, preargs, splatarg, postargs],
- start: pieces[0][:start],
- char_start: pieces[0][:char_start],
- end: pieces[-1][:end],
- char_end: pieces[-1][:char_end]
- }
- end
-
- # assign is a parser event that represents assigning something to a
- # variable or constant. It accepts as arguments the left side of the
- # expression before the equals sign and the right side of the expression.
- def on_assign(left, right)
- left.merge(
- type: :assign,
- body: [left, right],
- end: right[:end],
- char_end: right[:char_end]
- )
- end
-
- # assoc_new is a parser event that contains a key-value pair within a
- # hash. It is a child event of either an assoclist_from_args or a
- # bare_assoc_hash.
- def on_assoc_new(key, value)
- {
- type: :assoc_new,
- body: [key, value],
- start: key[:start],
- char_start: key[:char_start],
- end: value[:end],
- char_end: value[:char_end]
- }
- end
-
- # assoc_splat is a parser event that represents splatting a value into a
- # hash (either a hash literal or a bare hash in a method call).
- def on_assoc_splat(contents)
- find_scanner_event(:@op, '**').merge!(
- type: :assoc_splat,
- body: [contents],
- end: contents[:end],
- char_end: contents[:char_end]
- )
- end
-
- # assoclist_from_args is a parser event that contains a list of all of the
- # associations inside of a hash literal. Its parent node is always a hash.
- # It accepts as an argument an array of assoc events (either assoc_new or
- # assoc_splat).
- def on_assoclist_from_args(assocs)
- {
- type: :assoclist_from_args,
- body: assocs,
- start: assocs[0][:start],
- char_start: assocs[0][:char_start],
- end: assocs[-1][:end],
- char_end: assocs[-1][:char_end]
- }
- end
-
- # bare_assoc_hash is a parser event that represents a hash of contents
- # being passed as a method argument (and therefore has omitted braces). It
- # accepts as an argument an array of assoc events (either assoc_new or
- # assoc_splat).
- def on_bare_assoc_hash(assoc_news)
- {
- type: :bare_assoc_hash,
- body: assoc_news,
- start: assoc_news[0][:start],
- char_start: assoc_news[0][:char_start],
- end: assoc_news[-1][:end],
- char_end: assoc_news[-1][:char_end]
- }
- end
-
- # begin is a parser event that represents the beginning of a begin..end chain.
- # It includes a bodystmt event that has all of the consequent clauses.
- def on_begin(bodystmt)
- beging = find_scanner_event(:@kw, 'begin')
- char_end =
- if bodystmt[:body][1..-1].any?
- bodystmt[:char_end]
- else
- find_scanner_event(:@kw, 'end')[:char_end]
- end
-
- bodystmt.bind(beging[:char_end], char_end)
-
- beging.merge!(
- type: :begin,
- body: [bodystmt],
- end: bodystmt[:end],
- char_end: bodystmt[:char_end]
- )
- end
-
- # binary is a parser event that represents a binary operation between two
- # values.
- def on_binary(left, oper, right)
- {
- type: :binary,
- body: [left, oper, right],
- start: left[:start],
- char_start: left[:char_start],
- end: right[:end],
- char_end: right[:char_end]
- }
- end
-
- # block_var is a parser event that represents the parameters being passed to
- # block. Effectively they're everything contained within the pipes.
- def on_block_var(params, locals)
- index =
- scanner_events.rindex do |event|
- event[:type] == :@op && %w[| ||].include?(event[:body]) &&
- event[:char_start] < params[:char_start]
- end
-
- beging = scanner_events[index]
- ending = scanner_events[-1]
-
- {
- type: :block_var,
- body: [params, locals],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # blockarg is a parser event that represents defining a block variable on
- # a method definition.
- def on_blockarg(ident)
- find_scanner_event(:@op, '&').merge!(
- type: :blockarg,
- body: [ident],
- end: ident[:end],
- char_end: ident[:char_end]
- )
- end
-
- # bodystmt can't actually determine its bounds appropriately because it
- # doesn't necessarily know where it started. So the parent node needs to
- # report back down into this one where it goes.
- class BodyStmt < SimpleDelegator
- def bind(char_start, char_end)
- merge!(char_start: char_start, char_end: char_end)
- parts = self[:body]
-
- # Here we're going to determine the bounds for the stmts
- consequent = parts[1..-1].compact.first
- self[:body][0].bind(
- char_start,
- consequent ? consequent[:char_start] : char_end
- )
-
- # Next we're going to determine the rescue clause if there is one
- if parts[1]
- consequent = parts[2..-1].compact.first
- self[:body][1].bind_end(consequent ? consequent[:char_start] : char_end)
- end
- end
- end
-
- # bodystmt is a parser event that represents all of the possible combinations
- # of clauses within the body of a method or block.
- def on_bodystmt(stmts, rescued, ensured, elsed)
- BodyStmt.new(
- type: :bodystmt,
- body: [stmts, rescued, ensured, elsed],
- start: lineno,
- char_start: char_pos,
- end: lineno,
- char_end: char_pos
- )
- end
-
- # brace_block is a parser event that represents passing a block to a
- # method call using the {..} operators. It accepts as arguments an
- # optional block_var event that represents any parameters to the block as
- # well as a stmts event that represents the statements inside the block.
- def on_brace_block(block_var, stmts)
- beging = find_scanner_event(:@lbrace)
- ending = find_scanner_event(:@rbrace)
-
- stmts.bind((block_var || beging)[:char_end], ending[:char_start])
-
- {
- type: :brace_block,
- body: [block_var, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # break is a parser event that represents using the break keyword. It
- # accepts as an argument an args or args_add_block event that contains all
- # of the arguments being passed to the break.
- def on_break(args_add_block)
- beging = find_scanner_event(:@kw, 'break')
-
- # You can hit this if you are passing no arguments to break but it has a
- # comment right after it. In that case we can just use the location
- # information straight from the keyword.
- if args_add_block[:type] == :args
- return beging.merge!(type: :break, body: [args_add_block])
- end
-
- beging.merge!(
- type: :break,
- body: [args_add_block],
- end: args_add_block[:end],
- char_end: args_add_block[:char_end]
- )
- end
-
- # call is a parser event representing a method call with no arguments. It
- # accepts as arguments the receiver of the method, the operator being used
- # to send the method (., ::, or &.), and the value that is being sent to
- # the receiver (which can be another nested call as well).
- #
- # There is one esoteric syntax that comes into play here as well. If the
- # sending argument to this method is the symbol :call, then it represents
- # calling a lambda in a very odd looking way, as in:
- #
- # foo.(1, 2, 3)
- #
- def on_call(receiver, oper, sending)
- # Make sure we take the operator out of the scanner events so that it
- # doesn't get confused for a unary operator later.
- scanner_events.delete(oper)
-
- ending = sending
-
- if sending == :call
- ending = oper
-
- # Special handling here for Ruby <= 2.5 because the oper argument to this
- # method wasn't a parser event here it was just a plain symbol.
- ending = receiver if RUBY_MAJOR <= 2 && RUBY_MINOR <= 5
- end
-
- {
- type: :call,
- body: [receiver, oper, sending],
- start: receiver[:start],
- char_start: receiver[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # case is a parser event that represents the beginning of a case chain.
- # It accepts as arguments the switch of the case and the consequent
- # clause.
- def on_case(switch, consequent)
- find_scanner_event(:@kw, 'case').merge!(
- type: :case,
- body: [switch, consequent],
- end: consequent[:end],
- char_end: consequent[:char_end]
- )
- end
-
- # Finds the next position in the source string that begins a statement. This
- # is used to bind statements lists and make sure they don't include a
- # preceding comment. For example, we want the following comment to be attached
- # to the class node and not the statement node:
- #
- # class Foo # :nodoc:
- # ...
- # end
- #
- # By finding the next non-space character, we can make sure that the bounds of
- # the statement list are correct.
- def find_next_statement_start(position)
- remaining = source[position..-1]
-
- if remaining.sub(/\A +/, '')[0] == '#'
- return position + remaining.index("\n")
- end
-
- position
- end
-
- # class is a parser event that represents defining a class. It accepts as
- # arguments the name of the class, the optional name of the superclass,
- # and the bodystmt event that represents the statements evaluated within
- # the context of the class.
- def on_class(const, superclass, bodystmt)
- beging = find_scanner_event(:@kw, 'class')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind(
- find_next_statement_start((superclass || const)[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :class,
- body: [const, superclass, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # command is a parser event representing a method call with arguments and
- # no parentheses. It accepts as arguments the name of the method and the
- # arguments being passed to the method.
- def on_command(ident, args)
- {
- type: :command,
- body: [ident, args],
- start: ident[:start],
- char_start: ident[:char_start],
- end: args[:end],
- char_end: args[:char_end]
- }
- end
-
- # command_call is a parser event representing a method call on an object
- # with arguments and no parentheses. It accepts as arguments the receiver
- # of the method, the operator being used to send the method, the name of
- # the method, and the arguments being passed to the method.
- def on_command_call(receiver, oper, ident, args)
- ending = args || ident
-
- {
- type: :command_call,
- body: [receiver, oper, ident, args],
- start: receiver[:start],
- char_start: receiver[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # A const_path_field is a parser event that is always the child of some
- # kind of assignment. It represents when you're assigning to a constant
- # that is being referenced as a child of another variable. For example:
- #
- # foo::X = 1
- #
- def on_const_path_field(left, const)
- {
- type: :const_path_field,
- body: [left, const],
- start: left[:start],
- char_start: left[:char_start],
- end: const[:end],
- char_end: const[:char_end]
- }
- end
-
- # A const_path_ref is a parser event that is a very similar to
- # const_path_field except that it is not involved in an assignment. It
- # looks like the following example:
- #
- # foo::X
- #
- def on_const_path_ref(left, const)
- {
- type: :const_path_ref,
- body: [left, const],
- start: left[:start],
- char_start: left[:char_start],
- end: const[:end],
- char_end: const[:char_end]
- }
- end
-
- # A const_ref is a parser event that represents the name of the constant
- # being used in a class or module declaration. In the following example it
- # is the @const scanner event that has the contents of Foo.
- #
- # class Foo; end
- #
- def on_const_ref(const)
- const.merge(type: :const_ref, body: [const])
- end
-
- # A def is a parser event that represents defining a regular method on the
- # current self object. It accepts as arguments the ident (the name of the
- # method being defined), the params (the parameter declaration for the
- # method), and a bodystmt node which represents the statements inside the
- # method. As an example, here are the parts that go into this:
- #
- # def foo(bar) do baz end
- # │ │ │
- # │ │ └> bodystmt
- # │ └> params
- # └> ident
- #
- def on_def(ident, params, bodystmt)
- # Make sure to delete this scanner event in case you're defining something
- # like def class which would lead to this being a kw and causing all kinds
- # of trouble
- scanner_events.delete(ident)
-
- if params[:type] == :params && !params[:body].any?
- location = ident[:char_end]
- params.merge!(char_start: location, char_end: location)
- end
-
- beging = find_scanner_event(:@kw, 'def')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind(
- find_next_statement_start(params[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :def,
- body: [ident, params, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # A defs is a parser event that represents defining a singleton method on
- # an object. It accepts the same arguments as the def event, as well as
- # the target and operator that on which this method is being defined. As
- # an example, here are the parts that go into this:
- #
- # def foo.bar(baz) do baz end
- # │ │ │ │ │
- # │ │ │ │ │
- # │ │ │ │ └> bodystmt
- # │ │ │ └> params
- # │ │ └> ident
- # │ └> oper
- # └> target
- #
- def on_defs(target, oper, ident, params, bodystmt)
- # Make sure to delete this scanner event in case you're defining something
- # like def class which would lead to this being a kw and causing all kinds
- # of trouble
- scanner_events.delete(ident)
-
- if params[:type] == :params && !params[:body].any?
- location = ident[:char_end]
- params.merge!(char_start: location, char_end: location)
- end
-
- beging = find_scanner_event(:@kw, 'def')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind(
- find_next_statement_start(params[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :defs,
- body: [target, oper, ident, params, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # A defined node represents the rather unique defined? operator. It can be
- # used with and without parentheses. If they're present, we use them to
- # determine our bounds, otherwise we use the value that's being passed to
- # the operator.
- def on_defined(value)
- beging = find_scanner_event(:@kw, 'defined?')
-
- paren = source[beging[:char_end]...value[:char_start]].include?('(')
- ending = paren ? find_scanner_event(:@rparen) : value
-
- beging.merge!(
- type: :defined,
- body: [value],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # do_block is a parser event that represents passing a block to a method
- # call using the do..end keywords. It accepts as arguments an optional
- # block_var event that represents any parameters to the block as well as
- # a bodystmt event that represents the statements inside the block.
- def on_do_block(block_var, bodystmt)
- beging = find_scanner_event(:@kw, 'do')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind((block_var || beging)[:char_end], ending[:char_start])
-
- {
- type: :do_block,
- body: [block_var, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # dot2 is a parser event that represents using the .. operator between two
- # expressions. Usually this is to create a range object but sometimes it's to
- # use the flip-flop operator.
- def on_dot2(left, right)
- operator = find_scanner_event(:@op, '..')
-
- beging = left || operator
- ending = right || operator
-
- {
- type: :dot2,
- body: [left, right],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # dot3 is a parser event that represents using the ... operator between two
- # expressions. Usually this is to create a range object but sometimes it's to
- # use the flip-flop operator.
- def on_dot3(left, right)
- operator = find_scanner_event(:@op, '...')
-
- beging = left || operator
- ending = right || operator
-
- {
- type: :dot3,
- body: [left, right],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # A dyna_symbol is a parser event that represents a symbol literal that
- # uses quotes to interpolate its value. For example, if you had a variable
- # foo and you wanted a symbol that contained its value, you would write:
- #
- # :"#{foo}"
- #
- # As such, they accept as one argument a string node, which is the same
- # node that gets accepted into a string_literal (since we're basically
- # talking about a string literal with a : character at the beginning).
- #
- # They can also come in another flavor which is a dynamic symbol as a hash
- # key. This is kind of an interesting syntax which results in us having to
- # look for a @label_end scanner event instead to get our bearings. That
- # kind of code would look like:
- #
- # { "#{foo}": bar }
- #
- # which would be the same symbol as above.
- def on_dyna_symbol(string)
- if scanner_events.any? { |event| event[:type] == :@symbeg }
- # A normal dynamic symbol
- beging = find_scanner_event(:@symbeg)
- ending = find_scanner_event(:@tstring_end)
-
- beging.merge(
- type: :dyna_symbol,
- quote: beging[:body][1],
- body: string[:body],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- else
- # A dynamic symbol as a hash key
- beging = find_scanner_event(:@tstring_beg)
- ending = find_scanner_event(:@label_end)
-
- string.merge!(
- type: :dyna_symbol,
- quote: ending[:body][0],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
- end
-
- # else can either end with an end keyword (in which case we'll want to
- # consume that event) or it can end with an ensure keyword (in which case
- # we'll leave that to the ensure to handle).
- def find_else_ending
- index =
- scanner_events.rindex do |event|
- event[:type] == :@kw && %w[end ensure].include?(event[:body])
- end
-
- event = scanner_events[index]
- event[:body] == 'end' ? scanner_events.delete_at(index) : event
- end
-
- # else is a parser event that represents the end of a if, unless, or begin
- # chain. It accepts as an argument the statements that are contained
- # within the else clause.
- def on_else(stmts)
- beging = find_scanner_event(:@kw, 'else')
- ending = find_else_ending
-
- stmts.bind(beging[:char_end], ending[:char_start])
-
- {
- type: :else,
- body: [stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # elsif is a parser event that represents another clause in an if chain.
- # It accepts as arguments the predicate of the else if, the statements
- # that are contained within the else if clause, and the optional
- # consequent clause.
- def on_elsif(predicate, stmts, consequent)
- beging = find_scanner_event(:@kw, 'elsif')
- ending = consequent || find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :elsif,
- body: [predicate, stmts, consequent],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # embdocs are long comments that are surrounded by =begin..=end. They
- # cannot be nested, so we don't need to worry about keeping a stack around
- # like we do with heredocs. Instead we can just track the current embdoc
- # and add to it as we get content. It always starts with this scanner
- # event, so here we'll initialize the current embdoc.
- def on_embdoc_beg(value)
- @embdoc = {
- type: :@embdoc,
- value: value,
- start: lineno,
- char_start: char_pos
- }
- end
-
- # This is a scanner event that gets hit when we're inside an embdoc and
- # receive a new line of content. Here we are guaranteed to already have
- # initialized the @embdoc variable so we can just append the new line onto
- # the existing content.
- def on_embdoc(value)
- @embdoc[:value] << value
- end
-
- # This is the final scanner event for embdocs. It receives the =end. Here
- # we can finalize the embdoc with its location information and the final
- # piece of the string. We then add it to the list of comments so that
- # prettier can place it into the final source string.
- def on_embdoc_end(value)
- @comments <<
- @embdoc.merge!(
- value: @embdoc[:value] << value.chomp,
- end: lineno,
- char_end: char_pos + value.length - 1
- )
-
- @embdoc = nil
- end
-
- # ensure is a parser event that represents the use of the ensure keyword
- # and its subsequent statements.
- def on_ensure(stmts)
- beging = find_scanner_event(:@kw, 'ensure')
-
- # Specifically not using find_scanner_event here because we don't want to
- # consume the :@end event, because that would break def..ensure..end chains.
- index =
- scanner_events.rindex do |scanner_event|
- scanner_event[:type] == :@kw && scanner_event[:body] == 'end'
- end
-
- ending = scanner_events[index]
- stmts.bind(
- find_next_statement_start(beging[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :ensure,
- body: [beging, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # An excessed_comma is a special kind of parser event that represents a comma
- # at the end of a list of parameters. It's a very strange node. It accepts a
- # different number of arguments depending on Ruby version, which is why we
- # have the anonymous splat there.
- def on_excessed_comma(*)
- find_scanner_event(:@comma).merge!(type: :excessed_comma)
- end
-
- # An fcall is a parser event that represents the piece of a method call
- # that comes before any arguments (i.e., just the name of the method).
- def on_fcall(ident)
- ident.merge(type: :fcall, body: [ident])
- end
-
- # A field is a parser event that is always the child of an assignment. It
- # accepts as arguments the left side of operation, the operator (. or ::),
- # and the right side of the operation. For example:
- #
- # foo.x = 1
- #
- def on_field(left, oper, right)
- {
- type: :field,
- body: [left, oper, right],
- start: left[:start],
- char_start: left[:char_start],
- end: right[:end],
- char_end: right[:char_end]
- }
- end
-
- # for is a parser event that represents using the somewhat esoteric for
- # loop. It accepts as arguments an ident which is the iterating variable,
- # an enumerable for that which is being enumerated, and a stmts event that
- # represents the statements inside the for loop.
- def on_for(ident, enumerable, stmts)
- beging = find_scanner_event(:@kw, 'for')
- ending = find_scanner_event(:@kw, 'end')
-
- stmts.bind(enumerable[:char_end], ending[:char_start])
-
- {
- type: :for,
- body: [ident, enumerable, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # hash is a parser event that represents a hash literal. It accepts as an
- # argument an optional assoclist_from_args event which contains the
- # contents of the hash.
- def on_hash(assoclist_from_args)
- beging = find_scanner_event(:@lbrace)
- ending = find_scanner_event(:@rbrace)
-
- if assoclist_from_args
- # Here we're going to expand out the location information for the assocs
- # node so that it can grab up any remaining comments inside the hash.
- assoclist_from_args.merge!(
- char_start: beging[:char_end],
- char_end: ending[:char_start]
- )
- end
-
- {
- type: :hash,
- body: [assoclist_from_args],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # This is a scanner event that represents the beginning of the heredoc. It
- # includes the declaration (which we call beging here, which is just short
- # for beginning). The declaration looks something like <<-HERE or <<~HERE.
- # If the downcased version of the declaration actually matches an existing
- # prettier parser, we'll later attempt to print it using that parser and
- # printer through our embed function.
- def on_heredoc_beg(beging)
- location = {
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos + beging.length + 1
- }
-
- # Here we're going to artificially create an extra node type so that if
- # there are comments after the declaration of a heredoc, they get printed.
- location
- .merge(
- type: :heredoc,
- beging: location.merge(type: :@heredoc_beg, body: beging)
- )
- .tap { |node| @heredocs << node }
- end
-
- # This is a parser event that occurs when you're using a heredoc with a
- # tilde. These are considered `heredoc_dedent` nodes, whereas the hyphen
- # heredocs show up as string literals.
- def on_heredoc_dedent(string, _width)
- @heredocs[-1].merge!(body: string[:body])
- end
-
- # This is a scanner event that represents the end of the heredoc.
- def on_heredoc_end(ending)
- @heredocs[-1].merge!(ending: ending.chomp, end: lineno, char_end: char_pos)
- end
-
- # hshptn is a parser event that represents matching against a hash pattern
- # using the Ruby 2.7+ pattern matching syntax.
- def on_hshptn(const, kw, kwrest)
- pieces = [const, kw, kwrest].flatten(2).compact
-
- {
- type: :hshptn,
- body: [const, kw, kwrest],
- start: pieces[0][:start],
- char_start: pieces[0][:char_start],
- end: pieces[-1][:end],
- char_end: pieces[-1][:char_end]
- }
- end
-
- # if is a parser event that represents the first clause in an if chain.
- # It accepts as arguments the predicate of the if, the statements that are
- # contained within the if clause, and the optional consequent clause.
- def on_if(predicate, stmts, consequent)
- beging = find_scanner_event(:@kw, 'if')
- ending = consequent || find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :if,
- body: [predicate, stmts, consequent],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # ifop is a parser event that represents a ternary operator. It accepts as
- # arguments the predicate to the ternary, the truthy clause, and the falsy
- # clause.
- def on_ifop(predicate, truthy, falsy)
- predicate.merge(
- type: :ifop,
- body: [predicate, truthy, falsy],
- end: falsy[:end],
- char_end: falsy[:char_end]
- )
- end
-
- # if_mod is a parser event that represents the modifier form of an if
- # statement. It accepts as arguments the predicate of the if and the
- # statement that are contained within the if clause.
- def on_if_mod(predicate, statement)
- find_scanner_event(:@kw, 'if')
-
- {
- type: :if_mod,
- body: [predicate, statement],
- start: statement[:start],
- char_start: statement[:char_start],
- end: predicate[:end],
- char_end: predicate[:char_end]
- }
- end
-
- # in is a parser event that represents using the in keyword within the
- # Ruby 2.7+ pattern matching syntax.
- def on_in(pattern, stmts, consequent)
- beging = find_scanner_event(:@kw, 'in')
- ending = consequent || find_scanner_event(:@kw, 'end')
-
- stmts.bind(beging[:char_end], ending[:char_start])
-
- beging.merge!(
- type: :in,
- body: [pattern, stmts, consequent],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # kwrest_param is a parser event that represents defining a parameter in a
- # method definition that accepts all remaining keyword parameters.
- def on_kwrest_param(ident)
- oper = find_scanner_event(:@op, '**')
- return oper.merge!(type: :kwrest_param, body: [nil]) unless ident
-
- oper.merge!(
- type: :kwrest_param,
- body: [ident],
- end: ident[:end],
- char_end: ident[:char_end]
- )
- end
-
- # lambda is a parser event that represents using a "stabby" lambda
- # literal. It accepts as arguments a params event that represents any
- # parameters to the lambda and a stmts event that represents the
- # statements inside the lambda.
- #
- # It can be wrapped in either {..} or do..end so we look for either of
- # those combinations to get our bounds.
- def on_lambda(params, stmts)
- beging = find_scanner_event(:@tlambda)
-
- if scanner_events.any? { |event| event[:type] == :@tlambeg }
- opening = find_scanner_event(:@tlambeg)
- closing = find_scanner_event(:@rbrace)
- else
- opening = find_scanner_event(:@kw, 'do')
- closing = find_scanner_event(:@kw, 'end')
- end
-
- stmts.bind(opening[:char_end], closing[:char_start])
-
- {
- type: :lambda,
- body: [params, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: closing[:end],
- char_end: closing[:char_end]
- }
- end
-
- # massign is a parser event that is a parent node of any kind of multiple
- # assignment. This includes splitting out variables on the left like:
- #
- # a, b, c = foo
- #
- # as well as splitting out variables on the right, as in:
- #
- # foo = a, b, c
- #
- # Both sides support splats, as well as variables following them. There's
- # also slightly odd behavior that you can achieve with the following:
- #
- # a, = foo
- #
- # In this case a would receive only the first value of the foo enumerable,
- # in which case we need to explicitly track the comma and add it onto the
- # child node.
- def on_massign(left, right)
- if source[left[:char_end]...right[:char_start]].strip.start_with?(',')
- left[:comma] = true
- end
-
- {
- type: :massign,
- body: [left, right],
- start: left[:start],
- char_start: left[:char_start],
- end: right[:end],
- char_end: right[:char_end]
- }
- end
-
- # method_add_arg is a parser event that represents a method call with
- # arguments and parentheses. It accepts as arguments the method being called
- # and the arg_paren event that contains the arguments to the method.
- def on_method_add_arg(fcall, arg_paren)
- # You can hit this if you are passing no arguments to a method that ends in
- # a question mark. Because it knows it has to be a method and not a local
- # variable. In that case we can just use the location information straight
- # from the fcall.
- if arg_paren[:type] == :args
- return fcall.merge(type: :method_add_arg, body: [fcall, arg_paren])
- end
-
- {
- type: :method_add_arg,
- body: [fcall, arg_paren],
- start: fcall[:start],
- char_start: fcall[:char_start],
- end: arg_paren[:end],
- char_end: arg_paren[:char_end]
- }
- end
-
- # method_add_block is a parser event that represents a method call with a
- # block argument. It accepts as arguments the method being called and the
- # block event.
- def on_method_add_block(method_add_arg, block)
- {
- type: :method_add_block,
- body: [method_add_arg, block],
- start: method_add_arg[:start],
- char_start: method_add_arg[:char_start],
- end: block[:end],
- char_end: block[:char_end]
- }
- end
-
- # An mlhs_new is a parser event that represents the beginning of the left
- # side of a multiple assignment. It is followed by any number of mlhs_add
- # nodes that each represent another variable being assigned.
- def on_mlhs_new
- {
- type: :mlhs,
- body: [],
- start: lineno,
- char_start: char_pos,
- end: lineno,
- char_end: char_pos
- }
- end
-
- # An mlhs_add is a parser event that represents adding another variable
- # onto a list of assignments. It accepts as arguments the parent mlhs node
- # as well as the part that is being added to the list.
- def on_mlhs_add(mlhs, part)
- if mlhs[:body].empty?
- part.merge(type: :mlhs, body: [part])
- else
- mlhs.merge!(
- body: mlhs[:body] << part,
- end: part[:end],
- char_end: part[:char_end]
- )
- end
- end
-
- # An mlhs_add_post is a parser event that represents adding another set of
- # variables onto a list of assignments after a splat variable. It accepts
- # as arguments the previous mlhs_add_star node that represented the splat
- # as well another mlhs node that represents all of the variables after the
- # splat.
- def on_mlhs_add_post(mlhs_add_star, mlhs)
- mlhs_add_star.merge(
- type: :mlhs_add_post,
- body: [mlhs_add_star, mlhs],
- end: mlhs[:end],
- char_end: mlhs[:char_end]
- )
- end
-
- # An mlhs_add_star is a parser event that represents a splatted variable
- # inside of a multiple assignment on the left hand side. It accepts as
- # arguments the parent mlhs node as well as the part that represents the
- # splatted variable.
- def on_mlhs_add_star(mlhs, part)
- beging = find_scanner_event(:@op, '*')
- ending = part || beging
-
- {
- type: :mlhs_add_star,
- body: [mlhs, part],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # An mlhs_paren is a parser event that represents parentheses being used
- # to deconstruct values in a multiple assignment on the left hand side. It
- # accepts as arguments the contents of the inside of the parentheses,
- # which is another mlhs node.
- def on_mlhs_paren(contents)
- beging = find_scanner_event(:@lparen)
- ending = find_scanner_event(:@rparen)
-
- if source[beging[:char_end]...ending[:char_start]].strip.end_with?(',')
- contents[:comma] = true
- end
-
- {
- type: :mlhs_paren,
- body: [contents],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # module is a parser event that represents defining a module. It accepts
- # as arguments the name of the module and the bodystmt event that
- # represents the statements evaluated within the context of the module.
- def on_module(const, bodystmt)
- beging = find_scanner_event(:@kw, 'module')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind(
- find_next_statement_start(const[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :module,
- body: [const, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # An mrhs_new is a parser event that represents the beginning of a list of
- # values that are being assigned within a multiple assignment node. It can
- # be followed by any number of mrhs_add nodes that we'll build up into an
- # array body.
- def on_mrhs_new
- {
- type: :mrhs,
- body: [],
- start: lineno,
- char_start: char_pos,
- end: lineno,
- char_end: char_pos
- }
- end
-
- # An mrhs_add is a parser event that represents adding another value onto
- # a list on the right hand side of a multiple assignment.
- def on_mrhs_add(mrhs, part)
- if mrhs[:body].empty?
- part.merge(type: :mrhs, body: [part])
- else
- mrhs.merge!(
- body: mrhs[:body] << part,
- end: part[:end],
- char_end: part[:char_end]
- )
- end
- end
-
- # An mrhs_add_star is a parser event that represents using the splat
- # operator to expand out a value on the right hand side of a multiple
- # assignment.
- def on_mrhs_add_star(mrhs, part)
- beging = find_scanner_event(:@op, '*')
- ending = part || beging
-
- {
- type: :mrhs_add_star,
- body: [mrhs, part],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # An mrhs_new_from_args is a parser event that represents the shorthand
- # of a multiple assignment that allows you to assign values using just
- # commas as opposed to assigning from an array. For example, in the
- # following segment the right hand side of the assignment would trigger
- # this event:
- #
- # foo = 1, 2, 3
- #
- def on_mrhs_new_from_args(args)
- args.merge(type: :mrhs_new_from_args, body: [args])
- end
-
- # next is a parser event that represents using the next keyword. It
- # accepts as an argument an args or args_add_block event that contains all
- # of the arguments being passed to the next.
- def on_next(args_add_block)
- find_scanner_event(:@kw, 'next').merge!(
- type: :next,
- body: [args_add_block],
- end: args_add_block[:end],
- char_end: args_add_block[:char_end]
- )
- end
-
- # opassign is a parser event that represents assigning something to a
- # variable or constant using an operator like += or ||=. It accepts as
- # arguments the left side of the expression before the operator, the
- # operator itself, and the right side of the expression.
- def on_opassign(left, oper, right)
- left.merge(
- type: :opassign,
- body: [left, oper, right],
- end: right[:end],
- char_end: right[:char_end]
- )
- end
-
- # params is a parser event that represents defining parameters on a
- # method. They have a somewhat interesting structure in that they are an
- # array of arrays where the position in the top-level array indicates the
- # type of param and the subarray is the list of parameters of that type.
- # We therefore have to flatten them down to get to the location.
- def on_params(*types)
- flattened = types.flatten(2).select { |type| type.is_a?(Hash) }
- location =
- if flattened.any?
- {
- start: flattened[0][:start],
- char_start: flattened[0][:char_start],
- end: flattened[-1][:end],
- char_end: flattened[-1][:char_end]
- }
- else
- { start: lineno, char_start: char_pos, end: lineno, char_end: char_pos }
- end
-
- location.merge!(type: :params, body: types)
- end
-
- # A paren is a parser event that represents using parentheses pretty much
- # anywhere in a Ruby program. It accepts as arguments the contents, which
- # can be either params or statements.
- def on_paren(contents)
- ending = find_scanner_event(:@rparen)
-
- find_scanner_event(:@lparen).merge!(
- type: :paren,
- body: [contents],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # The program node is the very top of the AST. Here we'll attach all of
- # the comments that we've gathered up over the course of parsing the
- # source string. We'll also attach on the __END__ content if there was
- # some found at the end of the source string.
- def on_program(stmts)
- range = {
- start: 1,
- end: lines.length,
- char_start: 0,
- char_end: source.length
- }
-
- stmts[:body] << @__end__ if @__end__
- stmts.bind(0, source.length)
-
- range.merge(type: :program, body: [stmts], comments: @comments)
- end
-
- # qsymbols_new is a parser event that represents the beginning of a symbol
- # literal array, like %i[one two three]. It can be followed by any number
- # of qsymbols_add events, which we'll append onto an array body.
- def on_qsymbols_new
- find_scanner_event(:@qsymbols_beg).merge!(type: :qsymbols, body: [])
- end
-
- # qsymbols_add is a parser event that represents an element inside of a
- # symbol literal array like %i[one two three]. It accepts as arguments the
- # parent qsymbols node as well as a tstring_content scanner event
- # representing the bare words.
- def on_qsymbols_add(qsymbols, tstring_content)
- qsymbols.merge!(
- body: qsymbols[:body] << tstring_content,
- end: tstring_content[:end],
- char_end: tstring_content[:char_end]
- )
- end
-
- # qwords_new is a parser event that represents the beginning of a string
- # literal array, like %w[one two three]. It can be followed by any number
- # of qwords_add events, which we'll append onto an array body.
- def on_qwords_new
- find_scanner_event(:@qwords_beg).merge!(type: :qwords, body: [])
- end
-
- # qsymbols_add is a parser event that represents an element inside of a
- # symbol literal array like %i[one two three]. It accepts as arguments the
- # parent qsymbols node as well as a tstring_content scanner event
- # representing the bare words.
- def on_qwords_add(qwords, tstring_content)
- qwords.merge!(
- body: qwords[:body] << tstring_content,
- end: tstring_content[:end],
- char_end: tstring_content[:char_end]
- )
- end
-
- # redo is a parser event that represents the bare redo keyword. It has no
- # body as it accepts no arguments.
- def on_redo
- find_scanner_event(:@kw, 'redo').merge!(type: :redo)
- end
-
- # regexp_new is a parser event that represents the beginning of a regular
- # expression literal, like /foo/. It can be followed by any number of
- # regexp_add events, which we'll append onto an array body.
- def on_regexp_new
- find_scanner_event(:@regexp_beg).merge!(type: :regexp, body: [])
- end
-
- # regexp_add is a parser event that represents a piece of a regular
- # body. It accepts as arguments the parent regexp node as well as a
- # tstring_content scanner event representing string content or a
- # string_embexpr parser event representing interpolated content.
- def on_regexp_add(regexp, piece)
- regexp.merge!(
- body: regexp[:body] << piece,
- end: regexp[:end],
- char_end: regexp[:char_end]
- )
- end
-
- # regexp_literal is a parser event that represents a regular expression.
- # It accepts as arguments a regexp node which is a built-up array of
- # pieces that go into the regexp content, as well as the ending used to
- # close out the regexp which includes any modifiers.
- def on_regexp_literal(regexp, ending)
- regexp.merge!(
- type: :regexp_literal,
- ending: ending[:body],
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
-
- # rescue is a special kind of node where you have a rescue chain but it
- # doesn't really have all of the information that it needs in order to
- # determine its ending. Therefore it relies on its parent bodystmt node to
- # report its ending to it.
- class Rescue < SimpleDelegator
- def bind_end(char_end)
- merge!(char_end: char_end)
-
- stmts = self[:body][2]
- consequent = self[:body][3]
-
- if consequent
- consequent.bind_end(char_end)
- stmts.bind_end(consequent[:char_start])
- else
- stmts.bind_end(char_end)
- end
- end
- end
-
- # rescue is a parser event that represents the use of the rescue keyword
- # inside of a bodystmt.
- def on_rescue(exceptions, variable, stmts, consequent)
- beging = find_scanner_event(:@kw, 'rescue')
-
- last_exception = exceptions.is_a?(Array) ? exceptions[-1] : exceptions
- last_node = variable || last_exception || beging
-
- stmts.bind(find_next_statement_start(last_node[:char_end]), char_pos)
-
- Rescue.new(
- beging.merge!(
- type: :rescue,
- body: [exceptions, variable, stmts, consequent],
- end: lineno,
- char_end: char_pos
- )
- )
- end
-
- # rescue_mod represents the modifier form of a rescue clause. It accepts as
- # arguments the statement that may raise an error and the value that should
- # be used if it does.
- def on_rescue_mod(statement, rescued)
- find_scanner_event(:@kw, 'rescue')
-
- {
- type: :rescue_mod,
- body: [statement, rescued],
- start: statement[:start],
- char_start: statement[:char_start],
- end: rescued[:end],
- char_end: rescued[:char_end]
- }
- end
-
- # rest_param is a parser event that represents defining a parameter in a
- # method definition that accepts all remaining positional parameters. It
- # accepts as an argument an optional identifier for the parameter. If it
- # is omitted, then we're just using the plain operator.
- def on_rest_param(ident)
- oper = find_scanner_event(:@op, '*')
- return oper.merge!(type: :rest_param, body: [nil]) unless ident
-
- oper.merge!(
- type: :rest_param,
- body: [ident],
- end: ident[:end],
- char_end: ident[:char_end]
- )
- end
-
- # retry is a parser event that represents the bare retry keyword. It has
- # no body as it accepts no arguments.
- def on_retry
- find_scanner_event(:@kw, 'retry').merge!(type: :retry)
- end
-
- # return is a parser event that represents using the return keyword with
- # arguments. It accepts as an argument an args_add_block event that
- # contains all of the arguments being passed.
- def on_return(args_add_block)
- find_scanner_event(:@kw, 'return').merge!(
- type: :return,
- body: [args_add_block],
- end: args_add_block[:end],
- char_end: args_add_block[:char_end]
- )
- end
-
- # return0 is a parser event that represents the bare return keyword. It
- # has no body as it accepts no arguments. This is as opposed to the return
- # parser event, which is the version where you're returning one or more
- # values.
- def on_return0
- find_scanner_event(:@kw, 'return').merge!(type: :return0)
- end
-
- # sclass is a parser event that represents a block of statements that
- # should be evaluated within the context of the singleton class of an
- # object. It's frequently used to define singleton methods. It looks like
- # the following example:
- #
- # class << self do foo end
- # │ │
- # │ └> bodystmt
- # └> target
- #
- def on_sclass(target, bodystmt)
- beging = find_scanner_event(:@kw, 'class')
- ending = find_scanner_event(:@kw, 'end')
-
- bodystmt.bind(
- find_next_statement_start(target[:char_end]),
- ending[:char_start]
- )
-
- {
- type: :sclass,
- body: [target, bodystmt],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # Everything that has a block of code inside of it has a list of statements.
- # Normally we would just track those as a node that has an array body, but we
- # have some special handling in order to handle empty statement lists. They
- # need to have the right location information, so all of the parent node of
- # stmts nodes will report back down the location information. We then
- # propagate that onto void_stmt nodes inside the stmts in order to make sure
- # all comments get printed appropriately.
- class Stmts < SimpleDelegator
- def bind(char_start, char_end)
- merge!(char_start: char_start, char_end: char_end)
-
- if self[:body][0][:type] == :void_stmt
- self[:body][0].merge!(char_start: char_start, char_end: char_start)
- end
- end
-
- def bind_end(char_end)
- merge!(char_end: char_end)
- end
-
- def <<(statement)
- if self[:body].any?
- merge!(statement.slice(:end, :char_end))
- else
- merge!(statement.slice(:start, :end, :char_start, :char_end))
- end
-
- self[:body] << statement
- self
- end
- end
-
- # stmts_new is a parser event that represents the beginning of a list of
- # statements within any lexical block. It can be followed by any number of
- # stmts_add events, which we'll append onto an array body.
- def on_stmts_new
- Stmts.new(
- type: :stmts,
- body: [],
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos
- )
- end
-
- # stmts_add is a parser event that represents a single statement inside a
- # list of statements within any lexical block. It accepts as arguments the
- # parent stmts node as well as an stmt which can be any expression in
- # Ruby.
- def on_stmts_add(stmts, stmt)
- stmts << stmt
- end
-
- # string_concat is a parser event that represents concatenating two
- # strings together using a backward slash, as in the following example:
- #
- # 'foo' \
- # 'bar'
- #
- def on_string_concat(left, right)
- {
- type: :string_concat,
- body: [left, right],
- start: left[:start],
- char_start: left[:char_start],
- end: right[:end],
- char_end: right[:char_end]
- }
- end
-
- # string_content is a parser event that represents the beginning of the
- # contents of a string, which will either be embedded inside of a
- # string_literal or a dyna_symbol node. It will have an array body so that
- # we can build up a list of @tstring_content, string_embexpr, and
- # string_dvar nodes.
- def on_string_content
- {
- type: :string,
- body: [],
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos
- }
- end
-
- # string_add is a parser event that represents a piece of a string. It
- # could be plain @tstring_content, string_embexpr, or string_dvar nodes.
- # It accepts as arguments the parent string node as well as the additional
- # piece of the string.
- def on_string_add(string, piece)
- string.merge!(
- body: string[:body] << piece,
- end: piece[:end],
- char_end: piece[:char_end]
- )
- end
-
- # string_dvar is a parser event that represents a very special kind of
- # interpolation into string. It allows you to take an instance variable,
- # class variable, or global variable and omit the braces when
- # interpolating. For example, if you wanted to interpolate the instance
- # variable @foo into a string, you could do "#@foo".
- def on_string_dvar(var_ref)
- find_scanner_event(:@embvar).merge!(
- type: :string_dvar,
- body: [var_ref],
- end: var_ref[:end],
- char_end: var_ref[:char_end]
- )
- end
-
- # string_embexpr is a parser event that represents interpolated content.
- # It can go a bunch of different parent nodes, including regexp, strings,
- # xstrings, heredocs, dyna_symbols, etc. Basically it's anywhere you see
- # the #{} construct.
- def on_string_embexpr(stmts)
- beging = find_scanner_event(:@embexpr_beg)
- ending = find_scanner_event(:@embexpr_end)
-
- stmts.bind(beging[:char_end], ending[:char_start])
-
- {
- type: :string_embexpr,
- body: [stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # String literals are either going to be a normal string or they're going
- # to be a heredoc if we've just closed a heredoc.
- def on_string_literal(string)
- heredoc = @heredocs[-1]
-
- if heredoc && heredoc[:ending]
- @heredocs.pop.merge!(body: string[:body])
- else
- beging = find_scanner_event(:@tstring_beg)
- ending = find_scanner_event(:@tstring_end)
-
- {
- type: :string_literal,
- body: string[:body],
- quote: beging[:body],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
- end
-
- # A super is a parser event that represents using the super keyword with
- # any number of arguments. It can optionally use parentheses (represented
- # by an arg_paren node) or just skip straight to the arguments (with an
- # args_add_block node).
- def on_super(contents)
- find_scanner_event(:@kw, 'super').merge!(
- type: :super,
- body: [contents],
- end: contents[:end],
- char_end: contents[:char_end]
- )
- end
-
- # A symbol is a parser event that immediately descends from a symbol
- # literal and contains an ident representing the contents of the symbol.
- def on_symbol(ident)
- # What the heck is this here for you ask!? Turns out when Ripper is lexing
- # source text, it turns symbols into keywords if their contents match, which
- # will mess up the location information of all of our other nodes.
- #
- # So for example instead of { type: :@ident, body: "class" } you would
- # instead get { type: :@kw, body: "class" } which is all kinds of
- # problematic.
- #
- # In order to take care of this, we explicitly delete this scanner event
- # from the stack to make sure it doesn't screw things up.
- scanner_events.pop
-
- ident.merge(type: :symbol, body: [ident])
- end
-
- # A symbol_literal represents a symbol in the system with no interpolation
- # (as opposed to a dyna_symbol). As its only argument it accepts either a
- # symbol node (for most cases) or an ident node (in the case that we're
- # using bare words, as in an alias node like alias foo bar).
- def on_symbol_literal(contents)
- if scanner_events[-1] == contents
- contents.merge(type: :symbol_literal, body: [contents])
- else
- beging = find_scanner_event(:@symbeg)
- contents.merge!(type: :symbol_literal, char_start: beging[:char_start])
- end
- end
-
- # symbols_new is a parser event that represents the beginning of a symbol
- # literal array that accepts interpolation, like %I[one #{two} three]. It
- # can be followed by any number of symbols_add events, which we'll append
- # onto an array body.
- def on_symbols_new
- find_scanner_event(:@symbols_beg).merge!(type: :symbols, body: [])
- end
-
- # symbols_add is a parser event that represents an element inside of a
- # symbol literal array that accepts interpolation, like
- # %I[one #{two} three]. It accepts as arguments the parent symbols node as
- # well as a word_add parser event.
- def on_symbols_add(symbols, word_add)
- symbols.merge!(
- body: symbols[:body] << word_add,
- end: word_add[:end],
- char_end: word_add[:char_end]
- )
- end
-
- # A helper function to find a :: operator for the next two nodes. We do
- # special handling instead of using find_scanner_event here because we
- # don't pop off all of the :: operators so you could end up getting the
- # wrong information if you have for instance ::X::Y::Z.
- def find_colon2_before(const)
- index =
- scanner_events.rindex do |event|
- event[:type] == :@op && event[:body] == '::' &&
- event[:char_start] < const[:char_start]
- end
-
- scanner_events[index]
- end
-
- # A top_const_field is a parser event that is always the child of some
- # kind of assignment. It represents when you're assigning to a constant
- # that is being referenced at the top level. For example:
- #
- # ::X = 1
- #
- def on_top_const_field(const)
- beging = find_colon2_before(const)
- const.merge(
- type: :top_const_field,
- body: [const],
- start: beging[:start],
- char_start: beging[:char_start]
- )
- end
-
- # A top_const_ref is a parser event that is a very similar to
- # top_const_field except that it is not involved in an assignment. It
- # looks like the following example:
- #
- # ::X
- #
- def on_top_const_ref(const)
- beging = find_colon2_before(const)
- const.merge(
- type: :top_const_ref,
- body: [const],
- start: beging[:start],
- char_start: beging[:char_start]
- )
- end
-
- # A unary node represents a unary method being called on an expression, as
- # in !, ~, or not. We have somewhat special handling of the not operator
- # since if it has parentheses they don't get reported as a paren node for
- # some reason.
- def on_unary(oper, value)
- if oper == :not
- node = find_scanner_event(:@kw, 'not')
-
- paren = source[node[:char_end]...value[:char_start]].include?('(')
- ending = paren ? find_scanner_event(:@rparen) : value
-
- node.merge!(
- type: :unary,
- oper: oper,
- body: [value],
- end: ending[:end],
- char_end: ending[:char_end],
- paren: paren
- )
- else
- # Special case instead of using find_scanner_event here. It turns out that
- # if you have a range that goes from a negative number to a negative
- # number then you can end up with a .. or a ... that's higher in the
- # stack. So we need to explicitly disallow those operators.
- index =
- scanner_events.rindex do |scanner_event|
- scanner_event[:type] == :@op &&
- !%w[.. ...].include?(scanner_event[:body])
- end
-
- beging = scanner_events.delete_at(index)
- beging.merge!(
- type: :unary,
- oper: oper[0],
- body: [value],
- end: value[:end],
- char_end: value[:char_end]
- )
- end
- end
-
- # undef nodes represent using the keyword undef. It accepts as an argument
- # an array of symbol_literal nodes that represent each message that the
- # user is attempting to undefine. We use the keyword to get the beginning
- # location and the last symbol to get the ending.
- def on_undef(symbol_literals)
- last = symbol_literals.last
-
- find_scanner_event(:@kw, 'undef').merge!(
- type: :undef,
- body: symbol_literals,
- end: last[:end],
- char_end: last[:char_end]
- )
- end
-
- # unless is a parser event that represents the first clause in an unless
- # chain. It accepts as arguments the predicate of the unless, the
- # statements that are contained within the unless clause, and the optional
- # consequent clause.
- def on_unless(predicate, stmts, consequent)
- beging = find_scanner_event(:@kw, 'unless')
- ending = consequent || find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :unless,
- body: [predicate, stmts, consequent],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # unless_mod is a parser event that represents the modifier form of an
- # unless statement. It accepts as arguments the predicate of the unless
- # and the statement that are contained within the unless clause.
- def on_unless_mod(predicate, statement)
- find_scanner_event(:@kw, 'unless')
-
- {
- type: :unless_mod,
- body: [predicate, statement],
- start: statement[:start],
- char_start: statement[:char_start],
- end: predicate[:end],
- char_end: predicate[:char_end]
- }
- end
-
- # until is a parser event that represents an until loop. It accepts as
- # arguments the predicate to the until and the statements that are
- # contained within the until clause.
- def on_until(predicate, stmts)
- beging = find_scanner_event(:@kw, 'until')
- ending = find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :until,
- body: [predicate, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # until_mod is a parser event that represents the modifier form of an
- # until loop. It accepts as arguments the predicate to the until and the
- # statement that is contained within the until loop.
- def on_until_mod(predicate, statement)
- find_scanner_event(:@kw, 'until')
-
- {
- type: :until_mod,
- body: [predicate, statement],
- start: statement[:start],
- char_start: statement[:char_start],
- end: predicate[:end],
- char_end: predicate[:char_end]
- }
- end
-
- # var_alias is a parser event that represents when you're using the alias
- # keyword with global variable arguments. You can optionally use
- # parentheses with this keyword, so we either track the location
- # information based on those or the final argument to the alias method.
- def on_var_alias(left, right)
- beging = find_scanner_event(:@kw, 'alias')
-
- paren = source[beging[:char_end]...left[:char_start]].include?('(')
- ending = paren ? find_scanner_event(:@rparen) : right
-
- {
- type: :var_alias,
- body: [left, right],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # var_ref is a parser event that represents using either a local variable,
- # a nil literal, a true or false literal, or a numbered block variable.
- def on_var_ref(contents)
- contents.merge(type: :var_ref, body: [contents])
- end
-
- # var_field is a parser event that represents a variable that is being
- # assigned a value. As such, it is always a child of an assignment type
- # node. For example, in the following example foo is a var_field:
- #
- # foo = 1
- #
- def on_var_field(ident)
- if ident
- ident.merge(type: :var_field, body: [ident])
- else
- # You can hit this pattern if you're assigning to a splat using pattern
- # matching syntax in Ruby 2.7+
- { type: :var_field, body: [] }
- end
- end
-
- # vcall nodes are any plain named thing with Ruby that could be either a
- # local variable or a method call. They accept as an argument the ident
- # scanner event that contains their content.
- #
- # Access controls like private, protected, and public are reported as
- # vcall nodes since they're technically method calls. We want to be able
- # add new lines around them as necessary, so here we're going to
- # explicitly track those as a different node type.
- def on_vcall(ident)
- @controls ||= %w[private protected public].freeze
-
- body = ident[:body]
- type =
- if @controls.include?(body) && body == lines[lineno - 1].strip
- :access_ctrl
- else
- :vcall
- end
-
- ident.merge(type: type, body: [ident])
- end
-
- # void_stmt is a special kind of parser event that represents an empty lexical
- # block of code. It often will have comments attached to it, so it requires
- # some special handling.
- def on_void_stmt
- {
- type: :void_stmt,
- start: lineno,
- end: lineno,
- char_start: char_pos,
- char_end: char_pos
- }
- end
-
- # when is a parser event that represents another clause in a case chain.
- # It accepts as arguments the predicate of the when, the statements that
- # are contained within the else if clause, and the optional consequent
- # clause.
- def on_when(predicate, stmts, consequent)
- beging = find_scanner_event(:@kw, 'when')
- ending = consequent || find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :when,
- body: [predicate, stmts, consequent],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # while is a parser event that represents a while loop. It accepts as
- # arguments the predicate to the while and the statements that are
- # contained within the while clause.
- def on_while(predicate, stmts)
- beging = find_scanner_event(:@kw, 'while')
- ending = find_scanner_event(:@kw, 'end')
-
- stmts.bind(predicate[:char_end], ending[:char_start])
-
- {
- type: :while,
- body: [predicate, stmts],
- start: beging[:start],
- char_start: beging[:char_start],
- end: ending[:end],
- char_end: ending[:char_end]
- }
- end
-
- # while_mod is a parser event that represents the modifier form of an
- # while loop. It accepts as arguments the predicate to the while and the
- # statement that is contained within the while loop.
- def on_while_mod(predicate, statement)
- find_scanner_event(:@kw, 'while')
-
- {
- type: :while_mod,
- body: [predicate, statement],
- start: statement[:start],
- char_start: statement[:char_start],
- end: predicate[:end],
- char_end: predicate[:char_end]
- }
- end
-
- # word_new is a parser event that represents the beginning of a word
- # within a special array literal (either strings or symbols) that accepts
- # interpolation. For example, in the following array, there are three
- # word nodes:
- #
- # %W[one a#{two}a three]
- #
- # Each word inside that array is represented as its own node, which is in
- # terms of the parser a tree of word_new and word_add nodes. For our
- # purposes, we're going to report this as a word node and build up an
- # array body of our parts.
- def on_word_new
- { type: :word, body: [] }
- end
-
- # word_add is a parser event that represents a piece of a word within a
- # special array literal that accepts interpolation. It accepts as
- # arguments the parent word node as well as the additional piece of the
- # word, which can be either a @tstring_content node for a plain string
- # piece or a string_embexpr for an interpolated piece.
- def on_word_add(word, piece)
- if word[:body].empty?
- # Here we're making sure we get the correct bounds by using the
- # location information from the first piece.
- piece.merge(type: :word, body: [piece])
- else
- word.merge!(
- body: word[:body] << piece,
- end: piece[:end],
- char_end: piece[:char_end]
- )
- end
- end
-
- # words_new is a parser event that represents the beginning of a string
- # literal array that accepts interpolation, like %W[one #{two} three]. It
- # can be followed by any number of words_add events, which we'll append
- # onto an array body.
- def on_words_new
- find_scanner_event(:@words_beg).merge!(type: :words, body: [])
- end
-
- # words_add is a parser event that represents an element inside of a
- # string literal array that accepts interpolation, like
- # %W[one #{two} three]. It accepts as arguments the parent words node as
- # well as a word_add parser event.
- def on_words_add(words, word_add)
- words.merge!(
- body: words[:body] << word_add,
- end: word_add[:end],
- char_end: word_add[:char_end]
- )
- end
-
- # xstring_new is a parser event that represents the beginning of a string
- # of commands that gets sent out to the terminal, like `ls`. It can
- # optionally include interpolation much like a regular string, so we're
- # going to build up an array body.
- #
- # If the xstring actually starts with a heredoc declaration, then we're
- # going to let heredocs continue to do their thing and instead just use
- # its location information.
- def on_xstring_new
- heredoc = @heredocs[-1]
-
- if heredoc && heredoc[:beging][3] = '`'
- heredoc.merge(type: :xstring, body: [])
- elsif RUBY_MAJOR <= 2 && RUBY_MINOR <= 5 && RUBY_PATCH < 7
- { type: :xstring, body: [] }
- else
- find_scanner_event(:@backtick).merge!(type: :xstring, body: [])
- end
- end
-
- # xstring_add is a parser event that represents a piece of a string of
- # commands that gets sent out to the terminal, like `ls`. It accepts two
- # arguments, the parent xstring node as well as the piece that is being
- # added to the string. Because it supports interpolation this is either a
- # tstring_content scanner event representing bare string content or a
- # string_embexpr representing interpolated content.
- def on_xstring_add(xstring, piece)
- xstring.merge!(
- body: xstring[:body] << piece,
- end: piece[:end],
- char_end: piece[:char_end]
- )
- end
-
- # xstring_literal is a parser event that represents a string of commands
- # that gets sent to the terminal, like `ls`. It accepts as its only
- # argument an xstring node that is a built up array representation of all
- # of the parts of the string (including the plain string content and the
- # interpolated content).
- #
- # They can also use heredocs to present themselves, as in the example:
- #
- # <<-`SHELL`
- # ls
- # SHELL
- #
- # In this case we need to change the node type to be a heredoc instead of
- # an xstring_literal in order to get the right formatting.
- def on_xstring_literal(xstring)
- heredoc = @heredocs[-1]
-
- if heredoc && heredoc[:beging][3] = '`'
- heredoc.merge!(body: xstring[:body])
- else
- ending = find_scanner_event(:@tstring_end)
- xstring.merge!(
- type: :xstring_literal,
- end: ending[:end],
- char_end: ending[:char_end]
- )
- end
- end
-
- # yield is a parser event that represents using the yield keyword with
- # arguments. It accepts as an argument an args_add_block event that
- # contains all of the arguments being passed.
- def on_yield(args_add_block)
- find_scanner_event(:@kw, 'yield').merge!(
- type: :yield,
- body: [args_add_block],
- end: args_add_block[:end],
- char_end: args_add_block[:char_end]
- )
- end
-
- # yield0 is a parser event that represents the bare yield keyword. It has
- # no body as it accepts no arguments. This is as opposed to the yield
- # parser event, which is the version where you're yielding one or more
- # values.
- def on_yield0
- find_scanner_event(:@kw, 'yield').merge!(type: :yield0)
- end
-
- # zsuper is a parser event that represents the bare super keyword. It has
- # no body as it accepts no arguments. This is as opposed to the super
- # parser event, which is the version where you're calling super with one
- # or more values.
- def on_zsuper
- find_scanner_event(:@kw, 'super').merge!(type: :zsuper)
- end
-end
-
-# If this is the main file we're executing, then most likely this is being
-# executed from the parser.js spawn. In that case, read the ruby source from
-# stdin and report back the AST over stdout.
-
-if $0 == __FILE__
- builder = Prettier::Parser.new($stdin.read)
- response = builder.parse
-
- if !response || builder.error?
- warn(
- '@prettier/plugin-ruby encountered an error when attempting to parse ' \
- 'the ruby source. This usually means there was a syntax error in the ' \
- 'file in question. You can verify by running `ruby -i [path/to/file]`.'
- )
-
- exit 1
- end
-
- puts JSON.fast_generate(response)
-end
diff --git a/src/plugin.js b/src/plugin.js
new file mode 100644
index 00000000..71d2030b
--- /dev/null
+++ b/src/plugin.js
@@ -0,0 +1,381 @@
+import { spawn } from "child_process";
+import fs from "fs";
+import net from "net";
+import os from "os";
+import path from "path";
+import process from "process";
+import url from "url";
+import { resolveConfigFile } from "prettier";
+
+// In order to properly parse ruby code, we need to tell the ruby process to
+// parse using UTF-8. Unfortunately, the way that you accomplish this looks
+// differently depending on your platform.
+function getLang() {
+ const { env, platform } = process;
+ const envValue = env.LC_ALL || env.LC_CTYPE || env.LANG;
+
+ // If an env var is set for the locale that already includes UTF-8 in the
+ // name, then assume we can go with that.
+ if (envValue && envValue.includes("UTF-8")) {
+ return envValue;
+ }
+
+ // Otherwise, we're going to guess which encoding to use based on the system.
+ // This is probably not the best approach in the world, as you could be on
+ // linux and not have C.UTF-8, but in that case you're probably passing an env
+ // var for it. This object below represents all of the possible values of
+ // process.platform per:
+ // https://nodejs.org/api/process.html#process_process_platform
+ return {
+ aix: "C.UTF-8",
+ android: "C.UTF-8",
+ cygwin: "C.UTF-8",
+ darwin: "en_US.UTF-8",
+ freebsd: "C.UTF-8",
+ haiku: "C.UTF-8",
+ linux: "C.UTF-8",
+ netbsd: "C.UTF-8",
+ openbsd: "C.UTF-8",
+ sunos: "C.UTF-8",
+ win32: ".UTF-8"
+ }[platform];
+}
+
+// Return the list of plugins that should be passed to the server process.
+function getPlugins(opts) {
+ const plugins = new Set();
+
+ const rubyPlugins = opts.rubyPlugins.trim();
+ if (rubyPlugins.length > 0) {
+ rubyPlugins.split(",").forEach((plugin) => plugins.add(plugin.trim()));
+ }
+
+ if (opts.rubySingleQuote) {
+ plugins.add("plugin/single_quotes");
+ }
+
+ if (opts.trailingComma !== "none") {
+ plugins.add("plugin/trailing_comma");
+ }
+
+ return Array.from(plugins);
+}
+
+// Create a file that will act as a communication mechanism, spawn a parser
+// server with that filepath as an argument, then wait for the file to be
+// created that will contain the connection information.
+export async function spawnServer(opts, killOnExit = true) {
+ const tmpdir = os.tmpdir();
+ const filepath = path.join(tmpdir, `prettier-ruby-parser-${process.pid}.txt`);
+
+ const options = {
+ env: Object.assign({}, process.env, { LANG: getLang() }),
+ stdio: ["ignore", "ignore", "inherit"],
+ detached: true
+ };
+
+ if (opts.filepath) {
+ const prettierConfig = await resolveConfigFile(opts.filepath);
+ options.cwd = path.dirname(prettierConfig);
+ }
+
+ const server = spawn(
+ opts.rubyExecutablePath || "ruby",
+ [
+ url.fileURLToPath(new URL("./server.rb", import.meta.url)),
+ `--plugins=${getPlugins(opts).join(",")}`,
+ filepath
+ ],
+ options
+ );
+
+ server.unref();
+
+ if (killOnExit) {
+ process.on("exit", () => {
+ if (fs.existsSync(filepath)) {
+ fs.unlinkSync(filepath);
+ }
+
+ try {
+ if (server.pid) {
+ // Kill the server process if it's still running. If we're on windows
+ // we're going to use the process ID number. If we're not, we're going
+ // to use the negative process ID to indicate the group.
+ const pid = process.platform === "win32" ? server.pid : -server.pid;
+ process.kill(pid);
+ }
+ } catch (error) {
+ // If there's an error killing the process, we're going to ignore it.
+ }
+ });
+ }
+
+ return new Promise((resolve, reject) => {
+ const interval = setInterval(() => {
+ if (fs.existsSync(filepath)) {
+ const connectionJSON = fs.readFileSync(filepath).toString("utf-8");
+ resolve({
+ serverPID: server.pid,
+ connectionFilepath: filepath,
+ connectionOptions: JSON.parse(connectionJSON)
+ });
+
+ clearTimeout(timeout);
+ clearInterval(interval);
+ } else if (server.exitCode) {
+ reject(new Error("Failed to start parse server."));
+ clearTimeout(timeout);
+ clearInterval(interval);
+ }
+ }, 100);
+
+ const timeout = setTimeout(
+ () => {
+ const message =
+ "Failed to get connection options from parse server in time. If this happens repeatedly, try increasing the PRETTIER_RUBY_TIMEOUT_MS environment variable beyond 10000.";
+
+ clearInterval(interval);
+ reject(new Error(message));
+ },
+ parseInt(process.env.PRETTIER_RUBY_TIMEOUT_MS || "10000", 10)
+ );
+ });
+}
+
+let connectionOptions;
+if (process.env.PRETTIER_RUBY_HOST) {
+ connectionOptions = JSON.parse(process.env.PRETTIER_RUBY_HOST);
+}
+
+// Formats and sends an asynchronous request to the parser server.
+async function parse(parser, source, opts) {
+ if (!connectionOptions) {
+ const spawnedServer = await spawnServer(opts);
+ connectionOptions = spawnedServer.connectionOptions;
+ }
+
+ return new Promise((resolve, reject) => {
+ const socket = new net.Socket();
+ let chunks = "";
+
+ socket.on("error", (error) => {
+ reject(error);
+ });
+
+ socket.on("data", (data) => {
+ chunks += data.toString("utf-8");
+ });
+
+ socket.on("end", () => {
+ const response = JSON.parse(chunks);
+
+ if (response.error) {
+ const error = new Error(response.error);
+ if (response.loc) {
+ error.loc = response.loc;
+ }
+
+ reject(error);
+ }
+
+ resolve(response);
+ });
+
+ socket.connect(connectionOptions, () => {
+ socket.end(
+ JSON.stringify({
+ parser,
+ source,
+ maxwidth: opts.printWidth,
+ tabwidth: opts.tabWidth
+ })
+ );
+ });
+ });
+}
+
+// Metadata mostly pulled from linguist and rubocop:
+// https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
+// https://github.com/rubocop/rubocop/blob/master/spec/rubocop/target_finder_spec.rb
+const plugin = {
+ languages: [
+ {
+ name: "Ruby",
+ parsers: ["ruby"],
+ extensions: [
+ ".arb",
+ ".axlsx",
+ ".builder",
+ ".eye",
+ ".fcgi",
+ ".gemfile",
+ ".gemspec",
+ ".god",
+ ".jb",
+ ".jbuilder",
+ ".mspec",
+ ".opal",
+ ".pluginspec",
+ ".podspec",
+ ".rabl",
+ ".rake",
+ ".rb",
+ ".rbi",
+ ".rbuild",
+ ".rbw",
+ ".rbx",
+ ".ru",
+ ".ruby",
+ ".thor",
+ ".watchr"
+ ],
+ filenames: [
+ ".irbrc",
+ ".pryrc",
+ ".simplecov",
+ "Appraisals",
+ "Berksfile",
+ "Brewfile",
+ "Buildfile",
+ "Capfile",
+ "Cheffile",
+ "Dangerfile",
+ "Deliverfile",
+ "Fastfile",
+ "Gemfile",
+ "Guardfile",
+ "Jarfile",
+ "Mavenfile",
+ "Podfile",
+ "Puppetfile",
+ "Rakefile",
+ "Snapfile",
+ "Thorfile",
+ "Vagabondfile",
+ "Vagrantfile",
+ "buildfile"
+ ],
+ interpreters: ["jruby", "macruby", "rake", "rbx", "ruby"],
+ linguistLanguageId: 326,
+ vscodeLanguageIds: ["ruby"]
+ },
+ {
+ name: "RBS",
+ parsers: ["rbs"],
+ extensions: [".rbs"]
+ },
+ {
+ name: "HAML",
+ parsers: ["haml"],
+ extensions: [".haml"],
+ vscodeLanguageIds: ["haml"]
+ }
+ ],
+ parsers: {
+ ruby: {
+ parse(text, opts) {
+ return parse("ruby", text, opts);
+ },
+ astFormat: "ruby",
+ hasPragma(text) {
+ return /^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/m.test(text);
+ },
+ locStart() {
+ return 0;
+ },
+ locEnd() {
+ return 0;
+ }
+ },
+ rbs: {
+ parse(text, opts) {
+ return parse("rbs", text, opts);
+ },
+ astFormat: "rbs",
+ hasPragma(text) {
+ return /^\s*#[^\S\n]*@(prettier|format)\s*(\n|$)/.test(text);
+ },
+ locStart() {
+ return 0;
+ },
+ locEnd() {
+ return 0;
+ }
+ },
+ haml: {
+ parse(text, opts) {
+ return parse("haml", text, opts);
+ },
+ astFormat: "haml",
+ hasPragma(text) {
+ return /^\s*-#\s*@(prettier|format)/.test(text);
+ },
+ locStart() {
+ return 0;
+ },
+ locEnd() {
+ return 0;
+ }
+ }
+ },
+ printers: {
+ ruby: {
+ print(path) {
+ return path.getValue();
+ },
+ insertPragma(text) {
+ return `# @format${text.startsWith("#") ? "\n" : "\n\n"}${text}`;
+ }
+ },
+ rbs: {
+ print(path) {
+ return path.getValue();
+ },
+ insertPragma(text) {
+ return `# @format${text.startsWith("#") ? "\n" : "\n\n"}${text}`;
+ }
+ },
+ haml: {
+ print(path) {
+ return path.getValue();
+ },
+ insertPragma(text) {
+ return `-# @format${text.startsWith("-#") ? "\n" : "\n\n"}${text}`;
+ }
+ }
+ },
+ options: {
+ rubyPlugins: {
+ type: "string",
+ category: "Ruby",
+ default: "",
+ description: "The comma-separated list of plugins to require.",
+ since: "3.1.0"
+ },
+ rubySingleQuote: {
+ type: "boolean",
+ category: "Ruby",
+ default: false,
+ description:
+ "When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals.",
+ since: "1.0.0"
+ },
+ rubyExecutablePath: {
+ type: "string",
+ category: "Ruby",
+ default: "ruby",
+ description:
+ "The path to the Ruby executable to use to run the formatter.",
+ since: "3.3.0"
+ }
+ },
+ defaultOptions: {
+ printWidth: 80,
+ tabWidth: 2,
+ trailingComma: "none",
+ singleQuote: false
+ }
+};
+
+export default plugin;
diff --git a/src/prettier.js b/src/prettier.js
deleted file mode 100644
index 9774eac1..00000000
--- a/src/prettier.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// If `RBPRETTIER` is set, then this is being run from the `Prettier::run` ruby
-// method. In that case, we need to pull `prettier` from the node_modules
-// directly, as it's been shipped with the gem.
-const source = process.env.RBPRETTIER ? "../node_modules/prettier" : "prettier";
-
-const prettier = require(source);
-
-// Just combine all the things into one big object so that we can import
-// whatever we need from prettier without having to dive too deeply.
-module.exports = Object.assign(
- {},
- prettier.doc.builders,
- prettier.doc.utils,
- prettier.util
-);
diff --git a/src/printer.js b/src/printer.js
deleted file mode 100644
index 7588b127..00000000
--- a/src/printer.js
+++ /dev/null
@@ -1,90 +0,0 @@
-const { concat, trim } = require("./prettier");
-
-const embed = require("./embed");
-const nodes = require("./nodes");
-
-// This is the generic node print function, used to convert any node in the AST
-// into its equivalent Doc representation.
-function printNode(path, opts, print) {
- const { type, body } = path.getValue();
-
- if (type in nodes) {
- return nodes[type](path, opts, print);
- }
-
- if (type[0] === "@") {
- return body;
- }
-
- const ast = JSON.stringify(body, null, 2);
- throw new Error(`Unsupported node encountered: ${type}\n${ast}`);
-}
-
-const noComments = [
- "args",
- "args_add_block",
- "args_add_star",
- "mlhs",
- "mlhs_add_post",
- "mlhs_add_star"
-];
-
-// Certain nodes are used more for organizational purposed than for actually
-// displaying content, so we tell prettier that we don't want comments attached
-// to them.
-function canAttachComment(node) {
- return !noComments.includes(node.type);
-}
-
-// This function tells prettier how to recurse down our AST so that it can find
-// where it needs to attach the comments.
-function getCommentChildNodes(node) {
- switch (node.type) {
- case "heredoc":
- return [node.beging];
- case "rescue":
- return [].concat(node.body[0]).concat(node.body.slice(1));
- case "aryptn":
- return [node.body[0]]
- .concat(node.body[1])
- .concat(node.body[2])
- .concat(node.body[3]);
- case "hshptn": {
- const pairs = node.body[1];
- const values = pairs.reduce((left, right) => left.concat(right), []);
-
- return [node.body[0]].concat(values).concat(node.body[2]);
- }
- default:
- return node.body;
- }
-}
-
-// This is the generic print function for any comment in the AST. It handles
-// both regular comments that begin with a # and embdoc comments, which are
-// surrounded by =begin..=end.
-function printComment(path, _opts) {
- const comment = path.getValue();
-
- if (comment.type === "@comment") {
- return `#${comment.value}`;
- }
-
- return concat([trim, comment.value]);
-}
-
-// To be honest I'm not 100% sure this function is actually necessary, but it
-// *feels* like a block comment equivalent in JavaScript so I'm going to leave
-// it in place for now.
-function isBlockComment(comment) {
- return comment.type === "@embdoc";
-}
-
-module.exports = {
- embed,
- print: printNode,
- canAttachComment,
- getCommentChildNodes,
- printComment,
- isBlockComment
-};
diff --git a/src/ruby.js b/src/ruby.js
deleted file mode 100644
index 5c98657a..00000000
--- a/src/ruby.js
+++ /dev/null
@@ -1,120 +0,0 @@
-const printer = require("./printer");
-const parser = require("./parser");
-
-/*
- * metadata mostly pulled from linguist and rubocop:
- * https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
- * https://github.com/rubocop-hq/rubocop/blob/master/spec/rubocop/target_finder_spec.rb
- */
-
-module.exports = {
- languages: [
- {
- name: "Ruby",
- parsers: ["ruby"],
- extensions: [
- ".arb",
- ".axlsx",
- ".builder",
- ".eye",
- ".fcgi",
- ".gemfile",
- ".gemspec",
- ".god",
- ".jb",
- ".jbuilder",
- ".mspec",
- ".opal",
- ".pluginspec",
- ".podspec",
- ".rabl",
- ".rake",
- ".rb",
- ".rbuild",
- ".rbw",
- ".rbx",
- ".ru",
- ".ruby",
- ".thor",
- ".watchr"
- ],
- filenames: [
- ".irbrc",
- ".pryrc",
- ".simplecov",
- "Appraisals",
- "Berksfile",
- "Brewfile",
- "Buildfile",
- "Capfile",
- "Cheffile",
- "Dangerfile",
- "Deliverfile",
- "Fastfile",
- "Gemfile",
- "Guardfile",
- "Jarfile",
- "Mavenfile",
- "Podfile",
- "Puppetfile",
- "Rakefile",
- "Snapfile",
- "Thorfile",
- "Vagabondfile",
- "Vagrantfile",
- "buildfile"
- ],
- interpreters: ["jruby", "macruby", "rake", "rbx", "ruby"],
- linguistLanguageId: 326,
- vscodeLanguageIds: ["ruby"]
- }
- ],
- parsers: {
- ruby: parser
- },
- printers: {
- ruby: printer
- },
- options: {
- rubyArrayLiteral: {
- type: "boolean",
- category: "Ruby",
- default: true,
- description:
- "When possible, favor the use of string and symbol array literals."
- },
- rubyHashLabel: {
- type: "boolean",
- category: "Ruby",
- default: true,
- description:
- "When possible, uses the shortened hash key syntax, as opposed to hash rockets."
- },
- rubyModifier: {
- type: "boolean",
- category: "Ruby",
- default: true,
- description:
- "When it fits on one line, allows if, unless, while, and until statements to use the modifier form."
- },
- rubySingleQuote: {
- type: "boolean",
- category: "Ruby",
- default: true,
- description:
- "When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals."
- },
- rubyToProc: {
- type: "boolean",
- category: "Ruby",
- default: false,
- description:
- "When possible, convert blocks to the more concise Symbol#to_proc syntax."
- }
- },
- defaultOptions: {
- printWidth: 80,
- tabWidth: 2,
- trailingComma: "none"
- }
-};
diff --git a/src/server.rb b/src/server.rb
new file mode 100644
index 00000000..d5876cf7
--- /dev/null
+++ b/src/server.rb
@@ -0,0 +1,167 @@
+# frozen_string_literal: true
+
+require "bundler/setup"
+require "json"
+require "socket"
+
+require "syntax_tree"
+
+# Optional dependencies
+%W[syntax_tree/rbs syntax_tree/haml prettier_print].each do |dep|
+ begin
+ require dep
+ rescue LoadError
+ end
+end
+
+# First, require all of the plugins that the user specified.
+ARGV.shift[/^--plugins=(.*)$/, 1]
+ .split(",")
+ .each { |plugin| require "syntax_tree/#{plugin}" }
+
+# Next, get the file where we should write our connection information.
+connection_filepath = ARGV.shift
+
+# Make sure we trap these signals to be sure we get the quit command coming from
+# the parent node process
+quit = false
+trap(:INT) { quit = true }
+trap(:TERM) { quit = true }
+
+if Signal.list.key?("QUIT") && RUBY_ENGINE != "jruby"
+ trap(:QUIT) { quit = true }
+end
+
+connection_information =
+ if Gem.win_platform?
+ # If we're on windows, we're going to start up a TCP server. The 0 here
+ # means to bind to some available port.
+ server = TCPServer.new(0)
+ address = server.local_address
+
+ # Ensure that we close the server when this process exits.
+ at_exit { server.close }
+
+ # Return the connection information.
+ { address: address.ip_address, port: address.ip_port }
+ else
+ # If we're not on windows, then we're going to assume we can use unix socket
+ # files (since they're faster than a TCP server).
+ filepath = "/tmp/prettier-ruby-parser-#{Process.pid}.sock"
+ server = UNIXServer.new(filepath)
+
+ # Ensure that we close the server and delete the socket file when this
+ # process exits.
+ at_exit do
+ server.close
+ File.unlink(filepath)
+ end
+
+ # Return the connection information.
+ { path: server.local_address.unix_path }
+ end
+
+# This is the actual listening thread that will be acting as our server. We have
+# to start it in another thread in order to properly trap the signals in this
+# parent thread.
+listener =
+ Thread.new do
+ loop do
+ break if quit
+
+ # Start up a new thread that will handle each successive connection.
+ Thread.new(server.accept_nonblock) do |socket|
+ request = JSON.parse(socket.read.force_encoding("UTF-8"))
+ source = request["source"]
+
+ source.each_line do |line|
+ case line
+ when /^\s*#.+?coding/
+ # If we've found an encoding comment, then we're going to take that
+ # into account and reclassify the encoding for the source.
+ encoding = Ripper.new(line).tap(&:parse).encoding
+ source = source.force_encoding(encoding)
+ break
+ when /^\s*#/
+ # continue
+ else
+ break
+ end
+ end
+
+ # At the moment, we're not going to support odd tabwidths. It's going to
+ # have to be a multiple of 2, because of the way that the prettyprint
+ # gem functions. So we're going to just use integer division here.
+ scalar = request["tabwidth"].to_i / 2
+ genspace = ->(n) { " " * n * scalar }
+
+ maxwidth = request["maxwidth"].to_i
+ response =
+ case request["parser"]
+ when "ruby"
+ formatter =
+ SyntaxTree::Formatter.new(source, [], maxwidth, "\n", &genspace)
+ SyntaxTree.parse(source).format(formatter)
+ formatter.flush
+ formatter.output.join
+ when "rbs"
+ formatter =
+ SyntaxTree::RBS::Formatter.new(
+ source,
+ [],
+ maxwidth,
+ "\n",
+ &genspace
+ )
+ SyntaxTree::RBS.parse(source).format(formatter)
+ formatter.flush
+ formatter.output.join
+ when "haml"
+ formatter =
+ if defined?(SyntaxTree::Haml::Format::Formatter)
+ SyntaxTree::Haml::Format::Formatter.new(
+ source,
+ +"",
+ maxwidth,
+ "\n",
+ &genspace
+ )
+ else
+ PrettierPrint.new(+"", maxwidth, "\n", &genspace)
+ end
+
+ SyntaxTree::Haml.parse(source).format(formatter)
+ formatter.flush
+ formatter.output
+ end
+
+ if response
+ socket.write(JSON.fast_generate(response.force_encoding("UTF-8")))
+ else
+ socket.write("{ \"error\": true }")
+ end
+ rescue SyntaxTree::Parser::ParseError => error
+ loc = { start: { line: error.lineno, column: error.column } }
+ socket.write(JSON.fast_generate(error: error.message, loc: loc))
+ rescue StandardError => error
+ begin
+ socket.write(JSON.fast_generate(error: error.message))
+ rescue Errno::EPIPE
+ # Do nothing, the pipe has been closed by the parent process so we
+ # don't actually care about writing to it anymore.
+ end
+ ensure
+ socket.close
+ end
+ rescue IO::WaitReadable, Errno::EINTR
+ # Wait for select(2) to give us a connection that has content for 1
+ # second. Otherwise timeout and continue on (so that we hit our
+ # "break if quit" pretty often).
+ IO.select([server], nil, nil, 1)
+
+ retry unless quit
+ end
+ end
+
+File.write(connection_filepath, JSON.fast_generate(connection_information))
+listener.join
diff --git a/src/toProc.js b/src/toProc.js
deleted file mode 100644
index ecd40a17..00000000
--- a/src/toProc.js
+++ /dev/null
@@ -1,109 +0,0 @@
-const isCall = (node) => ["::", "."].includes(node) || node.type === "@period";
-
-// If you have a simple block that only calls a method on the single required
-// parameter that is passed to it, then you can replace that block with the
-// simpler `Symbol#to_proc`. Meaning, it would go from:
-//
-// [1, 2, 3].map { |i| i.to_s }
-//
-// to:
-//
-// [1, 2, 3].map(&:to_s)
-//
-// This works with `do` blocks as well.
-const toProc = (path, node) => {
- if (!node) {
- return null;
- }
-
- const [variables, blockContents] = node.body;
-
- // Ensure that there are variables being passed to this block.
- const params = variables && variables.body[0];
- if (!params || params.type !== "params") {
- return null;
- }
-
- // Ensure there is one and only one parameter, and that it is required.
- const reqParams = params.body[0];
- const otherParams = params.body.slice(1);
- if (
- !Array.isArray(reqParams) ||
- reqParams.length !== 1 ||
- otherParams.some(Boolean)
- ) {
- return null;
- }
-
- let statements;
- if (blockContents.type === "bodystmt") {
- // We’re in a `do` block
- const blockStatements = blockContents.body[0];
- const rescueElseEnsure = blockStatements.body.slice(1);
-
- // You can’t use the to_proc shortcut if you’re rescuing
- if (rescueElseEnsure.some(Boolean)) {
- return null;
- }
-
- statements = blockStatements;
- } else {
- // We’re in a brace block
- statements = blockContents;
- }
-
- // Ensure the block contains only one statement
- if (statements.body.length !== 1) {
- return null;
- }
-
- // Ensure that statement is a call and that it has no comments attached
- const [statement] = statements.body;
- if (statement.type !== "call" || statement.comments) {
- return null;
- }
-
- // Ensure the call is a method of the block argument
- const [varRef, call, method, args] = statement.body;
-
- if (
- varRef.type !== "var_ref" ||
- varRef.body[0].body !== reqParams[0].body ||
- !isCall(call) ||
- method.type !== "@ident" ||
- args
- ) {
- return null;
- }
-
- // Ensure that we're not inside of a hash that is being passed to a key that
- // corresponds to `:if` or `:unless` to avoid problems with callbacks with
- // Rails. For more context, see:
- // https://github.com/prettier/plugin-ruby/issues/449
- let assocNode = null;
-
- if (path.getValue().type === "method_add_block") {
- assocNode = path.getParentNode();
- } else if (path.getValue().type === "args") {
- assocNode = path.getParentNode(2);
- }
-
- if (assocNode && assocNode.type === "assoc_new") {
- const [key] = assocNode.body;
-
- if (key.type === "@label" && ["if:", "unless:"].includes(key.body)) {
- return null;
- }
-
- if (
- key.type === "symbol_literal" &&
- ["if", "unless"].includes(key.body[0].body[0].body)
- ) {
- return null;
- }
- }
-
- return `&:${method.body}`;
-};
-
-module.exports = toProc;
diff --git a/src/utils.js b/src/utils.js
deleted file mode 100644
index ea5d9ae9..00000000
--- a/src/utils.js
+++ /dev/null
@@ -1,95 +0,0 @@
-const { concat } = require("./prettier");
-const isEmptyStmts = require("./utils/isEmptyStmts");
-const literalLineNoBreak = require("./utils/literalLineNoBreak");
-const printEmptyCollection = require("./utils/printEmptyCollection");
-
-// If the node is a type of assignment or if the node is a paren and nested
-// inside that paren is a node that is a type of assignment.
-const containsAssignment = (node) =>
- node &&
- (["assign", "massign", "opassign"].includes(node.type) ||
- (Array.isArray(node.body) && node.body.some(containsAssignment)));
-
-const docLength = (doc) => {
- if (doc.length) {
- return doc.length;
- }
-
- if (doc.parts) {
- return doc.parts.reduce((sum, child) => sum + docLength(child), 0);
- }
-
- if (doc.contents) {
- return docLength(doc.contents);
- }
-
- return 0;
-};
-
-const empty = () => "";
-
-const first = (path, opts, print) => path.call(print, "body", 0);
-
-const getTrailingComma = (opts) => ["all", "es5"].includes(opts.trailingComma);
-
-const hasAncestor = (path, types) => {
- let parent = 0;
- let parentNode = path.getParentNode();
-
- while (parentNode) {
- if (types.includes(parentNode.type)) {
- return true;
- }
-
- parent += 1;
- parentNode = path.getParentNode(parent);
- }
-
- return false;
-};
-
-const literal = (value) => () => value;
-
-const makeCall = (path, opts, print) => {
- const operation = path.getValue().body[1];
-
- if ([".", "&."].includes(operation)) {
- return operation;
- }
-
- return operation === "::" ? "." : path.call(print, "body", 1);
-};
-
-const noIndent = [
- "array",
- "hash",
- "heredoc",
- "if",
- "method_add_block",
- "xstring_literal"
-];
-
-const prefix = (value) => (path, opts, print) =>
- concat([value, path.call(print, "body", 0)]);
-
-const skippable = ["array", "hash", "heredoc", "lambda", "regexp_literal"];
-const skipAssignIndent = (node) =>
- skippable.includes(node.type) ||
- (node.type === "call" && skipAssignIndent(node.body[0]));
-
-module.exports = {
- containsAssignment,
- docLength,
- empty,
- first,
- getTrailingComma,
- hasAncestor,
- isEmptyStmts,
- literal,
- literalLineNoBreak,
- makeCall,
- noIndent,
- prefix,
- printEmptyCollection,
- skipAssignIndent
-};
diff --git a/src/utils/inlineEnsureParens.js b/src/utils/inlineEnsureParens.js
deleted file mode 100644
index e1efab84..00000000
--- a/src/utils/inlineEnsureParens.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const needsParens = ["args", "assign", "assoc_new", "massign", "opassign"];
-
-// If you have a modifier statement (for instance an inline if statement or an
-// inline while loop) there are times when you need to wrap the entire statement
-// in parentheses. This occurs when you have something like:
-//
-// foo[:foo] =
-// if bar?
-// baz
-// end
-//
-// Normally we would shorten this to an inline version, which would result in:
-//
-// foo[:foo] = baz if bar?
-//
-// but this actually has different semantic meaning. The first example will
-// result in a nil being inserted into the hash for the :foo key, whereas the
-// second example will result in an empty hash because the if statement applies
-// to the entire assignment.
-//
-// We can fix this in a couple of ways. We can use the then keyword, as in:
-//
-// foo[:foo] = if bar? then baz end
-//
-// but I haven't actually seen this anywhere. We can also just leave it as is
-// with the multi-line version, but for a short predicate and short value it
-// looks pretty silly. The last option and the one I've selected here is to add
-// parentheses on both sides of the expression, as in:
-//
-// foo[:foo] = (baz if bar?)
-//
-// This approach maintains the nice conciseness of the inline version, while
-// keeping the correct semantic meaning.
-const inlineEnsureParens = (path, parts) => {
- if (needsParens.includes(path.getParentNode().type)) {
- return ["("].concat(parts, ")");
- }
-
- return parts;
-};
-
-module.exports = inlineEnsureParens;
diff --git a/src/utils/isEmptyStmts.js b/src/utils/isEmptyStmts.js
deleted file mode 100644
index 4d790400..00000000
--- a/src/utils/isEmptyStmts.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const isEmptyStmts = (node) =>
- node &&
- node.type === "stmts" &&
- node.body.length === 1 &&
- node.body[0].type === "void_stmt";
-
-module.exports = isEmptyStmts;
diff --git a/src/utils/literalLineNoBreak.js b/src/utils/literalLineNoBreak.js
deleted file mode 100644
index bdb058ce..00000000
--- a/src/utils/literalLineNoBreak.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const literalLineNoBreak = {
- type: "line",
- hard: true,
- literal: true
-};
-
-module.exports = literalLineNoBreak;
diff --git a/src/utils/printEmptyCollection.js b/src/utils/printEmptyCollection.js
deleted file mode 100644
index 6e5f02e9..00000000
--- a/src/utils/printEmptyCollection.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const { concat, group, hardline, indent, join, line } = require("../prettier");
-
-// Empty collections are array or hash literals that do not contain any
-// contents. They can, however, have comments inside the body. You can solve
-// this by having a child node inside the array that gets the comments attached
-// to it, but that requires modifying the parser. Instead, we can just manually
-// print out the non-leading comments here.
-function printEmptyCollection(path, opts, startToken, endToken) {
- const node = path.getValue();
-
- // If there are no comments or only leading comments, then we can just print
- // out the start and end token and be done, as there are no comments inside
- // the body of this node.
- if (!node.comments || !node.comments.some((comment) => !comment.leading)) {
- return `${startToken}${endToken}`;
- }
-
- const comments = [];
-
- // For each comment, go through its path and print it out manually.
- const printComment = (commentPath) => {
- const comment = commentPath.getValue();
-
- if (!comment.leading) {
- comment.printed = true;
- comments.push(opts.printer.printComment(commentPath));
- }
- };
-
- path.each(printComment, "comments");
-
- return group(
- concat([
- startToken,
- indent(concat([hardline, join(hardline, comments)])),
- line,
- endToken
- ])
- );
-}
-
-module.exports = printEmptyCollection;
diff --git a/test/js/alias.test.js b/test/js/alias.test.js
deleted file mode 100644
index 16f9c00c..00000000
--- a/test/js/alias.test.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("alias", () => {
- test("bare word aliases", () => expect("alias foo bar").toMatchFormat());
-
- test("bare word operator aliases", () =>
- expect("alias << push").toMatchFormat());
-
- test("bare word keyword aliases", () =>
- expect("alias in within").toMatchFormat());
-
- test("bare word constant aliases", () =>
- expect("alias in IN").toMatchFormat());
-
- test("symbol aliases become bare word aliases", () =>
- expect("alias :foo :bar").toChangeFormat("alias foo bar"));
-
- test("dynamic symbols do not get transformed (left)", () =>
- expect("alias :'foo' :bar").toChangeFormat("alias :'foo' bar"));
-
- test("dynamic symbols do not get transformed (right)", () =>
- expect("alias :foo :'bar'").toChangeFormat("alias foo :'bar'"));
-
- test("global aliases", () => expect("alias $foo $bar").toMatchFormat());
-
- test("handles long symbols", () => {
- const expected = ruby(`
- alias ${long}
- bar
- `);
-
- return expect(`alias ${long} bar`).toChangeFormat(expected);
- });
-
- test("handles comments on the right node", () =>
- expect("alias foo bar # baz").toMatchFormat());
-
- test("handles comments on the left node", () => {
- const content = ruby(`
- alias foo # baz
- bar
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("handles comments on both nodes", () => {
- const content = ruby(`
- alias foo # foo
- bar # bar
- `);
-
- return expect(content).toMatchFormat();
- });
-});
diff --git a/test/js/aref.test.js b/test/js/aref.test.js
deleted file mode 100644
index 665326b2..00000000
--- a/test/js/aref.test.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("aref", () => {
- test("literal reference", () => expect("array[5]").toMatchFormat());
-
- test("dynamic reference", () => expect("array[idx]").toMatchFormat());
-
- test("reference with comment", () =>
- expect("array[idx] # foo").toMatchFormat());
-
- test("literal assignment", () => expect("array[5] = 6").toMatchFormat());
-
- test("dynamic assignment", () => expect("array[idx] = 6").toMatchFormat());
-
- test("comments within assignment", () => {
- const contents = ruby(`
- array = %w[foo bar]
- array[1] = [
- # abc
- %w[abc]
- ]
- `);
-
- return expect(contents).toMatchFormat();
- });
-});
diff --git a/test/js/arrays.test.js b/test/js/arrays.test.js
deleted file mode 100644
index 018607f2..00000000
--- a/test/js/arrays.test.js
+++ /dev/null
@@ -1,128 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("array", () => {
- test("empty arrays", () => expect("[]").toMatchFormat());
-
- test("basic formatting", () => expect("[1, 2, 3]").toMatchFormat());
-
- test("does not transform single string arrays", () =>
- expect("['a']").toMatchFormat());
-
- test("does not transform single symbol arrays", () =>
- expect("[:a]").toMatchFormat());
-
- test("transforms basic string arrays", () =>
- expect("['a', 'b', 'c', 'd', 'e']").toChangeFormat("%w[a b c d e]"));
-
- test("does not transform string arrays with spaces", () =>
- expect("['a', 'b c', 'd', 'e']").toMatchFormat());
-
- test("does not transform string arrays with tabs", () =>
- expect(`['a', "b\\tc", 'd', 'e']`).toMatchFormat());
-
- test("does not transform string arrays with newlines", () =>
- expect(`['a', "b\\nc", 'd', 'e']`).toMatchFormat());
-
- test("does not transform string arrays with carriage returns", () =>
- expect(`['a', "b\\rc", 'd', 'e']`).toMatchFormat());
-
- test("does not transform string arrays with interpolation", () =>
- expect(`['a', "b#{c}d", 'e']`).toMatchFormat());
-
- test("does not transform string arrays with brackets", () =>
- expect(`['a [] b', 'c [] d']`).toMatchFormat());
-
- test("does not transform string arrays if disabled", () =>
- expect(`['a', 'b']`).toMatchFormat({ rubyArrayLiteral: false }));
-
- test("does not transform symbol arrays if disabled", () =>
- expect("[:a, :b]").toMatchFormat({ rubyArrayLiteral: false }));
-
- test("transforms basic symbol arrays", () =>
- expect("[:a, :b, :c]").toChangeFormat("%i[a b c]"));
-
- test("does not transform symbol arrays with dynamic symbols", () =>
- expect("[:'a + b']").toMatchFormat());
-
- test("handles splats", () => expect("[1, 2, *[3, 4], 5, 6]").toMatchFormat());
-
- test("breaks appropriately", () => {
- const contents = ruby(`
- [
- ${long},
- ${long},
- [
- ${long},
- ${long},
- ${long}
- ]
- ]
- `);
-
- return expect(contents).toMatchFormat();
- });
-
- test("adds trailing commas when requested", () => {
- const before = `[${long}, ${long}, ${long}]`;
- const after = `[\n ${long},\n ${long},\n ${long},\n]`;
-
- return expect(before).toChangeFormat(after, { trailingComma: "all" });
- });
-
- test("breaking maintains calls on the end", () =>
- expect(`[${long}].freeze`).toChangeFormat(`[\n ${long}\n].freeze`));
-
- describe("heredocs", () => {
- test("as the first value", () => {
- const content = ruby(`
- [<<~HERE, foo]
- this is the heredoc
- HERE
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("as the last value", () => {
- const content = ruby(`
- [foo, <<~HERE]
- this is the heredoc
- HERE
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("with splats in the array", () => {
- const content = ruby(`
- [foo, *bar, baz, <<~HERE]
- this is the heredoc
- HERE
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("with trailing commas", () => {
- const content = ruby(`
- [
- ${long},
- <<~HERE,
- this is the heredoc
- HERE
- ]
- `);
-
- return expect(content).toMatchFormat({ trailingComma: "all" });
- });
- });
-
- test("with leading comments but none in body", () => {
- const content = ruby(`
- # leading
- []
- `);
-
- return expect(content).toMatchFormat();
- });
-});
diff --git a/test/js/assign.test.js b/test/js/assign.test.js
deleted file mode 100644
index d4eb8a1a..00000000
--- a/test/js/assign.test.js
+++ /dev/null
@@ -1,87 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("assign", () => {
- describe("single assignment", () => {
- test("basic", () => expect("a = 1").toMatchFormat());
-
- test("multiline", () => {
- const content = ruby(`
- a =
- begin
- 1
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("other operator", () => expect("a ||= b").toMatchFormat());
- });
-
- test("heredoc", () => {
- const content = ruby(`
- text = <<-TEXT
- abcd
- TEXT
- `);
-
- return expect(content).toMatchFormat();
- });
-
- describe("breaking", () => {
- test("inline becomes multi line", () =>
- expect(`${long} = ${long}`).toChangeFormat(`${long} =\n ${long}`));
-
- test("arrays don't get force indented", () =>
- expect(`a = [${long}, ${long}, ${long}]`).toChangeFormat(
- ruby(`
- a = [
- ${long},
- ${long},
- ${long}
- ]
- `)
- ));
-
- test("hashes don't get force indented", () =>
- expect(`a = { a: ${long}, b: ${long}, c: ${long} }`).toChangeFormat(
- ruby(`
- a = {
- a:
- ${long},
- b:
- ${long},
- c:
- ${long}
- }
- `)
- ));
-
- test("chained methods on array literals don't get oddly indented", () =>
- expect(`a = [${long}].freeze`).toChangeFormat(
- ruby(`
- a = [
- ${long}
- ].freeze
- `)
- ));
-
- test("chained methods on hash literals don't get oddly indented", () =>
- expect(`a = { a: ${long} }.freeze`).toChangeFormat(
- ruby(`
- a = {
- a:
- ${long}
- }.freeze
- `)
- ));
- });
-
- describe("constants", () => {
- test("assigning to constant", () =>
- expect("Pret::TIER = 'config'").toMatchFormat());
-
- test("assigning to top level constants", () =>
- expect("::PRETTIER = 'config'").toMatchFormat());
- });
-});
diff --git a/test/js/blocks.test.js b/test/js/blocks.test.js
deleted file mode 100644
index 64f15aae..00000000
--- a/test/js/blocks.test.js
+++ /dev/null
@@ -1,129 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("blocks", () => {
- test("empty", () => expect("loop {}").toMatchFormat());
-
- test("single line non-breaking", () => expect("loop { 1 }").toMatchFormat());
-
- test("single line breaking", () =>
- expect(`loop { ${long} }`).toChangeFormat(`loop do\n ${long}\nend`));
-
- test("multi line non-breaking", () =>
- expect("loop do\n 1\nend").toChangeFormat("loop { 1 }"));
-
- test("multi-line breaking", () =>
- expect(`loop do\n ${long}\nend`).toMatchFormat());
-
- test("multi-line with comment", () =>
- expect("loop do\n # foobar\nend").toMatchFormat());
-
- test("multi-line on command, no body", () =>
- expect("command 'foobar' do\nend").toMatchFormat());
-
- test("multi-line on command call, no body", () =>
- expect("command.call 'foobar' do\nend").toMatchFormat());
-
- test("multi-line on command, with body", () =>
- expect("command 'foobar' do\n foo\nend").toMatchFormat());
-
- test("multi-line on command call, with body", () =>
- expect("command.call 'foobar' do\n foo\nend").toMatchFormat());
-
- test("blocks nested inside commands use braces", () => {
- const expected = ruby(`
- foo ${long} {
- ${long}
- }.bar
- `);
-
- return expect(`foo ${long} { ${long} }.bar`).toChangeFormat(expected);
- });
-
- test("breaking maintains calls on the end", () => {
- const content = ruby(`
- method.each do |foo|
- bar
- baz
- end.to_i
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("doesn't do weird things with comments", () => {
- const content = ruby(`
- foo.each do |bar|
- # comment
- bar.baz
- bar.baz
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("for loops get changed", () => {
- const content = ruby(`
- for i in [1, 2, 3] do
- p i
- end
- `);
-
- return expect(content).toChangeFormat(
- ruby(`
- [1, 2, 3].each do |i|
- p i
- end
- `)
- );
- });
-
- // from ruby test/ruby/test_call.rb
- test("inline do end", () =>
- expect(`assert_nil(("a".sub! "b" do end&.foo {}))`).toChangeFormat(
- ruby(`
- assert_nil(
- (
- 'a'.sub! 'b' do
- end&.foo do
- end
- )
- )
- `)
- ));
-
- test("excessed_comma nodes", () => expect("proc { |x,| }").toMatchFormat());
-
- describe("args", () => {
- test("no body", () => expect("loop { |i| }").toMatchFormat());
-
- test("single line non-breaking", () =>
- expect("loop { |i| 1 }").toMatchFormat());
-
- test("single line breaking", () =>
- expect(`loop { |i| ${long} }`).toChangeFormat(
- `loop do |i|\n ${long}\nend`
- ));
-
- test("multi-line non-breaking", () =>
- expect("loop do |i|\n i\nend").toChangeFormat("loop { |i| i }"));
-
- test("multi-line breaking", () =>
- expect(`loop do |i|\n ${long}\nend`).toMatchFormat());
-
- test("block-local args", () => expect("loop { |i; j| 1 }").toMatchFormat());
-
- test("splat", () => expect("loop { |*| i }").toMatchFormat());
-
- test("destructure", () => expect("loop { |(a, b)| i }").toMatchFormat());
-
- test("lots of args types", () =>
- expect("loop { |a, (b, c), d, *e| i }").toMatchFormat());
-
- test("does not split up args inside pipes", () =>
- expect(`loop do |${long} = 1, a${long} = 2|\nend`).toMatchFormat());
- });
-
- test("leaves sorbet type annotations in place", () =>
- expect(`sig { ${long} }`).toMatchFormat());
-});
diff --git a/test/js/break.test.js b/test/js/break.test.js
deleted file mode 100644
index bb87ca25..00000000
--- a/test/js/break.test.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("break", () => {
- test("empty break", () => expect("break").toMatchFormat());
-
- test("break with one argument, no parens", () =>
- expect("break 1").toMatchFormat());
-
- test("break with parens drops parens", () =>
- expect("break(1)").toChangeFormat("break 1"));
-
- test("break with multiple arguments", () =>
- expect("break 1, 2, 3").toMatchFormat());
-
- test("keeps parens for multiple statements", () => {
- const expected = ruby(`
- break(
- a = 1
- a == 1
- )
- `);
-
- return expect("break(a = 1; a == 1)").toChangeFormat(expected);
- });
-
- test("keeps parens for _mod nodes", () =>
- expect("break(1 if true)").toMatchFormat());
-
- test("works with comments", () => expect("break # foo").toMatchFormat());
-});
diff --git a/test/js/calls.test.js b/test/js/calls.test.js
deleted file mode 100644
index cd4cf465..00000000
--- a/test/js/calls.test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("calls", () => {
- test("simple calls", () => {
- const content = "posts.active.where('created_at > ?', 1.year.ago)";
-
- return expect(content).toMatchFormat();
- });
-
- test("chain methods", () => {
- const before = ruby(`
- aaaaaaaaaa.bbbbbbbbbb.cccccccccc.dddddddddd(foo, bar).eeeeeeeeee.ffffffffff.gggggggggg.hhhhhhhhhh
- `);
-
- const after = ruby(`
- aaaaaaaaaa
- .bbbbbbbbbb
- .cccccccccc
- .dddddddddd(foo, bar)
- .eeeeeeeeee
- .ffffffffff
- .gggggggggg
- .hhhhhhhhhh
- `);
-
- return expect(before).toChangeFormat(after);
- });
-
- test("tons of calls that fit on one line", () => {
- const content = "a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z";
-
- return expect(content).toMatchFormat();
- });
-
- test("no explicit call doesn't add call", () =>
- expect("a.(1, 2, 3)").toMatchFormat());
-
- test("explicit call maintains call", () =>
- expect("a.call(1, 2, 3)").toMatchFormat());
-
- test("double bang with a special operator", () =>
- expect("!!object&.topic_list").toMatchFormat());
-});
diff --git a/test/js/defined.test.js b/test/js/defined.test.js
deleted file mode 100644
index daa15574..00000000
--- a/test/js/defined.test.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const { long } = require("./utils");
-
-describe("defined", () => {
- test("no parens", () => expect("defined? a").toChangeFormat("defined?(a)"));
-
- test("parens", () => expect("defined?(a)").toMatchFormat());
-
- test("breaks on long identifier, no parens", () =>
- expect(`defined? ${long}`).toChangeFormat(`defined?(\n ${long}\n)`));
-
- test("breaks on long identifier, with parens", () =>
- expect(`defined?(${long})`).toChangeFormat(`defined?(\n ${long}\n)`));
-
- test("breaking keeps breaking", () =>
- expect(`defined?(\n ${long}\n)`).toMatchFormat());
-
- test("unnecessary breaking reverts to inline", () =>
- expect("defined?(\n a\n)").toChangeFormat("defined?(a)"));
-});
diff --git a/test/js/embed.test.js b/test/js/embed.test.js
deleted file mode 100644
index 3bd0ae5a..00000000
--- a/test/js/embed.test.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("embed", () => {
- test("formats correctly on straight heredocs", () => {
- const content = ruby(`
- <<-JS.squish
- const a=1;
- const b=2;
- return a+b;
- JS
- `);
-
- const expected = ruby(`
- <<-JS.squish
- const a = 1;
- const b = 2;
- return a + b;
- JS
- `);
-
- return expect(content).toChangeFormat(expected);
- });
-
- test("formats correctly on squiggly heredocs", () => {
- const content = ruby(`
- <<~JS.squish
- const a=1;
- const b=2;
- return a+b;
- JS
- `);
-
- const expected = ruby(`
- <<~JS.squish
- const a = 1;
- const b = 2;
- return a + b;
- JS
- `);
-
- return expect(content).toChangeFormat(expected);
- });
-
- test("does not format if the heredoc has an interpolation", () => {
- const content = ruby(`
- <<~JS.squish
- const a=1;
- const b=#{2};
- return a+b;
- JS
- `);
-
- return expect(content).toMatchFormat();
- });
-});
diff --git a/test/js/encoding.test.js b/test/js/encoding.test.js
deleted file mode 100644
index 313c38c8..00000000
--- a/test/js/encoding.test.js
+++ /dev/null
@@ -1,13 +0,0 @@
-describe("encoding", () => {
- const header = "# -*- encoding: binary -*-";
-
- test("comments", () => expect(`${header}\n# il était`).toMatchFormat());
-
- test("symbol literals", () => expect(`${header}\n:il_était`).toMatchFormat());
-
- test("string literals", () =>
- expect(`${header}\n'ひらがな'`).toMatchFormat());
-
- test("regexp literals", () =>
- expect(`${header}\n/ひらがな/`).toMatchFormat());
-});
diff --git a/test/js/errors.test.js b/test/js/errors.test.js
deleted file mode 100644
index 4310fed4..00000000
--- a/test/js/errors.test.js
+++ /dev/null
@@ -1,3 +0,0 @@
-describe("errors", () => {
- test("invalid ruby", () => expect("<>").toFailFormat());
-});
diff --git a/test/js/files.test.js b/test/js/files.test.js
index 0552f749..05b239bd 100644
--- a/test/js/files.test.js
+++ b/test/js/files.test.js
@@ -1,10 +1,15 @@
+import { getFileInfo } from "prettier";
+import url from "url";
+import plugin from "../../src/plugin.js";
+
describe("files", () => {
- test("handles full files that match", () =>
- expect("files/Gemfile").toInferParser());
+ const cases = ["files/Gemfile", "files/shebang", "files/test.rake"];
- test("handles shebangs that match", () =>
- expect("files/shebang").toInferParser());
+ test.each(cases)("infers Ruby parser from %s", async (filename) => {
+ const filepath = url.fileURLToPath(new URL(filename, import.meta.url));
+ const fileInfoOptions = { plugins: [plugin] };
- test("handles extensions that match", () =>
- expect("files/test.rake").toInferParser());
+ const { inferredParser } = await getFileInfo(filepath, fileInfoOptions);
+ expect(inferredParser).toEqual("ruby");
+ });
});
diff --git a/test/js/globalSetup.js b/test/js/globalSetup.js
new file mode 100644
index 00000000..72c9be34
--- /dev/null
+++ b/test/js/globalSetup.js
@@ -0,0 +1,30 @@
+import { spawnSync } from "child_process";
+import { spawnServer } from "../../src/plugin.js";
+
+// This is somewhat similar to the spawnServer function in parseSync but
+// slightly different in that it logs its information into environment variables
+// so that it can be reused across the test suite.
+async function globalSetup() {
+ // Set a RUBY_VERSION environment variable because certain tests will only run
+ // for certain versions of Ruby.
+ const args = ["--disable-gems", "-e", "puts RUBY_VERSION"];
+ process.env.RUBY_VERSION = spawnSync("ruby", args)
+ .stdout.toString("utf-8")
+ .trim();
+
+ const { serverPID, connectionFilepath, connectionOptions } =
+ await spawnServer(
+ {
+ rubyPlugins: "",
+ rubySingleQuote: false,
+ trailingComma: "none"
+ },
+ false
+ );
+
+ process.env.PRETTIER_RUBY_PID = serverPID;
+ process.env.PRETTIER_RUBY_FILE = connectionFilepath;
+ process.env.PRETTIER_RUBY_HOST = JSON.stringify(connectionOptions);
+}
+
+export default globalSetup;
diff --git a/test/js/globalTeardown.js b/test/js/globalTeardown.js
new file mode 100644
index 00000000..c51948b9
--- /dev/null
+++ b/test/js/globalTeardown.js
@@ -0,0 +1,25 @@
+import fs from "fs";
+
+// If a parse server was successfully spawned, then its process ID will be in
+// the PRETTIER_RUBY_PID environment variable. At the end of the test suite we
+// should send a kill signal to it.
+function globalTeardown() {
+ const serverPID = process.env.PRETTIER_RUBY_PID;
+ const connectionFilepath = process.env.PRETTIER_RUBY_FILE;
+
+ if (serverPID) {
+ try {
+ const pid = process.platform === "win32" ? serverPID : -serverPID;
+ process.kill(pid, "SIGINT");
+ } catch (error) {
+ console.error("Failed to kill the parser process in globalTeardown.");
+ throw error;
+ }
+ }
+
+ if (fs.existsSync(connectionFilepath)) {
+ fs.unlinkSync(connectionFilepath);
+ }
+}
+
+export default globalTeardown;
diff --git a/test/js/haml/comment.test.js b/test/js/haml/comment.test.js
new file mode 100644
index 00000000..6ceac558
--- /dev/null
+++ b/test/js/haml/comment.test.js
@@ -0,0 +1,36 @@
+import { haml } from "../utils";
+
+describe("comment", () => {
+ test("single line", () => {
+ return expect(
+ haml("/ This is the peanutbutterjelly element")
+ ).toMatchFormat();
+ });
+
+ test("multi line", () => {
+ const content = haml(`
+ /
+ %p This doesn't render, because it's commented out!
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("conditional", () => {
+ const content = haml(`
+ /[if IE]
+ %h1 Get Firefox
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("revealed", () => {
+ const content = haml(`
+ /![if !IE]
+ You are not using Internet Explorer, or are using version 10+.
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/doctype.test.js b/test/js/haml/doctype.test.js
new file mode 100644
index 00000000..5e6f1ba1
--- /dev/null
+++ b/test/js/haml/doctype.test.js
@@ -0,0 +1,43 @@
+import { haml } from "../utils";
+
+describe("doctype", () => {
+ test("basic", () => {
+ return expect(haml("!!! Basic")).toMatchFormat();
+ });
+
+ test("frameset", () => {
+ return expect(haml("!!! Frameset")).toMatchFormat();
+ });
+
+ test("mobile", () => {
+ return expect(haml("!!! Mobile")).toMatchFormat();
+ });
+
+ test("rdfa", () => {
+ return expect(haml("!!! RDFa")).toMatchFormat();
+ });
+
+ test("strict", () => {
+ return expect(haml("!!! Strict")).toMatchFormat();
+ });
+
+ test("xml", () => {
+ return expect(haml("!!! XML")).toMatchFormat();
+ });
+
+ test("encoding", () => {
+ return expect(haml("!!! XML iso-8859-1")).toMatchFormat();
+ });
+
+ test("1.1", () => {
+ return expect(haml("!!! 1.1")).toMatchFormat();
+ });
+
+ test("5", () => {
+ return expect(haml("!!! 5")).toMatchFormat();
+ });
+
+ test("misc", () => {
+ return expect(haml("!!! foo")).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/filter.test.js b/test/js/haml/filter.test.js
new file mode 100644
index 00000000..14e7e223
--- /dev/null
+++ b/test/js/haml/filter.test.js
@@ -0,0 +1,31 @@
+import { haml } from "../utils";
+
+describe("filter", () => {
+ test("self", () => {
+ const content = haml(`
+ :haml
+ -# comment
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("custom", () => {
+ const content = haml(`
+ :python
+ def foo:
+ bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("css", () => {
+ const content = haml(`
+ :css
+ .foo { height: 100px; width: 100px; }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/hamlComment.test.js b/test/js/haml/hamlComment.test.js
new file mode 100644
index 00000000..757f241b
--- /dev/null
+++ b/test/js/haml/hamlComment.test.js
@@ -0,0 +1,26 @@
+import { haml } from "../utils";
+
+describe("haml comment", () => {
+ test("empty", () => {
+ return expect(haml("-#")).toMatchFormat();
+ });
+
+ test("same line", () => {
+ return expect(haml("-# comment")).toMatchFormat();
+ });
+
+ test("multi line", () => {
+ const content = haml(`
+ -#
+ this is
+ a multi line
+ comment
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("weird spacing same line", () => {
+ return expect(haml("-# foobar ")).toChangeFormat("-# foobar");
+ });
+});
diff --git a/test/js/haml/plain.test.js b/test/js/haml/plain.test.js
new file mode 100644
index 00000000..87b1e79f
--- /dev/null
+++ b/test/js/haml/plain.test.js
@@ -0,0 +1,13 @@
+import { haml } from "../utils";
+
+describe("plain", () => {
+ const specialChars = ["%", ".", "#", "/", "!", "=", "&", "~", "-", "\\", ":"];
+
+ test.each(specialChars)("escapes starting %s", (specialChar) => {
+ return expect(haml(`\\${specialChar}`)).toMatchFormat();
+ });
+
+ test("does not unnecessarily escape other characters", () => {
+ return expect(haml("foo")).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/script.test.js b/test/js/haml/script.test.js
new file mode 100644
index 00000000..f9c56e02
--- /dev/null
+++ b/test/js/haml/script.test.js
@@ -0,0 +1,34 @@
+import { haml } from "../utils";
+
+describe("script", () => {
+ test("single line", () => {
+ return expect(haml('%p= "hello"')).toMatchFormat();
+ });
+
+ test("multi line", () => {
+ const content = haml(`
+ %p
+ = ['hi', 'there', 'reader!'].join " "
+ = "yo"
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("escape with interpolate", () => {
+ return expect(haml(`&= "I like cheese & crackers"`)).toMatchFormat();
+ });
+
+ test("children", () => {
+ const content = haml(`
+ = foo
+ = bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("preserve", () => {
+ return expect(haml('~ "Foo\\nBar\\nBaz
"')).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/silentScript.test.js b/test/js/haml/silentScript.test.js
new file mode 100644
index 00000000..c7e78177
--- /dev/null
+++ b/test/js/haml/silentScript.test.js
@@ -0,0 +1,72 @@
+import { haml } from "../utils";
+
+describe("silent script", () => {
+ test("single line", () => {
+ return expect(haml('- foo = "hello"')).toMatchFormat();
+ });
+
+ test("multi-line", () => {
+ const content = haml(`
+ - foo
+ - bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multi line with case", () => {
+ const content = haml(`
+ - case foo
+ - when 1
+ = "1"
+ %span bar
+ - when 2
+ = "2"
+ - else
+ = "3"
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multi line with if/else", () => {
+ const content = haml(`
+ - if foo
+ %span bar
+ -# baz
+ - elsif qux
+ = "qax"
+ - else
+ -# qix
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multi line with unless/else", () => {
+ const content = haml(`
+ - unless foo
+ %span bar
+ -# baz
+ - elsif qux
+ = "qax"
+ - else
+ -# qix
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multi line with embedded", () => {
+ const content = haml(`
+ - if foo
+ %span foo
+ - if bar
+ %span bar
+ - elsif baz
+ %span baz
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/haml/tag.test.js b/test/js/haml/tag.test.js
new file mode 100644
index 00000000..70f4c17f
--- /dev/null
+++ b/test/js/haml/tag.test.js
@@ -0,0 +1,136 @@
+import { long, haml } from "../utils";
+
+describe("tag", () => {
+ test("class", () => {
+ return expect(haml("%p.foo")).toMatchFormat();
+ });
+
+ test("class multiple", () => {
+ return expect(haml("%p.foo.bar.baz")).toMatchFormat();
+ });
+
+ test("id", () => {
+ return expect(haml("%p#foo")).toMatchFormat();
+ });
+
+ test("classes and id", () => {
+ return expect(haml("%p.foo.bar#baz")).toMatchFormat();
+ });
+
+ test("self closing", () => {
+ return expect(haml("%br/")).toMatchFormat();
+ });
+
+ test("whitespace removal left single line", () => {
+ return expect(haml('%p>= "Foo\\nBar"')).toMatchFormat();
+ });
+
+ test("whitespace removal right single line", () => {
+ return expect(haml('%p<= "Foo\\nBar"')).toMatchFormat();
+ });
+
+ test("whitespace removal right multi line", () => {
+ const content = haml(`
+ %blockquote<
+ %div
+ Foo!
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("dynamic attribute", () => {
+ return expect(haml("%span{html_attrs('fr-fr')}")).toMatchFormat();
+ });
+
+ test("dynamic attributes (ruby hash)", () => {
+ const content = haml(`%div{data: { controller: "lesson-evaluation" }}`);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("dynamic attributes (html-style)", () => {
+ const content = haml("%img(title=@title alt=@alt)/");
+
+ return expect(content).toMatchFormat();
+ });
+
+ describe("static attributes", () => {
+ test("basic", () => {
+ return expect(haml("%span(foo)")).toChangeFormat("%span{foo: true}");
+ });
+
+ test("hash label, single quote", () => {
+ const content = haml(`%section(xml:lang="en" title="title")`);
+ const expected = `%section{"xml:lang": "en", title: "title"}`;
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("hash label, double quote", () => {
+ const content = haml(`%section(xml:lang="en" title="title")`);
+ const expected = `%section{"xml:lang": "en", title: "title"}`;
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("hash label, single quote, interpolation", () => {
+ const content = haml(`%section{title: "#{title}"}`);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("non-strings", () => {
+ const content = haml(`%section(foo=1 bar=2)`);
+ const expected = `%section(foo=1 bar=2)`;
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("attributes prefixed with @", () => {
+ return Promise.all([
+ expect(haml(`%span{"@click": "open = true"}`)).toMatchFormat(),
+ expect(haml(`%span{"@click.outside": "open = true"}`)).toMatchFormat(),
+ expect(
+ haml(`%span{"@keydown.arrow-up.prevent": "open = true"}`)
+ ).toMatchFormat()
+ ]);
+ });
+ });
+
+ test("object reference", () => {
+ const content = haml(`
+ %div[@user, :greeting]
+ %bar[290]/
+ Hello!
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("long declaration before text", () => {
+ const content = haml(`%button{ data: { current: ${long} } } foo`);
+ const expected = haml(`
+ %button{
+ data: {
+ current: ${long}
+ }
+ }
+ foo
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("with quotes in string", () => {
+ const content = haml(`%div{title: "escaping quotes, it's annoying"}`);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with interpolation in the value", () => {
+ const content = haml(`%p hello"#{1 + 2} little pigs"`);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/hasPragma.test.js b/test/js/hasPragma.test.js
deleted file mode 100644
index cc2b1804..00000000
--- a/test/js/hasPragma.test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const { hasPragma } = require("../../src/ruby").parsers.ruby;
-
-describe("hasPragma", () => {
- test("checks for @prettier comments", () => {
- expect(hasPragma("# @prettier")).toBe(true);
- });
-
- test("checks for @format comments", () => {
- expect(hasPragma("# @format")).toBe(true);
- });
-
- test("does not check for anything else", () => {
- expect(hasPragma("# @foobar")).toBe(false);
- });
-});
diff --git a/test/js/hashes.test.js b/test/js/hashes.test.js
deleted file mode 100644
index ff0a132f..00000000
--- a/test/js/hashes.test.js
+++ /dev/null
@@ -1,254 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("hash", () => {
- test("empty", () => expect("{}").toMatchFormat());
-
- test("empty with comments", () => {
- const content = ruby(`
- {
- # foo
- # bar
- }
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("breaking", () => {
- const content = ruby(`
- {
- ${long}:
- ${long},
- ${long}: {
- ${long}:
- ${long}
- }
- }
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("breaking maintains calls on the end", () =>
- expect(`{ a: ${long} }.freeze`).toChangeFormat(
- `{\n a:\n ${long}\n}.freeze`
- ));
-
- test("breaking with trailing commas", () => {
- const expected = `{\n ${long}:\n ${long},\n}`;
-
- return expect(`{ ${long}: ${long} }`).toChangeFormat(expected, {
- trailingComma: "all"
- });
- });
-
- describe("heredocs as values", () => {
- test("as the first value", () => {
- const content = ruby(`
- { foo: <<~HERE, bar: 'bar' }
- this is the heredoc
- HERE
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("as the last value", () => {
- const content = ruby(`
- { foo: 'foo', bar: <<~HERE }
- this is the heredoc
- HERE
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("with trailing commas", () => {
- const content = ruby(`
- {
- foo:
- ${long},
- bar: <<~HERE,
- this is the heredoc
- HERE
- }
- `);
-
- return expect(content).toMatchFormat({ trailingComma: "all" });
- });
-
- test("when exceeding line length", () => {
- const content = ruby(`
- { foo: '${long}', bar: <<~HERE }
- this is the heredoc
- HERE
- `);
-
- const expected = ruby(`
- {
- foo:
- '${long}',
- bar: <<~HERE
- this is the heredoc
- HERE
- }
- `);
-
- return expect(content).toChangeFormat(expected);
- });
- });
-
- describe("dynamic string keys", () => {
- test("basic", () => expect(`{ 'foo': 'bar' }`).toMatchFormat());
-
- test("with interpolation", () =>
- expect(`{ "#{1 + 1}": 2 }`).toMatchFormat());
-
- test("basic without hash labels", () =>
- expect(`{ :'foo' => 'bar' }`).toMatchFormat({ rubyHashLabel: false }));
-
- test("with interpolation without hash labels", () =>
- expect(`{ :"#{1 + 1}" => 2 }`).toMatchFormat({ rubyHashLabel: false }));
- });
-
- describe("bare assoc hash", () => {
- test("commands", () =>
- expect("foobar alpha: alpha, beta: beta").toMatchFormat());
-
- test("command calls", () =>
- expect("foo.bar alpha: alpha, beta: beta").toMatchFormat());
-
- test("calls", () =>
- expect("foobar(alpha: alpha, beta: beta)").toMatchFormat());
-
- test("does not add trailing commas on breaking commands", () =>
- expect(`foobar ${long}: ${long}, a${long}: a${long}`).toChangeFormat(
- ruby(`
- foobar ${long}:
- ${long},
- a${long}:
- a${long}
- `),
- { trailingComma: "all" }
- ));
-
- test("does not add trailing commas on breaking command calls", () =>
- expect(`foo.bar ${long}: ${long}, a${long}: a${long}`).toChangeFormat(
- ruby(`
- foo.bar ${long}:
- ${long},
- a${long}:
- a${long}
- `),
- { trailingComma: "all" }
- ));
-
- test("does add trailing commas on breaking calls", () =>
- expect(`foobar(${long}: ${long}, a${long}: a${long})`).toChangeFormat(
- ruby(`
- foobar(
- ${long}:
- ${long},
- a${long}:
- a${long},
- )
- `),
- { trailingComma: "all" }
- ));
-
- test("breaks contents and parens together", () => {
- const content = ruby(`
- foobar(key1: ${long.slice(0, 32)}, key2: ${long.slice(0, 32)})
- `);
-
- const expected = ruby(`
- foobar(
- key1: ${long.slice(0, 32)},
- key2: ${long.slice(0, 32)}
- )
- `);
-
- return expect(content).toChangeFormat(expected);
- });
- });
-
- describe("when hash labels allowed", () => {
- test("hash labels stay", () =>
- expect("{ a: 'a', b: 'b', c: 'c' }").toMatchFormat());
-
- test("hash rockets get replaced", () =>
- expect("{ :a => 'a', :b => 'b', :c => 'c' }").toChangeFormat(
- "{ a: 'a', b: 'b', c: 'c' }"
- ));
-
- test("hash rockets stay when needed", () =>
- expect("{ Foo => 1, Bar => 2 }").toMatchFormat());
-
- test("ending in equals stays", () =>
- expect("{ :foo= => 'bar' }").toMatchFormat());
-
- test("starting with non-letter/non-underscore stays", () =>
- expect("{ :@foo => 'bar' }").toMatchFormat());
-
- test("starting with underscore converts", () =>
- expect("{ :_foo => 'bar' }").toChangeFormat("{ _foo: 'bar' }"));
- });
-
- describe("when hash labels disallowed", () => {
- test("hash labels get replaced", () =>
- expect("{ a: 'a', b: 'b', c: 'c' }").toChangeFormat(
- "{ :a => 'a', :b => 'b', :c => 'c' }",
- {
- rubyHashLabel: false
- }
- ));
-
- test("hash rockets stay", () =>
- expect("{ :a => 'a', :b => 'b', :c => 'c' }").toMatchFormat({
- rubyHashLabel: false
- }));
-
- test("hash rockets stay when needed", () =>
- expect("{ Foo => 1, Bar => 2 }").toMatchFormat({
- rubyHashLabel: false
- }));
-
- test("ending in equals stays", () =>
- expect("{ :foo= => 'bar' }").toMatchFormat({
- rubyHashLabel: false
- }));
-
- test("starting with non-letter/non-underscore stays", () =>
- expect("{ :@foo => 'bar' }").toMatchFormat({
- rubyHashLabel: false
- }));
-
- test("starting with underscore stays", () =>
- expect("{ :_foo => 'bar' }").toMatchFormat({
- rubyHashLabel: false
- }));
- });
-
- test("prints hashes with consistent keys", () =>
- expect("{ a: 'a', b => 'b' }").toChangeFormat("{ :a => 'a', b => 'b' }"));
-
- test("print hashes with correct braces when contents fits", () => {
- const content = ruby(`
- {
- key1: ${long.slice(0, 32)},
- key2: ${long.slice(0, 32)}
- }
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("with leading comments but none in body", () => {
- const content = ruby(`
- # leading
- {}
- `);
-
- return expect(content).toMatchFormat();
- });
-});
diff --git a/test/js/hooks.test.js b/test/js/hooks.test.js
deleted file mode 100644
index b29d195f..00000000
--- a/test/js/hooks.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe.each(["BEGIN", "END"])("%s hook", (hook) => {
- test("shortens to one line", () =>
- expect(`${hook} {\n p 'hook'\n}`).toChangeFormat(`${hook} { p 'hook' }`));
-
- test("maintains single lines", () =>
- expect(`${hook} { p 'hook' }`).toMatchFormat());
-
- test("maintains multi line", () =>
- expect(`${hook} {\n ${long}\n}`).toMatchFormat());
-
- test("expands to multi line", () =>
- expect(`${hook} { ${long} }`).toChangeFormat(`${hook} {\n ${long}\n}`));
-
- test("works for comments in the body", () => {
- const content = ruby(`
- ${hook} {
- # this is the comment
- }
- `);
-
- return expect(content).toMatchFormat();
- });
-});
diff --git a/test/js/kwargs.test.js b/test/js/kwargs.test.js
deleted file mode 100644
index be5ad7cb..00000000
--- a/test/js/kwargs.test.js
+++ /dev/null
@@ -1,8 +0,0 @@
-describe("kwargs", () => {
- test("basic", () => expect("def foo(bar: baz); end").toMatchFormat());
-
- test("optional", () => expect("def foo(bar:); end").toMatchFormat());
-
- test("double splat", () =>
- expect("def foo(bar:, **baz); end").toMatchFormat());
-});
diff --git a/test/js/lambda.test.js b/test/js/lambda.test.js
deleted file mode 100644
index b6bc15a7..00000000
--- a/test/js/lambda.test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("lambda", () => {
- test("plain stabby lambda literal", () => expect("-> { 1 }").toMatchFormat());
-
- test("stabby lambda literal with args", () =>
- expect("->(a, b, c) { a + b + c }").toMatchFormat());
-
- test("stabby lambda literal with arg, no parens", () =>
- expect("-> a { a }").toChangeFormat("->(a) { a }"));
-
- test("stabby lambda with parens, no args", () =>
- expect("-> () { 1 }").toChangeFormat("-> { 1 }"));
-
- test("breaking stabby lambda literal", () =>
- expect(`-> { ${long} }`).toChangeFormat(`-> do\n ${long}\nend`));
-
- test("breaking stabby lambda literal with args", () => {
- const content = `->(a) { a + ${long} }`;
- const expected = `->(a) do\n a +\n ${long}\nend`;
-
- return expect(content).toChangeFormat(expected);
- });
-
- test("stabby lambda literal within a command node", () =>
- expect("command :foo, ->(arg) { arg + arg }").toMatchFormat());
-
- test("stabby lambda literal that breaks within a command node", () =>
- expect(`command :foo, -> { ${long} }`).toChangeFormat(
- ruby(`
- command :foo,
- -> {
- ${long}
- }
- `)
- ));
-
- test("stabby lambda literal with a command call node", () =>
- expect("command.call :foo, ->(arg) { arg + arg }").toMatchFormat());
-
- test("stabby lambda literal that breaks with a command call node", () =>
- expect(`command.call :foo, -> { ${long} }`).toChangeFormat(
- ruby(`
- command.call :foo,
- -> {
- ${long}
- }
- `)
- ));
-
- test("stabby lambda literal that breaks deeply within a command node", () =>
- expect(`command :foo, bar: -> { ${long} }`).toChangeFormat(
- ruby(`
- command :foo,
- bar: -> {
- ${long}
- }
- `)
- ));
-
- test("very long arguments list doesn't break within pipes", () => {
- const content = `command :foo, ->(${long}, a${long}, aa${long}) { true }`;
-
- return expect(content).toChangeFormat(
- ruby(`
- command :foo,
- ->(
- ${long},
- a${long},
- aa${long}
- ) {
- true
- }
- `)
- );
- });
-
- test("empty brackets", () => expect("a[]").toMatchFormat());
-
- test("brackets with multiple args", () =>
- expect("a[1, 2, 3]").toMatchFormat());
-});
diff --git a/test/js/lang.test.js b/test/js/lang.test.js
deleted file mode 100644
index 693a812b..00000000
--- a/test/js/lang.test.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const { spawnSync } = require("child_process");
-const path = require("path");
-
-expect.extend({
- toHaveExitedCleanly(child) {
- return {
- pass: child.status === 0,
- message: () => child.stderr.toString()
- };
- }
-});
-
-test("different lang settings don't break", () => {
- const script = path.join(__dirname, "../../node_modules/.bin/prettier");
- const child = spawnSync(
- process.execPath,
- [script, "--plugin", ".", "--parser", "ruby"],
- {
- env: {
- LANG: "US-ASCII"
- },
- input: "'# あ'"
- }
- );
-
- expect(child).toHaveExitedCleanly();
-});
diff --git a/test/js/layout.test.js b/test/js/layout.test.js
deleted file mode 100644
index d34c9992..00000000
--- a/test/js/layout.test.js
+++ /dev/null
@@ -1,13 +0,0 @@
-describe("layout", () => {
- test("turns multiple blank lines into just one blank line", () =>
- expect("1\n\n\n\n\n2").toChangeFormat("1\n\n2"));
-
- test("turns semicolons into adjacent lines", () =>
- expect("1; 2; 3").toChangeFormat("1\n2\n3"));
-
- test("maintains semicolons from within interpolation", () =>
- expect(`"a#{b; c}"`).toMatchFormat());
-
- test("handles multiple newlines at the end of the file", () =>
- expect("foo\n\n\n").toChangeFormat("foo"));
-});
diff --git a/test/js/locations.test.js b/test/js/locations.test.js
deleted file mode 100644
index 50e6c9bc..00000000
--- a/test/js/locations.test.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const { ruby } = require("../../src/ruby").parsers;
-
-describe("locations", () => {
- test("locStart and locEnd are defined", () => {
- const { hasOwnProperty } = Object.prototype;
-
- expect(hasOwnProperty.call(ruby, "locStart")).toBe(true);
- expect(hasOwnProperty.call(ruby, "locEnd")).toBe(true);
- });
-});
diff --git a/test/js/loops.test.js b/test/js/loops.test.js
deleted file mode 100644
index ed8c973b..00000000
--- a/test/js/loops.test.js
+++ /dev/null
@@ -1,176 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe.each(["while", "until"])("%s", (keyword) => {
- test("aligns predicates", () =>
- expect(`foo ${keyword} ${long} || ${long}`).toChangeFormat(
- ruby(`
- ${keyword} ${long} ||
- ${Array(keyword.length).fill().join(" ")}${long}
- foo
- end
- `)
- ));
-
- describe("inlines allowed", () => {
- test("transforms to inline", () =>
- expect(`${keyword} a\n 1\nend`).toChangeFormat(`1 ${keyword} a`));
-
- test("maintains inlines", () => expect(`1 ${keyword} a`).toMatchFormat());
-
- test("breaks on large predicates", () =>
- expect(`${keyword} ${long}\n 1\nend`).toMatchFormat());
-
- test("breaks inlines on large predicates", () =>
- expect(`1 ${keyword} ${long}`).toChangeFormat(
- `${keyword} ${long}\n 1\nend`
- ));
-
- test("does not break into block when modifying a begin", () => {
- const content = ruby(`
- begin
- foo
- end ${keyword} bar
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("breaks when an assignment is in the predicate", () => {
- const content = ruby(`
- ${keyword} (a = 1)
- a
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("breaks when a multi assignment is in the predicate", () => {
- const content = ruby(`
- ${keyword} (a, b = 1, 2)
- a
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("breaks the parent when there is an assignment", () => {
- const content = ruby(`
- foo do
- while foo = foo
- yield foo
- end
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("wraps single lines in parens when assigning", () =>
- expect(
- `hash[:key] = ${keyword} false do break :value end`
- ).toChangeFormat(`hash[:key] = (break :value ${keyword} false)`));
-
- test("empty body", () => {
- const content = ruby(`
- while foo
- end
- `);
-
- return expect(content).toChangeFormat("while foo; end");
- });
-
- test("empty body, long predicate", () => {
- const content = ruby(`
- while ${long}
- end
- `);
-
- return expect(content).toMatchFormat();
- });
- });
-
- describe("inlines not allowed", () => {
- test("maintains multiline", () =>
- expect(`${keyword} a\n 1\nend`).toMatchFormat({ rubyModifier: false }));
-
- test("transforms to multiline", () =>
- expect(`1 ${keyword} a`).toChangeFormat(`${keyword} a\n 1\nend`, {
- rubyModifier: false
- }));
-
- test("breaks on large predicates", () =>
- expect(`${keyword} ${long}\n 1\nend`).toMatchFormat({
- rubyModifier: false
- }));
-
- test("breaks inlines on large predicates", () =>
- expect(`1 ${keyword} ${long}`).toChangeFormat(
- `${keyword} ${long}\n 1\nend`,
- {
- rubyModifier: false
- }
- ));
-
- test("does not break into block when modifying a begin", () => {
- const content = ruby(`
- begin
- foo
- end ${keyword} bar
- `);
-
- return expect(content).toMatchFormat({ rubyModifier: false });
- });
-
- test("empty body", () => {
- const content = ruby(`
- while foo
- end
- `);
-
- return expect(content).toChangeFormat("while foo; end", {
- rubyModifier: false
- });
- });
-
- test("empty body, long predicate", () => {
- const content = ruby(`
- while ${long}
- end
- `);
-
- return expect(content).toMatchFormat({ rubyModifier: false });
- });
- });
-
- describe.each(["while", "until"])(
- "add parens when necessary %s",
- (keyword) => {
- test("args", () =>
- expect(`[${keyword} foo? do bar end]`).toChangeFormat(
- `[(bar ${keyword} foo?)]`
- ));
-
- test("assign", () =>
- expect(`foo = ${keyword} bar? do baz end`).toChangeFormat(
- `foo = (baz ${keyword} bar?)`
- ));
-
- test("assoc_new", () =>
- expect(`{ foo: ${keyword} bar? do baz end }`).toChangeFormat(
- `{ foo: (baz ${keyword} bar?) }`
- ));
-
- test("massign", () =>
- expect(`f, o, o = ${keyword} bar? do baz end`).toChangeFormat(
- `f, o, o = (baz ${keyword} bar?)`
- ));
-
- test("opassign", () =>
- expect(`foo ||= ${keyword} bar? do baz end`).toChangeFormat(
- `foo ||= (baz ${keyword} bar?)`
- ));
- }
- );
-});
diff --git a/test/js/massign.test.js b/test/js/massign.test.js
deleted file mode 100644
index cdacb5b1..00000000
--- a/test/js/massign.test.js
+++ /dev/null
@@ -1,46 +0,0 @@
-describe("massign", () => {
- test("multi on left, multi on right", () =>
- expect("a, b, c = 1, 2, 3").toMatchFormat());
-
- test("single on left, multi on right", () =>
- expect("a = 1, 2, 3").toMatchFormat());
-
- test("multi on left, array on right", () =>
- expect("a, b, c = [1, 2, 3]").toMatchFormat());
-
- test("parens on left, multi on right", () =>
- expect("(a, b, c) = 1, 2, 3").toChangeFormat("a, b, c = 1, 2, 3"));
-
- test("double parens on left, multi on right", () =>
- expect("((a, b, c)) = 1, 2, 3").toChangeFormat("a, b, c = 1, 2, 3"));
-
- test("parens on some of left, multi on right", () =>
- expect("(a, b), c = [1, 2], 3").toMatchFormat());
-
- test("extra commas at the end", () => expect("a, = 1").toMatchFormat());
-
- test("extra commas at the end with multiple", () =>
- expect("a, b, c, = 1").toMatchFormat());
-
- test("extra commas with parens", () =>
- expect("(a, b,), c, = 1").toMatchFormat());
-
- test("extra commas with doubled parens", () =>
- expect("((a, b,), c,), = 1").toMatchFormat());
-
- describe("splat", () => {
- test("after ident", () => expect("a, *b = 1, 2, 3").toMatchFormat());
-
- test("between idents", () =>
- expect("a, *b, c, d = 1, 2, 3").toMatchFormat());
-
- test("with no name", () => expect("a, * = 1, 2, 3").toMatchFormat());
-
- test("on right side", () => expect("a = *a").toMatchFormat());
-
- test("only on left side", () => expect("* = [1, 2, 3]").toMatchFormat());
-
- test("and then ident on left side", () =>
- expect("*, a = [1, 2, 3]").toMatchFormat());
- });
-});
diff --git a/test/js/method.test.js b/test/js/method.test.js
deleted file mode 100644
index 008f6a30..00000000
--- a/test/js/method.test.js
+++ /dev/null
@@ -1,294 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("method", () => {
- describe("definitions", () => {
- test("shorthand for empty methods", () =>
- expect("def foo; end").toMatchFormat());
-
- test("shorthand for empty methods with parens", () =>
- expect("def foo(); end").toMatchFormat());
-
- test("single arg, no parens", () =>
- expect("def foo bar\nend").toChangeFormat("def foo(bar); end"));
-
- test("single arg, with parens", () =>
- expect("def foo(bar)\nend").toChangeFormat("def foo(bar); end"));
-
- test("shorthand for empty singleton methods", () =>
- expect("def self.foo; end").toMatchFormat());
-
- test("shorthand for empty singleton methods with parens", () =>
- expect("def self.foo(); end").toMatchFormat());
-
- test("singleton, single arg, no parens", () =>
- expect("def self.foo bar\nend").toChangeFormat("def self.foo(bar); end"));
-
- test("singleton, single arg, with parens", () =>
- expect("def self.foo(bar)\nend").toChangeFormat(
- "def self.foo(bar); end"
- ));
-
- test("shorthand with a body", () =>
- expect("def foo(alpha); 1; end").toChangeFormat(
- "def foo(alpha)\n 1\nend"
- ));
-
- test("single splat arg with no name", () =>
- expect("def foo(*); end").toMatchFormat());
-
- test("double splat arg with no name", () =>
- expect("def foo(**); end").toMatchFormat());
-
- test("with helper method", () => {
- const content = ruby(`
- private def foo
- 'bar'
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("with helper method on defs", () => {
- const content = ruby(`
- private def self.foo
- 'bar'
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("every single arg type", () => {
- const content = ruby(`
- def method(req, *rest, post, kwarg:, kwarg_opt: 1, **kwarg_rest, &block)
- 'foo'
- end
- `);
-
- return expect(content).toMatchFormat();
- });
-
- if (process.env.RUBY_VERSION >= "2.7") {
- test("nokw_param", () => expect("def foo(**nil); end").toMatchFormat());
-
- test("args_forward", () => {
- const content = ruby(`
- def foo(...)
- bar(...)
- end
- `);
-
- return expect(content).toMatchFormat();
- });
- }
-
- test("breaking", () =>
- expect(`def foo(${long}:, a${long}:); end`).toChangeFormat(
- ruby(`
- def foo(
- ${long}:,
- a${long}:
- ); end
- `)
- ));
-
- test.skip("def/begin transform", () => {
- const content = ruby(`
- def foo
- begin
- try_something
- rescue SomeError => error
- handle_error(error)
- ensure
- this_always_happens
- end
- end
- `);
-
- const expected = ruby(`
- def foo
- try_something
- rescue SomeError => error
- handle_error(error)
- ensure
- this_always_happens
- end
- `);
-
- return expect(content).toChangeFormat(expected);
- });
- });
-
- describe("method calls", () => {
- test("empty parens", () => expect("foo()").toChangeFormat("foo"));
-
- test("single args", () => expect("foo(1)").toMatchFormat());
-
- test("multi arg", () => expect("foo(1, 2)").toMatchFormat());
-
- test("just block", () => expect("foo(&block)").toMatchFormat());
-
- describe("commands", () => {
- test("alignment", () => {
- const content = ruby(`
- command.call some_method(
- ${long}
- )
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("alignment for `to`", () => {
- const content = ruby(`
- expect(value).to matcher(
- ${long}
- )
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("alignment for `not_to`", () => {
- const content = ruby(`
- expect(value).not_to matcher(
- ${long}
- )
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("just block", () => {
- const content = ruby(`
- def curry(&block)
- new &block
- end
- `);
-
- return expect(content).toMatchFormat();
- });
- });
-
- describe("single splat", () => {
- test("plain", () => expect("foo(*bar)").toMatchFormat());
-
- test("with multi args", () => expect("foo(1, 2, *abc)").toMatchFormat());
-
- test("between multi args", () =>
- expect("foo(1, 2, *abc, 3, 4)").toMatchFormat());
-
- test("with block", () => expect("foo(*bar, &block)").toMatchFormat());
- });
-
- describe("double splat", () => {
- test("plain", () => expect("foo(**bar)").toMatchFormat());
-
- test("with block", () => expect("foo(**bar, &block)").toMatchFormat());
-
- test("with splat and block", () =>
- expect("foo(*bar, **baz, &lock)").toMatchFormat());
-
- test("after kwarg", () =>
- expect("foo(kwarg: 1, **splat)").toMatchFormat());
-
- test("before kwarg", () =>
- expect("foo(**splat, kwarg: 1)").toMatchFormat());
-
- test("before kwargs", () =>
- expect("foo(before: 1, **splat, after: 1)").toMatchFormat());
- });
-
- describe("different operators", () => {
- test("double colon gets changed", () =>
- expect("Foo::foo").toChangeFormat("Foo.foo"));
-
- test("lonely operator", () => expect("foo&.foo").toMatchFormat());
- });
-
- describe("breaking", () => {
- describe("without trailing commas", () => {
- test("starting with no trailing comma stays", () =>
- expect(`foo(${long}, a${long})`).toChangeFormat(
- `foo(\n ${long},\n a${long}\n)`
- ));
-
- test("with breaking ternary as first argument", () =>
- expect(`foo bar ? ${long} : a${long}`).toChangeFormat(
- `foo(\n if bar\n ${long}\n else\n a${long}\n end\n)`
- ));
-
- test("starting with trailing comma changes", () =>
- expect(`foo(${long}, a${long},)`).toChangeFormat(
- `foo(\n ${long},\n a${long}\n)`
- ));
-
- test("with block on the end", () =>
- expect(`foo(${long}, &block)`).toChangeFormat(
- `foo(\n ${long},\n &block\n)`
- ));
-
- test("on commands", () =>
- expect(`command ${long}, a${long}`).toChangeFormat(
- ruby(`
- command ${long},
- a${long}
- `)
- ));
-
- test("on command calls", () =>
- expect(`command.call ${long}, a${long}`).toChangeFormat(
- ruby(`
- command.call ${long},
- a${long}
- `)
- ));
- });
-
- describe("with trailing commas", () => {
- test("starting with no trailing comma changes", () =>
- expect(`foo(${long}, a${long})`).toChangeFormat(
- `foo(\n ${long},\n a${long},\n)`,
- {
- trailingComma: "all"
- }
- ));
-
- test("starting with trailing comma stays", () =>
- expect(`foo(${long}, a${long},)`).toChangeFormat(
- `foo(\n ${long},\n a${long},\n)`,
- {
- trailingComma: "all"
- }
- ));
-
- test("with block on the end", () =>
- expect(`foo(${long}, &block)`).toChangeFormat(
- `foo(\n ${long},\n &block\n)`,
- {
- trailingComma: "all"
- }
- ));
-
- test("on commands", () =>
- expect(`command ${long}, a${long}`).toChangeFormat(
- ruby(`
- command ${long},
- a${long}
- `),
- { trailingComma: "all" }
- ));
-
- test("on command calls", () =>
- expect(`command.call ${long}, a${long}`).toChangeFormat(
- ruby(`
- command.call ${long},
- a${long}
- `),
- { trailingComma: "all" }
- ));
- });
- });
- });
-});
diff --git a/test/js/next.test.js b/test/js/next.test.js
deleted file mode 100644
index 233f296f..00000000
--- a/test/js/next.test.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("next", () => {
- test("bare", () => expect("next").toMatchFormat());
-
- test("one arg, no parens", () => expect("next 1").toMatchFormat());
-
- test("one arg, with parens", () =>
- expect("next(1)").toChangeFormat("next 1"));
-
- test("multiple args", () => expect("next 1, 2").toMatchFormat());
-
- test("keeps parens for multiple statements", () => {
- const expected = ruby(`
- next(
- a = 1
- a == 1
- )
- `);
-
- return expect("next(a = 1; a == 1)").toChangeFormat(expected);
- });
-
- test("keeps parens for _mod nodes", () =>
- expect("next(1 if true)").toMatchFormat());
-});
diff --git a/test/js/nodes.test.js b/test/js/nodes.test.js
deleted file mode 100644
index 317b0a10..00000000
--- a/test/js/nodes.test.js
+++ /dev/null
@@ -1,77 +0,0 @@
-const { spawnSync } = require("child_process");
-
-const nodes = require("../../src/nodes");
-const print = require("../../src/printer").print;
-
-const expectedUnhandledNodes = [
- "alias_error",
- "arg_ambiguous",
- "args_add",
- "args_new",
- "assign_error",
- "class_name_error",
- "heredoc_dedent",
- "magic_comment",
- "mlhs_add",
- "mlhs_new",
- "mrhs_add",
- "mrhs_new",
- "nokw_param",
- "operator_ambiguous",
- "param_error",
- "parse_error",
- "qsymbols_add",
- "qsymbols_new",
- "qwords_add",
- "qwords_new",
- "regexp_add",
- "regexp_new",
- "stmts_add",
- "stmts_new",
- "string_add",
- "string_content",
- "symbol",
- "symbols_add",
- "symbols_new",
- "void_stmt",
- "word_add",
- "word_new",
- "words_add",
- "words_new",
- "xstring_add",
- "xstring_new"
-];
-
-const possibleNodes = () => {
- const child = spawnSync("ruby", [
- "--disable-gems",
- "-rripper",
- "-e",
- "puts Ripper::PARSER_EVENTS"
- ]);
-
- const error = child.stderr.toString();
- if (error) {
- throw new Error(error);
- }
-
- return child.stdout.toString().trim().split("\n");
-};
-
-describe("node support", () => {
- test("handles all ripper parsing events", () => {
- const supportedNodes = Object.keys(nodes)
- .concat(expectedUnhandledNodes)
- .sort();
-
- expect(supportedNodes).toEqual(
- expect.arrayContaining(possibleNodes().sort())
- );
- });
-
- test("when encountering an unsupported node type", () => {
- const path = { getValue: () => ({ type: "unsupported", body: {} }) };
-
- expect(() => print(path)).toThrow("Unsupported");
- });
-});
diff --git a/test/js/numbers.test.js b/test/js/numbers.test.js
deleted file mode 100644
index bdbbf6da..00000000
--- a/test/js/numbers.test.js
+++ /dev/null
@@ -1,35 +0,0 @@
-describe("numbers", () => {
- test("basic", () => expect("123").toMatchFormat());
-
- test("preserves sign", () => expect("-123").toMatchFormat());
-
- test("respects no o for octal numbers", () =>
- expect("0123").toChangeFormat("0123"));
-
- test("respects o for octal numbers", () =>
- expect("0o123").toChangeFormat("0o123"));
-
- test("does not consider numbers large until they have more than 4 digits", () =>
- expect("1234").toMatchFormat());
-
- test("for large numbers adds underscores (mod 3 ==== 0)", () =>
- expect("123456").toChangeFormat("123_456"));
-
- test("for large numbers adds underscores (mod 3 === 1)", () =>
- expect("1234567").toChangeFormat("1_234_567"));
-
- test("for large numbers add underscores (mod 3 ==== 2)", () =>
- expect("12345678").toChangeFormat("12_345_678"));
-
- test("ignores numbers that already have underscores", () =>
- expect("2019_04_17_17_09_00").toMatchFormat());
-
- test("ignores formatting on binary numbers", () =>
- expect("0b01101001").toMatchFormat());
-
- test("ignores formatting on octal numbers", () =>
- expect("0o123401234").toMatchFormat());
-
- test("ignores formatting on hex numbers", () =>
- expect("0x123401234").toMatchFormat());
-});
diff --git a/test/js/parser.rb b/test/js/parser.rb
deleted file mode 100644
index 44d3ae4b..00000000
--- a/test/js/parser.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require_relative '../../src/parser'
-
-# This function will poll $stdin for 2 seconds and attempt to gather up every
-# line until it hits a "---" line. At that point it will return everything
-# joined together. If it does not receive input within 2 seconds, it will bail
-# out and return `nil`.
-def gather
- return unless select([$stdin], nil, nil, 2)
-
- lines, line = [], nil
- while (line = gets) != "---\n"
- lines << line
- end
- lines.join
-end
-
-# This process will loop infinitely, gathering up lines from stdin, parsing them
-# with Prettier::Parser, and then returning the parsed AST over stdout.
-loop do
- gathered = gather
- next unless gathered
-
- parser = Prettier::Parser.new(gathered)
-
- STDOUT.puts JSON.fast_generate(parser.parse)
- STDOUT.flush
-end
diff --git a/test/js/patterns.test.js b/test/js/patterns.test.js
deleted file mode 100644
index b584508e..00000000
--- a/test/js/patterns.test.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("patterns", () => {
- if (process.env.RUBY_VERSION <= "2.7") {
- test("pattern matching does not exist before ruby 2.7", () => {
- // this is here because test files must contain at least one test, so for
- // earlier versions of ruby this is just going to chill here
- });
-
- return;
- }
-
- describe("value pattern", () => {
- const cases = [
- "0",
- "-1..1",
- "Integer",
- "bar",
- "_, _",
- "0 | 1 | 2",
- "Integer => bar",
- "Object[0, *bar, 1]",
- "a, b, *c, d, e",
- "0, [1, _] => bar",
- "^bar",
- "x: 0.. => px, **rest",
- "SuperPoint[x: 0.. => px]",
- "a, b if b == a * 2"
- ];
-
- test.each(cases)("%s", (pattern) => {
- const content = ruby(`
- case foo
- in ${pattern}
- baz
- end
- `);
-
- return expect(content).toMatchFormat();
- });
- });
-});
diff --git a/test/js/ranges.test.js b/test/js/ranges.test.js
deleted file mode 100644
index 64c44ecc..00000000
--- a/test/js/ranges.test.js
+++ /dev/null
@@ -1,9 +0,0 @@
-describe("ranges", () => {
- test("two dot", () => expect("1..2").toMatchFormat());
-
- test("negative two dot", () => expect("-2..-1").toMatchFormat());
-
- test("three dot", () => expect("3...4").toMatchFormat());
-
- test("negative three dot", () => expect("-4...-3").toMatchFormat());
-});
diff --git a/test/js/rbs/combination.txt b/test/js/rbs/combination.txt
new file mode 100644
index 00000000..2761e7a7
--- /dev/null
+++ b/test/js/rbs/combination.txt
@@ -0,0 +1,5 @@
+untyped | void | nil
+untyped & void & nil
+untyped | void & nil
+untyped & void | nil
+untyped & (void | nil)
diff --git a/test/js/rbs/constant.txt b/test/js/rbs/constant.txt
new file mode 100644
index 00000000..763be8d4
--- /dev/null
+++ b/test/js/rbs/constant.txt
@@ -0,0 +1,11 @@
+Object
+::Object
+Enumerator::Lazy
+::Enumerator::Lazy
+Array[untyped]
+foo
+::foo
+Foo::foo
+::Foo::foo
+singleton(Object)
+singleton(::Object)
diff --git a/test/js/rbs/declaration.txt b/test/js/rbs/declaration.txt
new file mode 100644
index 00000000..2cabe37b
--- /dev/null
+++ b/test/js/rbs/declaration.txt
@@ -0,0 +1,3 @@
+Hello::World: Integer
+$name: String
+type ::Module::foo = String | Integer
diff --git a/test/js/rbs/generic.txt b/test/js/rbs/generic.txt
new file mode 100644
index 00000000..6ea1e1ac
--- /dev/null
+++ b/test/js/rbs/generic.txt
@@ -0,0 +1,7 @@
+[A, B] (A) -> B
+[A] (A) -> A
+[A, B, C] -> ::Foo[A, B, C]
+[A, B] -> [A, B]
+[A] -> { foo: A }
+[A, B] (A & B) -> void
+[A, B, C, D] -> ::Foo[A, B, C, D]
diff --git a/test/js/rbs/interface.txt b/test/js/rbs/interface.txt
new file mode 100644
index 00000000..ebfb7c53
--- /dev/null
+++ b/test/js/rbs/interface.txt
@@ -0,0 +1,5 @@
+_Foo
+::_Foo
+Foo::_Foo
+::Foo::_Foo
+_Foo[untyped, nil]
diff --git a/test/js/rbs/literal.txt b/test/js/rbs/literal.txt
new file mode 100644
index 00000000..4fff20f4
--- /dev/null
+++ b/test/js/rbs/literal.txt
@@ -0,0 +1,9 @@
+1
+-1
+:foo
+:foo?
+:$foo
+:@foo
+:@@foo
+:+
+:-
diff --git a/test/js/rbs/member.txt b/test/js/rbs/member.txt
new file mode 100644
index 00000000..b6233f3a
--- /dev/null
+++ b/test/js/rbs/member.txt
@@ -0,0 +1,28 @@
+alias foo bar
+alias self.foo self.bar
+attr_accessor foo: Foo
+attr_accessor self.foo: Foo
+attr_accessor foo(): Foo
+attr_accessor self.foo(): Foo
+attr_accessor foo(@bar): Foo
+attr_accessor self.foo(@bar): Foo
+attr_reader foo: Foo
+attr_reader self.foo: Foo
+attr_reader foo(): Foo
+attr_reader self.foo(): Foo
+attr_reader foo(@bar): Foo
+attr_reader self.foo(@bar): Foo
+attr_writer foo: Foo
+attr_writer self.foo: Foo
+attr_writer foo(): Foo
+attr_writer self.foo(): Foo
+attr_writer foo(@bar): Foo
+attr_writer self.foo(@bar): Foo
+@foo: Foo
+self.@foo: Foo
+@@foo: Foo
+include Foo
+prepend Foo
+extend Foo
+private
+public
diff --git a/test/js/rbs/method.txt b/test/js/rbs/method.txt
new file mode 100644
index 00000000..dfd4dd65
--- /dev/null
+++ b/test/js/rbs/method.txt
@@ -0,0 +1,17 @@
+def t: -> void
+def t: -> void | ...
+def t: -> ("a" | "b" | "c")
+def t: -> ("a" | "b" | "c")?
+def t: -> ("a" & "b" & "c")
+def t: -> ("a" & "b" & "c")?
+def t: -> ("a" & ("b" | "c"))
+def t: -> ("a" & ("b" | "c"))?
+def self.t: -> void
+def self.t: -> void | ...
+def self?.t: -> void
+def self?.t: -> void | ...
+def t: { -> void } -> void
+def t: ?{ -> void } -> void
+def `self`: -> void
+def `: -> void
+def t: (untyped `untyped`) -> void
diff --git a/test/js/rbs/optional.txt b/test/js/rbs/optional.txt
new file mode 100644
index 00000000..e7842ee6
--- /dev/null
+++ b/test/js/rbs/optional.txt
@@ -0,0 +1,5 @@
+untyped?
+^-> untyped?
+untyped | void?
+:foo??
+:foo!?
diff --git a/test/js/rbs/plain.txt b/test/js/rbs/plain.txt
new file mode 100644
index 00000000..99ab75f5
--- /dev/null
+++ b/test/js/rbs/plain.txt
@@ -0,0 +1,11 @@
+void
+untyped
+bool
+true
+false
+nil
+top
+bot
+self
+instance
+class
diff --git a/test/js/rbs/proc.txt b/test/js/rbs/proc.txt
new file mode 100644
index 00000000..4d77333b
--- /dev/null
+++ b/test/js/rbs/proc.txt
@@ -0,0 +1,11 @@
+^-> void
+^(untyped) -> void
+^(untyped, void) -> void
+^(untyped x, void _y) -> void
+^(untyped x, ?void, ?nil y) -> void
+^(untyped x, ?void, ?nil y, *untyped a) -> void
+^(untyped x, *untyped a, nil z) -> void
+^(foo: untyped, _bar: nil bar) -> void
+^(?_bar: nil, **untyped rest) -> void
+^-> void
+^{ -> void } -> void
diff --git a/test/js/rbs/rbs.test.js b/test/js/rbs/rbs.test.js
new file mode 100644
index 00000000..3e6addac
--- /dev/null
+++ b/test/js/rbs/rbs.test.js
@@ -0,0 +1,319 @@
+import { readFileSync } from "fs";
+import { platform } from "os";
+import { atLeastVersion, rbs } from "../utils";
+
+function testCases(name, transform) {
+ const buffer = readFileSync(new URL(`${name}.txt`, import.meta.url));
+ const sources = buffer.toString().slice(0, -1).split(/\r?\n/);
+
+ sources.forEach((source) => {
+ test(source, () => {
+ return expect(rbs(transform(source))).toMatchFormat();
+ });
+ });
+}
+
+function describeCases(name, transform) {
+ describe(name, () => {
+ testCases(name, transform);
+ });
+}
+
+describe("rbs", () => {
+ describeCases("combination", (source) => `T: ${source}`);
+
+ describeCases("constant", (source) => `T: ${source}`);
+
+ describe("declaration", () => {
+ testCases("declaration", (source) => source);
+
+ test("interface", () => {
+ const content = rbs(`
+ interface _Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("interface with type params", () => {
+ const content = rbs(`
+ interface _Foo[A, B]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ if (atLeastVersion("3.1")) {
+ test("interface with bounded type param", () => {
+ const content = rbs(`
+ interface _Foo[A < B]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("interface with fancy bounded type params", () => {
+ const content = rbs(`
+ interface _Foo[U < singleton(::Hash), V < W[X, Y]]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ }
+
+ test("class", () => {
+ const content = rbs(`
+ class Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with type params", () => {
+ const content = rbs(`
+ class Foo[A, B]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with complicated type params", () => {
+ const content = rbs(`
+ class Foo[unchecked in A, unchecked out B, in C, out D, unchecked E, unchecked F, G, H]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ if (atLeastVersion("3.1")) {
+ test("class with bounded type param", () => {
+ const content = rbs(`
+ class Foo[A < B]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with fancy bounded type params", () => {
+ const content = rbs(`
+ class Foo[U < singleton(::Hash), V < W[X, Y]]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ }
+
+ test("class with annotations", () => {
+ const content = rbs(`
+ %a{This is an annotation.}
+ class Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with annotations that cannot be switched to braces", () => {
+ const content = rbs(`
+ %a
+ class Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with comments", () => {
+ const content = rbs(`
+ # This is a comment.
+ class Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("class with superclass", () => {
+ const content = rbs(`
+ class Foo < Bar
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("module", () => {
+ const content = rbs(`
+ module Foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("module with type params", () => {
+ const content = rbs(`
+ module Foo[A, B]
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("module with self types", () => {
+ const content = rbs(`
+ module Foo : A
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multiple empty lines", () => {
+ const content = rbs(`
+ class Foo
+ A: 1
+ B: 2
+
+
+ C: 3
+ end
+ `);
+
+ const expected = rbs(`
+ class Foo
+ A: 1
+ B: 2
+
+ C: 3
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+ });
+
+ describeCases(
+ "generic",
+ (source) => `
+ class T
+ def t: ${source}
+ end
+ `
+ );
+
+ describeCases("interface", (source) => `T: ${source}`);
+
+ describe("literal", () => {
+ testCases("literal", (source) => `T: ${source}`);
+
+ test("+1 drops the plus sign", () => {
+ return expect(rbs("T: +1")).toChangeFormat("T: 1");
+ });
+
+ test("uses default quotes", () => {
+ return expect(rbs(`T: "foo"`)).toMatchFormat();
+ });
+
+ test("changes quotes to match", () => {
+ return expect(rbs("T: 'foo'")).toChangeFormat(`T: "foo"`);
+ });
+
+ test("keeps string the same when there is an escape sequence", () => {
+ return expect(rbs(`T: "super \\a duper"`)).toMatchFormat();
+ });
+
+ test("unescapes double quotes when using single quotes", () => {
+ return expect(rbs(`T: "super \\" duper"`)).toChangeFormat(
+ `T: "super \\" duper"`
+ );
+ });
+
+ test("unescapes single quotes when using double quotes", () => {
+ return expect(rbs(`T: 'super \\' duper'`)).toChangeFormat(
+ `T: 'super \\' duper'`
+ );
+ });
+
+ test("maintains escape sequences when using double quotes", () => {
+ return expect(
+ rbs(`T: "escape sequences \\a\\b\\e\\f\\n\\r"`)
+ ).toMatchFormat();
+ });
+
+ test("maintains not escape sequences when using single quotes", () => {
+ return expect(
+ rbs(`T: 'escape sequences \\a\\b\\e\\f\\n\\r'`)
+ ).toMatchFormat();
+ });
+ });
+
+ describeCases(
+ "member",
+ (source) => `
+ class T
+ ${source}
+ end
+ `
+ );
+
+ describeCases(
+ "method",
+ (source) => `
+ class T
+ ${source}
+ end
+ `
+ );
+
+ describe("optional", () => {
+ testCases("optional", (source) => `T: ${source}`);
+
+ test("removes optional space before question mark", () => {
+ return expect(rbs("T: :foo ?")).toChangeFormat("T: :foo?");
+ });
+ });
+
+ describeCases("plain", (source) => `T: ${source}`);
+
+ describe("proc", () => {
+ testCases("proc", (source) => `T: ${source}`);
+
+ test("drops optional parentheses when there are no params", () => {
+ return expect(rbs("T: ^() -> void")).toChangeFormat("T: ^-> void");
+ });
+
+ test("drops optional parentheses with block param when there are no params to the block", () => {
+ return expect(rbs("T: ^{ () -> void } -> void")).toChangeFormat(
+ "T: ^{ -> void } -> void"
+ );
+ });
+ });
+
+ describeCases("record", (source) => `T: ${source}`);
+
+ // For some reason these tests are failing on windows on Ruby < 3.0. I'm not
+ // sure why, but I'm leaving it here for now.
+ if (platform() !== "win32" || atLeastVersion("3.0")) {
+ describe("non-ASCII", () => {
+ test("emoji", () => {
+ return expect(rbs(`T: { "🌼" => Integer }`)).toMatchFormat();
+ });
+
+ test("kanji", () => {
+ return expect(rbs(`T: { "日本語" => Integer }`)).toMatchFormat();
+ });
+ });
+ }
+
+ describeCases("tuple", (source) => `T: ${source}`);
+});
diff --git a/test/js/rbs/record.txt b/test/js/rbs/record.txt
new file mode 100644
index 00000000..d5e3a6e0
--- /dev/null
+++ b/test/js/rbs/record.txt
@@ -0,0 +1,3 @@
+{ foo: Integer }
+{ foo: untyped, 3 => "hoge" }
+{ :+ => 1 }
diff --git a/test/js/rbs/tuple.txt b/test/js/rbs/tuple.txt
new file mode 100644
index 00000000..7dd425e4
--- /dev/null
+++ b/test/js/rbs/tuple.txt
@@ -0,0 +1,3 @@
+[ ]
+[untyped, nil, void]
+[untyped]
diff --git a/test/js/regexp.test.js b/test/js/regexp.test.js
deleted file mode 100644
index df9f6f82..00000000
--- a/test/js/regexp.test.js
+++ /dev/null
@@ -1,45 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("regexp", () => {
- test("basic", () => expect("/abc/").toMatchFormat());
-
- test("unnecessary braces", () => expect("%r{abc}").toChangeFormat("/abc/"));
-
- test("unnecessary slashes", () => expect("%r/abc/").toChangeFormat("/abc/"));
-
- test("unnecessary brackets", () => expect("%r[abc]").toChangeFormat("/abc/"));
-
- test("unnecessary parens", () => expect("%r(abc)").toChangeFormat("/abc/"));
-
- test("necessary braces", () => expect("%r{a/b/c}").toMatchFormat());
-
- test("interpolation", () => expect("/a#{inter}c/").toMatchFormat());
-
- test("modifiers", () => expect("/abc/i").toMatchFormat());
-
- test("braces and modifiers", () => expect("%r{a/b/c}mi").toMatchFormat());
-
- test("global interpolation", () => expect("/#$&/").toChangeFormat("/#{$&}/"));
-
- test("comments in regex", () => {
- const content = ruby(`
- /\\A
- [[:digit:]]+ # 1 or more digits before the decimal point
- (\\. # Decimal point
- [[:digit:]]+ # 1 or more digits after the decimal point
- )? # The decimal point and following digits are optional
- \\Z/x
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("forces braces if could be ambiguous with space in command", () =>
- expect("foo %r{ bar}").toMatchFormat());
-
- test("forces braces if could be ambiguous with equals in command", () =>
- expect("foo %r{= bar}").toMatchFormat());
-
- test("do not force braces if space is in parens", () =>
- expect("foo(/ bar/)").toMatchFormat());
-});
diff --git a/test/js/return.test.js b/test/js/return.test.js
deleted file mode 100644
index a2377b89..00000000
--- a/test/js/return.test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const { long } = require("./utils");
-
-describe("return", () => {
- test("bare", () => expect("return").toMatchFormat());
-
- test("one arg, no parens", () => expect("return 1").toMatchFormat());
-
- test("one arg, with parens", () =>
- expect("return(1)").toChangeFormat("return 1"));
-
- test("multiple args", () => expect("return 1, 2").toMatchFormat());
-
- test("return method call", () => expect("return foo :bar").toMatchFormat());
-
- test("return with breaking", () =>
- expect(`return ${long}`).toChangeFormat(`return(\n ${long}\n)`));
-
- test("returning an array", () =>
- expect("return [1, 2, 3]").toChangeFormat("return 1, 2, 3"));
-
- test("returning an empty array", () => expect("return []").toMatchFormat());
-
- test("returning a single element array", () =>
- expect("return [1]").toMatchFormat());
-
- test("returning a list that breaks", () =>
- expect(`return ${long}, ${long}`).toChangeFormat(
- `return [\n ${long},\n ${long}\n]`
- ));
-
- test("returning an array within parens", () =>
- expect("return([1, 2, 3])").toChangeFormat("return 1, 2, 3"));
-
- test("returning a long special array", () =>
- expect(`return %w[${long}]`).toChangeFormat(
- `return(\n %w[\n ${long}\n ]\n)`
- ));
-
- test("returning two arguments, one that breaks", () =>
- expect(`return foo, ${long}`).toChangeFormat(
- `return [\n foo,\n ${long}\n]`
- ));
-});
diff --git a/test/js/comments.test.js b/test/js/ruby/comments.test.js
similarity index 88%
rename from test/js/comments.test.js
rename to test/js/ruby/comments.test.js
index fc639814..1dcea4a3 100644
--- a/test/js/comments.test.js
+++ b/test/js/ruby/comments.test.js
@@ -1,4 +1,4 @@
-const { ruby } = require("./utils");
+import { ruby } from "../utils.js";
describe("comments", () => {
describe("on their own line", () => {
@@ -151,14 +151,21 @@ describe("comments", () => {
});
describe("inline", () => {
- test("basic", () =>
- expect("foo # this is an inline comment").toMatchFormat());
+ test("basic", () => {
+ return expect("foo # this is an inline comment").toMatchFormat();
+ });
- test("commands", () =>
- expect("command 'foo' # this is an inline comment").toMatchFormat());
+ test("commands", () => {
+ return expect(
+ `command "foo" # this is an inline comment`
+ ).toMatchFormat();
+ });
- test("command calls", () =>
- expect("command.call 'foo' # this is an inline comment").toMatchFormat());
+ test("command calls", () => {
+ return expect(
+ `command.call "foo" # this is an inline comment`
+ ).toMatchFormat();
+ });
});
describe("arrays", () => {
@@ -183,9 +190,9 @@ describe("comments", () => {
{
# these are comments
# inside of a hash
- foo: 'bar',
+ foo: "bar",
# and then some more
- bar: 'baz'
+ bar: "baz"
}
`);
@@ -215,7 +222,12 @@ describe("comments", () => {
.baz
`);
- return expect(content).toMatchFormat();
+ const expected = ruby(`
+ foo.bar # comment
+ .baz
+ `);
+
+ return expect(content).toChangeFormat(expected);
});
describe("declaration style comments", () => {
@@ -237,4 +249,15 @@ describe("comments", () => {
return expect(content).toMatchFormat();
});
});
+
+ test("works with multi-byte characters", () => {
+ const content = ruby(`
+ [
+ ["先生小"], #
+ ["小"]
+ ]
+ `);
+
+ return expect(content).toMatchFormat();
+ });
});
diff --git a/test/js/ruby/encoding.test.js b/test/js/ruby/encoding.test.js
new file mode 100644
index 00000000..1d6bb806
--- /dev/null
+++ b/test/js/ruby/encoding.test.js
@@ -0,0 +1,19 @@
+describe("encoding", () => {
+ const header = "# -*- encoding: binary -*-";
+
+ test("comments", () => {
+ return expect(`${header}\n# il était`).toMatchFormat();
+ });
+
+ test("symbol literals", () => {
+ return expect(`${header}\n:il_était`).toMatchFormat();
+ });
+
+ test("string literals", () => {
+ return expect(`${header}\n"ひらがな"`).toMatchFormat();
+ });
+
+ test("regexp literals", () => {
+ return expect(`${header}\n/ひらがな/`).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/errors.test.js b/test/js/ruby/errors.test.js
new file mode 100644
index 00000000..a5e99bbb
--- /dev/null
+++ b/test/js/ruby/errors.test.js
@@ -0,0 +1,24 @@
+import { format } from "prettier";
+
+describe("errors", () => {
+ const cases = [
+ "alias $a $1",
+ "self = 1",
+ "$` = 1",
+ "class foo; end",
+ "def foo(A) end",
+ "def foo($a) end",
+ "def foo(@a) end",
+ "def foo(@@a) end",
+ "<>"
+ ];
+
+ test.each(cases)("fails for %s", async (content) => {
+ try {
+ await format(content, { parser: "ruby", plugins: ["."] });
+ expect(true).toBe(false);
+ } catch (error) {
+ expect(error.loc).toBeDefined();
+ }
+ });
+});
diff --git a/test/js/ruby/ignore.test.js b/test/js/ruby/ignore.test.js
new file mode 100644
index 00000000..f1ce1f95
--- /dev/null
+++ b/test/js/ruby/ignore.test.js
@@ -0,0 +1,12 @@
+import { ruby } from "../utils.js";
+
+describe("ignore", () => {
+ test("you can ignore code blocks", () => {
+ const content = ruby(`
+ # stree-ignore
+ class Foo; def bar; 1+1+1; end; end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/layout.test.js b/test/js/ruby/layout.test.js
new file mode 100644
index 00000000..393d5e5d
--- /dev/null
+++ b/test/js/ruby/layout.test.js
@@ -0,0 +1,41 @@
+import { ruby } from "../utils.js";
+
+describe("layout", () => {
+ test("turns multiple blank lines into just one blank line", () => {
+ return expect("1\n\n\n\n\n2").toChangeFormat("1\n\n2");
+ });
+
+ test("turns semicolons into adjacent lines", () => {
+ return expect("1; 2; 3").toChangeFormat("1\n2\n3");
+ });
+
+ test("maintains semicolons from within interpolation", () => {
+ return expect(`"a#{b; c}"`).toMatchFormat();
+ });
+
+ test("handles multiple newlines at the end of the file", () => {
+ return expect("foo\n\n\n").toChangeFormat("foo");
+ });
+
+ test("keeps comments in their place when nothing to attach to", () => {
+ const content = ruby(`
+ # Comment
+ def f
+ print 1
+ end
+
+ # Comment
+ # Comment
+
+ def g
+ print 2
+ end
+
+ # Comment
+ # Comment
+ # Comment
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/alias.test.js b/test/js/ruby/nodes/alias.test.js
new file mode 100644
index 00000000..df83939f
--- /dev/null
+++ b/test/js/ruby/nodes/alias.test.js
@@ -0,0 +1,66 @@
+import { long, ruby } from "../../utils.js";
+
+describe("alias", () => {
+ test("bare word aliases", () => {
+ return expect("alias foo bar").toMatchFormat();
+ });
+
+ test("bare word operator aliases", () => {
+ return expect("alias << push").toMatchFormat();
+ });
+
+ test("bare word keyword aliases", () => {
+ return expect("alias in within").toMatchFormat();
+ });
+
+ test("bare word constant aliases", () => {
+ return expect("alias in IN").toMatchFormat();
+ });
+
+ test("symbol aliases become bare word aliases", () => {
+ return expect("alias :foo :bar").toChangeFormat("alias foo bar");
+ });
+
+ test("dynamic symbols do not get transformed (left)", () => {
+ return expect(`alias :"foo" :bar`).toChangeFormat(`alias :"foo" bar`);
+ });
+
+ test("dynamic symbols do not get transformed (right)", () => {
+ return expect(`alias :foo :"bar"`).toChangeFormat(`alias foo :"bar"`);
+ });
+
+ test("global aliases", () => {
+ return expect("alias $foo $bar").toMatchFormat();
+ });
+
+ test("handles long symbols", () => {
+ const expected = ruby(`
+ alias ${long}
+ bar
+ `);
+
+ return expect(`alias ${long} bar`).toChangeFormat(expected);
+ });
+
+ test("handles comments on the right node", () => {
+ return expect("alias foo bar # baz").toMatchFormat();
+ });
+
+ test("handles comments on the left node", () => {
+ const content = ruby(`
+ alias foo # baz
+ bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("handles comments on both nodes", () => {
+ const content = ruby(`
+ alias foo # foo
+ bar # bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/aref.test.js b/test/js/ruby/nodes/aref.test.js
new file mode 100644
index 00000000..aa7d7cb4
--- /dev/null
+++ b/test/js/ruby/nodes/aref.test.js
@@ -0,0 +1,35 @@
+import { ruby } from "../../utils.js";
+
+describe("aref", () => {
+ test("literal reference", () => {
+ return expect("array[5]").toMatchFormat();
+ });
+
+ test("dynamic reference", () => {
+ return expect("array[idx]").toMatchFormat();
+ });
+
+ test("reference with comment", () => {
+ return expect("array[idx] # foo").toMatchFormat();
+ });
+
+ test("literal assignment", () => {
+ return expect("array[5] = 6").toMatchFormat();
+ });
+
+ test("dynamic assignment", () => {
+ return expect("array[idx] = 6").toMatchFormat();
+ });
+
+ test("comments within assignment", () => {
+ const contents = ruby(`
+ array = %w[foo bar]
+ array[1] = [
+ # abc
+ %w[abc]
+ ]
+ `);
+
+ return expect(contents).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/arrays.test.js b/test/js/ruby/nodes/arrays.test.js
new file mode 100644
index 00000000..e54d567f
--- /dev/null
+++ b/test/js/ruby/nodes/arrays.test.js
@@ -0,0 +1,161 @@
+import { long, ruby } from "../../utils.js";
+
+describe("array", () => {
+ test("empty arrays", () => {
+ return expect("[]").toMatchFormat();
+ });
+
+ test("basic formatting", () => {
+ return expect("[1, 2, 3]").toMatchFormat();
+ });
+
+ test("does not transform single string arrays", () => {
+ return expect(`["a"]`).toMatchFormat();
+ });
+
+ test("does not transform single symbol arrays", () => {
+ return expect("[:a]").toMatchFormat();
+ });
+
+ test("transforms basic string arrays", () => {
+ return expect(`["a", "b", "c", "d", "e"]`).toChangeFormat("%w[a b c d e]");
+ });
+
+ test("does not transform string arrays with interpolation", () => {
+ return expect(`["a", "#{b}", "c"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with spaces", () => {
+ return expect(`["a", "b c", "d", "e"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with tabs", () => {
+ return expect(`["a", "b\\tc", "d", "e"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with newlines", () => {
+ return expect(`["a", "b\\nc", "d", "e"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with carriage returns", () => {
+ return expect(`["a", "b\\rc", "d", "e"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with interpolation", () => {
+ return expect(`["a", "b#{c}d", "e"]`).toMatchFormat();
+ });
+
+ test("does not transform string arrays with brackets", () => {
+ return expect(`["a [] b", "c [] d"]`).toMatchFormat();
+ });
+
+ test("transforms basic symbol arrays", () => {
+ return expect("[:a, :b, :c]").toChangeFormat("%i[a b c]");
+ });
+
+ test("does not transform symbol arrays with dynamic symbols", () => {
+ return expect(`[:"a + b"]`).toMatchFormat();
+ });
+
+ test("handles splats", () => {
+ return expect("[1, 2, *[3, 4], 5, 6]").toMatchFormat();
+ });
+
+ test("breaks appropriately", () => {
+ const contents = ruby(`
+ [
+ ${long},
+ ${long},
+ [
+ ${long},
+ ${long},
+ ${long}
+ ]
+ ]
+ `);
+
+ return expect(contents).toMatchFormat();
+ });
+
+ test("breaking maintains calls on the end", () => {
+ return expect(`[${long}].freeze`).toChangeFormat(`[\n ${long}\n].freeze`);
+ });
+
+ describe("heredocs", () => {
+ test("as the first value", () => {
+ const content = ruby(`
+ [<<~HERE, foo]
+ this is the heredoc
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("as the last value", () => {
+ const content = ruby(`
+ [foo, <<~HERE]
+ this is the heredoc
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with splats in the array", () => {
+ const content = ruby(`
+ [foo, *bar, baz, <<~HERE]
+ this is the heredoc
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ test("with leading comments but none in body", () => {
+ const content = ruby(`
+ # leading
+ []
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with leading comments and comments in the body", () => {
+ const content = ruby(`
+ # leading
+ [
+ # inside
+ # body
+ ]
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments just in the body", () => {
+ const content = ruby(`
+ [
+ # inside
+ # body
+ ]
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments just outside but attached", () => {
+ const content = ruby(`
+ foo(
+ [] # comment comment
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test.each(["%w", "%W", "%i", "%I"])("%s special array literals", (start) =>
+ expect(`${start}[a b c]`).toMatchFormat()
+ );
+});
diff --git a/test/js/ruby/nodes/assign.test.js b/test/js/ruby/nodes/assign.test.js
new file mode 100644
index 00000000..f8a1254e
--- /dev/null
+++ b/test/js/ruby/nodes/assign.test.js
@@ -0,0 +1,149 @@
+import { long, ruby } from "../../utils.js";
+
+describe("assign", () => {
+ describe("single assignment", () => {
+ test("basic", () => {
+ return expect("a = 1").toMatchFormat();
+ });
+
+ test("multiline", () => {
+ const content = ruby(`
+ a =
+ begin
+ 1
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("other operator", () => {
+ return expect("a ||= b").toMatchFormat();
+ });
+ });
+
+ test("heredoc", () => {
+ const content = ruby(`
+ text = <<-TEXT
+ abcd
+ TEXT
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ describe("breaking", () => {
+ test("inline becomes multi line", () => {
+ return expect(`${long} = ${long}`).toChangeFormat(`${long} =\n ${long}`);
+ });
+
+ test("arrays don't get force indented", () => {
+ return expect(`a = [${long}, ${long}, ${long}]`).toChangeFormat(
+ ruby(`
+ a = [
+ ${long},
+ ${long},
+ ${long}
+ ]
+ `)
+ );
+ });
+
+ test("hashes don't get force indented", () => {
+ return expect(
+ `a = { a: ${long}, b: ${long}, c: ${long} }`
+ ).toChangeFormat(
+ ruby(`
+ a = {
+ a:
+ ${long},
+ b:
+ ${long},
+ c:
+ ${long}
+ }
+ `)
+ );
+ });
+
+ describe("assignments from quotewords and similar", () => {
+ const cases = ["w", "W", "i", "I"];
+
+ test.each(cases)("x = %s[...] is not force-indented", (literal) => {
+ return expect(`a = %${literal}[${long} ${long}]`).toChangeFormat(
+ ruby(`
+ a = %${literal}[
+ ${long}
+ ${long}
+ ]
+ `)
+ );
+ });
+ });
+
+ test("chained methods on array literals don't get oddly indented", () => {
+ return expect(`a = [${long}].freeze`).toChangeFormat(
+ ruby(`
+ a = [
+ ${long}
+ ].freeze
+ `)
+ );
+ });
+
+ test("chained methods on hash literals don't get oddly indented", () => {
+ return expect(`a = { a: ${long} }.freeze`).toChangeFormat(
+ ruby(`
+ a = {
+ a:
+ ${long}
+ }.freeze
+ `)
+ );
+ });
+
+ describe("assignment operators", () => {
+ // some but not all
+ const operators = ["||", "&&", "+", "*", "%", "**", "<<"];
+
+ test.each(operators)("array %s= [...] is not force-indented", (op) => {
+ return expect(`a ${op}= [${long}, ${long}, ${long}]`).toChangeFormat(
+ ruby(`
+ a ${op}= [
+ ${long},
+ ${long},
+ ${long}
+ ]
+ `)
+ );
+ });
+
+ test.each(operators)("hash %s= { ... } is not force-indented", (op) => {
+ return expect(
+ `a ${op}= { a: ${long}, b: ${long}, c: ${long} }`
+ ).toChangeFormat(
+ ruby(`
+ a ${op}= {
+ a:
+ ${long},
+ b:
+ ${long},
+ c:
+ ${long}
+ }
+ `)
+ );
+ });
+ });
+ });
+
+ describe("constants", () => {
+ test("assigning to constant", () => {
+ return expect(`Pret::TIER = "config"`).toMatchFormat();
+ });
+
+ test("assigning to top level constants", () => {
+ return expect(`::PRETTIER = "config"`).toMatchFormat();
+ });
+ });
+});
diff --git a/test/js/binary.test.js b/test/js/ruby/nodes/binary.test.js
similarity index 59%
rename from test/js/binary.test.js
rename to test/js/ruby/nodes/binary.test.js
index 9bf34b26..2ce05d6a 100644
--- a/test/js/binary.test.js
+++ b/test/js/ruby/nodes/binary.test.js
@@ -1,12 +1,15 @@
-const { long, ruby } = require("./utils");
+import { long, ruby } from "../../utils.js";
describe("binary", () => {
- test("single line", () => expect("foo && bar && baz").toMatchFormat());
+ test("single line", () => {
+ return expect("foo && bar && baz").toMatchFormat();
+ });
- test("multi line", () =>
- expect(`${long} && ${long} && ${long}`).toChangeFormat(
+ test("multi line", () => {
+ return expect(`${long} && ${long} && ${long}`).toChangeFormat(
`${long} &&\n ${long} &&\n ${long}`
- ));
+ );
+ });
test("no indent on the right", () => {
const content = `foo << [${long}]`;
@@ -28,4 +31,8 @@ describe("binary", () => {
return expect(content).toMatchFormat();
});
+
+ test("no spaces for **", () => {
+ return expect("a**b").toMatchFormat();
+ });
});
diff --git a/test/js/ruby/nodes/blocks.test.js b/test/js/ruby/nodes/blocks.test.js
new file mode 100644
index 00000000..8d4c9d8f
--- /dev/null
+++ b/test/js/ruby/nodes/blocks.test.js
@@ -0,0 +1,199 @@
+import { long, ruby } from "../../utils.js";
+
+describe("blocks", () => {
+ test("empty", () => {
+ return expect("loop {}").toMatchFormat();
+ });
+
+ test("single line non-breaking", () => {
+ return expect("loop { 1 }").toMatchFormat();
+ });
+
+ test("single line breaking", () => {
+ return expect(`loop { ${long} }`).toChangeFormat(`loop do\n ${long}\nend`);
+ });
+
+ test("multi line non-breaking", () => {
+ return expect("loop do\n 1\nend").toChangeFormat("loop { 1 }");
+ });
+
+ test("multi-line breaking", () => {
+ return expect(`loop do\n ${long}\nend`).toMatchFormat();
+ });
+
+ test("multi-line with comment", () => {
+ return expect("loop do\n # foobar\nend").toMatchFormat();
+ });
+
+ test("multi-line on command, no body", () => {
+ return expect(`command "foobar" do\nend`).toMatchFormat();
+ });
+
+ test("multi-line on command call, no body", () => {
+ return expect(`command.call "foobar" do\nend`).toMatchFormat();
+ });
+
+ test("multi-line on command, with body", () => {
+ return expect(`command "foobar" do\n foo\nend`).toMatchFormat();
+ });
+
+ test("multi-line on command call, with body", () => {
+ return expect(`command.call "foobar" do\n foo\nend`).toMatchFormat();
+ });
+
+ test("blocks nested inside commands use braces", () => {
+ const expected = ruby(`
+ foo ${long} {
+ ${long}
+ }.bar
+ `);
+
+ return expect(`foo ${long} { ${long} }.bar`).toChangeFormat(expected);
+ });
+
+ test("breaking maintains calls on the end", () => {
+ const content = ruby(`
+ method.each do |foo|
+ bar
+ baz
+ end.to_i
+ `);
+
+ const expected = ruby(`
+ method
+ .each do |foo|
+ bar
+ baz
+ end
+ .to_i
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("doesn't do weird things with comments", () => {
+ const content = ruby(`
+ foo.each do |bar|
+ # comment
+ bar.baz
+ bar.baz
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ describe("for loops", () => {
+ test("for loops", () => {
+ const content = ruby(`
+ for i in [1, 2, 3]
+ p i
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multiple variables", () => {
+ const content = ruby(`
+ for a, b in [[1, 2], [3, 4]]
+ p i
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("optional do keyword", () => {
+ const content = ruby(`
+ a do
+ # comment
+ for b in c do
+ puts b
+ end
+ end
+ `);
+
+ const expected = ruby(`
+ a do
+ # comment
+ for b in c
+ puts b
+ end
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+ });
+
+ test("excessed_comma nodes", () => {
+ return expect("proc { |x,| }").toMatchFormat();
+ });
+
+ describe("args", () => {
+ test("no body", () => {
+ return expect("loop { |i| }").toMatchFormat();
+ });
+
+ test("single line non-breaking", () => {
+ return expect("loop { |i| 1 }").toMatchFormat();
+ });
+
+ test("single line breaking", () => {
+ return expect(`loop { |i| ${long} }`).toChangeFormat(
+ `loop do |i|\n ${long}\nend`
+ );
+ });
+
+ test("multi-line non-breaking", () => {
+ return expect("loop do |i|\n i\nend").toChangeFormat("loop { |i| i }");
+ });
+
+ test("multi-line breaking", () => {
+ return expect(`loop do |i|\n ${long}\nend`).toMatchFormat();
+ });
+
+ test("block-local args", () => {
+ return expect("loop { |i; j| 1 }").toMatchFormat();
+ });
+
+ test("splat", () => {
+ return expect("loop { |*| i }").toMatchFormat();
+ });
+
+ test("destructure", () => {
+ return expect("loop { |(a, b)| i }").toMatchFormat();
+ });
+
+ test("lots of args types", () => {
+ return expect("loop { |a, (b, c), d, *e| i }").toMatchFormat();
+ });
+
+ test("does not split up args inside pipes", () => {
+ return expect(`loop do |${long} = 1, a${long} = 2|\nend`).toMatchFormat();
+ });
+ });
+
+ // https://github.com/prettier/plugin-ruby/issues/989
+ test("comments on a do block", () => {
+ const content = ruby(`
+ RSpec.describe Api::V2::OAuth::TokensController, type: :api do # rubocop:disable RSpec/FilePath
+ foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ // https://github.com/prettier/plugin-ruby/issues/1042
+ test("comments on the do block without a command", () => {
+ const content = ruby(`
+ let!(:some_variable) do # comment text
+ nil
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/break.test.js b/test/js/ruby/nodes/break.test.js
new file mode 100644
index 00000000..10ba00f9
--- /dev/null
+++ b/test/js/ruby/nodes/break.test.js
@@ -0,0 +1,38 @@
+import { ruby } from "../../utils.js";
+
+describe("break", () => {
+ test("empty break", () => {
+ return expect("break").toMatchFormat();
+ });
+
+ test("break with one argument, no parens", () => {
+ return expect("break 1").toMatchFormat();
+ });
+
+ test("break with parens drops parens", () => {
+ return expect("break(1)").toChangeFormat("break 1");
+ });
+
+ test("break with multiple arguments", () => {
+ return expect("break 1, 2, 3").toMatchFormat();
+ });
+
+ test("keeps parens for multiple statements", () => {
+ const expected = ruby(`
+ break(
+ a = 1
+ a == 1
+ )
+ `);
+
+ return expect("break(a = 1; a == 1)").toChangeFormat(expected);
+ });
+
+ test("keeps parens for _mod nodes", () => {
+ return expect("break(1 if true)").toMatchFormat();
+ });
+
+ test("works with comments", () => {
+ return expect("break # foo").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/calls.test.js b/test/js/ruby/nodes/calls.test.js
new file mode 100644
index 00000000..1b57328e
--- /dev/null
+++ b/test/js/ruby/nodes/calls.test.js
@@ -0,0 +1,206 @@
+import { long, ruby } from "../../utils.js";
+
+describe("calls", () => {
+ test("simple calls", () => {
+ const content = `posts.active.where("created_at > ?", 1.year.ago)`;
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("short chains", () => {
+ return expect("foo.bar.baz qux").toMatchFormat();
+ });
+
+ test("chain methods", () => {
+ const before = ruby(`
+ aaaaaaaaaa.bbbbbbbbbb.cccccccccc.dddddddddd(foo, bar).eeeeeeeeee.ffffffffff.gggggggggg.hhhhhhhhhh
+ `);
+
+ const after = ruby(`
+ aaaaaaaaaa
+ .bbbbbbbbbb
+ .cccccccccc
+ .dddddddddd(foo, bar)
+ .eeeeeeeeee
+ .ffffffffff
+ .gggggggggg
+ .hhhhhhhhhh
+ `);
+
+ return expect(before).toChangeFormat(after);
+ });
+
+ test("chains of methods with one with arguments right at the top", () => {
+ const content = ruby(`
+ aaa.bbb.ccc.ddd.eee.merge(
+ ${long.slice(0, 30)}: "aaa",
+ ${long.slice(0, 31)}: "bbb"
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("chains of methods with a block right at the top", () => {
+ const block = long.slice(0, 60);
+ const content = ruby(`
+ aaa.bbb.ccc.ddd.eee do
+ ${block}
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("tons of calls that fit on one line", () => {
+ const content = "a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z";
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("chains which contain a .where.not", () => {
+ const content = ruby(`
+ Customer
+ .active
+ .where(foo: "bar")
+ .where.not(banned_at: nil)
+ .order(created_at: "desc")
+ .limit(10)
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ describe("within sig blocks", () => {
+ test("basic chains", () => {
+ const content = ruby(`
+ sig do
+ params(contacts: Contact::ActiveRecord_Relation).returns(
+ Customer::ActiveRecord_Relation
+ )
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("chains with other methods", () => {
+ const content = ruby(`
+ sig do
+ overridable
+ .params(contacts: Contact::ActiveRecord_Relation)
+ .returns(Customer::ActiveRecord_Relation)
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ test("chains with blocks mixed in", () => {
+ const content = ruby(`
+ Model
+ .dataset
+ .eager(:table1)
+ .join(:second_table_name.as(:table2), %i[album_id artist_id])
+ .where(table1__artist_id: artists.map(&:id))
+ .where { table1__date > Time.now - 31.days }
+ .where { table2__date > table1_date }
+ .exclude(table2__album_id: :table1__album_id)
+ .select_all(:table1)
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("no explicit call doesn't add call", () => {
+ return expect("a.(1, 2, 3)").toMatchFormat();
+ });
+
+ test("explicit call maintains call", () => {
+ return expect("a.call(1, 2, 3)").toMatchFormat();
+ });
+
+ test("double bang with a special operator on a call", () => {
+ return expect("!!object&.topic_list").toMatchFormat();
+ });
+
+ test("bang with a special operator on a command_call", () => {
+ return expect(`!domain&.include? "@"`).toMatchFormat();
+ });
+
+ test("#call shorthand does not eliminate empty parentheses", () => {
+ return expect("Foo.new.()").toMatchFormat();
+ });
+
+ test("methods that look like constants do not eliminate empty parens", () => {
+ return expect("Foo()").toMatchFormat();
+ });
+
+ test("call chains with no indent on the first receiver", () => {
+ const item = long.slice(0, 30);
+ const content = `result = [${item}, ${item}, ${item}].map(&:foo?).bbb.ccc`;
+
+ const expected = ruby(`
+ result = [
+ ${item},
+ ${item},
+ ${item}
+ ].map(&:foo?).bbb.ccc
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("chained method_add_arg after a block", () => {
+ const content = ruby(`
+ a.b c do
+ end.d e, f
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("comments in a method chain get printed correctly", () => {
+ // https://github.com/prettier/plugin-ruby/issues/943
+ const content = ruby(`
+ Organization.includes(
+ :users,
+ :venues
+ )
+ .where(id: org_ids)
+ .flatten.
+ # first remove rows with duplicate names
+ uniq { |contact| "#{contact[:first_name]}#{contact[:last_name]}#{contact[:org_name]}" }.
+ # then remove remaining rows with duplicate emails
+ uniq { |contact| contact[:email] }
+ .tap { |res|
+ CSV.open(OUTPUT_PATH, "wb") { |csv|
+ csv << HEADERS
+ res.each { |d| csv << d.values }
+ }
+ }
+ `);
+
+ const expected = ruby(`
+ Organization
+ .includes(:users, :venues)
+ .where(id: org_ids)
+ .flatten.
+ # first remove rows with duplicate names
+ uniq do |contact|
+ "#{contact[:first_name]}#{contact[:last_name]}#{contact[:org_name]}"
+ end.
+ # then remove remaining rows with duplicate emails
+ uniq { |contact| contact[:email] }
+ .tap do |res|
+ CSV.open(OUTPUT_PATH, "wb") do |csv|
+ csv << HEADERS
+ res.each { |d| csv << d.values }
+ end
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+});
diff --git a/test/js/case.test.js b/test/js/ruby/nodes/case.test.js
similarity index 86%
rename from test/js/case.test.js
rename to test/js/ruby/nodes/case.test.js
index ac4ec173..f6efaa5d 100644
--- a/test/js/case.test.js
+++ b/test/js/ruby/nodes/case.test.js
@@ -1,4 +1,4 @@
-const { long, ruby } = require("./utils");
+import { long, ruby } from "../../utils.js";
describe("case", () => {
test("empty case", () => {
@@ -37,9 +37,9 @@ describe("case", () => {
test("breaking with multiple predicates, one when", () => {
const content = ruby(`
case foo
- when '${long}',
- 'a${long}',
- 'b${long}'
+ when "${long}",
+ "a${long}",
+ "b${long}"
bar
end
`);
@@ -50,15 +50,15 @@ describe("case", () => {
test("breaking with multiple predicates, each one not too long", () => {
const content = ruby(`
case foo
- when '${long.slice(0, 40)}', '${long.slice(0, 40)}'
+ when "${long.slice(0, 40)}", "${long.slice(0, 40)}"
bar
end
`);
const expected = ruby(`
case foo
- when '${long.slice(0, 40)}',
- '${long.slice(0, 40)}'
+ when "${long.slice(0, 40)}",
+ "${long.slice(0, 40)}"
bar
end
`);
diff --git a/test/js/class.test.js b/test/js/ruby/nodes/class.test.js
similarity index 73%
rename from test/js/class.test.js
rename to test/js/ruby/nodes/class.test.js
index 781e1a34..ba917ba9 100644
--- a/test/js/class.test.js
+++ b/test/js/ruby/nodes/class.test.js
@@ -1,12 +1,15 @@
-const { long, ruby } = require("./utils");
+import { long, ruby } from "../../utils.js";
describe("class", () => {
test("basic nesting", () => {
const content = ruby(`
module Pret
module Tier
- class Plugin; end
- module Ruby; end
+ class Plugin
+ end
+
+ module Ruby
+ end
end
end
`);
@@ -17,23 +20,29 @@ describe("class", () => {
test("inheritance", () => {
const content = ruby(`
module Prettier
- class Ruby < Object; end
+ class Ruby < Object
+ end
end
`);
return expect(content).toMatchFormat();
});
- test("breaking class name", () =>
- expect(`class P${long}; end`).toChangeFormat(`class P${long}\nend`));
+ test("breaking class name", () => {
+ return expect(`class P${long}; end`).toChangeFormat(`class P${long}\nend`);
+ });
- test("breaking module name", () =>
- expect(`module P${long}; end`).toChangeFormat(`module P${long}\nend`));
+ test("breaking module name", () => {
+ return expect(`module P${long}; end`).toChangeFormat(
+ `module P${long}\nend`
+ );
+ });
test("class push blocks", () => {
const content = ruby(`
class << Prettier
- def foo; end
+ def foo
+ end
end
`);
@@ -110,8 +119,12 @@ describe("class", () => {
);
describe("constant reference", () => {
- test("regular", () => expect("Pret::Tier::Ruby").toMatchFormat());
+ test("regular", () => {
+ return expect("Pret::Tier::Ruby").toMatchFormat();
+ });
- test("top-level", () => expect("::Pret::Tier::Ruby").toMatchFormat());
+ test("top-level", () => {
+ return expect("::Pret::Tier::Ruby").toMatchFormat();
+ });
});
});
diff --git a/test/js/conditionals.test.js b/test/js/ruby/nodes/conditionals.test.js
similarity index 55%
rename from test/js/conditionals.test.js
rename to test/js/ruby/nodes/conditionals.test.js
index abeb65b7..dc8db071 100644
--- a/test/js/conditionals.test.js
+++ b/test/js/ruby/nodes/conditionals.test.js
@@ -1,10 +1,11 @@
-const { long, ruby } = require("./utils");
+import { long, ruby, atLeastVersion } from "../../utils.js";
describe("conditionals", () => {
describe("not operator", () => {
// from ruby test/ruby/test_not.rb
- test("not operator, empty parens", () =>
- expect("assert_equal(true, (not ()))").toMatchFormat());
+ test("not operator, empty parens", () => {
+ return expect("assert_equal(true, (not ()))").toMatchFormat();
+ });
test("not operator from within a ternary adds parens", () => {
return expect("a ? not(b) : c").toMatchFormat();
@@ -26,56 +27,97 @@ describe("conditionals", () => {
describe("modifiers", () => {
describe.each(["if", "unless"])("%s keyword", (keyword) => {
test("when modifying an assignment expression", () => {
- const content = `text = '${long}' ${keyword} text`;
+ const content = `text = "${long}" ${keyword} text`;
const expected = ruby(`
text =
- '${long}' ${keyword} text
+ "${long}" ${keyword} text
`);
return expect(content).toChangeFormat(expected);
});
test("when modifying an abbreviated assignment expression", () => {
- const content = `text ||= '${long}' ${keyword} text`;
+ const content = `text ||= "${long}" ${keyword} text`;
const expected = ruby(`
text ||=
- '${long}' ${keyword} text
+ "${long}" ${keyword} text
`);
return expect(content).toChangeFormat(expected);
});
test("when modifying an expression with an assignment descendant", () => {
- const content = `true && (text = '${long}') ${keyword} text`;
+ const content = `true && (text = "${long}") ${keyword} text`;
const expected = ruby(`
true &&
(
text =
- '${long}'
+ "${long}"
) ${keyword} text
`);
return expect(content).toChangeFormat(expected);
});
});
+
+ test("does not insert double modifiers on a single line", () => {
+ const content = ruby(`
+ if a
+ do_something unless b
+ end
+ `);
+ const expected = ruby(`
+ if a
+ do_something unless b
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("does not insert double modifiers on a single line for nested conditionals", () => {
+ const content = ruby(`
+ if a
+ unless b
+ do_something
+ end
+ end
+ `);
+ const expected = ruby(`
+ if a
+ do_something unless b
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
});
describe("when inline allowed", () => {
describe.each(["if", "unless"])("%s keyword", (keyword) => {
- test("inline stays", () => expect(`1 ${keyword} a`).toMatchFormat());
+ test("inline stays", () => {
+ return expect(`1 ${keyword} a`).toMatchFormat();
+ });
- test("multi line changes", () =>
- expect(`${keyword} a\n 1\nend`).toChangeFormat(`1 ${keyword} a`));
+ test("multi line changes", () => {
+ return expect(`${keyword} a\n 1\nend`).toChangeFormat(
+ `1 ${keyword} a`
+ );
+ });
- test("inline breaking changes", () =>
- expect(`${long} ${keyword} ${long}`).toChangeFormat(
+ test("inline breaking changes", () => {
+ return expect(`${long} ${keyword} ${long}`).toChangeFormat(
`${keyword} ${long}\n ${long}\nend`
- ));
+ );
+ });
- test("multi line breaking stays", () =>
- expect(`${keyword} ${long}\n ${long}\nend`).toMatchFormat());
+ test("multi line breaking stays", () => {
+ return expect(`${keyword} ${long}\n ${long}\nend`).toMatchFormat();
+ });
- test("not operator", () => expect(`b ${keyword} not a`).toMatchFormat());
+ test("not operator", () => {
+ return expect(`b ${keyword} not a`).toMatchFormat();
+ });
test("empty first body", () => {
const content = ruby(`
@@ -89,7 +131,6 @@ describe("conditionals", () => {
test("empty first body with present second body", () => {
const content = ruby(`
${keyword} a
-
else
b
end
@@ -152,135 +193,61 @@ describe("conditionals", () => {
return expect(content).toMatchFormat();
});
- test("align long predicates", () =>
- expect(`foo ${keyword} ${long} || ${long}a`).toChangeFormat(
+ test("align long predicates", () => {
+ return expect(`foo ${keyword} ${long} || ${long}a`).toChangeFormat(
ruby(`
${keyword} ${long} ||
- ${Array(keyword.length).fill().join(" ")}${long}a
+ ${Array(keyword.length).fill("").join(" ")}${long}a
foo
end
`)
- ));
-
- test("wraps single lines in parens when assigning", () =>
- expect(`hash[:key] = ${keyword} false then :value end`).toChangeFormat(
- `hash[:key] = (:value ${keyword} false)`
- ));
- });
- });
-
- describe("when inline not allowed", () => {
- describe.each(["if", "unless"])("%s keyword", (keyword) => {
- test("inline changes", () =>
- expect(`1 ${keyword} a`).toChangeFormat(`${keyword} a\n 1\nend`, {
- rubyModifier: false
- }));
-
- test("multi line stays", () =>
- expect(`${keyword} a\n 1\nend`).toMatchFormat({
- rubyModifier: false
- }));
-
- test("inline breaking changes", () =>
- expect(`${long} ${keyword} ${long}`).toChangeFormat(
- `${keyword} ${long}\n ${long}\nend`,
- {
- rubyModifier: false
- }
- ));
-
- test("multi line breaking stays", () =>
- expect(`${keyword} ${long}\n ${long}\nend`).toMatchFormat({
- rubyModifier: false
- }));
-
- test("not operator", () =>
- expect(`${keyword} not a\n b\nend`).toMatchFormat({
- rubyModifier: false
- }));
-
- test("not operator parens", () => expect("not(true)").toMatchFormat());
-
- test("empty first body", () => {
- const content = ruby(`
- ${keyword} a
- end
- `);
-
- return expect(content).toMatchFormat({ rubyModifier: false });
+ );
});
- test("empty first body with present second body", () => {
- const content = ruby(`
- ${keyword} a
-
- else
- b
- end
- `);
-
- return expect(content).toMatchFormat({ rubyModifier: false });
+ test("wraps single lines in parens when assigning", () => {
+ return expect(
+ `hash[:key] = ${keyword} false then :value end`
+ ).toChangeFormat(`hash[:key] = (:value ${keyword} false)`);
});
- test("comment in body", () => {
+ test("wraps inline version with calls", () => {
const content = ruby(`
- ${keyword} a
- # comment
- end
+ if true
+ false
+ end.to_s
`);
- return expect(content).toMatchFormat({ rubyModifier: false });
+ return expect(content).toChangeFormat("(false if true).to_s");
});
- test("comment on node in body", () => {
+ test("wraps inline version within binary", () => {
const content = ruby(`
- ${keyword} a
- break # comment
- end
- `);
-
- return expect(content).toMatchFormat({ rubyModifier: false });
- });
-
- test("align long predicates", () =>
- expect(`foo ${keyword} ${long} || ${long}a`).toChangeFormat(
- ruby(`
- ${keyword} ${long} ||
- ${Array(keyword.length).fill().join(" ")}${long}a
- foo
- end
- `)
- ));
-
- test("single line should break up", () => {
- const content = "foo = if bar? then baz end";
- const expected = ruby(`
- foo =
- if bar?
- baz
- end
+ if foo
+ bar
+ end || baz
`);
- return expect(content).toChangeFormat(expected, {
- rubyModifier: false
- });
+ return expect(content).toChangeFormat("(bar if foo) || baz");
});
});
});
describe("ternaries", () => {
- test("non-breaking", () => expect("a ? 1 : 2").toMatchFormat());
+ test("non-breaking", () => {
+ return expect("a ? 1 : 2").toMatchFormat();
+ });
- test("breaking", () =>
- expect(`a ? ${long} : ${long}`).toChangeFormat(
+ test("breaking", () => {
+ return expect(`a ? ${long} : ${long}`).toChangeFormat(
ruby(`
- if a
- ${long}
- else
- ${long}
- end
- `)
- ));
+ if a
+ ${long}
+ else
+ ${long}
+ end
+ `)
+ );
+ });
test("transform from if/else", () => {
const content = ruby(`
@@ -342,6 +309,40 @@ describe("conditionals", () => {
return expect(content).toChangeFormat("(a ? 1 : 2) + 1");
});
+ test("adds parens if within a command", () => {
+ const content = `foo baz ? ${long} : ${long}`;
+ const expected = ruby(`
+ foo(
+ if baz
+ ${long}
+ else
+ ${long}
+ end
+ )
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("does not add parens if within a command_call non-breaking", () => {
+ return expect("foo.bar baz ? foo : bar").toMatchFormat();
+ });
+
+ test("adds parens if within a command_call", () => {
+ const content = `foo.bar baz ? ${long} : ${long}`;
+ const expected = ruby(`
+ foo.bar(
+ if baz
+ ${long}
+ else
+ ${long}
+ end
+ )
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
describe("unable to transform", () => {
test("breaking", () => {
const content = ruby(`
@@ -403,6 +404,105 @@ describe("conditionals", () => {
return expect(content).toMatchFormat();
});
+ test("heredoc in if body", () => {
+ const content = ruby(`
+ if a
+ <<~HEREDOC
+ a
+ b
+ HEREDOC
+ else
+ b
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("heredoc in else body", () => {
+ const content = ruby(`
+ if a
+ a
+ else
+ <<~HEREDOC
+ a
+ b
+ HEREDOC
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("nested conditional in if body", () => {
+ const content = ruby(`
+ if a
+ if b
+ c
+ else
+ d
+ end
+ else
+ b
+ end
+ `);
+
+ const expected = ruby(`
+ if a
+ b ? c : d
+ else
+ b
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("nested conditional in else body", () => {
+ const content = ruby(`
+ if a
+ b
+ else
+ if c
+ d
+ else
+ b
+ end
+ end
+ `);
+ const expected = ruby(`
+ if a
+ b
+ else
+ c ? d : b
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("nested ternary in if body", () => {
+ const content = ruby(`
+ if a
+ b ? c : d
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("nested ternary in else body", () => {
+ const content = ruby(`
+ if a
+ b
+ else
+ c ? d : e
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
test("command with argument predicate", () => {
const content = ruby(`
if a b
@@ -427,22 +527,23 @@ describe("conditionals", () => {
return expect(content).toMatchFormat();
});
- test("align long predicates", () =>
- expect(`${long} || ${long}a ? foo : bar`).toChangeFormat(
+ test("align long predicates", () => {
+ return expect(`${long} || ${long}a ? foo : bar`).toChangeFormat(
ruby(`
- if ${long} ||
- ${long}a
- foo
- else
- bar
- end
- `)
- ));
+ if ${long} ||
+ ${long}a
+ foo
+ else
+ bar
+ end
+ `)
+ );
+ });
test("lower precendence operators", () => {
const content = ruby(`
if x.nil?
- puts 'nil' and return
+ puts "nil" and return
else
x
end
@@ -474,6 +575,19 @@ describe("conditionals", () => {
return expect(content).toMatchFormat();
});
+
+ test("cannot transform with multiple statements", () => {
+ const content = ruby(`
+ if a
+ 1
+ 2
+ else
+ 3
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
});
});
@@ -508,29 +622,45 @@ describe("conditionals", () => {
});
describe.each(["if", "unless"])("add parens when necessary %s", (keyword) => {
- test("args", () =>
- expect(`[${keyword} foo? then bar end]`).toChangeFormat(
+ test("args", () => {
+ return expect(`[${keyword} foo? then bar end]`).toChangeFormat(
`[(bar ${keyword} foo?)]`
- ));
+ );
+ });
- test("assign", () =>
- expect(`foo = ${keyword} bar? then baz end`).toChangeFormat(
+ test("assign", () => {
+ return expect(`foo = ${keyword} bar? then baz end`).toChangeFormat(
`foo = (baz ${keyword} bar?)`
- ));
+ );
+ });
- test("assoc_new", () =>
- expect(`{ foo: ${keyword} bar? then baz end }`).toChangeFormat(
+ test("assoc", () => {
+ return expect(`{ foo: ${keyword} bar? then baz end }`).toChangeFormat(
`{ foo: (baz ${keyword} bar?) }`
- ));
+ );
+ });
- test("massign", () =>
- expect(`f, o, o = ${keyword} bar? then baz end`).toChangeFormat(
+ test("massign", () => {
+ return expect(`f, o, o = ${keyword} bar? then baz end`).toChangeFormat(
`f, o, o = (baz ${keyword} bar?)`
- ));
+ );
+ });
- test("opassign", () =>
- expect(`foo ||= ${keyword} bar? then baz end`).toChangeFormat(
+ test("opassign", () => {
+ return expect(`foo ||= ${keyword} bar? then baz end`).toChangeFormat(
`foo ||= (baz ${keyword} bar?)`
- ));
+ );
+ });
});
+
+ if (atLeastVersion("3.0")) {
+ test.each(["if", "unless"])("%s with pattern matching", (keyword) => {
+ const content = ruby(`
+ user = { role: "admin", login: "matz" }
+ puts "admin: #{name}" ${keyword} user in { role: "admin", name: }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ }
});
diff --git a/test/js/ruby/nodes/defined.test.js b/test/js/ruby/nodes/defined.test.js
new file mode 100644
index 00000000..3faf4b8b
--- /dev/null
+++ b/test/js/ruby/nodes/defined.test.js
@@ -0,0 +1,29 @@
+import { long } from "../../utils.js";
+
+describe("defined", () => {
+ test("no parens", () => {
+ return expect("defined? a").toChangeFormat("defined?(a)");
+ });
+
+ test("parens", () => {
+ return expect("defined?(a)").toMatchFormat();
+ });
+
+ test("breaks on long identifier, no parens", () => {
+ return expect(`defined? ${long}`).toChangeFormat(`defined?(\n ${long}\n)`);
+ });
+
+ test("breaks on long identifier, with parens", () => {
+ return expect(`defined?(${long})`).toChangeFormat(
+ `defined?(\n ${long}\n)`
+ );
+ });
+
+ test("breaking keeps breaking", () => {
+ return expect(`defined?(\n ${long}\n)`).toMatchFormat();
+ });
+
+ test("unnecessary breaking reverts to inline", () => {
+ return expect("defined?(\n a\n)").toChangeFormat("defined?(a)");
+ });
+});
diff --git a/test/js/embdoc.test.js b/test/js/ruby/nodes/embdoc.test.js
similarity index 94%
rename from test/js/embdoc.test.js
rename to test/js/ruby/nodes/embdoc.test.js
index 3b74b121..9d3e1d2a 100644
--- a/test/js/embdoc.test.js
+++ b/test/js/ruby/nodes/embdoc.test.js
@@ -1,4 +1,4 @@
-const { ruby } = require("./utils");
+import { ruby } from "../../utils.js";
describe("embdoc", () => {
test("basic embdocs", () => {
diff --git a/test/js/ruby/nodes/field.test.js b/test/js/ruby/nodes/field.test.js
new file mode 100644
index 00000000..2492c093
--- /dev/null
+++ b/test/js/ruby/nodes/field.test.js
@@ -0,0 +1,13 @@
+describe("field", () => {
+ test("basic", () => {
+ return expect("foo.x = 1").toMatchFormat();
+ });
+
+ test("replaces :: with .", () => {
+ return expect("foo::x = 1").toChangeFormat("foo.x = 1");
+ });
+
+ test("with lonely operator", () => {
+ return expect("foo&.x = 1").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/hashes.test.js b/test/js/ruby/nodes/hashes.test.js
new file mode 100644
index 00000000..a9ecdc85
--- /dev/null
+++ b/test/js/ruby/nodes/hashes.test.js
@@ -0,0 +1,257 @@
+import { long, ruby } from "../../utils.js";
+
+describe("hash", () => {
+ test("empty", () => {
+ return expect("{}").toMatchFormat();
+ });
+
+ test("empty with comments", () => {
+ const content = ruby(`
+ {
+ # foo
+ # bar
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaking", () => {
+ const content = ruby(`
+ {
+ ${long}:
+ ${long},
+ ${long}: {
+ ${long}:
+ ${long}
+ }
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaking maintains calls on the end", () => {
+ return expect(`{ a: ${long} }.freeze`).toChangeFormat(
+ `{\n a:\n ${long}\n}.freeze`
+ );
+ });
+
+ describe("heredocs as values", () => {
+ test("as the first value", () => {
+ const content = ruby(`
+ { foo: <<~HERE, bar: "bar" }
+ this is the heredoc
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("as the last value", () => {
+ const content = ruby(`
+ { foo: "foo", bar: <<~HERE }
+ this is the heredoc
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("when exceeding line length", () => {
+ const content = ruby(`
+ { foo: "${long}", bar: <<~HERE }
+ this is the heredoc
+ HERE
+ `);
+
+ const expected = ruby(`
+ {
+ foo:
+ "${long}",
+ bar: <<~HERE
+ this is the heredoc
+ HERE
+ }
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+ });
+
+ describe("dynamic string keys", () => {
+ test("basic", () => {
+ return expect(`{ "foo": "bar" }`).toChangeFormat(`{ foo: "bar" }`);
+ });
+
+ test("with interpolation", () => {
+ return expect(`{ "#{1 + 1}": 2 }`).toMatchFormat();
+ });
+ });
+
+ describe("bare assoc hash", () => {
+ test("commands", () => {
+ return expect("foobar alpha: alpha, beta: beta").toMatchFormat();
+ });
+
+ test("command calls", () => {
+ return expect("foo.bar alpha: alpha, beta: beta").toMatchFormat();
+ });
+
+ test("calls", () => {
+ return expect("foobar(alpha: alpha, beta: beta)").toMatchFormat();
+ });
+
+ test("breaks contents and parens together", () => {
+ const content = ruby(`
+ foobar(key1: ${long.slice(0, 32)}, key2: ${long.slice(0, 32)})
+ `);
+
+ const expected = ruby(`
+ foobar(
+ key1: ${long.slice(0, 32)},
+ key2: ${long.slice(0, 32)}
+ )
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+ });
+
+ describe("when hash labels allowed", () => {
+ test("hash labels stay", () => {
+ return expect(`{ a: "a", b: "b", c: "c" }`).toMatchFormat();
+ });
+
+ test("hash rockets get replaced", () => {
+ return expect(`{ :a => "a", :b => "b", :c => "c" }`).toChangeFormat(
+ `{ a: "a", b: "b", c: "c" }`
+ );
+ });
+
+ test("hash rockets stay when needed", () => {
+ return expect("{ Foo => 1, Bar => 2 }").toMatchFormat();
+ });
+
+ test("ending in equals stays", () => {
+ return expect(`{ :foo= => "bar" }`).toMatchFormat();
+ });
+
+ test("starting with non-letter/non-underscore stays", () => {
+ return expect(`{ :@foo => "bar" }`).toMatchFormat();
+ });
+
+ test("starting with underscore converts", () => {
+ return expect(`{ :_foo => "bar" }`).toChangeFormat(`{ _foo: "bar" }`);
+ });
+ });
+
+ test("prints hashes with consistent keys", () => {
+ return expect(`{ a: "a", b => "b" }`).toChangeFormat(
+ `{ :a => "a", b => "b" }`
+ );
+ });
+
+ test("print hashes with correct braces when contents fits", () => {
+ const content = ruby(`
+ {
+ key1: ${long.slice(0, 32)},
+ key2: ${long.slice(0, 32)}
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with leading comments but none in body", () => {
+ const content = ruby(`
+ # leading
+ {}
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with leading comments and comments in the body", () => {
+ const content = ruby(`
+ # leading
+ {
+ # inside
+ # body
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments just in the body", () => {
+ const content = ruby(`
+ {
+ # inside
+ # body
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ // https://github.com/prettier/plugin-ruby/issues/758
+ test("splits if the key has a comment attached", () => {
+ const content = ruby(`
+ items = {
+ :"foo-bar"=> # Inline comment
+ baz,
+ }
+ `);
+
+ const expected = ruby(`
+ items = {
+ "foo-bar": # Inline comment
+ baz
+ }
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("child hashes break assoc_news if their parents break", () => {
+ const content = ruby(`
+ {
+ ${long}: { foo: bar }
+ }
+ `);
+
+ const expected = ruby(`
+ {
+ ${long}: {
+ foo: bar
+ }
+ }
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("child hashes break hashes if their parents break", () => {
+ const key = long.slice(0, 40);
+ const content = ruby(`
+ {
+ ${key}: foo,
+ ${key}: foo,
+ ${key}: { foo: bar }
+ }
+ `);
+
+ const expected = ruby(`
+ {
+ ${key}: foo,
+ ${key}: foo,
+ ${key}: {
+ foo: bar
+ }
+ }
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+});
diff --git a/test/js/heredocs.test.js b/test/js/ruby/nodes/heredocs.test.js
similarity index 94%
rename from test/js/heredocs.test.js
rename to test/js/ruby/nodes/heredocs.test.js
index 0c4b1432..77e5e8fb 100644
--- a/test/js/heredocs.test.js
+++ b/test/js/ruby/nodes/heredocs.test.js
@@ -1,4 +1,4 @@
-const { long, ruby } = require("./utils");
+import { long, ruby } from "../../utils.js";
describe("heredocs", () => {
describe("straight", () => {
@@ -240,7 +240,7 @@ describe("heredocs", () => {
foo
FOO
${long}:
- 'bar'
+ "bar"
)
`);
@@ -256,7 +256,7 @@ describe("heredocs", () => {
`);
const expected = ruby(`
- puts(<<~TEXT) { 'sample block' }
+ puts(<<~TEXT) { "sample block" }
Hello
TEXT
`);
@@ -279,7 +279,7 @@ describe("heredocs", () => {
const expected = ruby(`
scope :late_for_checkin,
- -> { select(<<~EOS.squish).data_push.having('something') }
+ -> { select(<<~EOS.squish).data_push.having("something") }
some complicated query here
EOS
`);
@@ -308,7 +308,7 @@ describe("heredocs", () => {
test("call w/ short breakable arg after heredoc literal", () => {
const content = ruby(`
- p(<<-BAR, ['value', 'value', 125_484, 0o24024103])
+ p(<<-BAR, ["value", "value", 125_484, 0o24024103])
text
BAR
`);
@@ -321,12 +321,12 @@ describe("heredocs", () => {
call(1, 2, 3, <<-HERE) do
foo
HERE
- puts 'more code'
+ puts "more code"
end
`);
const expected = ruby(`
- call(1, 2, 3, <<-HERE) { puts 'more code' }
+ call(1, 2, 3, <<-HERE) { puts "more code" }
foo
HERE
`);
@@ -346,7 +346,7 @@ describe("heredocs", () => {
test("in parens args with trailing args after", () => {
const content = ruby(`
- Foo.new(<<-ARG1, 'test2')
+ Foo.new(<<-ARG1, "test2")
test1 line 1
test1 line 2
ARG1
@@ -357,7 +357,7 @@ describe("heredocs", () => {
test("in paren args with a call", () => {
const content = ruby(`
- Foo.new(<<~ARG1.upcase.chomp, 'test2')
+ Foo.new(<<~ARG1.upcase.chomp, "test2")
test1 line 1
test1 line 2
ARG1
@@ -523,4 +523,15 @@ describe("heredocs", () => {
return expect(content).toMatchFormat();
});
+
+ test("spilling out from another node keeps subsequent formatting", () => {
+ const content = ruby(`
+ foo { <<~BAR.baz }
+ qux
+ BAR
+ qaz
+ `);
+
+ return expect(content).toMatchFormat();
+ });
});
diff --git a/test/js/ruby/nodes/hooks.test.js b/test/js/ruby/nodes/hooks.test.js
new file mode 100644
index 00000000..a5d94a65
--- /dev/null
+++ b/test/js/ruby/nodes/hooks.test.js
@@ -0,0 +1,43 @@
+import { long, ruby } from "../../utils.js";
+
+describe.each(["BEGIN", "END"])("%s hook", (hook) => {
+ test("shortens to one line", () => {
+ return expect(`${hook} {\n p "hook"\n}`).toChangeFormat(
+ `${hook} { p "hook" }`
+ );
+ });
+
+ test("maintains single lines", () => {
+ return expect(`${hook} { p "hook" }`).toMatchFormat();
+ });
+
+ test("maintains multi line", () => {
+ return expect(`${hook} {\n ${long}\n}`).toMatchFormat();
+ });
+
+ test("expands to multi line", () => {
+ return expect(`${hook} { ${long} }`).toChangeFormat(
+ `${hook} {\n ${long}\n}`
+ );
+ });
+
+ test("does not move comments on the declaration", () => {
+ const content = ruby(`
+ ${hook} { # comment
+ p "hook"
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("works for comments in the body", () => {
+ const content = ruby(`
+ ${hook} {
+ # this is the comment
+ }
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/kwargs.test.js b/test/js/ruby/nodes/kwargs.test.js
new file mode 100644
index 00000000..4aa5d4f5
--- /dev/null
+++ b/test/js/ruby/nodes/kwargs.test.js
@@ -0,0 +1,13 @@
+describe("kwargs", () => {
+ test("basic", () => {
+ return expect("def foo(bar: baz)\nend").toMatchFormat();
+ });
+
+ test("optional", () => {
+ return expect("def foo(bar:)\nend").toMatchFormat();
+ });
+
+ test("double splat", () => {
+ return expect("def foo(bar:, **baz)\nend").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/lambda.test.js b/test/js/ruby/nodes/lambda.test.js
new file mode 100644
index 00000000..a1f9dc3c
--- /dev/null
+++ b/test/js/ruby/nodes/lambda.test.js
@@ -0,0 +1,96 @@
+import { long, ruby } from "../../utils.js";
+
+describe("lambda", () => {
+ test("plain stabby lambda literal", () => {
+ return expect("-> { 1 }").toMatchFormat();
+ });
+
+ test("stabby lambda literal with args", () => {
+ return expect("->(a, b, c) { a + b + c }").toMatchFormat();
+ });
+
+ test("stabby lambda literal with arg, no parens", () => {
+ return expect("-> a { a }").toChangeFormat("->(a) { a }");
+ });
+
+ test("stabby lambda with parens, no args", () => {
+ return expect("-> () { 1 }").toChangeFormat("-> { 1 }");
+ });
+
+ test("breaking stabby lambda literal", () => {
+ return expect(`-> { ${long} }`).toChangeFormat(`-> do\n ${long}\nend`);
+ });
+
+ test("breaking stabby lambda literal with args", () => {
+ const content = `->(a) { a + ${long} }`;
+ const expected = `->(a) do\n a +\n ${long}\nend`;
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("stabby lambda literal within a command node", () => {
+ return expect("command :foo, ->(arg) { arg + arg }").toMatchFormat();
+ });
+
+ test("stabby lambda literal that breaks within a command node", () => {
+ return expect(`command :foo, -> { ${long} }`).toChangeFormat(
+ ruby(`
+ command :foo,
+ -> do
+ ${long}
+ end
+ `)
+ );
+ });
+
+ test("stabby lambda literal with a command call node", () => {
+ return expect("command.call :foo, ->(arg) { arg + arg }").toMatchFormat();
+ });
+
+ test("stabby lambda literal that breaks with a command call node", () => {
+ return expect(`command.call :foo, -> { ${long} }`).toChangeFormat(
+ ruby(`
+ command.call :foo,
+ -> do
+ ${long}
+ end
+ `)
+ );
+ });
+
+ test("stabby lambda literal that breaks deeply within a command node", () => {
+ return expect(`command :foo, bar: -> { ${long} }`).toChangeFormat(
+ ruby(`
+ command :foo,
+ bar: -> do
+ ${long}
+ end
+ `)
+ );
+ });
+
+ test("very long arguments list doesn't break within pipes", () => {
+ const content = `command :foo, ->(${long}, a${long}, aa${long}) { true }`;
+
+ return expect(content).toChangeFormat(
+ ruby(`
+ command :foo,
+ ->(
+ ${long},
+ a${long},
+ aa${long}
+ ) do
+ true
+ end
+ `)
+ );
+ });
+
+ test("empty brackets", () => {
+ return expect("a[]").toMatchFormat();
+ });
+
+ test("brackets with multiple args", () => {
+ return expect("a[1, 2, 3]").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/loops.test.js b/test/js/ruby/nodes/loops.test.js
new file mode 100644
index 00000000..fb1bc9bc
--- /dev/null
+++ b/test/js/ruby/nodes/loops.test.js
@@ -0,0 +1,160 @@
+import { long, ruby } from "../../utils.js";
+
+describe.each(["while", "until"])("%s", (keyword) => {
+ test("aligns predicates", () => {
+ return expect(`foo ${keyword} ${long} || ${long}`).toChangeFormat(
+ ruby(`
+ ${keyword} ${long} ||
+ ${Array(keyword.length).fill("").join(" ")}${long}
+ foo
+ end
+ `)
+ );
+ });
+
+ describe("inlines allowed", () => {
+ test("transforms to inline", () => {
+ return expect(`${keyword} a\n 1\nend`).toChangeFormat(`1 ${keyword} a`);
+ });
+
+ test("maintains inlines", () => {
+ return expect(`1 ${keyword} a`).toMatchFormat();
+ });
+
+ test("breaks on large predicates", () => {
+ return expect(`${keyword} ${long}\n 1\nend`).toMatchFormat();
+ });
+
+ test("breaks inlines on large predicates", () => {
+ return expect(`1 ${keyword} ${long}`).toChangeFormat(
+ `${keyword} ${long}\n 1\nend`
+ );
+ });
+
+ test("does not break into block when modifying a begin", () => {
+ const content = ruby(`
+ begin
+ foo
+ end ${keyword} bar
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaks when an assignment is in the predicate", () => {
+ const content = ruby(`
+ ${keyword} (a = 1)
+ a
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaks when a multi assignment is in the predicate", () => {
+ const content = ruby(`
+ ${keyword} (a, b = 1, 2)
+ a
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaks the parent when there is an assignment", () => {
+ const content = ruby(`
+ foo do
+ while foo = foo
+ yield foo
+ end
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("wraps single lines in parens when assigning", () => {
+ return expect(
+ `hash[:key] = ${keyword} false do break :value end`
+ ).toChangeFormat(`hash[:key] = (break :value ${keyword} false)`);
+ });
+
+ test("empty body", () => {
+ const content = ruby(`
+ while foo
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("empty body, long predicate", () => {
+ const content = ruby(`
+ while ${long}
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ describe.each(["while", "until"])(
+ "add parens when necessary %s",
+ (keyword) => {
+ test("args", () => {
+ return expect(`[${keyword} foo? do bar end]`).toChangeFormat(
+ `[(bar ${keyword} foo?)]`
+ );
+ });
+
+ test("assign", () => {
+ return expect(`foo = ${keyword} bar? do baz end`).toChangeFormat(
+ `foo = (baz ${keyword} bar?)`
+ );
+ });
+
+ test("assoc", () => {
+ return expect(`{ foo: ${keyword} bar? do baz end }`).toChangeFormat(
+ `{ foo: (baz ${keyword} bar?) }`
+ );
+ });
+
+ test("massign", () => {
+ return expect(`f, o, o = ${keyword} bar? do baz end`).toChangeFormat(
+ `f, o, o = (baz ${keyword} bar?)`
+ );
+ });
+
+ test("opassign", () => {
+ return expect(`foo ||= ${keyword} bar? do baz end`).toChangeFormat(
+ `foo ||= (baz ${keyword} bar?)`
+ );
+ });
+ }
+ );
+
+ // https://github.com/prettier/plugin-ruby/issues/759
+ test("handles do keyword", () => {
+ const content = ruby(`
+ %w[foo bar].each do |resource|
+ puts resource
+
+ # comment comment
+ ${keyword} @client.missing?(resource) do
+ sleep 1
+ end
+ end
+ `);
+
+ const expected = ruby(`
+ %w[foo bar].each do |resource|
+ puts resource
+
+ # comment comment
+ sleep 1 ${keyword} @client.missing?(resource)
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+});
diff --git a/test/js/ruby/nodes/massign.test.js b/test/js/ruby/nodes/massign.test.js
new file mode 100644
index 00000000..5c0ac339
--- /dev/null
+++ b/test/js/ruby/nodes/massign.test.js
@@ -0,0 +1,67 @@
+describe("massign", () => {
+ test("multi on left, multi on right", () => {
+ return expect("a, b, c = 1, 2, 3").toMatchFormat();
+ });
+
+ test("single on left, multi on right", () => {
+ return expect("a = 1, 2, 3").toMatchFormat();
+ });
+
+ test("multi on left, array on right", () => {
+ return expect("a, b, c = [1, 2, 3]").toMatchFormat();
+ });
+
+ test("parens on left, multi on right", () => {
+ return expect("(a, b, c) = 1, 2, 3").toChangeFormat("a, b, c = 1, 2, 3");
+ });
+
+ test("double parens on left, multi on right", () => {
+ return expect("((a, b, c)) = 1, 2, 3").toChangeFormat("a, b, c = 1, 2, 3");
+ });
+
+ test("parens on some of left, multi on right", () => {
+ return expect("(a, b), c = [1, 2], 3").toMatchFormat();
+ });
+
+ test("extra commas at the end", () => {
+ return expect("a, = 1").toMatchFormat();
+ });
+
+ test("extra commas at the end with multiple", () => {
+ return expect("a, b, c, = 1").toMatchFormat();
+ });
+
+ test("extra commas with parens", () => {
+ return expect("(a, b,), c, = 1").toMatchFormat();
+ });
+
+ test("extra commas with doubled parens", () => {
+ return expect("((a, b,), c,), = 1").toMatchFormat();
+ });
+
+ describe("splat", () => {
+ test("after ident", () => {
+ return expect("a, *b = 1, 2, 3").toMatchFormat();
+ });
+
+ test("between idents", () => {
+ return expect("a, *b, c, d = 1, 2, 3").toMatchFormat();
+ });
+
+ test("with no name", () => {
+ return expect("a, * = 1, 2, 3").toMatchFormat();
+ });
+
+ test("on right side", () => {
+ return expect("a = *a").toMatchFormat();
+ });
+
+ test("only on left side", () => {
+ return expect("* = [1, 2, 3]").toMatchFormat();
+ });
+
+ test("and then ident on left side", () => {
+ return expect("*, a = [1, 2, 3]").toMatchFormat();
+ });
+ });
+});
diff --git a/test/js/ruby/nodes/method.test.js b/test/js/ruby/nodes/method.test.js
new file mode 100644
index 00000000..5195e29f
--- /dev/null
+++ b/test/js/ruby/nodes/method.test.js
@@ -0,0 +1,394 @@
+import { atLeastVersion, long, ruby } from "../../utils.js";
+
+describe("method", () => {
+ describe("definitions", () => {
+ test("shorthand for empty methods", () => {
+ return expect("def foo; end").toChangeFormat("def foo\nend");
+ });
+
+ test("shorthand for empty methods with parens", () => {
+ return expect("def foo(); end").toChangeFormat("def foo()\nend");
+ });
+
+ test("single arg, no parens", () => {
+ return expect("def foo bar\nend").toChangeFormat("def foo(bar)\nend");
+ });
+
+ test("single arg, with parens", () => {
+ return expect("def foo(bar)\nend").toMatchFormat();
+ });
+
+ test("shorthand for empty singleton methods", () => {
+ return expect("def self.foo; end").toChangeFormat("def self.foo\nend");
+ });
+
+ test("shorthand for empty singleton methods with parens", () => {
+ return expect("def self.foo(); end").toChangeFormat(
+ "def self.foo()\nend"
+ );
+ });
+
+ test("singleton, single arg, no parens", () => {
+ return expect("def self.foo bar\nend").toChangeFormat(
+ "def self.foo(bar)\nend"
+ );
+ });
+
+ test("singleton, single arg, with parens", () => {
+ return expect("def self.foo(bar)\nend").toMatchFormat();
+ });
+
+ test("shorthand with a body", () => {
+ return expect("def foo(alpha); 1; end").toChangeFormat(
+ "def foo(alpha)\n 1\nend"
+ );
+ });
+
+ test("single splat arg with no name", () => {
+ return expect("def foo(*); end").toChangeFormat("def foo(*)\nend");
+ });
+
+ test("double splat arg with no name", () => {
+ return expect("def foo(**); end").toChangeFormat("def foo(**)\nend");
+ });
+
+ test("with helper method", () => {
+ const content = ruby(`
+ private def foo
+ "bar"
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with helper method on defs", () => {
+ const content = ruby(`
+ private def self.foo
+ "bar"
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("every single arg type", () => {
+ const content = ruby(`
+ def method(req, *rest, post, kwarg:, kwarg_opt: 1, **kwarg_rest, &block)
+ "foo"
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("breaking", () => {
+ const content = `def foo(${long}:, a${long}:); end`;
+ const expected = ruby(`
+ def foo(
+ ${long}:,
+ a${long}:
+ )
+ end
+ `);
+
+ return expect(content).toChangeFormat(expected);
+ });
+
+ test("with comments on method definition", () => {
+ const content = ruby(`
+ def foo( # bar
+ ${long}:
+ )
+ ${long}
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments on params", () => {
+ const content = ruby(`
+ def method(
+ req, # req comment
+ *rest, # rest comment
+ post, # post comment
+ kwarg:, # kwarg comment
+ kwarg_opt: 1, # kwarg_opt comment
+ **kwarg_rest, # kwarg_rest comment
+ &block # block comment
+ )
+ "foo"
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments on optional params", () => {
+ const content = ruby(`
+ def method(
+ optl = "value" # comment
+ )
+ "foo"
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ if (atLeastVersion("2.7")) {
+ test("nokw_param", () => {
+ return expect("def foo(**nil); end").toChangeFormat(
+ "def foo(**nil)\nend"
+ );
+ });
+
+ test("args_forward", () => {
+ const content = ruby(`
+ def foo(...)
+ bar(...)
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ }
+
+ if (atLeastVersion("3.0")) {
+ test("args_forward with other arguments", () => {
+ const content = ruby(`
+ def get(...)
+ request(:get, ...)
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("single-line methods", () => {
+ return expect("def foo = bar").toMatchFormat();
+ });
+
+ test("single-line methods with params", () => {
+ return expect("def foo(name) = bar").toMatchFormat();
+ });
+ }
+
+ test("comments on kwargs", () => {
+ const content = ruby(`
+ def foo(
+ bar:, # hello
+ baz:
+ )
+ bar
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ describe("method calls", () => {
+ test("single args", () => {
+ return expect("foo(1)").toMatchFormat();
+ });
+
+ test("multi arg", () => {
+ return expect("foo(1, 2)").toMatchFormat();
+ });
+
+ test("just block", () => {
+ return expect("foo(&block)").toMatchFormat();
+ });
+
+ describe("commands", () => {
+ test("alignment", () => {
+ const content = ruby(`
+ command.call some_method(
+ ${long}
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("alignment for `to`", () => {
+ const content = ruby(`
+ expect(value).to matcher(
+ ${long}
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("alignment for `not_to`", () => {
+ const content = ruby(`
+ expect(value).not_to matcher(
+ ${long}
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("alignment for `to_not`", () => {
+ const content = ruby(`
+ expect(value).to_not matcher(
+ ${long}
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("just block", () => {
+ const content = ruby(`
+ def curry(&block)
+ new &block
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ describe("single splat", () => {
+ test("plain", () => {
+ return expect("foo(*bar)").toMatchFormat();
+ });
+
+ test("with multi args", () => {
+ return expect("foo(1, 2, *abc)").toMatchFormat();
+ });
+
+ test("between multi args", () => {
+ return expect("foo(1, 2, *abc, 3, 4)").toMatchFormat();
+ });
+
+ test("with comments", () => {
+ const content = ruby(`
+ foo(
+ # comment
+ # another comment
+ # even more comment
+ *values
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with trailing comments", () => {
+ const content = ruby(`
+ foo(
+ # comment
+ # another comment
+ *values # a trailing comment
+ # a whole other comment
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with block", () => {
+ return expect("foo(*bar, &block)").toMatchFormat();
+ });
+
+ test("with comments and block", () => {
+ const content = ruby(`
+ foo(
+ # comment
+ &block
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ describe("double splat", () => {
+ test("plain", () => {
+ return expect("foo(**bar)").toMatchFormat();
+ });
+
+ test("with block", () => {
+ return expect("foo(**bar, &block)").toMatchFormat();
+ });
+
+ test("with splat and block", () => {
+ return expect("foo(*bar, **baz, &block)").toMatchFormat();
+ });
+
+ test("after kwarg", () => {
+ return expect("foo(kwarg: 1, **splat)").toMatchFormat();
+ });
+
+ test("before kwarg", () => {
+ return expect("foo(**splat, kwarg: 1)").toMatchFormat();
+ });
+
+ test("before kwargs", () => {
+ return expect("foo(before: 1, **splat, after: 1)").toMatchFormat();
+ });
+ });
+
+ describe("different operators", () => {
+ test("double colon gets changed", () => {
+ return expect("Foo::foo").toChangeFormat("Foo.foo");
+ });
+
+ test("lonely operator", () => {
+ return expect("foo&.foo").toMatchFormat();
+ });
+ });
+
+ describe("breaking", () => {
+ describe("without trailing commas", () => {
+ test("starting with no trailing comma stays", () => {
+ return expect(`foo(${long}, a${long})`).toChangeFormat(
+ `foo(\n ${long},\n a${long}\n)`
+ );
+ });
+
+ test("with breaking ternary as first argument", () => {
+ return expect(`foo bar ? ${long} : a${long}`).toChangeFormat(
+ `foo(\n if bar\n ${long}\n else\n a${long}\n end\n)`
+ );
+ });
+
+ test("starting with trailing comma changes", () => {
+ return expect(`foo(${long}, a${long},)`).toChangeFormat(
+ `foo(\n ${long},\n a${long}\n)`
+ );
+ });
+
+ test("with block on the end", () => {
+ return expect(`foo(${long}, &block)`).toChangeFormat(
+ `foo(\n ${long},\n &block\n)`
+ );
+ });
+
+ test("on commands", () => {
+ return expect(`command ${long}, a${long}`).toChangeFormat(
+ ruby(`
+ command ${long},
+ a${long}
+ `)
+ );
+ });
+
+ test("on command calls", () => {
+ return expect(`command.call ${long}, a${long}`).toChangeFormat(
+ ruby(`
+ command.call ${long},
+ a${long}
+ `)
+ );
+ });
+ });
+ });
+ });
+});
diff --git a/test/js/ruby/nodes/next.test.js b/test/js/ruby/nodes/next.test.js
new file mode 100644
index 00000000..b1a9fb54
--- /dev/null
+++ b/test/js/ruby/nodes/next.test.js
@@ -0,0 +1,34 @@
+import { ruby } from "../../utils.js";
+
+describe("next", () => {
+ test("bare", () => {
+ return expect("next").toMatchFormat();
+ });
+
+ test("one arg, no parens", () => {
+ return expect("next 1").toMatchFormat();
+ });
+
+ test("one arg, with parens", () => {
+ return expect("next(1)").toChangeFormat("next 1");
+ });
+
+ test("multiple args", () => {
+ return expect("next 1, 2").toMatchFormat();
+ });
+
+ test("keeps parens for multiple statements", () => {
+ const expected = ruby(`
+ next(
+ a = 1
+ a == 1
+ )
+ `);
+
+ return expect("next(a = 1; a == 1)").toChangeFormat(expected);
+ });
+
+ test("keeps parens for _mod nodes", () => {
+ return expect("next(1 if true)").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/numbers.test.js b/test/js/ruby/nodes/numbers.test.js
new file mode 100644
index 00000000..a1edd35b
--- /dev/null
+++ b/test/js/ruby/nodes/numbers.test.js
@@ -0,0 +1,49 @@
+describe("numbers", () => {
+ test("basic", () => {
+ return expect("123").toMatchFormat();
+ });
+
+ test("preserves sign", () => {
+ return expect("-123").toMatchFormat();
+ });
+
+ test("respects no o for octal numbers", () => {
+ return expect("0123").toChangeFormat("0123");
+ });
+
+ test("respects o for octal numbers", () => {
+ return expect("0o123").toChangeFormat("0o123");
+ });
+
+ test("does not consider numbers large until they have more than 4 digits", () => {
+ return expect("1234").toMatchFormat();
+ });
+
+ test("for large numbers adds underscores (mod 3 ==== 0)", () => {
+ return expect("123456").toChangeFormat("123_456");
+ });
+
+ test("for large numbers adds underscores (mod 3 === 1)", () => {
+ return expect("1234567").toChangeFormat("1_234_567");
+ });
+
+ test("for large numbers add underscores (mod 3 ==== 2)", () => {
+ return expect("12345678").toChangeFormat("12_345_678");
+ });
+
+ test("ignores numbers that already have underscores", () => {
+ return expect("2019_04_17_17_09_00").toMatchFormat();
+ });
+
+ test("ignores formatting on binary numbers", () => {
+ return expect("0b01101001").toMatchFormat();
+ });
+
+ test("ignores formatting on octal numbers", () => {
+ return expect("0o123401234").toMatchFormat();
+ });
+
+ test("ignores formatting on hex numbers", () => {
+ return expect("0x123401234").toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/patterns.test.js b/test/js/ruby/nodes/patterns.test.js
new file mode 100644
index 00000000..19e0793f
--- /dev/null
+++ b/test/js/ruby/nodes/patterns.test.js
@@ -0,0 +1,189 @@
+import { atLeastVersion, atMostVersion, ruby } from "../../utils.js";
+
+describe("patterns", () => {
+ if (atMostVersion("2.7")) {
+ test("pattern matching does not exist before ruby 2.7", () => {
+ // this is here because test files must contain at least one test, so for
+ // earlier versions of ruby this is just going to chill here
+ });
+
+ return;
+ }
+
+ const cases = [
+ "0",
+ "-1..1",
+ "Integer",
+ "bar",
+ "0 | 1 | 2",
+ "Integer => bar",
+ "Object[0, *bar, 1]",
+ "^bar",
+ "{ x: 0.. => px, **rest }",
+ "**rest",
+ "SuperPoint[x: 0.. => px]"
+ ];
+
+ if (atLeastVersion("3.0")) {
+ cases.push("[*, 0, *]", "[*, 0, 1, 2, *]", "FooBar[*, 0, *]");
+
+ test("rassign", () => {
+ const content = `{ db: { user: "John" } } => { db: { user: } }`;
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("rassign with fndptn", () => {
+ const content = "(1..10).to_a.shuffle => [*bef, 2..4 => thresh, *aft]";
+
+ return expect(content).toMatchFormat();
+ });
+ }
+
+ test.each(cases)("%s", (pattern) => {
+ const content = ruby(`
+ case foo
+ in ${pattern}
+ baz
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("a, b, *c, d, e", () => {
+ const content = ruby(`
+ case foo
+ in a, b, *c, d, e
+ baz
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [a, b, *c, d, e]
+ baz
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("0, [1, _] => bar", () => {
+ const content = ruby(`
+ case foo
+ in 0, [1, _] => bar
+ baz
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [0, [1, _] => bar]
+ baz
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("*c, d, e", () => {
+ const content = ruby(`
+ case foo
+ in *c, d, e
+ baz
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [*c, d, e]
+ baz
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("_, _", () => {
+ const content = ruby(`
+ case foo
+ in _, _
+ baz
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [_, _]
+ baz
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("a, b if b == a * 2", () => {
+ const content = ruby(`
+ case foo
+ in a, b if b == a * 2
+ baz
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [a, b] if b == a * 2
+ baz
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("with a single array element", () => {
+ const content = ruby(`
+ case value
+ in [element]
+ matched
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("with comments in an array pattern", () => {
+ const content = ruby(`
+ case foo
+ in 1, # 1 comment
+ 2 # 2 comment
+ bar
+ end
+ `);
+
+ const expectedContent = ruby(`
+ case foo
+ in [
+ 1, # 1 comment
+ 2
+ ] # 2 comment
+ bar
+ end
+ `);
+
+ return expect(content).toChangeFormat(expectedContent);
+ });
+
+ test("multiple clauses", () => {
+ const content = ruby(`
+ case foo
+ in bar
+ 1
+ in baz
+ 2
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/ranges.test.js b/test/js/ruby/nodes/ranges.test.js
new file mode 100644
index 00000000..1f92ba36
--- /dev/null
+++ b/test/js/ruby/nodes/ranges.test.js
@@ -0,0 +1,39 @@
+import { atLeastVersion } from "../../utils.js";
+
+describe("ranges", () => {
+ test("two dot", () => {
+ return expect("1..2").toMatchFormat();
+ });
+
+ test("negative two dot", () => {
+ return expect("-2..-1").toMatchFormat();
+ });
+
+ test("three dot", () => {
+ return expect("3...4").toMatchFormat();
+ });
+
+ test("negative three dot", () => {
+ return expect("-4...-3").toMatchFormat();
+ });
+
+ if (atLeastVersion("2.6")) {
+ test("two dot with no ending", () => {
+ return expect("1..").toMatchFormat();
+ });
+
+ test("three dot with no ending", () => {
+ return expect("1...").toMatchFormat();
+ });
+ }
+
+ if (atLeastVersion("2.7")) {
+ test("two dot with no beginning", () => {
+ return expect("..2").toMatchFormat();
+ });
+
+ test("three dot with no beginning", () => {
+ return expect("...2").toMatchFormat();
+ });
+ }
+});
diff --git a/test/js/ruby/nodes/regexp.test.js b/test/js/ruby/nodes/regexp.test.js
new file mode 100644
index 00000000..327e6e2b
--- /dev/null
+++ b/test/js/ruby/nodes/regexp.test.js
@@ -0,0 +1,80 @@
+import { ruby } from "../../utils.js";
+
+describe("regexp", () => {
+ test("basic", () => {
+ return expect("/abc/").toMatchFormat();
+ });
+
+ test("unnecessary braces", () => {
+ return expect("%r{abc}").toChangeFormat("/abc/");
+ });
+
+ test("unnecessary slashes", () => {
+ return expect("%r/abc/").toChangeFormat("/abc/");
+ });
+
+ test("unnecessary brackets", () => {
+ return expect("%r[abc]").toChangeFormat("/abc/");
+ });
+
+ test("unnecessary parens", () => {
+ return expect("%r(abc)").toChangeFormat("/abc/");
+ });
+
+ test("necessary braces", () => {
+ return expect("%r{a/b/c}").toMatchFormat();
+ });
+
+ test("interpolation", () => {
+ return expect("/a#{inter}c/").toMatchFormat();
+ });
+
+ test("modifiers", () => {
+ return expect("/abc/i").toMatchFormat();
+ });
+
+ test("braces and modifiers", () => {
+ return expect("%r{a/b/c}mi").toMatchFormat();
+ });
+
+ test("global interpolation", () => {
+ return expect("/#$&/").toChangeFormat("/#{$&}/");
+ });
+
+ test("do not change if { and / in regexp literal", () => {
+ return expect("%r(a{b/c)").toMatchFormat();
+ });
+
+ test("do not change if } and / in regexp literal", () => {
+ return expect("%r[a}b/c]").toMatchFormat();
+ });
+
+ test("parens with }", () => {
+ return expect("%r(a}bc)").toChangeFormat("/a}bc/");
+ });
+
+ test("comments in regex", () => {
+ const content = ruby(`
+ /\\A
+ [[:digit:]]+ # 1 or more digits before the decimal point
+ (\\. # Decimal point
+ [[:digit:]]+ # 1 or more digits after the decimal point
+ )? # The decimal point and following digits are optional
+ \\Z/x
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("forces braces if could be ambiguous with space in command", () => {
+ return expect("foo %r{ bar}").toMatchFormat();
+ });
+
+ test("forces braces if could be ambiguous with equals in command", () => {
+ return expect("foo %r{= bar}").toMatchFormat();
+ });
+
+ test("do not force braces if space is in parens", () => {
+ return expect("foo(/ bar/)").toMatchFormat();
+ });
+});
diff --git a/test/js/rescue.test.js b/test/js/ruby/nodes/rescue.test.js
similarity index 68%
rename from test/js/rescue.test.js
rename to test/js/ruby/nodes/rescue.test.js
index 244cfecd..4a10d7b1 100644
--- a/test/js/rescue.test.js
+++ b/test/js/ruby/nodes/rescue.test.js
@@ -1,16 +1,29 @@
-const { ruby } = require("./utils");
+import { ruby } from "../../utils.js";
describe("rescue", () => {
- test("inline", () =>
- expect("a rescue nil").toChangeFormat(
- ruby(`
+ test("inline", () => {
+ const expected = ruby(`
begin
a
rescue StandardError
nil
end
- `)
- ));
+ `);
+
+ return expect("a rescue nil").toChangeFormat(expected);
+ });
+
+ test("rescue just variable", () => {
+ const content = ruby(`
+ begin
+ a
+ rescue => e
+ nil
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
// from ruby spec/ruby/language/rescue_spec.rb
test("splat errors", () => {
@@ -25,6 +38,19 @@ describe("rescue", () => {
return expect(content).toMatchFormat();
});
+ // https://github.com/prettier/plugin-ruby/pull/1000
+ test("errors with scope resolution operator", () => {
+ const content = ruby(`
+ def foo
+ a
+ rescue ::A
+ e
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
test.each(["begin", "def foo"])("%s with every clause", (declaration) => {
const error = "BreakingBreakingBreakingBreakingBreakingError";
const content = ruby(`
@@ -97,6 +123,30 @@ describe("rescue", () => {
return expect(content).toMatchFormat();
});
+ test("comment inline with multiple", () => {
+ const content = ruby(`
+ begin
+ foo
+ rescue Foo, Bar # foo
+ bar
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("comment inline with splat", () => {
+ const content = ruby(`
+ begin
+ foo
+ rescue Foo, *Bar # foo
+ bar
+ end
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
test("one error with a comment", () => {
const content = ruby(`
begin
diff --git a/test/js/ruby/nodes/return.test.js b/test/js/ruby/nodes/return.test.js
new file mode 100644
index 00000000..0121128c
--- /dev/null
+++ b/test/js/ruby/nodes/return.test.js
@@ -0,0 +1,103 @@
+import { long, ruby } from "../../utils.js";
+
+describe("return", () => {
+ test("bare", () => {
+ return expect("return").toMatchFormat();
+ });
+
+ test("one arg, no parens", () => {
+ return expect("return 1").toMatchFormat();
+ });
+
+ test("one arg, with parens", () => {
+ return expect("return(1)").toChangeFormat("return 1");
+ });
+
+ test("multiple args", () => {
+ return expect("return 1, 2").toMatchFormat();
+ });
+
+ test("return method call", () => {
+ return expect("return foo :bar").toMatchFormat();
+ });
+
+ test("return with breaking", () => {
+ return expect(`return ${long}`).toChangeFormat(`return(\n ${long}\n)`);
+ });
+
+ test("returning an array", () => {
+ return expect("return [1, 2, 3]").toChangeFormat("return 1, 2, 3");
+ });
+
+ test("returning an empty array", () => {
+ return expect("return []").toMatchFormat();
+ });
+
+ test("returning a single element array", () => {
+ return expect("return [1]").toMatchFormat();
+ });
+
+ test("returning a list that breaks", () => {
+ return expect(`return ${long}, ${long}`).toChangeFormat(
+ `return [\n ${long},\n ${long}\n]`
+ );
+ });
+
+ test("returning an array within parens", () => {
+ return expect("return([1, 2, 3])").toChangeFormat("return 1, 2, 3");
+ });
+
+ test("returning a long special array", () => {
+ return expect(`return %w[${long}]`).toChangeFormat(
+ `return(\n %w[\n ${long}\n ]\n)`
+ );
+ });
+
+ test("returning two arguments, one that breaks", () => {
+ return expect(`return foo, ${long}`).toChangeFormat(
+ `return [\n foo,\n ${long}\n]`
+ );
+ });
+
+ test("returning two arguments, the first with parentheses", () => {
+ return expect("return (1), 2").toMatchFormat();
+ });
+
+ test("returning with the or keyword", () => {
+ return expect("return(a or b)").toMatchFormat();
+ });
+
+ test("returning with the not keyword", () => {
+ return expect("return(not a)").toMatchFormat();
+ });
+
+ test("comment inside of return parentheses", () => {
+ const content = ruby(`
+ return(
+ # foo
+ bar
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("returning multiple statements", () => {
+ const content = ruby(`
+ return(
+ foo
+ bar
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("returning a value with a modifier if", () => {
+ const content = ruby(`
+ return :inactive if given_date.before?(first_event_date)
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+});
diff --git a/test/js/ruby/nodes/strings.test.js b/test/js/ruby/nodes/strings.test.js
new file mode 100644
index 00000000..3970ad51
--- /dev/null
+++ b/test/js/ruby/nodes/strings.test.js
@@ -0,0 +1,269 @@
+import { long, ruby } from "../../utils.js";
+
+describe("strings", () => {
+ describe("%-literals with escape sequences in the middle", () => {
+ const cases = [
+ ["(", ")"],
+ ["[", "]"],
+ ["{", "}"],
+ ["<", ">"],
+ ["|", "|"]
+ ];
+
+ test.each(cases)("%%%s%s", (stringStart, stringEnd) =>
+ expect(`%${stringStart}a\\bc${stringEnd}`).toMatchFormat()
+ );
+
+ test.each(cases)("%q%s%s", (stringStart, stringEnd) =>
+ expect(`%q${stringStart}a\\bc${stringEnd}`).toMatchFormat()
+ );
+
+ test.each(cases)("%Q%s%s", (stringStart, stringEnd) =>
+ expect(`%Q${stringStart}a\\bc${stringEnd}`).toMatchFormat()
+ );
+ });
+
+ describe("with single quotes", () => {
+ test("empty single quote strings stay", () => {
+ return expect("''").toChangeFormat(`""`);
+ });
+
+ test("empty double quote strings change", () => {
+ return expect(`""`).toMatchFormat();
+ });
+
+ test("basic strings with single quotes stay", () => {
+ return expect("'abc'").toChangeFormat(`"abc"`);
+ });
+
+ test("basic strings with double quotes change", () => {
+ return expect(`"abc"`).toMatchFormat();
+ });
+
+ test("double quotes with inner single quotes stay", () => {
+ return expect(`"abc's"`).toMatchFormat();
+ });
+
+ describe("escape sequences", () => {
+ test("single quotes stay", () => {
+ return expect("'abc\\n'").toMatchFormat();
+ });
+
+ test("double quotes stay", () => {
+ return expect(`"abc\\n"`).toMatchFormat();
+ });
+
+ test("interpolation within single quotes stay", () => {
+ return expect(`'#{"\\n"}'`).toMatchFormat();
+ });
+
+ test("interpolation within double quotes stay", () => {
+ return expect(`"#{"\\n"}"`).toMatchFormat();
+ });
+
+ test("escaped double quotes are not unquoted", () => {
+ return expect("'abc \\\"def\\\" ghi'").toMatchFormat();
+ });
+ });
+ });
+
+ describe("with double quotes", () => {
+ test("empty single quote strings change", () => {
+ return expect("''").toChangeFormat(`""`);
+ });
+
+ test("empty double quote strings stay", () => {
+ return expect(`""`).toMatchFormat();
+ });
+
+ test("basic strings with single quotes change", () => {
+ return expect("'abc'").toChangeFormat(`"abc"`);
+ });
+
+ test("basic strings with double quotes stay", () => {
+ return expect(`"abc"`).toMatchFormat();
+ });
+
+ test("double quotes with inner single quotes stay", () => {
+ return expect(`"abc's"`).toMatchFormat();
+ });
+
+ test("double quotes do not get escaped if it results in more quotes", () => {
+ return expect(`'"foo"'`).toMatchFormat();
+ });
+
+ describe("escape sequences", () => {
+ test("single quotes stay", () => {
+ return expect("'abc\\n'").toMatchFormat();
+ });
+
+ test("double quotes stay", () => {
+ return expect(`"abc\\n"`).toMatchFormat();
+ });
+
+ test("interpolation within single quotes stay", () => {
+ return expect(`'#{"\\n"}'`).toMatchFormat();
+ });
+
+ test("interpolation within double quotes stay", () => {
+ return expect(`"#{"\\n"}"`).toMatchFormat();
+ });
+ });
+ });
+
+ describe("with %{} quotes", () => {
+ test("matches correctly", () => {
+ return expect("%{foo\\n#{bar}\\nbaz}").toMatchFormat();
+ });
+ });
+
+ test("concatenation", () => {
+ return expect(`"abc" \\\n "def" \\\n "ghi"`).toMatchFormat();
+ });
+
+ describe("interpolation", () => {
+ test("with keywords", () => {
+ return expect(`"abc #{super} abc"`).toMatchFormat();
+ });
+
+ test("at the beginning of the string", () => {
+ return expect(`"#{abc} abc"`).toMatchFormat();
+ });
+
+ test("very interpolated", () => {
+ return expect(`"abc #{"abc #{abc} abc"} abc"`).toMatchFormat();
+ });
+
+ test("long strings with interpolation do not break", () => {
+ return expect(`"${long} #{foo[:bar]} ${long}"`).toMatchFormat();
+ });
+
+ test("long strings with interpolation that were broken do break", () => {
+ const content = ruby(`
+ <<~HERE
+ #{
+ ${long}
+ }
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("within a heredoc there is no indentation", () => {
+ const content = ruby(`
+ <<~HERE
+ #{${long}}
+ HERE
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ describe("char literals", () => {
+ test("single chars get changed", () => {
+ return expect("?a").toChangeFormat(`"a"`);
+ });
+
+ test("single chars get changed with double quotes", () => {
+ return expect("?a").toChangeFormat(`"a"`);
+ });
+
+ test("control escape sequences stay", () => {
+ return expect("?\\C-a").toMatchFormat();
+ });
+
+ test("meta escape sequences stay", () => {
+ return expect("?\\M-a").toMatchFormat();
+ });
+
+ test("meta and control sequences stay", () => {
+ return expect("?\\M-\\C-a").toMatchFormat();
+ });
+ });
+
+ describe("xstrings", () => {
+ test("backtick literals", () => {
+ return expect("`abc`").toMatchFormat();
+ });
+
+ test("breaking backtick literals", () => {
+ return expect(`\`${long}\``).toMatchFormat();
+ });
+
+ test("breaking backtick literals with method chains", () => {
+ return expect(`\`${long}\`.to_s`).toMatchFormat();
+ });
+
+ test("%x literals", () => {
+ return expect("%x[abc]").toChangeFormat("`abc`");
+ });
+
+ test("breaking %x literals", () => {
+ return expect(`%x[${long}]`).toChangeFormat(`\`${long}\``);
+ });
+
+ test("breaking %x literals with method chains", () => {
+ return expect(`%x[${long}].to_s`).toChangeFormat(`\`${long}\`.to_s`);
+ });
+ });
+
+ describe("symbols", () => {
+ test("basic", () => {
+ return expect(":abc").toMatchFormat();
+ });
+
+ test("with single quotes", () => {
+ return expect(":'abc'").toChangeFormat(`:"abc"`);
+ });
+
+ test("with double quotes", () => {
+ return expect(`:"abc"`).toMatchFormat();
+ });
+
+ test("with double quotes with double quotes desired", () => {
+ return expect(`:"abc"`).toMatchFormat();
+ });
+
+ test("with real interpolation and double quotes", () => {
+ return expect(`:"abc#{foo}abc"`).toMatchFormat();
+ });
+
+ test("%s literal", () => {
+ return expect("%s[abc]").toChangeFormat(`:"abc"`);
+ });
+
+ test("%s literal with false interpolation", () => {
+ return expect("%s[abc#{d}]").toChangeFormat(`:'abc#{d}'`);
+ });
+
+ test("%s literal as hash key", () => {
+ return expect("{ %s[abc] => d }").toChangeFormat(`{ abc: d }`);
+ });
+
+ test("symbol literal as a hash key", () => {
+ return expect("{ '\\d' => 1 }").toMatchFormat();
+ });
+
+ test("%s literal with newlines", () => {
+ const content = ruby(`
+ a = %s[
+ a
+ ]
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("gets correct quotes", () => {
+ const content = `where("lint_tool_configs.plugin": plugins + %w[core])`;
+
+ return expect(content).toMatchFormat();
+ });
+ });
+
+ test.each(["@v", "@@v", "$v"])("%s dvar", (interp) => {
+ return expect(`"#${interp}"`).toChangeFormat(`"#{${interp}}"`);
+ });
+});
diff --git a/test/js/ruby/nodes/super.test.js b/test/js/ruby/nodes/super.test.js
new file mode 100644
index 00000000..1b66b025
--- /dev/null
+++ b/test/js/ruby/nodes/super.test.js
@@ -0,0 +1,73 @@
+import { ruby } from "../../utils.js";
+
+describe("super", () => {
+ test("bare", () => {
+ return expect("super").toMatchFormat();
+ });
+
+ test("empty parens", () => {
+ return expect("super()").toMatchFormat();
+ });
+
+ test("one arg, no parens", () => {
+ return expect("super 1").toMatchFormat();
+ });
+
+ test("one arg, with parens", () => {
+ return expect("super(1)").toMatchFormat();
+ });
+
+ test("multiple args, no parens", () => {
+ return expect("super 1, 2").toMatchFormat();
+ });
+
+ test("multiple args, with parens", () => {
+ return expect("super(1, 2)").toMatchFormat();
+ });
+
+ describe("with comments", () => {
+ test("bare", () => {
+ return expect("super # comment").toMatchFormat();
+ });
+
+ test("empty parens", () => {
+ return expect("super() # comment").toMatchFormat();
+ });
+
+ test("one arg, no parens", () => {
+ return expect("super 1 # comment").toMatchFormat();
+ });
+
+ test("one arg, with parens", () => {
+ return expect("super(1) # comment").toMatchFormat();
+ });
+
+ test("multiple args, no parens", () => {
+ return expect("super 1, 2 # comment").toMatchFormat();
+ });
+
+ test("multiple args, multiple lines, no parens", () => {
+ const content = ruby(`
+ super 1, # first comment
+ 2 # second comment
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+
+ test("multiple args, with parens", () => {
+ return expect("super(1, 2) # comment").toMatchFormat();
+ });
+
+ test("multiple args, multiple lines, no parens", () => {
+ const content = ruby(`
+ super(
+ 1, # first comment
+ 2 # second comment
+ )
+ `);
+
+ return expect(content).toMatchFormat();
+ });
+ });
+});
diff --git a/test/js/ruby/nodes/unary.test.js b/test/js/ruby/nodes/unary.test.js
new file mode 100644
index 00000000..8f619b74
--- /dev/null
+++ b/test/js/ruby/nodes/unary.test.js
@@ -0,0 +1,10 @@
+describe("unary", () => {
+ test("regular", () => {
+ return expect("!foo").toMatchFormat();
+ });
+
+ // https://github.com/prettier/plugin-ruby/issues/764
+ test("with other operator", () => {
+ return expect("!(x&.>(0))").toMatchFormat();
+ });
+});
diff --git a/test/js/undef.test.js b/test/js/ruby/nodes/undef.test.js
similarity index 64%
rename from test/js/undef.test.js
rename to test/js/ruby/nodes/undef.test.js
index e1c60b71..3716cab6 100644
--- a/test/js/undef.test.js
+++ b/test/js/ruby/nodes/undef.test.js
@@ -1,9 +1,13 @@
-const { long, ruby } = require("./utils");
+import { long, ruby } from "../../utils.js";
describe("undef", () => {
- test("single inline", () => expect("undef foo").toMatchFormat());
+ test("single inline", () => {
+ return expect("undef foo").toMatchFormat();
+ });
- test("multiple inline", () => expect("undef foo, bar").toMatchFormat());
+ test("multiple inline", () => {
+ return expect("undef foo, bar").toMatchFormat();
+ });
test("multiple breaking", () => {
const expected = ruby(`
@@ -14,10 +18,13 @@ describe("undef", () => {
return expect(`undef ${long}, a${long}`).toChangeFormat(expected);
});
- test("single with comment", () => expect("undef foo # bar").toMatchFormat());
+ test("single with comment", () => {
+ return expect("undef foo # bar").toMatchFormat();
+ });
- test("multiple inline with comment", () =>
- expect("undef foo, bar # baz").toMatchFormat());
+ test("multiple inline with comment", () => {
+ return expect("undef foo, bar # baz").toMatchFormat();
+ });
test("multiple lines comment on first", () => {
const content = ruby(`
diff --git a/test/js/ruby/nodes/yield.test.js b/test/js/ruby/nodes/yield.test.js
new file mode 100644
index 00000000..5ac27496
--- /dev/null
+++ b/test/js/ruby/nodes/yield.test.js
@@ -0,0 +1,21 @@
+describe("yield", () => {
+ test("bare yield", () => {
+ return expect("yield").toMatchFormat();
+ });
+
+ test("yield with one argument, no parens", () => {
+ return expect("yield i").toMatchFormat();
+ });
+
+ test("yield with one argument, with parens", () => {
+ return expect("yield(i)").toMatchFormat();
+ });
+
+ test("yield with multiple arguments, no parens", () => {
+ return expect("yield i, 2").toMatchFormat();
+ });
+
+ test("yield with multiple arguments, with parens", () => {
+ return expect("yield(i, 2)").toMatchFormat();
+ });
+});
diff --git a/test/js/setupTests.js b/test/js/setupTests.js
index 2045f29c..c0459fb0 100644
--- a/test/js/setupTests.js
+++ b/test/js/setupTests.js
@@ -1,98 +1,32 @@
-const { spawn, spawnSync } = require("child_process");
-const path = require("path");
-const prettier = require("prettier");
-const readline = require("readline");
-
-// Set RUBY_VERSION so certain tests only run for certain versions
-const args = ["--disable-gems", "-e", "puts RUBY_VERSION"];
-process.env.RUBY_VERSION = spawnSync("ruby", args).stdout.toString().trim();
-
-// eslint-disable-next-line no-underscore-dangle
-const { formatAST } = prettier.__debug;
-
-const parser = spawn("ruby", ["./test/js/parser.rb"]);
-
-const rl = readline.createInterface({
- input: parser.stdout,
- output: parser.stdin
-});
-
-afterAll(() => {
- rl.close();
- parser.stdin.pause();
- parser.kill("SIGINT");
-});
-
-const realFormat = (content, config = {}) =>
- prettier.format(
- content,
- Object.assign(
- { parser: "ruby", plugins: ["."], originalText: content },
- config
- )
- );
-
-const checkFormat = (before, after, config) =>
- new Promise((resolve) => {
- if (before.includes("#") || before.includes("=begin")) {
- // If the source includes an #, then this test has a comment in it.
- // Unfortunately, formatAST ignores comments and doesn't parse them at
- // all, so we can't call it and check against the output. In this case,
- // we need to instead go through the normal format function and spawn a
- // process.
- resolve(realFormat(before, config));
- } else {
- const opts = Object.assign(
- { parser: "ruby", plugins: ["."], originalText: before },
- config
- );
-
- rl.question(`${before}\n---\n`, (response) => {
- const { formatted } = formatAST(JSON.parse(response), opts);
- resolve(formatted);
- });
- }
- }).then((formatted) => ({
- pass: formatted === `${after}\n`,
- message: () => `Expected:\n${after}\nReceived:\n${formatted}`
- }));
+import { format } from "prettier";
+import plugin from "../../src/plugin.js";
+
+function normalize(code) {
+ const string = typeof code === "string" ? code : code.code;
+ return string.replace(/\r?\n/g, "\n").trim();
+}
+
+async function checkFormat(before, after) {
+ const originalText = typeof before === "string" ? before : before.code;
+ const formatted = await format(originalText, {
+ parser: typeof before === "string" ? "ruby" : before.parser,
+ plugins: [plugin]
+ });
+
+ const expected = normalize(after);
+ const received = normalize(formatted);
+
+ return {
+ pass: received === expected,
+ message: () => `Expected:\n${expected}\nReceived:\n${received}`
+ };
+}
expect.extend({
- toChangeFormat(before, after, config = {}) {
- return checkFormat(before, after, config);
+ toChangeFormat(before, after) {
+ return checkFormat(before, after);
},
- toMatchFormat(before, config = {}) {
- return checkFormat(before, before, config);
- },
- toFailFormat(before, message) {
- let pass = false;
- let error = null;
-
- try {
- realFormat(before);
- } catch (caught) {
- error = caught;
- pass = caught.message === message;
- }
-
- return {
- pass,
- message: () => `
- Expected format to throw an error for ${before} with ${message},
- but got ${error.message} instead
- `
- };
- },
- toInferParser(filename) {
- const filepath = path.join(__dirname, filename);
- const plugin = path.join(__dirname, "..", "..", "src", "ruby");
-
- return prettier
- .getFileInfo(filepath, { plugins: [plugin] })
- .then((props) => ({
- pass: props.inferredParser === "ruby",
- message: () =>
- `Expected prettier to infer the ruby parser for ${filename}, but got ${props.inferredParser} instead`
- }));
+ toMatchFormat(before) {
+ return checkFormat(before, before);
}
});
diff --git a/test/js/strings.test.js b/test/js/strings.test.js
deleted file mode 100644
index 6dae6263..00000000
--- a/test/js/strings.test.js
+++ /dev/null
@@ -1,165 +0,0 @@
-const { long, ruby } = require("./utils");
-
-describe("strings", () => {
- describe("%-literals with escape sequences in the middle", () => {
- const cases = [
- ["(", ")"],
- ["[", "]"],
- ["{", "}"],
- ["<", ">"],
- ["|", "|"]
- ];
-
- test.each(cases)("%%%s%s", (stringStart, stringEnd) =>
- expect(`%${stringStart}a\\bc${stringEnd}`).toMatchFormat()
- );
-
- test.each(cases)("%q%s%s", (stringStart, stringEnd) =>
- expect(`%q${stringStart}a\\bc${stringEnd}`).toMatchFormat()
- );
-
- test.each(cases)("%Q%s%s", (stringStart, stringEnd) =>
- expect(`%Q${stringStart}a\\bc${stringEnd}`).toMatchFormat()
- );
- });
-
- describe("with single quotes", () => {
- test("empty single quote strings stay", () => expect("''").toMatchFormat());
-
- test("empty double quote strings change", () =>
- expect(`""`).toChangeFormat("''"));
-
- test("basic strings with single quotes stay", () =>
- expect("'abc'").toMatchFormat());
-
- test("basic strings with double quotes change", () =>
- expect(`"abc"`).toChangeFormat("'abc'"));
-
- test("double quotes with inner single quotes stay", () =>
- expect(`"abc's"`).toMatchFormat());
-
- describe("escape sequences", () => {
- test("single quotes stay", () => expect("'abc\\n'").toMatchFormat());
-
- test("double quotes stay", () => expect(`"abc\\n"`).toMatchFormat());
-
- test("interpolation within single quotes stay", () =>
- expect(`'#{"\\n"}'`).toMatchFormat());
-
- test("interpolation within double quotes stay", () =>
- expect(`"#{"\\n"}"`).toMatchFormat());
-
- test("escaped double quotes are not unquoted", () =>
- expect("'abc \\\"def\\\" ghi'").toMatchFormat());
- });
- });
-
- describe("with double quotes", () => {
- test("empty single quote strings change", () =>
- expect("''").toChangeFormat(`""`, { rubySingleQuote: false }));
-
- test("empty double quote strings stay", () =>
- expect(`""`).toMatchFormat({ rubySingleQuote: false }));
-
- test("basic strings with single quotes change", () =>
- expect("'abc'").toChangeFormat(`"abc"`, { rubySingleQuote: false }));
-
- test("basic strings with double quotes stay", () =>
- expect(`"abc"`).toMatchFormat({ rubySingleQuote: false }));
-
- test("double quotes with inner single quotes stay", () =>
- expect(`"abc's"`).toMatchFormat({ rubySingleQuote: false }));
-
- describe("escape sequences", () => {
- test("single quotes stay", () => expect("'abc\\n'").toMatchFormat());
-
- test("double quotes stay", () => expect(`"abc\\n"`).toMatchFormat());
-
- test("interpolation within single quotes stay", () =>
- expect(`'#{"\\n"}'`).toMatchFormat());
-
- test("interpolation within double quotes stay", () =>
- expect(`"#{"\\n"}"`).toMatchFormat());
- });
- });
-
- describe("with %{} quotes", () => {
- test("matches correctly", () =>
- expect("%{foo\\n#{bar}\\nbaz}").toMatchFormat());
- });
-
- test("concatenation", () =>
- expect(`'abc' \\\n 'def' \\\n 'ghi'`).toMatchFormat());
-
- describe("interpolation", () => {
- test("with keywords", () => expect(`"abc #{super} abc"`).toMatchFormat());
-
- test("at the beginning of the string", () =>
- expect(`"#{abc} abc"`).toMatchFormat());
-
- test("very interpolated", () =>
- expect(`"abc #{"abc #{abc} abc"} abc"`).toMatchFormat());
-
- test("breaks interpolation on #{ ... } and not some inner node", () =>
- expect(`"${long} #{foo[:bar]} ${long}"`).toChangeFormat(
- ruby(`
- "${long} #{
- foo[:bar]
- } ${long}"
- `)
- ));
- });
-
- describe("char literals", () => {
- test("single chars get changed", () => expect("?a").toChangeFormat("'a'"));
-
- test("single chars get changed with double quotes", () =>
- expect("?a").toChangeFormat(`"a"`, { rubySingleQuote: false }));
-
- test("control escape sequences stay", () =>
- expect("?\\C-a").toMatchFormat());
-
- test("meta escape sequences stay", () => expect("?\\M-a").toMatchFormat());
-
- test("meta and control sequences stay", () =>
- expect("?\\M-\\C-a").toMatchFormat());
- });
-
- describe("xstrings", () => {
- test("backtick literals", () => expect("`abc`").toMatchFormat());
-
- test("breaking backtick literals", () =>
- expect(`\`${long}\``).toMatchFormat());
-
- test("breaking backtick literals with method chains", () =>
- expect(`\`${long}\`.to_s`).toMatchFormat());
-
- test("%x literals", () => expect("%x[abc]").toChangeFormat("`abc`"));
-
- test("breaking %x literals", () =>
- expect(`%x[${long}]`).toChangeFormat(`\`${long}\``));
-
- test("breaking %x literals with method chains", () =>
- expect(`%x[${long}].to_s`).toChangeFormat(`\`${long}\`.to_s`));
- });
-
- describe("symbols", () => {
- test("basic", () => expect(":abc").toMatchFormat());
-
- test("with single quotes", () => expect(":'abc'").toMatchFormat());
-
- test("with double quotes", () => expect(`:"abc"`).toMatchFormat());
-
- test("with false interpolation and single quotes", () =>
- expect(":'abc#{foo}abc'").toMatchFormat());
-
- test("with real interpolation and double quotes", () =>
- expect(`:"abc#{foo}abc"`).toMatchFormat());
-
- test("gets correct quotes", () => {
- const content = "where('lint_tool_configs.plugin': plugins + %w[core])";
-
- return expect(content).toMatchFormat();
- });
- });
-});
diff --git a/test/js/super.test.js b/test/js/super.test.js
deleted file mode 100644
index 8fda3c71..00000000
--- a/test/js/super.test.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("super", () => {
- test("bare", () => expect("super").toMatchFormat());
-
- test("empty parens", () => expect("super()").toMatchFormat());
-
- test("one arg, no parens", () => expect("super 1").toMatchFormat());
-
- test("one arg, with parens", () => expect("super(1)").toMatchFormat());
-
- test("multiple args, no parens", () => expect("super 1, 2").toMatchFormat());
-
- test("multiple args, with parens", () =>
- expect("super(1, 2)").toMatchFormat());
-
- describe("with comments", () => {
- test("bare", () => expect("super # comment").toMatchFormat());
-
- test("empty parens", () => expect("super() # comment").toMatchFormat());
-
- test("one arg, no parens", () =>
- expect("super 1 # comment").toMatchFormat());
-
- test("one arg, with parens", () =>
- expect("super(1) # comment").toMatchFormat());
-
- test("multiple args, no parens", () =>
- expect("super 1, 2 # comment").toMatchFormat());
-
- test("multiple args, multiple lines, no parens", () => {
- const content = ruby(`
- super 1, # first comment
- 2 # second comment
- `);
-
- return expect(content).toMatchFormat();
- });
-
- test("multiple args, with parens", () =>
- expect("super(1, 2) # comment").toMatchFormat());
-
- test("multiple args, multiple lines, no parens", () => {
- const content = ruby(`
- super(
- 1, # first comment
- 2 # second comment
- )
- `);
-
- return expect(content).toMatchFormat();
- });
- });
-});
diff --git a/test/js/toProc.test.js b/test/js/toProc.test.js
deleted file mode 100644
index 2dd165e8..00000000
--- a/test/js/toProc.test.js
+++ /dev/null
@@ -1,144 +0,0 @@
-const { ruby } = require("./utils");
-
-describe("to_proc transform", () => {
- test("basic inline", () =>
- expect("loop { |i| i.to_s }").toChangeFormat("loop(&:to_s)", {
- rubyToProc: true
- }));
-
- test("basic inline with option turned off", () =>
- expect("loop { |i| i.to_s }").toMatchFormat({ rubyToProc: false }));
-
- test("basic multi-line", () => {
- const content = ruby(`
- list.each do |node|
- node.print
- end
- `);
-
- return expect(content).toChangeFormat("list.each(&:print)", {
- rubyToProc: true
- });
- });
-
- test("maintains to_proc if already in use when rubyToProc false", () =>
- expect("loop(&:to_s)").toMatchFormat({ rubyToProc: false }));
-
- test("maintains to_proc if already in use when rubyToProc true", () =>
- expect("loop(&:to_s)").toMatchFormat({ rubyToProc: true }));
-
- test("multi-line with comment", () => {
- const content = ruby(`
- foo.each do |bar|
- # comment
- bar.baz
- end
- `);
-
- return expect(content).toMatchFormat({ rubyToProc: true });
- });
-
- test("happens for command nodes", () => {
- const content = ruby(`
- command 'foo' do |bar|
- bar.to_s
- end
- `);
-
- return expect(content).toChangeFormat("command 'foo', &:to_s", {
- rubyToProc: true
- });
- });
-
- test("happens for command call nodes", () => {
- const content = ruby(`
- command.call 'foo' do |bar|
- bar.to_s
- end
- `);
-
- return expect(content).toChangeFormat("command.call 'foo', &:to_s", {
- rubyToProc: true
- });
- });
-
- test("with args and parens", () =>
- expect("foo(bar) { |baz| baz.to_i }").toChangeFormat("foo(bar, &:to_i)", {
- rubyToProc: true
- }));
-
- test("with commands", () => {
- const content = ruby(`
- command bar do |baz|
- baz.to_i
- end
- `);
-
- return expect(content).toChangeFormat("command bar, &:to_i", {
- rubyToProc: true
- });
- });
-
- test("with command calls", () => {
- const content = ruby(`
- command.call bar do |baz|
- baz.to_i
- end
- `);
-
- return expect(content).toChangeFormat("command.call bar, &:to_i", {
- rubyToProc: true
- });
- });
-
- test("does not happen when there are multiple lines", () => {
- const content = ruby(`
- loop do |i|
- i.to_s
- i.next
- end
- `);
-
- return expect(content).toMatchFormat({ rubyToProc: true });
- });
-
- test("does not happen when there are args to the method call", () =>
- expect("loop { |i| i.to_s(:db) }").toMatchFormat({
- rubyToProc: true
- }));
-
- test("does not happen when there are multiple args", () =>
- expect("loop { |i, j| i.to_s }").toMatchFormat({ rubyToProc: true }));
-
- test("does not duplicate when inside of an aref node", () =>
- expect(
- "foo[:bar].each { |baz| baz.to_s }"
- ).toChangeFormat("foo[:bar].each(&:to_s)", { rubyToProc: true }));
-
- describe.each(["if", "unless"])(
- "does not transform when used inside hash with %s",
- (keyword) => {
- test(`hash literal with :${keyword} key`, () =>
- expect(`{ ${keyword}: ->(foo) { foo.to_s } }`).toMatchFormat({
- rubyToProc: true
- }));
-
- test(`hash literal with hashrocket :${keyword} key`, () =>
- expect(`{ :${keyword} => ->(foo) { foo.to_s } }`).toMatchFormat({
- rubyHashLabel: false,
- rubyToProc: true
- }));
-
- test(`method arguments with :${keyword} key`, () =>
- expect(`bar ${keyword}: ->(foo) { foo.to_s }`).toMatchFormat({
- rubyToProc: true
- }));
-
- test(`method arguments with hashrocket :${keyword} key`, () =>
- expect(`bar :${keyword} => ->(foo) { foo.to_s }`).toMatchFormat({
- rubyHashLabel: false,
- rubyToProc: true
- }));
- }
- );
-});
diff --git a/test/js/utils.js b/test/js/utils.js
index b29efeb8..8ca50d04 100644
--- a/test/js/utils.js
+++ b/test/js/utils.js
@@ -1,12 +1,39 @@
-const long = Array(80).fill("a").join("");
+export const long = Array(80).fill("a").join("");
+
+function stripLeadingWhitespace(code) {
+ if (!code.includes("\n")) {
+ return code;
+ }
-const ruby = (code) => {
const lines = code.split("\n");
const indent = lines[1].split("").findIndex((char) => /[^\s]/.test(char));
const content = lines.slice(1, lines.length - 1);
return content.map((line) => line.slice(indent)).join("\n");
-};
+}
+
+export function ruby(code) {
+ return stripLeadingWhitespace(code);
+}
+
+export function rbs(code) {
+ return { code: stripLeadingWhitespace(code), parser: "rbs" };
+}
+
+export function haml(code) {
+ return { code: stripLeadingWhitespace(code), parser: "haml" };
+}
+
+// The follow are two functions used for comparing against the provided
+// RUBY_VERSION environment variable. That variable is set in globalSetup so it
+// should be always available. TypeScript doesn't know that though, so we
+// explicitly allow it to be undefined by coalescing with the empty string.
+
+export function atLeastVersion(version) {
+ return (process.env.RUBY_VERSION || "") >= version;
+}
-module.exports = { long, ruby };
+export function atMostVersion(version) {
+ return (process.env.RUBY_VERSION || "") < version;
+}
diff --git a/test/js/yield.test.js b/test/js/yield.test.js
deleted file mode 100644
index 79b4a37f..00000000
--- a/test/js/yield.test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-describe("yield", () => {
- test("bare yield", () => expect("yield").toMatchFormat());
-
- test("yield with one argument, no parens", () =>
- expect("yield i").toMatchFormat());
-
- test("yield with one argument, with parens", () =>
- expect("yield(i)").toMatchFormat());
-
- test("yield with multiple arguments, no parens", () =>
- expect("yield i, 2").toMatchFormat());
-
- test("yield with multiple arguments, with parens", () =>
- expect("yield(i, 2)").toMatchFormat());
-});
diff --git a/test/rb/metadata_test.rb b/test/rb/metadata_test.rb
deleted file mode 100644
index dea004d9..00000000
--- a/test/rb/metadata_test.rb
+++ /dev/null
@@ -1,840 +0,0 @@
-# frozen_string_literal: true
-
-require 'test_helper'
-require_relative '../../src/parser'
-
-class MetadataTest < Minitest::Test
- def test_BEGIN
- assert_metadata :BEGIN, <<~SOURCE
- BEGIN {
- }
- SOURCE
- end
-
- def test_END
- assert_metadata :END, <<~SOURCE
- END {
- }
- SOURCE
- end
-
- def test_alias
- assert_metadata :alias, 'alias foo bar'
- end
-
- def test_array_args
- assert_metadata :array, <<~SOURCE
- [
- foo,
- bar,
- baz
- ]
- SOURCE
- end
-
- def test_array_args_add_star
- assert_metadata :array, <<~SOURCE
- [
- foo,
- *bar,
- baz
- ]
- SOURCE
- end
-
- def test_array_qwords
- assert_metadata :array, <<~SOURCE
- %w[
- foo
- bar
- baz
- ]
- SOURCE
- end
-
- def test_aref
- assert_metadata :aref, 'foo[bar]'
- end
-
- def test_aref_field
- assert_node_metadata(
- :aref_field,
- parse('foo[bar] = baz').dig(:body, 0),
- char_start: 0,
- char_end: 8
- )
- end
-
- def test_args
- assert_node_metadata(
- :args,
- parse('foo bar, baz').dig(:body, 1, :body, 0),
- char_start: 4,
- char_end: 12
- )
- end
-
- def test_args_add_block
- assert_node_metadata(
- :args_add_block,
- parse('foo bar, baz').dig(:body, 1),
- char_start: 4,
- char_end: 12
- )
- end
-
- def test_args_add_star
- assert_node_metadata(
- :args_add_star,
- parse('foo *bar').dig(:body, 1, :body, 0),
- char_start: 4,
- char_end: 8
- )
- end
-
- def test_arg_paren
- content = <<~SOURCE
- foo(
- a,
- b,
- c
- )
- SOURCE
-
- assert_node_metadata(
- :arg_paren,
- parse(content).dig(:body, 1),
- char_start: 3,
- char_end: 20
- )
- end
-
- def test_assign
- assert_metadata :assign, 'foo = bar'
- end
-
- def test_assoc_new
- assert_node_metadata(
- :assoc_new,
- parse('{ foo: bar, bar: baz }').dig(:body, 0, :body, 0),
- char_start: 2,
- char_end: 10
- )
- end
-
- def test_assoc_splat
- assert_node_metadata(
- :assoc_splat,
- parse('foo **bar').dig(:body, 1, :body, 0, :body, 0, :body, 0),
- char_start: 4,
- char_end: 9
- )
- end
-
- def test_assoclist_from_args
- assert_node_metadata(
- :assoclist_from_args,
- parse('{ foo => bar }').dig(:body, 0),
- char_start: 1,
- char_end: 13
- )
- end
-
- def test_bare_assoc_hash
- assert_node_metadata(
- :bare_assoc_hash,
- parse('foo(bar: baz)').dig(:body, 1, :body, 0, :body, 0, :body, 0),
- char_start: 4,
- char_end: 12
- )
- end
-
- def test_begin
- assert_metadata :begin, <<~SOURCE
- begin
- begin; end
- end
- SOURCE
- end
-
- def test_binary
- assert_metadata :binary, 'foo + bar'
- end
-
- def test_blockarg
- assert_node_metadata(
- :blockarg,
- parse('def foo(&bar) end').dig(:body, 1, :body, 0, :body, 6),
- char_start: 8,
- char_end: 12
- )
- end
-
- def test_block_var
- assert_node_metadata(
- :block_var,
- parse('foo { |bar| }').dig(:body, 1, :body, 0),
- char_start: 6,
- char_end: 11
- )
- end
-
- def test_bodystmt
- assert_node_metadata(
- :bodystmt,
- parse('class Foo; def foo; end; end').dig(:body, 2),
- char_start: 9,
- char_end: 25
- )
- end
-
- def test_brace_block
- assert_node_metadata(
- :brace_block,
- parse('foo { bar }').dig(:body, 1),
- char_start: 4,
- char_end: 11
- )
- end
-
- def test_break
- assert_metadata :break, 'break foo'
- end
-
- def test_call
- assert_metadata :call, 'foo.bar'
- end
-
- def test_case
- assert_metadata :case, <<~SOURCE
- case foo
- when bar
- case baz
- when qux
- end
- end
- SOURCE
- end
-
- def test_class
- assert_metadata :class, <<~SOURCE
- class Foo
- class Bar; end
- end
- SOURCE
- end
-
- def test_command
- assert_metadata :command, 'foo bar'
- end
-
- def test_command_call
- assert_metadata :command_call, 'foo.bar baz'
- end
-
- def test_const_ref
- assert_node_metadata(
- :const_ref,
- parse('class Foo; end').dig(:body, 0),
- char_start: 6,
- char_end: 9
- )
- end
-
- def test_const_path_field
- assert_node_metadata(
- :const_path_field,
- parse('Foo::Bar = baz').dig(:body, 0),
- char_start: 0,
- char_end: 8
- )
- end
-
- def test_const_path_ref
- assert_metadata :const_path_ref, 'Foo::Bar'
- end
-
- def test_def
- assert_metadata :def, <<~SOURCE
- def foo
- def bar; end
- end
- SOURCE
- end
-
- def test_defined
- assert_metadata :defined, <<~SOURCE
- defined?(
- Foo
- )
- SOURCE
- end
-
- def test_defs
- assert_metadata :defs, <<~SOURCE
- def Object.foo
- def Object.bar; end
- end
- SOURCE
- end
-
- def test_do_block
- assert_node_metadata(
- :do_block,
- parse('foo do; bar; end').dig(:body, 1),
- char_start: 4,
- char_end: 16
- )
- end
-
- def test_dot2
- assert_metadata :dot2, 'foo..bar'
- end
-
- def test_dot3
- assert_metadata :dot3, 'foo...bar'
- end
-
- def test_dyna_symbol
- assert_metadata :dyna_symbol, ':"foo #{bar} baz"'
- end
-
- def test_else
- content = <<~SOURCE
- if foo
- bar
- else
- baz
- end
- SOURCE
-
- assert_node_metadata(
- :else,
- parse(content).dig(:body, 2),
- char_start: 13,
- char_end: 27
- )
- end
-
- def test_elsif
- content = <<~SOURCE
- if foo
- bar
- elsif bar
- qux
- end
- SOURCE
-
- assert_node_metadata(
- :elsif,
- parse(content).dig(:body, 2),
- char_start: 13,
- char_end: 32
- )
- end
-
- def test_ensure
- content = <<~SOURCE
- begin
- foo
- ensure
- bar
- end
- SOURCE
-
- assert_node_metadata(
- :ensure,
- parse(content).dig(:body, 0, :body, 3),
- char_start: 12,
- char_end: 28
- )
- end
-
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
- def test_excessed_comma
- assert_node_metadata(
- :excessed_comma,
- parse('foo { |bar,| }').dig(:body, 1, :body, 0, :body, 0, :body, 2),
- char_start: 10,
- char_end: 11
- )
- end
- end
-
- def test_fcall
- assert_node_metadata(
- :fcall,
- parse('foo(bar)').dig(:body, 0),
- char_start: 0,
- char_end: 3
- )
- end
-
- def test_field
- assert_node_metadata(
- :field,
- parse('foo.bar = baz').dig(:body, 0),
- char_start: 0,
- char_end: 7
- )
- end
-
- def test_for
- assert_metadata :for, <<~SOURCE
- for foo in bar do
- for baz in qux do
- end
- end
- SOURCE
- end
-
- def test_hash
- assert_metadata :hash, <<~SOURCE
- {
- foo: 'bar'
- }
- SOURCE
- end
-
- def test_if
- assert_metadata :if, <<~SOURCE
- if foo
- if bar; end
- end
- SOURCE
- end
-
- def test_ifop
- assert_metadata :ifop, 'foo ? bar : baz'
- end
-
- def test_if_mod
- assert_metadata :if_mod, 'foo if bar'
- end
-
- def test_kwrest_param
- assert_node_metadata(
- :kwrest_param,
- parse('def foo(**bar); end').dig(:body, 1, :body, 0, :body, 5),
- char_start: 8,
- char_end: 13
- )
- end
-
- def test_lambda
- assert_metadata :lambda, <<~SOURCE
- -> (foo, bar) {
- foo + bar
- }
- SOURCE
- end
-
- def test_massign
- assert_metadata :massign, 'foo, bar, baz = 1, 2, 3'
- end
-
- def test_method_add_arg
- assert_metadata :method_add_arg, 'foo(bar)'
- end
-
- def test_method_add_block
- assert_metadata :method_add_block, 'foo { bar }'
- end
-
- def test_mlhs
- assert_node_metadata(
- :mlhs,
- parse('foo, bar, baz = 1, 2, 3').dig(:body, 0),
- char_start: 0,
- char_end: 13
- )
- end
-
- def test_mlhs_add_post
- assert_node_metadata(
- :mlhs_add_post,
- parse('foo, *bar, baz = 1, 2, 3').dig(:body, 0),
- char_start: 5,
- char_end: 14
- )
- end
-
- def test_mlhs_add_star
- assert_node_metadata(
- :mlhs_add_star,
- parse('foo, *bar = 1, 2, 3').dig(:body, 0),
- char_start: 5,
- char_end: 9
- )
- end
-
- def test_mlhs_paren
- assert_node_metadata(
- :mlhs_paren,
- parse('(foo, bar) = baz').dig(:body, 0),
- char_start: 0,
- char_end: 10
- )
- end
-
- def test_module
- assert_metadata :module, <<~SOURCE
- module Foo
- module Bar; end
- end
- SOURCE
- end
-
- def test_mrhs_add_star
- assert_node_metadata(
- :mrhs_add_star,
- parse('foo, bar = *baz').dig(:body, 1),
- char_start: 11,
- char_end: 15
- )
- end
-
- def test_mrhs_new_from_args
- assert_node_metadata(
- :mrhs_new_from_args,
- parse('foo, bar, baz = 1, 2, 3').dig(:body, 1),
- char_start: 16,
- char_end: 23
- )
- end
-
- def test_next
- assert_metadata :next, 'next foo'
- end
-
- def test_opassign
- assert_metadata :opassign, 'foo ||= bar'
- end
-
- def test_params
- content = <<~SOURCE
- def foo(
- bar,
- baz
- ); end
- SOURCE
-
- assert_node_metadata(
- :params,
- parse(content).dig(:body, 1, :body, 0),
- char_start: 11,
- char_end: 21
- )
- end
-
- def test_paren
- assert_metadata :paren, '()'
- end
-
- def test_qsymbols
- assert_node_metadata(
- :qsymbols,
- parse('%i[foo bar baz]').dig(:body, 0),
- char_start: 0,
- char_end: 15
- )
- end
-
- def test_qwords
- assert_node_metadata(
- :qwords,
- parse('%w[foo bar baz]').dig(:body, 0),
- char_start: 0,
- char_end: 15
- )
- end
-
- def test_redo
- assert_metadata :redo, 'redo'
- end
-
- def test_regexp_literal
- assert_metadata :regexp_literal, '/foo/'
- assert_metadata :regexp_literal, '%r{foo}'
- end
-
- def test_rescue
- assert_node_metadata(
- :rescue,
- parse('begin; foo; rescue => bar; baz; end').dig(:body, 0, :body, 1),
- char_start: 12,
- char_end: 35
- )
- end
-
- def test_rescue_mod
- assert_metadata :rescue_mod, 'foo rescue bar'
- end
-
- def test_rest_param
- assert_node_metadata(
- :rest_param,
- parse('def foo(*bar); end').dig(:body, 1, :body, 0, :body, 2),
- char_start: 8,
- char_end: 12
- )
- end
-
- def test_retry
- assert_metadata :retry, 'retry'
- end
-
- def test_return
- assert_metadata :return, 'return foo'
- end
-
- def test_return0
- assert_metadata :return0, 'return'
- end
-
- def test_sclass
- assert_metadata :sclass, <<~SOURCE
- class << Foo
- class << Bar; end
- end
- SOURCE
- end
-
- def test_string_concat
- assert_metadata :string_concat, <<~SOURCE
- 'foo' \
- 'bar'
- SOURCE
- end
-
- def test_string_dvar
- assert_node_metadata(
- :string_dvar,
- parse('"#$foo"').dig(:body, 0),
- char_start: 1,
- char_end: 6
- )
- end
-
- def test_string_embexpr
- assert_node_metadata(
- :string_embexpr,
- parse('"foo #{bar} baz"').dig(:body, 1),
- char_start: 5,
- char_end: 11
- )
- end
-
- def test_string_literal
- assert_metadata :string_literal, '"foo"'
- end
-
- def test_super
- assert_metadata :super, 'super foo'
- end
-
- def test_symbol_literal
- assert_metadata :symbol_literal, ':foo'
- end
-
- def test_symbols
- assert_node_metadata(
- :symbols,
- parse('%I[f#{o}o b#{a}r b#{a}z]').dig(:body, 0),
- char_start: 0,
- char_end: 24
- )
- end
-
- def test_top_const_field
- assert_node_metadata(
- :top_const_field,
- parse('::Foo = bar').dig(:body, 0),
- char_start: 0,
- char_end: 5
- )
- end
-
- def test_top_const_ref
- assert_metadata :top_const_ref, '::Foo'
- end
-
- def test_unary
- assert_metadata :unary, '-foo'
- assert_metadata :unary, 'not foo'
- end
-
- def test_undef
- assert_metadata :undef, 'undef foo, bar'
- end
-
- def test_unless
- assert_metadata :unless, <<~SOURCE
- unless foo
- unless bar; end
- end
- SOURCE
- end
-
- def test_unless_mod
- assert_metadata :unless_mod, 'foo unless bar'
- end
-
- def test_until
- assert_metadata :until, <<~SOURCE
- until foo
- until bar; end
- end
- SOURCE
- end
-
- def test_until_mod
- assert_metadata :until_mod, 'foo until bar'
- end
-
- def test_while
- assert_metadata :while, <<~SOURCE
- while foo
- while bar; end
- end
- SOURCE
- end
-
- def test_var_alias
- assert_metadata :var_alias, 'alias $foo $bar'
- end
-
- def test_var_field
- assert_node_metadata(
- :var_field,
- parse('foo = 1').dig(:body, 0),
- char_start: 0,
- char_end: 3
- )
- end
-
- def test_var_ref
- assert_metadata :var_ref, 'true'
- end
-
- def test_vcall
- assert_metadata :vcall, 'foo'
- end
-
- def test_void_stmt
- assert_node_metadata(:void_stmt, parse('; ;'), char_start: 0, char_end: 0)
- end
-
- def test_when
- assert_node_metadata(
- :when,
- parse('case foo; when bar; baz; end').dig(:body, 1),
- char_start: 10,
- char_end: 28
- )
- end
-
- def test_while_mod
- assert_metadata :while_mod, 'foo while bar'
- end
-
- def test_words
- assert_node_metadata(
- :words,
- parse('%W[f#{o}o b#{a}r b#{a}z]').dig(:body, 0),
- char_start: 0,
- char_end: 24
- )
- end
-
- def test_xstring
- assert_metadata :xstring_literal, <<~SOURCE
- `
- foo
- bar
- `
- SOURCE
- end
-
- def test_yield
- assert_metadata :yield, 'yield foo'
- end
-
- def test_yield0
- assert_metadata :yield0, 'yield'
- end
-
- def test_zsuper
- assert_metadata :zsuper, 'super'
- end
-
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7')
- def test_args_forward
- content = <<~SOURCE
- def foo(...)
- bar(...)
- end
- SOURCE
-
- assert_node_metadata(
- :args_forward,
- parse(content).dig(:body, 1, :body, 0, :body, 2),
- char_start: 8,
- char_end: 11
- )
- end
-
- def test_aryptn
- content = <<~SOURCE
- case foo
- in bar, baz
- qux
- end
- SOURCE
-
- assert_node_metadata(
- :aryptn,
- parse(content).dig(:body, 1, :body, 0),
- char_start: 12,
- char_end: 20
- )
- end
-
- def test_in
- content = <<~SOURCE
- case foo
- in bar
- baz
- end
- SOURCE
-
- assert_node_metadata(
- :in,
- parse(content).dig(:body, 1),
- char_start: 9,
- char_end: 25
- )
- end
- end
-
- private
-
- def assert_metadata(type, ruby)
- assert_node_metadata(
- type,
- parse(ruby),
- char_start: 0,
- char_end: ruby.chomp.size
- )
- end
-
- def assert_node_metadata(type, node, metadata)
- assert_equal type, node[:type]
-
- metadata.each { |key, value| assert_equal value, node[key] }
- end
-
- def parse(ruby)
- Prettier::Parser.parse(ruby).dig(:body, 0, :body, 0)
- end
-end
diff --git a/test/rb/rake_test.rb b/test/rb/rake_test.rb
index ab3335c3..65891544 100644
--- a/test/rb/rake_test.rb
+++ b/test/rb/rake_test.rb
@@ -1,13 +1,13 @@
# frozen_string_literal: true
-require 'test_helper'
-require 'prettier/rake/task'
+require "test_helper"
+require "prettier/rake/task"
class RakeTest < Minitest::Test
Invoke = Struct.new(:args)
def test_task
- source_files = '{app,config,lib}/**/*.rb'
+ source_files = "{app,config,lib}/**/*.rb"
Prettier::Rake::Task.new do |t|
t.name = :format
t.write = true
@@ -16,9 +16,9 @@ def test_task
invoke = nil
Prettier.stub(:run, ->(args) { invoke = Invoke.new(args) }) do
- Rake::Task['format'].invoke
+ Rake::Task["format"].invoke
end
- assert_equal ['--write', source_files], invoke.args
+ assert_equal ["--write", source_files], invoke.args
end
end
diff --git a/test/rb/test_helper.rb b/test/rb/test_helper.rb
index 4b93f91d..f223f7f0 100644
--- a/test/rb/test_helper.rb
+++ b/test/rb/test_helper.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-$LOAD_PATH.unshift(File.expand_path('../../lib', __dir__))
+$LOAD_PATH.unshift(File.expand_path("../../lib", __dir__))
-require 'prettier'
-require 'minitest/autorun'
+require "prettier"
+require "minitest/autorun"
diff --git a/test/rb/version_test.rb b/test/rb/version_test.rb
index 9d55356e..289590be 100644
--- a/test/rb/version_test.rb
+++ b/test/rb/version_test.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require 'test_helper'
+require "test_helper"
class VersionTest < Minitest::Test
def test_version
diff --git a/yarn.lock b/yarn.lock
index 85f6eecf..dd883b5b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,151 +2,168 @@
# yarn lockfile v1
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
- integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
- dependencies:
- "@babel/highlight" "^7.10.4"
-
-"@babel/core@^7.1.0", "@babel/core@^7.7.5":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd"
- integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==
- dependencies:
- "@babel/code-frame" "^7.10.4"
- "@babel/generator" "^7.12.10"
- "@babel/helper-module-transforms" "^7.12.1"
- "@babel/helpers" "^7.12.5"
- "@babel/parser" "^7.12.10"
- "@babel/template" "^7.12.7"
- "@babel/traverse" "^7.12.10"
- "@babel/types" "^7.12.10"
- convert-source-map "^1.7.0"
+"@aashutoshrathi/word-wrap@^1.2.3":
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
+ integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
+
+"@ampproject/remapping@^2.2.0":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630"
+ integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.3.0"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.4.tgz#03ae5af150be94392cb5c7ccd97db5a19a5da6aa"
+ integrity sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==
+ dependencies:
+ "@babel/highlight" "^7.23.4"
+ chalk "^2.4.2"
+
+"@babel/compat-data@^7.22.9":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.3.tgz#3febd552541e62b5e883a25eb3effd7c7379db11"
+ integrity sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==
+
+"@babel/core@^7.11.6", "@babel/core@^7.12.3":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.3.tgz#5ec09c8803b91f51cc887dedc2654a35852849c9"
+ integrity sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==
+ dependencies:
+ "@ampproject/remapping" "^2.2.0"
+ "@babel/code-frame" "^7.22.13"
+ "@babel/generator" "^7.23.3"
+ "@babel/helper-compilation-targets" "^7.22.15"
+ "@babel/helper-module-transforms" "^7.23.3"
+ "@babel/helpers" "^7.23.2"
+ "@babel/parser" "^7.23.3"
+ "@babel/template" "^7.22.15"
+ "@babel/traverse" "^7.23.3"
+ "@babel/types" "^7.23.3"
+ convert-source-map "^2.0.0"
debug "^4.1.0"
- gensync "^1.0.0-beta.1"
- json5 "^2.1.2"
- lodash "^4.17.19"
- semver "^5.4.1"
- source-map "^0.5.0"
-
-"@babel/generator@^7.12.10":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460"
- integrity sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==
- dependencies:
- "@babel/types" "^7.12.10"
+ gensync "^1.0.0-beta.2"
+ json5 "^2.2.3"
+ semver "^6.3.1"
+
+"@babel/generator@^7.23.3", "@babel/generator@^7.23.4", "@babel/generator@^7.7.2":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.4.tgz#4a41377d8566ec18f807f42962a7f3551de83d1c"
+ integrity sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==
+ dependencies:
+ "@babel/types" "^7.23.4"
+ "@jridgewell/gen-mapping" "^0.3.2"
+ "@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"
- source-map "^0.5.0"
-
-"@babel/helper-function-name@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a"
- integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==
- dependencies:
- "@babel/helper-get-function-arity" "^7.10.4"
- "@babel/template" "^7.10.4"
- "@babel/types" "^7.10.4"
-
-"@babel/helper-get-function-arity@^7.10.4":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf"
- integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==
- dependencies:
- "@babel/types" "^7.12.10"
-
-"@babel/helper-member-expression-to-functions@^7.12.1":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855"
- integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==
- dependencies:
- "@babel/types" "^7.12.7"
-
-"@babel/helper-module-imports@^7.12.1":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb"
- integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==
- dependencies:
- "@babel/types" "^7.12.5"
-
-"@babel/helper-module-transforms@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c"
- integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==
- dependencies:
- "@babel/helper-module-imports" "^7.12.1"
- "@babel/helper-replace-supers" "^7.12.1"
- "@babel/helper-simple-access" "^7.12.1"
- "@babel/helper-split-export-declaration" "^7.11.0"
- "@babel/helper-validator-identifier" "^7.10.4"
- "@babel/template" "^7.10.4"
- "@babel/traverse" "^7.12.1"
- "@babel/types" "^7.12.1"
- lodash "^4.17.19"
-
-"@babel/helper-optimise-call-expression@^7.10.4":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d"
- integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==
- dependencies:
- "@babel/types" "^7.12.10"
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375"
- integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==
-
-"@babel/helper-replace-supers@^7.12.1":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9"
- integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==
- dependencies:
- "@babel/helper-member-expression-to-functions" "^7.12.1"
- "@babel/helper-optimise-call-expression" "^7.10.4"
- "@babel/traverse" "^7.12.5"
- "@babel/types" "^7.12.5"
-
-"@babel/helper-simple-access@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136"
- integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==
- dependencies:
- "@babel/types" "^7.12.1"
-
-"@babel/helper-split-export-declaration@^7.11.0":
- version "7.11.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f"
- integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==
- dependencies:
- "@babel/types" "^7.11.0"
-
-"@babel/helper-validator-identifier@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
- integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
-
-"@babel/helpers@^7.12.5":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
- integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==
- dependencies:
- "@babel/template" "^7.10.4"
- "@babel/traverse" "^7.12.5"
- "@babel/types" "^7.12.5"
-
-"@babel/highlight@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
- integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
- dependencies:
- "@babel/helper-validator-identifier" "^7.10.4"
- chalk "^2.0.0"
+"@babel/helper-compilation-targets@^7.22.15":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52"
+ integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==
+ dependencies:
+ "@babel/compat-data" "^7.22.9"
+ "@babel/helper-validator-option" "^7.22.15"
+ browserslist "^4.21.9"
+ lru-cache "^5.1.1"
+ semver "^6.3.1"
+
+"@babel/helper-environment-visitor@^7.22.20":
+ version "7.22.20"
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
+ integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==
+
+"@babel/helper-function-name@^7.23.0":
+ version "7.23.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
+ integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
+ dependencies:
+ "@babel/template" "^7.22.15"
+ "@babel/types" "^7.23.0"
+
+"@babel/helper-hoist-variables@^7.22.5":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
+ integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==
+ dependencies:
+ "@babel/types" "^7.22.5"
+
+"@babel/helper-module-imports@^7.22.15":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0"
+ integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==
+ dependencies:
+ "@babel/types" "^7.22.15"
+
+"@babel/helper-module-transforms@^7.23.3":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1"
+ integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==
+ dependencies:
+ "@babel/helper-environment-visitor" "^7.22.20"
+ "@babel/helper-module-imports" "^7.22.15"
+ "@babel/helper-simple-access" "^7.22.5"
+ "@babel/helper-split-export-declaration" "^7.22.6"
+ "@babel/helper-validator-identifier" "^7.22.20"
+
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295"
+ integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==
+
+"@babel/helper-simple-access@^7.22.5":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de"
+ integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==
+ dependencies:
+ "@babel/types" "^7.22.5"
+
+"@babel/helper-split-export-declaration@^7.22.6":
+ version "7.22.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
+ integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
+ dependencies:
+ "@babel/types" "^7.22.5"
+
+"@babel/helper-string-parser@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83"
+ integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==
+
+"@babel/helper-validator-identifier@^7.22.20":
+ version "7.22.20"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
+ integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
+
+"@babel/helper-validator-option@^7.22.15":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040"
+ integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==
+
+"@babel/helpers@^7.23.2":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.4.tgz#7d2cfb969aa43222032193accd7329851facf3c1"
+ integrity sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==
+ dependencies:
+ "@babel/template" "^7.22.15"
+ "@babel/traverse" "^7.23.4"
+ "@babel/types" "^7.23.4"
+
+"@babel/highlight@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b"
+ integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.22.20"
+ chalk "^2.4.2"
js-tokens "^4.0.0"
-"@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81"
- integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.3", "@babel/parser@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.4.tgz#409fbe690c333bb70187e2de4021e1e47a026661"
+ integrity sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==
"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
@@ -163,11 +180,11 @@
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-class-properties@^7.8.3":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978"
- integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==
+ version "7.12.13"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10"
+ integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==
dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.12.13"
"@babel/plugin-syntax-import-meta@^7.8.3":
version "7.10.4"
@@ -183,6 +200,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
+"@babel/plugin-syntax-jsx@^7.7.2":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473"
+ integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.22.5"
+
"@babel/plugin-syntax-logical-assignment-operators@^7.8.3":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699"
@@ -226,50 +250,51 @@
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-top-level-await@^7.8.3":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0"
- integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==
- dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
-
-"@babel/runtime@^7.12.5", "@babel/runtime@^7.7.6":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e"
- integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==
- dependencies:
- regenerator-runtime "^0.13.4"
-
-"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.3.3":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc"
- integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==
- dependencies:
- "@babel/code-frame" "^7.10.4"
- "@babel/parser" "^7.12.7"
- "@babel/types" "^7.12.7"
-
-"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a"
- integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==
- dependencies:
- "@babel/code-frame" "^7.10.4"
- "@babel/generator" "^7.12.10"
- "@babel/helper-function-name" "^7.10.4"
- "@babel/helper-split-export-declaration" "^7.11.0"
- "@babel/parser" "^7.12.10"
- "@babel/types" "^7.12.10"
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c"
+ integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-typescript@^7.7.2":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f"
+ integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.22.5"
+
+"@babel/template@^7.22.15", "@babel/template@^7.3.3":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
+ integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
+ dependencies:
+ "@babel/code-frame" "^7.22.13"
+ "@babel/parser" "^7.22.15"
+ "@babel/types" "^7.22.15"
+
+"@babel/traverse@^7.23.3", "@babel/traverse@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.4.tgz#c2790f7edf106d059a0098770fe70801417f3f85"
+ integrity sha512-IYM8wSUwunWTB6tFC2dkKZhxbIjHoWemdK+3f8/wq8aKhbUscxD5MX72ubd90fxvFknaLPeGw5ycU84V1obHJg==
+ dependencies:
+ "@babel/code-frame" "^7.23.4"
+ "@babel/generator" "^7.23.4"
+ "@babel/helper-environment-visitor" "^7.22.20"
+ "@babel/helper-function-name" "^7.23.0"
+ "@babel/helper-hoist-variables" "^7.22.5"
+ "@babel/helper-split-export-declaration" "^7.22.6"
+ "@babel/parser" "^7.23.4"
+ "@babel/types" "^7.23.4"
debug "^4.1.0"
globals "^11.1.0"
- lodash "^4.17.19"
-"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
- version "7.12.10"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260"
- integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==
+"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.3", "@babel/types@^7.23.4", "@babel/types@^7.3.3":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.4.tgz#7206a1810fc512a7f7f7d4dace4cb4c1c9dbfb8e"
+ integrity sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==
dependencies:
- "@babel/helper-validator-identifier" "^7.10.4"
- lodash "^4.17.19"
+ "@babel/helper-string-parser" "^7.23.4"
+ "@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"
"@bcoe/v8-coverage@^0.2.3":
@@ -277,30 +302,95 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
-"@cnakazawa/watch@^1.0.3":
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
- integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==
+"@eslint-community/eslint-utils@^4.2.0":
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
+ integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
+ dependencies:
+ eslint-visitor-keys "^3.3.0"
+
+"@eslint-community/regexpp@^4.12.1":
+ version "4.12.1"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
+ integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
+
+"@eslint/config-array@^0.19.2":
+ version "0.19.2"
+ resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.2.tgz#3060b809e111abfc97adb0bb1172778b90cb46aa"
+ integrity sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==
dependencies:
- exec-sh "^0.3.2"
- minimist "^1.2.0"
+ "@eslint/object-schema" "^2.1.6"
+ debug "^4.3.1"
+ minimatch "^3.1.2"
-"@eslint/eslintrc@^0.2.2":
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76"
- integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==
+"@eslint/core@^0.12.0":
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.12.0.tgz#5f960c3d57728be9f6c65bd84aa6aa613078798e"
+ integrity sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==
+ dependencies:
+ "@types/json-schema" "^7.0.15"
+
+"@eslint/eslintrc@^3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.0.tgz#96a558f45842989cca7ea1ecd785ad5491193846"
+ integrity sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==
dependencies:
ajv "^6.12.4"
- debug "^4.1.1"
- espree "^7.3.0"
- globals "^12.1.0"
- ignore "^4.0.6"
+ debug "^4.3.2"
+ espree "^10.0.1"
+ globals "^14.0.0"
+ ignore "^5.2.0"
import-fresh "^3.2.1"
- js-yaml "^3.13.1"
- lodash "^4.17.19"
- minimatch "^3.0.4"
+ js-yaml "^4.1.0"
+ minimatch "^3.1.2"
strip-json-comments "^3.1.1"
+"@eslint/js@9.21.0", "@eslint/js@^9.21.0":
+ version "9.21.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.21.0.tgz#4303ef4e07226d87c395b8fad5278763e9c15c08"
+ integrity sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==
+
+"@eslint/object-schema@^2.1.6":
+ version "2.1.6"
+ resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f"
+ integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==
+
+"@eslint/plugin-kit@^0.2.7":
+ version "0.2.7"
+ resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz#9901d52c136fb8f375906a73dcc382646c3b6a27"
+ integrity sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==
+ dependencies:
+ "@eslint/core" "^0.12.0"
+ levn "^0.4.1"
+
+"@humanfs/core@^0.19.1":
+ version "0.19.1"
+ resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77"
+ integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==
+
+"@humanfs/node@^0.16.6":
+ version "0.16.6"
+ resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e"
+ integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==
+ dependencies:
+ "@humanfs/core" "^0.19.1"
+ "@humanwhocodes/retry" "^0.3.0"
+
+"@humanwhocodes/module-importer@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
+ integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
+
+"@humanwhocodes/retry@^0.3.0":
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a"
+ integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==
+
+"@humanwhocodes/retry@^0.4.2":
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.2.tgz#1860473de7dfa1546767448f333db80cb0ff2161"
+ integrity sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==
+
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
@@ -313,325 +403,362 @@
resolve-from "^5.0.0"
"@istanbuljs/schema@^0.1.2":
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
- integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
+ integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
-"@jest/console@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2"
- integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==
+"@jest/console@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc"
+ integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==
dependencies:
- "@jest/types" "^26.6.2"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
chalk "^4.0.0"
- jest-message-util "^26.6.2"
- jest-util "^26.6.2"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
slash "^3.0.0"
-"@jest/core@^26.6.3":
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad"
- integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==
+"@jest/core@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f"
+ integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==
dependencies:
- "@jest/console" "^26.6.2"
- "@jest/reporters" "^26.6.2"
- "@jest/test-result" "^26.6.2"
- "@jest/transform" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/console" "^29.7.0"
+ "@jest/reporters" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
ansi-escapes "^4.2.1"
chalk "^4.0.0"
+ ci-info "^3.2.0"
exit "^0.1.2"
- graceful-fs "^4.2.4"
- jest-changed-files "^26.6.2"
- jest-config "^26.6.3"
- jest-haste-map "^26.6.2"
- jest-message-util "^26.6.2"
- jest-regex-util "^26.0.0"
- jest-resolve "^26.6.2"
- jest-resolve-dependencies "^26.6.3"
- jest-runner "^26.6.3"
- jest-runtime "^26.6.3"
- jest-snapshot "^26.6.2"
- jest-util "^26.6.2"
- jest-validate "^26.6.2"
- jest-watcher "^26.6.2"
- micromatch "^4.0.2"
- p-each-series "^2.1.0"
- rimraf "^3.0.0"
+ graceful-fs "^4.2.9"
+ jest-changed-files "^29.7.0"
+ jest-config "^29.7.0"
+ jest-haste-map "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-resolve-dependencies "^29.7.0"
+ jest-runner "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ jest-watcher "^29.7.0"
+ micromatch "^4.0.4"
+ pretty-format "^29.7.0"
slash "^3.0.0"
strip-ansi "^6.0.0"
-"@jest/environment@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c"
- integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==
+"@jest/environment@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7"
+ integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==
dependencies:
- "@jest/fake-timers" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
- jest-mock "^26.6.2"
+ jest-mock "^29.7.0"
+
+"@jest/expect-utils@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
+ integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==
+ dependencies:
+ jest-get-type "^29.6.3"
+
+"@jest/expect@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2"
+ integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==
+ dependencies:
+ expect "^29.7.0"
+ jest-snapshot "^29.7.0"
-"@jest/fake-timers@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad"
- integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==
+"@jest/fake-timers@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565"
+ integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==
dependencies:
- "@jest/types" "^26.6.2"
- "@sinonjs/fake-timers" "^6.0.1"
+ "@jest/types" "^29.6.3"
+ "@sinonjs/fake-timers" "^10.0.2"
"@types/node" "*"
- jest-message-util "^26.6.2"
- jest-mock "^26.6.2"
- jest-util "^26.6.2"
+ jest-message-util "^29.7.0"
+ jest-mock "^29.7.0"
+ jest-util "^29.7.0"
-"@jest/globals@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a"
- integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==
+"@jest/globals@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d"
+ integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==
dependencies:
- "@jest/environment" "^26.6.2"
- "@jest/types" "^26.6.2"
- expect "^26.6.2"
+ "@jest/environment" "^29.7.0"
+ "@jest/expect" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ jest-mock "^29.7.0"
-"@jest/reporters@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6"
- integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==
+"@jest/reporters@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7"
+ integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==
dependencies:
"@bcoe/v8-coverage" "^0.2.3"
- "@jest/console" "^26.6.2"
- "@jest/test-result" "^26.6.2"
- "@jest/transform" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/console" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@jridgewell/trace-mapping" "^0.3.18"
+ "@types/node" "*"
chalk "^4.0.0"
collect-v8-coverage "^1.0.0"
exit "^0.1.2"
- glob "^7.1.2"
- graceful-fs "^4.2.4"
+ glob "^7.1.3"
+ graceful-fs "^4.2.9"
istanbul-lib-coverage "^3.0.0"
- istanbul-lib-instrument "^4.0.3"
+ istanbul-lib-instrument "^6.0.0"
istanbul-lib-report "^3.0.0"
istanbul-lib-source-maps "^4.0.0"
- istanbul-reports "^3.0.2"
- jest-haste-map "^26.6.2"
- jest-resolve "^26.6.2"
- jest-util "^26.6.2"
- jest-worker "^26.6.2"
+ istanbul-reports "^3.1.3"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
+ jest-worker "^29.7.0"
slash "^3.0.0"
- source-map "^0.6.0"
string-length "^4.0.1"
- terminal-link "^2.0.0"
- v8-to-istanbul "^7.0.0"
- optionalDependencies:
- node-notifier "^8.0.0"
+ strip-ansi "^6.0.0"
+ v8-to-istanbul "^9.0.1"
+
+"@jest/schemas@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
+ integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==
+ dependencies:
+ "@sinclair/typebox" "^0.27.8"
-"@jest/source-map@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535"
- integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==
+"@jest/source-map@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4"
+ integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==
dependencies:
+ "@jridgewell/trace-mapping" "^0.3.18"
callsites "^3.0.0"
- graceful-fs "^4.2.4"
- source-map "^0.6.0"
+ graceful-fs "^4.2.9"
-"@jest/test-result@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18"
- integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==
+"@jest/test-result@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c"
+ integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==
dependencies:
- "@jest/console" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/console" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/istanbul-lib-coverage" "^2.0.0"
collect-v8-coverage "^1.0.0"
-"@jest/test-sequencer@^26.6.3":
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17"
- integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==
- dependencies:
- "@jest/test-result" "^26.6.2"
- graceful-fs "^4.2.4"
- jest-haste-map "^26.6.2"
- jest-runner "^26.6.3"
- jest-runtime "^26.6.3"
-
-"@jest/transform@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b"
- integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==
- dependencies:
- "@babel/core" "^7.1.0"
- "@jest/types" "^26.6.2"
- babel-plugin-istanbul "^6.0.0"
+"@jest/test-sequencer@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce"
+ integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==
+ dependencies:
+ "@jest/test-result" "^29.7.0"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ slash "^3.0.0"
+
+"@jest/transform@^29.7.0":
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c"
+ integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==
+ dependencies:
+ "@babel/core" "^7.11.6"
+ "@jest/types" "^29.6.3"
+ "@jridgewell/trace-mapping" "^0.3.18"
+ babel-plugin-istanbul "^6.1.1"
chalk "^4.0.0"
- convert-source-map "^1.4.0"
- fast-json-stable-stringify "^2.0.0"
- graceful-fs "^4.2.4"
- jest-haste-map "^26.6.2"
- jest-regex-util "^26.0.0"
- jest-util "^26.6.2"
- micromatch "^4.0.2"
- pirates "^4.0.1"
+ convert-source-map "^2.0.0"
+ fast-json-stable-stringify "^2.1.0"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-util "^29.7.0"
+ micromatch "^4.0.4"
+ pirates "^4.0.4"
slash "^3.0.0"
- source-map "^0.6.1"
- write-file-atomic "^3.0.0"
+ write-file-atomic "^4.0.2"
-"@jest/types@^26.6.2":
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e"
- integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==
+"@jest/types@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59"
+ integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==
dependencies:
+ "@jest/schemas" "^29.6.3"
"@types/istanbul-lib-coverage" "^2.0.0"
"@types/istanbul-reports" "^3.0.0"
"@types/node" "*"
- "@types/yargs" "^15.0.0"
+ "@types/yargs" "^17.0.8"
chalk "^4.0.0"
-"@sinonjs/commons@^1.7.0":
- version "1.8.1"
- resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217"
- integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==
+"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
+ integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==
+ dependencies:
+ "@jridgewell/set-array" "^1.0.1"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@jridgewell/resolve-uri@^3.1.0":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721"
+ integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
+
+"@jridgewell/set-array@^1.0.1":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
+ integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
+
+"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
+ version "1.4.15"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+
+"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9":
+ version "0.3.20"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f"
+ integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.1.0"
+ "@jridgewell/sourcemap-codec" "^1.4.14"
+
+"@sinclair/typebox@^0.27.8":
+ version "0.27.8"
+ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
+ integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
+
+"@sinonjs/commons@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72"
+ integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==
dependencies:
type-detect "4.0.8"
-"@sinonjs/fake-timers@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40"
- integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==
+"@sinonjs/fake-timers@^10.0.2":
+ version "10.3.0"
+ resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66"
+ integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==
dependencies:
- "@sinonjs/commons" "^1.7.0"
+ "@sinonjs/commons" "^3.0.0"
-"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7":
- version "7.1.12"
- resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d"
- integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==
+"@types/babel__core@^7.1.14":
+ version "7.20.4"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.4.tgz#26a87347e6c6f753b3668398e34496d6d9ac6ac0"
+ integrity sha512-mLnSC22IC4vcWiuObSRjrLd9XcBTGf59vUSoq2jkQDJ/QQ8PMI9rSuzE+aEV8karUMbskw07bKYoUJCKTUaygg==
dependencies:
- "@babel/parser" "^7.1.0"
- "@babel/types" "^7.0.0"
+ "@babel/parser" "^7.20.7"
+ "@babel/types" "^7.20.7"
"@types/babel__generator" "*"
"@types/babel__template" "*"
"@types/babel__traverse" "*"
"@types/babel__generator@*":
- version "7.6.2"
- resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8"
- integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==
+ version "7.6.7"
+ resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.7.tgz#a7aebf15c7bc0eb9abd638bdb5c0b8700399c9d0"
+ integrity sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==
dependencies:
"@babel/types" "^7.0.0"
"@types/babel__template@*":
- version "7.4.0"
- resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be"
- integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==
+ version "7.4.4"
+ resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f"
+ integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==
dependencies:
"@babel/parser" "^7.1.0"
"@babel/types" "^7.0.0"
-"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6":
- version "7.11.0"
- resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
- integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
+"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
+ version "7.20.4"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.4.tgz#ec2c06fed6549df8bc0eb4615b683749a4a92e1b"
+ integrity sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==
dependencies:
- "@babel/types" "^7.3.0"
+ "@babel/types" "^7.20.7"
+
+"@types/estree@^1.0.6":
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
+ integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
-"@types/graceful-fs@^4.1.2":
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.4.tgz#4ff9f641a7c6d1a3508ff88bc3141b152772e753"
- integrity sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg==
+"@types/graceful-fs@^4.1.3":
+ version "4.1.9"
+ resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4"
+ integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==
dependencies:
"@types/node" "*"
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
- integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
+ integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
"@types/istanbul-lib-report@*":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686"
- integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf"
+ integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==
dependencies:
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-reports@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821"
- integrity sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54"
+ integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
dependencies:
"@types/istanbul-lib-report" "*"
-"@types/minimatch@^3.0.3":
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
- integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
+"@types/json-schema@^7.0.15":
+ version "7.0.15"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
+ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
"@types/node@*":
- version "14.14.12"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.12.tgz#0b1d86f8c40141091285dea02e4940df73bba43f"
- integrity sha512-ASH8OPHMNlkdjrEdmoILmzFfsJICvhBsFfAum4aKZ/9U4B6M6tTmTPh+f3ttWdD74CEGV5XvXWkbyfSdXaTd7g==
-
-"@types/normalize-package-data@^2.4.0":
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
- integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
-
-"@types/parse-json@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
- integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
-
-"@types/prettier@^2.0.0":
- version "2.1.5"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.5.tgz#b6ab3bba29e16b821d84e09ecfaded462b816b00"
- integrity sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==
+ version "20.9.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.2.tgz#002815c8e87fe0c9369121c78b52e800fadc0ac6"
+ integrity sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==
+ dependencies:
+ undici-types "~5.26.4"
"@types/stack-utils@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"
- integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
+ integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
"@types/yargs-parser@*":
- version "15.0.0"
- resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"
- integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==
+ version "21.0.3"
+ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
+ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
-"@types/yargs@^15.0.0":
- version "15.0.11"
- resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.11.tgz#361d7579ecdac1527687bcebf9946621c12ab78c"
- integrity sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA==
+"@types/yargs@^17.0.8":
+ version "17.0.31"
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.31.tgz#8fd0089803fd55d8a285895a18b88cb71a99683c"
+ integrity sha512-bocYSx4DI8TmdlvxqGpVNXOgCNR1Jj0gNPhhAY+iz1rgKDAaYrAYdFYnhDV1IFuiuVc9HkOwyDcFxaTElF3/wg==
dependencies:
"@types/yargs-parser" "*"
-abab@^2.0.3:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
- integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==
-
-acorn-globals@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45"
- integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==
- dependencies:
- acorn "^7.1.1"
- acorn-walk "^7.1.1"
-
-acorn-jsx@^5.3.1:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
- integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
+acorn-jsx@^5.3.2:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
+ integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
-acorn-walk@^7.1.1:
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
- integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
+acorn@^8.11.3:
+ version "8.11.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
+ integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
-acorn@^7.1.1, acorn@^7.4.0:
- version "7.4.1"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
- integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
+acorn@^8.14.0:
+ version "8.14.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.1.tgz#721d5dc10f7d5b5609a891773d47731796935dfb"
+ integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==
-ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4:
+ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
@@ -641,45 +768,19 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-all-contributors-cli@^6.14.1:
- version "6.19.0"
- resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.19.0.tgz#7e4550973afede2476b62bd159fee6d72a1ad802"
- integrity sha512-QJN4iLeTeYpTZJES8XFTzQ+itA1qSyBbxLapJLtwrnY+kipyRhCX49fS/s/qftQQym9XLATMZUpUeEeJSox1sw==
- dependencies:
- "@babel/runtime" "^7.7.6"
- async "^3.0.1"
- chalk "^4.0.0"
- didyoumean "^1.2.1"
- inquirer "^7.0.4"
- json-fixer "^1.5.1"
- lodash "^4.11.2"
- node-fetch "^2.6.0"
- pify "^5.0.0"
- yargs "^15.0.1"
-
-ansi-colors@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
- integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
-
ansi-escapes@^4.2.1:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
- integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
+ version "4.3.2"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
+ integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
dependencies:
- type-fest "^0.11.0"
-
-ansi-regex@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
- integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+ type-fest "^0.21.3"
-ansi-regex@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
- integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
+ansi-regex@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
+ integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
@@ -693,18 +794,15 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"
-anymatch@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
- integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==
- dependencies:
- micromatch "^3.1.4"
- normalize-path "^2.1.1"
+ansi-styles@^5.0.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
+ integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
anymatch@^3.0.3:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
- integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
@@ -716,127 +814,49 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"
-arr-diff@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
- integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
-
-arr-flatten@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
- integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
-
-arr-union@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
- integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
-
-array-differ@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
- integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
-
-array-union@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
- integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
-
-array-unique@^0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
- integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
-
-arrify@^2.0.1:
+argparse@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
- integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
-
-asn1@~0.2.3:
- version "0.2.4"
- resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
- integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
- dependencies:
- safer-buffer "~2.1.0"
-
-assert-plus@1.0.0, assert-plus@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
- integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
-
-assign-symbols@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
- integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
-
-astral-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
- integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
-
-async@^3.0.1:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720"
- integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==
-
-asynckit@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
- integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
-
-atob@^2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
- integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
-
-aws-sign2@~0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
- integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
-
-aws4@^1.8.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
- integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
-
-babel-jest@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056"
- integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==
- dependencies:
- "@jest/transform" "^26.6.2"
- "@jest/types" "^26.6.2"
- "@types/babel__core" "^7.1.7"
- babel-plugin-istanbul "^6.0.0"
- babel-preset-jest "^26.6.2"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
+babel-jest@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5"
+ integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==
+ dependencies:
+ "@jest/transform" "^29.7.0"
+ "@types/babel__core" "^7.1.14"
+ babel-plugin-istanbul "^6.1.1"
+ babel-preset-jest "^29.6.3"
chalk "^4.0.0"
- graceful-fs "^4.2.4"
+ graceful-fs "^4.2.9"
slash "^3.0.0"
-babel-plugin-istanbul@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765"
- integrity sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==
+babel-plugin-istanbul@^6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"
+ integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@istanbuljs/load-nyc-config" "^1.0.0"
"@istanbuljs/schema" "^0.1.2"
- istanbul-lib-instrument "^4.0.0"
+ istanbul-lib-instrument "^5.0.4"
test-exclude "^6.0.0"
-babel-plugin-jest-hoist@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d"
- integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==
+babel-plugin-jest-hoist@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626"
+ integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==
dependencies:
"@babel/template" "^7.3.3"
"@babel/types" "^7.3.3"
- "@types/babel__core" "^7.0.0"
+ "@types/babel__core" "^7.1.14"
"@types/babel__traverse" "^7.0.6"
babel-preset-current-node-syntax@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz#cf5feef29551253471cfa82fc8e0f5063df07a77"
- integrity sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q==
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b"
+ integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==
dependencies:
"@babel/plugin-syntax-async-generators" "^7.8.4"
"@babel/plugin-syntax-bigint" "^7.8.3"
@@ -851,38 +871,18 @@ babel-preset-current-node-syntax@^1.0.0:
"@babel/plugin-syntax-optional-chaining" "^7.8.3"
"@babel/plugin-syntax-top-level-await" "^7.8.3"
-babel-preset-jest@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee"
- integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==
+babel-preset-jest@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c"
+ integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==
dependencies:
- babel-plugin-jest-hoist "^26.6.2"
+ babel-plugin-jest-hoist "^29.6.3"
babel-preset-current-node-syntax "^1.0.0"
balanced-match@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
- integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
-
-base@^0.11.1:
- version "0.11.2"
- resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
- integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
- dependencies:
- cache-base "^1.0.1"
- class-utils "^0.3.5"
- component-emitter "^1.2.1"
- define-property "^1.0.0"
- isobject "^3.0.1"
- mixin-deep "^1.2.0"
- pascalcase "^0.1.1"
-
-bcrypt-pbkdf@^1.0.0:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
- integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
- dependencies:
- tweetnacl "^0.14.3"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
brace-expansion@^1.1.7:
version "1.1.11"
@@ -892,33 +892,22 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"
-braces@^2.3.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
- integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
- dependencies:
- arr-flatten "^1.1.0"
- array-unique "^0.3.2"
- extend-shallow "^2.0.1"
- fill-range "^4.0.0"
- isobject "^3.0.1"
- repeat-element "^1.1.2"
- snapdragon "^0.8.1"
- snapdragon-node "^2.0.1"
- split-string "^3.0.2"
- to-regex "^3.0.1"
-
-braces@^3.0.1:
+braces@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
dependencies:
fill-range "^7.0.1"
-browser-process-hrtime@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
- integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
+browserslist@^4.21.9:
+ version "4.22.1"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619"
+ integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==
+ dependencies:
+ caniuse-lite "^1.0.30001541"
+ electron-to-chromium "^1.4.535"
+ node-releases "^2.0.13"
+ update-browserslist-db "^1.0.13"
bser@2.1.1:
version "2.1.1"
@@ -928,53 +917,31 @@ bser@2.1.1:
node-int64 "^0.4.0"
buffer-from@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
- integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
-
-cache-base@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
- integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
- dependencies:
- collection-visit "^1.0.0"
- component-emitter "^1.2.1"
- get-value "^2.0.6"
- has-value "^1.0.0"
- isobject "^3.0.1"
- set-value "^2.0.0"
- to-object-path "^0.3.0"
- union-value "^1.0.0"
- unset-value "^1.0.0"
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
+ integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
-camelcase@^5.0.0, camelcase@^5.3.1:
+camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
-camelcase@^6.0.0:
- version "6.2.0"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
- integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
-
-capture-exit@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4"
- integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==
- dependencies:
- rsvp "^4.8.4"
+camelcase@^6.2.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
+ integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
-caseless@~0.12.0:
- version "0.12.0"
- resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
- integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+caniuse-lite@^1.0.30001541:
+ version "1.0.30001563"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz#aa68a64188903e98f36eb9c56e48fba0c1fe2a32"
+ integrity sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==
-chalk@^2.0.0:
+chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -983,18 +950,10 @@ chalk@^2.0.0:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chalk@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
- integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
- dependencies:
- ansi-styles "^4.1.0"
- supports-color "^7.1.0"
-
-chalk@^4.0.0, chalk@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
- integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
+chalk@^4.0.0:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
+ integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
@@ -1004,69 +963,34 @@ char-regex@^1.0.2:
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
-chardet@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
- integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
-
-ci-info@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
- integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
-
-cjs-module-lexer@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f"
- integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==
-
-class-utils@^0.3.5:
- version "0.3.6"
- resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
- integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
- dependencies:
- arr-union "^3.1.0"
- define-property "^0.2.5"
- isobject "^3.0.0"
- static-extend "^0.1.1"
-
-cli-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
- integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
- dependencies:
- restore-cursor "^3.1.0"
+ci-info@^3.2.0:
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
+ integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
-cli-width@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
- integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
+cjs-module-lexer@^1.0.0:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
+ integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==
-cliui@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
- integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
+cliui@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
+ integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
dependencies:
string-width "^4.2.0"
- strip-ansi "^6.0.0"
- wrap-ansi "^6.2.0"
+ strip-ansi "^6.0.1"
+ wrap-ansi "^7.0.0"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
- integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
+ integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
collect-v8-coverage@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
- integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==
-
-collection-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
- integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
- dependencies:
- map-visit "^1.0.0"
- object-visit "^1.0.0"
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9"
+ integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==
color-convert@^1.9.0:
version "1.9.3"
@@ -1085,75 +1009,37 @@ color-convert@^2.0.1:
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
- integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+ integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-combined-stream@^1.0.6, combined-stream@~1.0.6:
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
- integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
- dependencies:
- delayed-stream "~1.0.0"
-
-compare-versions@^3.6.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
- integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
-
-component-emitter@^1.2.1:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
- integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
-
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
- integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
-
-convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
- integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
- dependencies:
- safe-buffer "~5.1.1"
-
-copy-descriptor@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
- integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+ integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
-core-util-is@1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
- integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+convert-source-map@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
+ integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
-cosmiconfig@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
- integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
+create-jest@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320"
+ integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==
dependencies:
- "@types/parse-json" "^4.0.0"
- import-fresh "^3.2.1"
- parse-json "^5.0.0"
- path-type "^4.0.0"
- yaml "^1.10.0"
-
-cross-spawn@^6.0.0:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
- integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
- dependencies:
- nice-try "^1.0.4"
- path-key "^2.0.1"
- semver "^5.5.0"
- shebang-command "^1.2.0"
- which "^1.2.9"
-
-cross-spawn@^7.0.0, cross-spawn@^7.0.2:
+ "@jest/types" "^29.6.3"
+ chalk "^4.0.0"
+ exit "^0.1.2"
+ graceful-fs "^4.2.9"
+ jest-config "^29.7.0"
+ jest-util "^29.7.0"
+ prompts "^2.0.1"
+
+cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@@ -1162,171 +1048,62 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2:
shebang-command "^2.0.0"
which "^2.0.1"
-cssom@^0.4.4:
- version "0.4.4"
- resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10"
- integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==
-
-cssom@~0.3.6:
- version "0.3.8"
- resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
- integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==
-
-cssstyle@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852"
- integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==
- dependencies:
- cssom "~0.3.6"
-
-dashdash@^1.12.0:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
- integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
- dependencies:
- assert-plus "^1.0.0"
-
-data-urls@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b"
- integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==
- dependencies:
- abab "^2.0.3"
- whatwg-mimetype "^2.3.0"
- whatwg-url "^8.0.0"
-
-debug@^2.2.0, debug@^2.3.3:
- version "2.6.9"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
- integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+cross-spawn@^7.0.6:
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
+ integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
dependencies:
- ms "2.0.0"
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
-debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
- integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
+debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
+ integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "2.1.2"
-decamelize@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
- integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
-
-decimal.js@^10.2.0:
- version "10.2.1"
- resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3"
- integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==
+dedent@^1.0.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff"
+ integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==
-decode-uri-component@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
- integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
-
-deep-is@^0.1.3, deep-is@~0.1.3:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
- integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
+deep-is@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
+ integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@^4.2.2:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
- integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
-
-define-property@^0.2.5:
- version "0.2.5"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
- integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
- dependencies:
- is-descriptor "^0.1.0"
-
-define-property@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
- integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
- dependencies:
- is-descriptor "^1.0.0"
-
-define-property@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
- integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
- dependencies:
- is-descriptor "^1.0.2"
- isobject "^3.0.1"
-
-delayed-stream@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
- integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
+ integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
detect-newline@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
-didyoumean@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"
- integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=
-
-diff-sequences@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
- integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
-
-doctrine@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
- integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
- dependencies:
- esutils "^2.0.2"
-
-domexception@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304"
- integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==
- dependencies:
- webidl-conversions "^5.0.0"
-
-ecc-jsbn@~0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
- integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
- dependencies:
- jsbn "~0.1.0"
- safer-buffer "^2.1.0"
+diff-sequences@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
+ integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==
-emittery@^0.7.1:
- version "0.7.2"
- resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82"
- integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==
+electron-to-chromium@^1.4.535:
+ version "1.4.588"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.588.tgz#d553f3c008e73488fb181fdf2601fdb0b1ffbb78"
+ integrity sha512-soytjxwbgcCu7nh5Pf4S2/4wa6UIu+A3p03U2yVr53qGxi1/VTR3ENI+p50v+UxqqZAfl48j3z55ud7VHIOr9w==
-emoji-regex@^7.0.1:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
- integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+emittery@^0.13.1:
+ version "0.13.1"
+ resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad"
+ integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
-end-of-stream@^1.1.0:
- version "1.4.4"
- resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
- integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
- dependencies:
- once "^1.4.0"
-
-enquirer@^2.3.5:
- version "2.3.6"
- resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
- integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
- dependencies:
- ansi-colors "^4.1.1"
-
error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
@@ -1334,119 +1111,121 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
+escalade@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
+
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
- integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+ integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
escape-string-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
-escodegen@^1.14.1:
- version "1.14.3"
- resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503"
- integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==
- dependencies:
- esprima "^4.0.1"
- estraverse "^4.2.0"
- esutils "^2.0.2"
- optionator "^0.8.1"
- optionalDependencies:
- source-map "~0.6.1"
+escape-string-regexp@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
+ integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
-eslint-config-prettier@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz#c1ae4106f74e6c0357f44adb076771d032ac0e97"
- integrity sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ==
+eslint-config-prettier@^10.0.2:
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.0.2.tgz#47444de8aa104ce82c2f91ad2a5e96b62c01e20d"
+ integrity sha512-1105/17ZIMjmCOJOPNfVdbXafLCLj3hPmkmB7dLgt7XsQ/zkxSuDerE/xgO3RxoHysR1N1whmquY0lSn2O0VLg==
-eslint-scope@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
- integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
+eslint-scope@^8.2.0:
+ version "8.2.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442"
+ integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==
dependencies:
esrecurse "^4.3.0"
- estraverse "^4.1.1"
-
-eslint-utils@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
- integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
- dependencies:
- eslint-visitor-keys "^1.1.0"
+ estraverse "^5.2.0"
-eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
- integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
+eslint-visitor-keys@^3.3.0:
+ version "3.4.3"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
+ integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
-eslint-visitor-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
- integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
+eslint-visitor-keys@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb"
+ integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==
-eslint@^7.8.1:
- version "7.15.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.15.0.tgz#eb155fb8ed0865fcf5d903f76be2e5b6cd7e0bc7"
- integrity sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==
- dependencies:
- "@babel/code-frame" "^7.0.0"
- "@eslint/eslintrc" "^0.2.2"
- ajv "^6.10.0"
+eslint-visitor-keys@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
+ integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
+
+eslint@^9.21.0:
+ version "9.21.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.21.0.tgz#b1c9c16f5153ff219791f627b94ab8f11f811591"
+ integrity sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/regexpp" "^4.12.1"
+ "@eslint/config-array" "^0.19.2"
+ "@eslint/core" "^0.12.0"
+ "@eslint/eslintrc" "^3.3.0"
+ "@eslint/js" "9.21.0"
+ "@eslint/plugin-kit" "^0.2.7"
+ "@humanfs/node" "^0.16.6"
+ "@humanwhocodes/module-importer" "^1.0.1"
+ "@humanwhocodes/retry" "^0.4.2"
+ "@types/estree" "^1.0.6"
+ "@types/json-schema" "^7.0.15"
+ ajv "^6.12.4"
chalk "^4.0.0"
- cross-spawn "^7.0.2"
- debug "^4.0.1"
- doctrine "^3.0.0"
- enquirer "^2.3.5"
- eslint-scope "^5.1.1"
- eslint-utils "^2.1.0"
- eslint-visitor-keys "^2.0.0"
- espree "^7.3.1"
- esquery "^1.2.0"
+ cross-spawn "^7.0.6"
+ debug "^4.3.2"
+ escape-string-regexp "^4.0.0"
+ eslint-scope "^8.2.0"
+ eslint-visitor-keys "^4.2.0"
+ espree "^10.3.0"
+ esquery "^1.5.0"
esutils "^2.0.2"
- file-entry-cache "^6.0.0"
- functional-red-black-tree "^1.0.1"
- glob-parent "^5.0.0"
- globals "^12.1.0"
- ignore "^4.0.6"
- import-fresh "^3.0.0"
+ fast-deep-equal "^3.1.3"
+ file-entry-cache "^8.0.0"
+ find-up "^5.0.0"
+ glob-parent "^6.0.2"
+ ignore "^5.2.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
- js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.4.1"
- lodash "^4.17.19"
- minimatch "^3.0.4"
+ lodash.merge "^4.6.2"
+ minimatch "^3.1.2"
natural-compare "^1.4.0"
- optionator "^0.9.1"
- progress "^2.0.0"
- regexpp "^3.1.0"
- semver "^7.2.1"
- strip-ansi "^6.0.0"
- strip-json-comments "^3.1.0"
- table "^5.2.3"
- text-table "^0.2.0"
- v8-compile-cache "^2.0.3"
+ optionator "^0.9.3"
+
+espree@^10.0.1:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f"
+ integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==
+ dependencies:
+ acorn "^8.11.3"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^4.0.0"
-espree@^7.3.0, espree@^7.3.1:
- version "7.3.1"
- resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6"
- integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==
+espree@^10.3.0:
+ version "10.3.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a"
+ integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==
dependencies:
- acorn "^7.4.0"
- acorn-jsx "^5.3.1"
- eslint-visitor-keys "^1.3.0"
+ acorn "^8.14.0"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^4.2.0"
-esprima@^4.0.0, esprima@^4.0.1:
+esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-esquery@^1.2.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
- integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
+esquery@^1.5.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7"
+ integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==
dependencies:
estraverse "^5.1.0"
@@ -1457,182 +1236,75 @@ esrecurse@^4.3.0:
dependencies:
estraverse "^5.2.0"
-estraverse@^4.1.1, estraverse@^4.2.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
- integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
-
estraverse@^5.1.0, estraverse@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
- integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
+ integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
-exec-sh@^0.3.2:
- version "0.3.4"
- resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5"
- integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==
-
-execa@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
- integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
- dependencies:
- cross-spawn "^6.0.0"
- get-stream "^4.0.0"
- is-stream "^1.1.0"
- npm-run-path "^2.0.0"
- p-finally "^1.0.0"
- signal-exit "^3.0.0"
- strip-eof "^1.0.0"
-
-execa@^4.0.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
- integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
+execa@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
+ integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
dependencies:
- cross-spawn "^7.0.0"
- get-stream "^5.0.0"
- human-signals "^1.1.1"
+ cross-spawn "^7.0.3"
+ get-stream "^6.0.0"
+ human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
- npm-run-path "^4.0.0"
- onetime "^5.1.0"
- signal-exit "^3.0.2"
+ npm-run-path "^4.0.1"
+ onetime "^5.1.2"
+ signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
- integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=
-
-expand-brackets@^2.1.4:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
- integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
- dependencies:
- debug "^2.3.3"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- posix-character-classes "^0.1.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-expect@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417"
- integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==
- dependencies:
- "@jest/types" "^26.6.2"
- ansi-styles "^4.0.0"
- jest-get-type "^26.3.0"
- jest-matcher-utils "^26.6.2"
- jest-message-util "^26.6.2"
- jest-regex-util "^26.0.0"
-
-extend-shallow@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
- integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
- dependencies:
- is-extendable "^0.1.0"
-
-extend-shallow@^3.0.0, extend-shallow@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
- integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
- dependencies:
- assign-symbols "^1.0.0"
- is-extendable "^1.0.1"
-
-extend@~3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
- integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+ integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
-external-editor@^3.0.3:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
- integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
+expect@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc"
+ integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==
dependencies:
- chardet "^0.7.0"
- iconv-lite "^0.4.24"
- tmp "^0.0.33"
-
-extglob@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
- integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
- dependencies:
- array-unique "^0.3.2"
- define-property "^1.0.0"
- expand-brackets "^2.1.4"
- extend-shallow "^2.0.1"
- fragment-cache "^0.2.1"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-extsprintf@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
- integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
-
-extsprintf@^1.2.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
- integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+ "@jest/expect-utils" "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
-fast-deep-equal@^3.1.1:
+fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
-fast-json-stable-stringify@^2.0.0:
+fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
-fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
+fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
- integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
+ integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fb-watchman@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
- integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c"
+ integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==
dependencies:
bser "2.1.1"
-figures@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
- integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
- dependencies:
- escape-string-regexp "^1.0.5"
-
-file-entry-cache@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz#7921a89c391c6d93efec2169ac6bf300c527ea0a"
- integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==
- dependencies:
- flat-cache "^3.0.4"
-
-fill-range@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
- integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+file-entry-cache@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
+ integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==
dependencies:
- extend-shallow "^2.0.1"
- is-number "^3.0.0"
- repeat-string "^1.6.1"
- to-regex-range "^2.1.0"
+ flat-cache "^4.0.0"
fill-range@^7.0.1:
version "7.0.1"
@@ -1649,78 +1321,48 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"
-find-versions@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e"
- integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
- dependencies:
- semver-regex "^2.0.0"
-
-flat-cache@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11"
- integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==
+find-up@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
+ integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
dependencies:
- flatted "^3.1.0"
- rimraf "^3.0.2"
-
-flatted@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067"
- integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==
-
-for-in@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
- integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
-
-forever-agent@~0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
- integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+ locate-path "^6.0.0"
+ path-exists "^4.0.0"
-form-data@~2.3.2:
- version "2.3.3"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
- integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+flat-cache@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c"
+ integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==
dependencies:
- asynckit "^0.4.0"
- combined-stream "^1.0.6"
- mime-types "^2.1.12"
+ flatted "^3.2.9"
+ keyv "^4.5.4"
-fragment-cache@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
- integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
- dependencies:
- map-cache "^0.2.2"
+flatted@^3.2.9:
+ version "3.2.9"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf"
+ integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
- integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
-
-fsevents@^2.1.2:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.2.1.tgz#1fb02ded2036a8ac288d507a65962bd87b97628d"
- integrity sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA==
+ integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
-function-bind@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
- integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+fsevents@^2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
-functional-red-black-tree@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
- integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+function-bind@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
-gensync@^1.0.0-beta.1:
+gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
-get-caller-file@^2.0.1:
+get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
@@ -1730,48 +1372,27 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
-get-stream@^4.0.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
- integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
- dependencies:
- pump "^3.0.0"
-
-get-stream@^5.0.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
- integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
- dependencies:
- pump "^3.0.0"
-
-get-value@^2.0.3, get-value@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
- integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
-
-getpass@^0.1.1:
- version "0.1.7"
- resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
- integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
- dependencies:
- assert-plus "^1.0.0"
+get-stream@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
+ integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
-glob-parent@^5.0.0:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
- integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
+glob-parent@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
dependencies:
- is-glob "^4.0.1"
+ is-glob "^4.0.3"
-glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
- version "7.1.6"
- resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
- integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+glob@^7.1.3, glob@^7.1.4:
+ version "7.2.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
+ integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
- minimatch "^3.0.4"
+ minimatch "^3.1.1"
once "^1.3.0"
path-is-absolute "^1.0.0"
@@ -1780,160 +1401,75 @@ globals@^11.1.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
-globals@^12.1.0:
- version "12.4.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
- integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==
- dependencies:
- type-fest "^0.8.1"
-
-graceful-fs@^4.2.4:
- version "4.2.4"
- resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
- integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
+globals@^14.0.0:
+ version "14.0.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
+ integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
-growly@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
- integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
-
-har-schema@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
- integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+globals@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-16.0.0.tgz#3d7684652c5c4fbd086ec82f9448214da49382d8"
+ integrity sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==
-har-validator@~5.1.3:
- version "5.1.5"
- resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd"
- integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==
- dependencies:
- ajv "^6.12.3"
- har-schema "^2.0.0"
+graceful-fs@^4.2.9:
+ version "4.2.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
+ integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
- integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+ integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
-has-value@^0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
- integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
- dependencies:
- get-value "^2.0.3"
- has-values "^0.1.4"
- isobject "^2.0.0"
-
-has-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
- integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
- dependencies:
- get-value "^2.0.6"
- has-values "^1.0.0"
- isobject "^3.0.0"
-
-has-values@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
- integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
-
-has-values@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
- integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
- dependencies:
- is-number "^3.0.0"
- kind-of "^4.0.0"
-
-has@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
- integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
- dependencies:
- function-bind "^1.1.1"
-
-hosted-git-info@^2.1.4:
- version "2.8.8"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
- integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
-
-html-encoding-sniffer@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3"
- integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==
+hasown@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c"
+ integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==
dependencies:
- whatwg-encoding "^1.0.5"
+ function-bind "^1.1.2"
html-escaper@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
-http-signature@~1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
- integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
- dependencies:
- assert-plus "^1.0.0"
- jsprim "^1.2.2"
- sshpk "^1.7.0"
-
-human-signals@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
- integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
-
-husky@^4.3.5:
- version "4.3.6"
- resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.6.tgz#ebd9dd8b9324aa851f1587318db4cccb7665a13c"
- integrity sha512-o6UjVI8xtlWRL5395iWq9LKDyp/9TE7XMOTvIpEVzW638UcGxTmV5cfel6fsk/jbZSTlvfGVJf2svFtybcIZag==
- dependencies:
- chalk "^4.0.0"
- ci-info "^2.0.0"
- compare-versions "^3.6.0"
- cosmiconfig "^7.0.0"
- find-versions "^3.2.0"
- opencollective-postinstall "^2.0.2"
- pkg-dir "^4.2.0"
- please-upgrade-node "^3.2.0"
- slash "^3.0.0"
- which-pm-runs "^1.0.0"
+human-signals@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
+ integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
-iconv-lite@0.4.24, iconv-lite@^0.4.24:
- version "0.4.24"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
- integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
- dependencies:
- safer-buffer ">= 2.1.2 < 3"
+husky@^9.1.7:
+ version "9.1.7"
+ resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
+ integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
-ignore@^4.0.6:
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
- integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
+ignore@^5.2.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
+ integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==
-ignore@^5.1.4:
- version "5.1.8"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
- integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
+ignore@^7.0.3:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.3.tgz#397ef9315dfe0595671eefe8b633fec6943ab733"
+ integrity sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==
-import-fresh@^3.0.0, import-fresh@^3.2.1:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.2.tgz#fc129c160c5d68235507f4331a6baad186bdbc3e"
- integrity sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==
+import-fresh@^3.2.1:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
+ integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"
import-local@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6"
- integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"
+ integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==
dependencies:
pkg-dir "^4.2.0"
resolve-cwd "^3.0.0"
@@ -1941,12 +1477,12 @@ import-local@^3.0.2:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
- integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+ integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
- integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
dependencies:
once "^1.3.0"
wrappy "1"
@@ -1956,126 +1492,22 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
-inquirer@^7.0.4:
- version "7.3.3"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
- integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
- dependencies:
- ansi-escapes "^4.2.1"
- chalk "^4.1.0"
- cli-cursor "^3.1.0"
- cli-width "^3.0.0"
- external-editor "^3.0.3"
- figures "^3.0.0"
- lodash "^4.17.19"
- mute-stream "0.0.8"
- run-async "^2.4.0"
- rxjs "^6.6.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
- through "^2.3.6"
-
-ip-regex@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
- integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
-
-is-accessor-descriptor@^0.1.6:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
- integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
- dependencies:
- kind-of "^3.0.2"
-
-is-accessor-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
- integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
- dependencies:
- kind-of "^6.0.0"
-
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
- integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
-
-is-buffer@^1.1.5:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
- integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-
-is-ci@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
- integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
- dependencies:
- ci-info "^2.0.0"
-
-is-core-module@^2.1.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
- integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
- dependencies:
- has "^1.0.3"
-
-is-data-descriptor@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
- integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
- dependencies:
- kind-of "^3.0.2"
-
-is-data-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
- integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
- dependencies:
- kind-of "^6.0.0"
-
-is-descriptor@^0.1.0:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
- integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
- dependencies:
- is-accessor-descriptor "^0.1.6"
- is-data-descriptor "^0.1.4"
- kind-of "^5.0.0"
-
-is-descriptor@^1.0.0, is-descriptor@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
- integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
- dependencies:
- is-accessor-descriptor "^1.0.0"
- is-data-descriptor "^1.0.0"
- kind-of "^6.0.2"
+ integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==
-is-docker@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156"
- integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==
-
-is-extendable@^0.1.0, is-extendable@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
- integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
-
-is-extendable@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
- integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+is-core-module@^2.13.0:
+ version "2.13.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
+ integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
dependencies:
- is-plain-object "^2.0.4"
+ hasown "^2.0.0"
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
- integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
-
-is-fullwidth-code-point@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
- integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
@@ -2087,504 +1519,438 @@ is-generator-fn@^2.0.0:
resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
-is-glob@^4.0.0, is-glob@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
- integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+is-glob@^4.0.0, is-glob@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
dependencies:
is-extglob "^2.1.1"
-is-number@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
- integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
- dependencies:
- kind-of "^3.0.2"
-
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
-is-plain-object@^2.0.3, is-plain-object@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
- integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
- dependencies:
- isobject "^3.0.1"
-
-is-potential-custom-element-name@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397"
- integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c=
-
-is-stream@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
- integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
-
is-stream@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
- integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
-
-is-typedarray@^1.0.0, is-typedarray@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
- integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
-
-is-windows@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
- integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
-
-is-wsl@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
- integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
- dependencies:
- is-docker "^2.0.0"
-
-isarray@1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
- integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
+ integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
- integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
-
-isobject@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
- integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
- dependencies:
- isarray "1.0.0"
-
-isobject@^3.0.0, isobject@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
- integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
-
-isstream@~0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
- integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+ integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
-istanbul-lib-coverage@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec"
- integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==
+istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756"
+ integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==
-istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d"
- integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==
+istanbul-lib-instrument@^5.0.4:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d"
+ integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==
dependencies:
- "@babel/core" "^7.7.5"
+ "@babel/core" "^7.12.3"
+ "@babel/parser" "^7.14.7"
"@istanbuljs/schema" "^0.1.2"
- istanbul-lib-coverage "^3.0.0"
+ istanbul-lib-coverage "^3.2.0"
semver "^6.3.0"
+istanbul-lib-instrument@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf"
+ integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==
+ dependencies:
+ "@babel/core" "^7.12.3"
+ "@babel/parser" "^7.14.7"
+ "@istanbuljs/schema" "^0.1.2"
+ istanbul-lib-coverage "^3.2.0"
+ semver "^7.5.4"
+
istanbul-lib-report@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6"
- integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d"
+ integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==
dependencies:
istanbul-lib-coverage "^3.0.0"
- make-dir "^3.0.0"
+ make-dir "^4.0.0"
supports-color "^7.1.0"
istanbul-lib-source-maps@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9"
- integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551"
+ integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==
dependencies:
debug "^4.1.1"
istanbul-lib-coverage "^3.0.0"
source-map "^0.6.1"
-istanbul-reports@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b"
- integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==
+istanbul-reports@^3.1.3:
+ version "3.1.6"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a"
+ integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==
dependencies:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"
-jest-changed-files@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0"
- integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==
+jest-changed-files@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a"
+ integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==
dependencies:
- "@jest/types" "^26.6.2"
- execa "^4.0.0"
- throat "^5.0.0"
+ execa "^5.0.0"
+ jest-util "^29.7.0"
+ p-limit "^3.1.0"
-jest-cli@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a"
- integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==
+jest-circus@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a"
+ integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==
dependencies:
- "@jest/core" "^26.6.3"
- "@jest/test-result" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/environment" "^29.7.0"
+ "@jest/expect" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
chalk "^4.0.0"
- exit "^0.1.2"
- graceful-fs "^4.2.4"
- import-local "^3.0.2"
- is-ci "^2.0.0"
- jest-config "^26.6.3"
- jest-util "^26.6.2"
- jest-validate "^26.6.2"
- prompts "^2.0.1"
- yargs "^15.4.1"
+ co "^4.6.0"
+ dedent "^1.0.0"
+ is-generator-fn "^2.0.0"
+ jest-each "^29.7.0"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
+ p-limit "^3.1.0"
+ pretty-format "^29.7.0"
+ pure-rand "^6.0.0"
+ slash "^3.0.0"
+ stack-utils "^2.0.3"
-jest-config@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349"
- integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==
+jest-cli@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995"
+ integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==
dependencies:
- "@babel/core" "^7.1.0"
- "@jest/test-sequencer" "^26.6.3"
- "@jest/types" "^26.6.2"
- babel-jest "^26.6.3"
+ "@jest/core" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ chalk "^4.0.0"
+ create-jest "^29.7.0"
+ exit "^0.1.2"
+ import-local "^3.0.2"
+ jest-config "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ yargs "^17.3.1"
+
+jest-config@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f"
+ integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==
+ dependencies:
+ "@babel/core" "^7.11.6"
+ "@jest/test-sequencer" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ babel-jest "^29.7.0"
chalk "^4.0.0"
+ ci-info "^3.2.0"
deepmerge "^4.2.2"
- glob "^7.1.1"
- graceful-fs "^4.2.4"
- jest-environment-jsdom "^26.6.2"
- jest-environment-node "^26.6.2"
- jest-get-type "^26.3.0"
- jest-jasmine2 "^26.6.3"
- jest-regex-util "^26.0.0"
- jest-resolve "^26.6.2"
- jest-util "^26.6.2"
- jest-validate "^26.6.2"
- micromatch "^4.0.2"
- pretty-format "^26.6.2"
-
-jest-diff@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394"
- integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==
+ glob "^7.1.3"
+ graceful-fs "^4.2.9"
+ jest-circus "^29.7.0"
+ jest-environment-node "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-runner "^29.7.0"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ micromatch "^4.0.4"
+ parse-json "^5.2.0"
+ pretty-format "^29.7.0"
+ slash "^3.0.0"
+ strip-json-comments "^3.1.1"
+
+jest-diff@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a"
+ integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==
dependencies:
chalk "^4.0.0"
- diff-sequences "^26.6.2"
- jest-get-type "^26.3.0"
- pretty-format "^26.6.2"
+ diff-sequences "^29.6.3"
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
-jest-docblock@^26.0.0:
- version "26.0.0"
- resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5"
- integrity sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==
+jest-docblock@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a"
+ integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==
dependencies:
detect-newline "^3.0.0"
-jest-each@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb"
- integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==
+jest-each@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1"
+ integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==
dependencies:
- "@jest/types" "^26.6.2"
+ "@jest/types" "^29.6.3"
chalk "^4.0.0"
- jest-get-type "^26.3.0"
- jest-util "^26.6.2"
- pretty-format "^26.6.2"
-
-jest-environment-jsdom@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e"
- integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==
- dependencies:
- "@jest/environment" "^26.6.2"
- "@jest/fake-timers" "^26.6.2"
- "@jest/types" "^26.6.2"
+ jest-get-type "^29.6.3"
+ jest-util "^29.7.0"
+ pretty-format "^29.7.0"
+
+jest-environment-node@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376"
+ integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
- jest-mock "^26.6.2"
- jest-util "^26.6.2"
- jsdom "^16.4.0"
-
-jest-environment-node@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c"
- integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==
- dependencies:
- "@jest/environment" "^26.6.2"
- "@jest/fake-timers" "^26.6.2"
- "@jest/types" "^26.6.2"
- "@types/node" "*"
- jest-mock "^26.6.2"
- jest-util "^26.6.2"
+ jest-mock "^29.7.0"
+ jest-util "^29.7.0"
-jest-get-type@^26.3.0:
- version "26.3.0"
- resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0"
- integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==
+jest-get-type@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
+ integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==
-jest-haste-map@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa"
- integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==
+jest-haste-map@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104"
+ integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==
dependencies:
- "@jest/types" "^26.6.2"
- "@types/graceful-fs" "^4.1.2"
+ "@jest/types" "^29.6.3"
+ "@types/graceful-fs" "^4.1.3"
"@types/node" "*"
anymatch "^3.0.3"
fb-watchman "^2.0.0"
- graceful-fs "^4.2.4"
- jest-regex-util "^26.0.0"
- jest-serializer "^26.6.2"
- jest-util "^26.6.2"
- jest-worker "^26.6.2"
- micromatch "^4.0.2"
- sane "^4.0.3"
- walker "^1.0.7"
+ graceful-fs "^4.2.9"
+ jest-regex-util "^29.6.3"
+ jest-util "^29.7.0"
+ jest-worker "^29.7.0"
+ micromatch "^4.0.4"
+ walker "^1.0.8"
optionalDependencies:
- fsevents "^2.1.2"
-
-jest-jasmine2@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd"
- integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==
- dependencies:
- "@babel/traverse" "^7.1.0"
- "@jest/environment" "^26.6.2"
- "@jest/source-map" "^26.6.2"
- "@jest/test-result" "^26.6.2"
- "@jest/types" "^26.6.2"
- "@types/node" "*"
- chalk "^4.0.0"
- co "^4.6.0"
- expect "^26.6.2"
- is-generator-fn "^2.0.0"
- jest-each "^26.6.2"
- jest-matcher-utils "^26.6.2"
- jest-message-util "^26.6.2"
- jest-runtime "^26.6.3"
- jest-snapshot "^26.6.2"
- jest-util "^26.6.2"
- pretty-format "^26.6.2"
- throat "^5.0.0"
-
-jest-leak-detector@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af"
- integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==
- dependencies:
- jest-get-type "^26.3.0"
- pretty-format "^26.6.2"
-
-jest-matcher-utils@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a"
- integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==
+ fsevents "^2.3.2"
+
+jest-leak-detector@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728"
+ integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==
+ dependencies:
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
+
+jest-matcher-utils@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12"
+ integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==
dependencies:
chalk "^4.0.0"
- jest-diff "^26.6.2"
- jest-get-type "^26.3.0"
- pretty-format "^26.6.2"
+ jest-diff "^29.7.0"
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
-jest-message-util@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07"
- integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==
+jest-message-util@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
+ integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==
dependencies:
- "@babel/code-frame" "^7.0.0"
- "@jest/types" "^26.6.2"
+ "@babel/code-frame" "^7.12.13"
+ "@jest/types" "^29.6.3"
"@types/stack-utils" "^2.0.0"
chalk "^4.0.0"
- graceful-fs "^4.2.4"
- micromatch "^4.0.2"
- pretty-format "^26.6.2"
+ graceful-fs "^4.2.9"
+ micromatch "^4.0.4"
+ pretty-format "^29.7.0"
slash "^3.0.0"
- stack-utils "^2.0.2"
+ stack-utils "^2.0.3"
-jest-mock@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302"
- integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==
+jest-mock@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347"
+ integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==
dependencies:
- "@jest/types" "^26.6.2"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
+ jest-util "^29.7.0"
jest-pnp-resolver@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"
- integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==
-
-jest-regex-util@^26.0.0:
- version "26.0.0"
- resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28"
- integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==
-
-jest-resolve-dependencies@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6"
- integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==
- dependencies:
- "@jest/types" "^26.6.2"
- jest-regex-util "^26.0.0"
- jest-snapshot "^26.6.2"
-
-jest-resolve@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507"
- integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==
- dependencies:
- "@jest/types" "^26.6.2"
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
+ integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
+
+jest-regex-util@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52"
+ integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==
+
+jest-resolve-dependencies@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428"
+ integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==
+ dependencies:
+ jest-regex-util "^29.6.3"
+ jest-snapshot "^29.7.0"
+
+jest-resolve@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30"
+ integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==
+ dependencies:
chalk "^4.0.0"
- graceful-fs "^4.2.4"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
jest-pnp-resolver "^1.2.2"
- jest-util "^26.6.2"
- read-pkg-up "^7.0.1"
- resolve "^1.18.1"
+ jest-util "^29.7.0"
+ jest-validate "^29.7.0"
+ resolve "^1.20.0"
+ resolve.exports "^2.0.0"
slash "^3.0.0"
-jest-runner@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159"
- integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==
+jest-runner@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e"
+ integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==
dependencies:
- "@jest/console" "^26.6.2"
- "@jest/environment" "^26.6.2"
- "@jest/test-result" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/console" "^29.7.0"
+ "@jest/environment" "^29.7.0"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
chalk "^4.0.0"
- emittery "^0.7.1"
- exit "^0.1.2"
- graceful-fs "^4.2.4"
- jest-config "^26.6.3"
- jest-docblock "^26.0.0"
- jest-haste-map "^26.6.2"
- jest-leak-detector "^26.6.2"
- jest-message-util "^26.6.2"
- jest-resolve "^26.6.2"
- jest-runtime "^26.6.3"
- jest-util "^26.6.2"
- jest-worker "^26.6.2"
- source-map-support "^0.5.6"
- throat "^5.0.0"
-
-jest-runtime@^26.6.3:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b"
- integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==
- dependencies:
- "@jest/console" "^26.6.2"
- "@jest/environment" "^26.6.2"
- "@jest/fake-timers" "^26.6.2"
- "@jest/globals" "^26.6.2"
- "@jest/source-map" "^26.6.2"
- "@jest/test-result" "^26.6.2"
- "@jest/transform" "^26.6.2"
- "@jest/types" "^26.6.2"
- "@types/yargs" "^15.0.0"
+ emittery "^0.13.1"
+ graceful-fs "^4.2.9"
+ jest-docblock "^29.7.0"
+ jest-environment-node "^29.7.0"
+ jest-haste-map "^29.7.0"
+ jest-leak-detector "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-resolve "^29.7.0"
+ jest-runtime "^29.7.0"
+ jest-util "^29.7.0"
+ jest-watcher "^29.7.0"
+ jest-worker "^29.7.0"
+ p-limit "^3.1.0"
+ source-map-support "0.5.13"
+
+jest-runtime@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817"
+ integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==
+ dependencies:
+ "@jest/environment" "^29.7.0"
+ "@jest/fake-timers" "^29.7.0"
+ "@jest/globals" "^29.7.0"
+ "@jest/source-map" "^29.6.3"
+ "@jest/test-result" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ "@types/node" "*"
chalk "^4.0.0"
- cjs-module-lexer "^0.6.0"
+ cjs-module-lexer "^1.0.0"
collect-v8-coverage "^1.0.0"
- exit "^0.1.2"
glob "^7.1.3"
- graceful-fs "^4.2.4"
- jest-config "^26.6.3"
- jest-haste-map "^26.6.2"
- jest-message-util "^26.6.2"
- jest-mock "^26.6.2"
- jest-regex-util "^26.0.0"
- jest-resolve "^26.6.2"
- jest-snapshot "^26.6.2"
- jest-util "^26.6.2"
- jest-validate "^26.6.2"
+ graceful-fs "^4.2.9"
+ jest-haste-map "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-mock "^29.7.0"
+ jest-regex-util "^29.6.3"
+ jest-resolve "^29.7.0"
+ jest-snapshot "^29.7.0"
+ jest-util "^29.7.0"
slash "^3.0.0"
strip-bom "^4.0.0"
- yargs "^15.4.1"
-
-jest-serializer@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1"
- integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==
- dependencies:
- "@types/node" "*"
- graceful-fs "^4.2.4"
-jest-snapshot@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84"
- integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==
+jest-snapshot@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5"
+ integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==
dependencies:
- "@babel/types" "^7.0.0"
- "@jest/types" "^26.6.2"
- "@types/babel__traverse" "^7.0.4"
- "@types/prettier" "^2.0.0"
+ "@babel/core" "^7.11.6"
+ "@babel/generator" "^7.7.2"
+ "@babel/plugin-syntax-jsx" "^7.7.2"
+ "@babel/plugin-syntax-typescript" "^7.7.2"
+ "@babel/types" "^7.3.3"
+ "@jest/expect-utils" "^29.7.0"
+ "@jest/transform" "^29.7.0"
+ "@jest/types" "^29.6.3"
+ babel-preset-current-node-syntax "^1.0.0"
chalk "^4.0.0"
- expect "^26.6.2"
- graceful-fs "^4.2.4"
- jest-diff "^26.6.2"
- jest-get-type "^26.3.0"
- jest-haste-map "^26.6.2"
- jest-matcher-utils "^26.6.2"
- jest-message-util "^26.6.2"
- jest-resolve "^26.6.2"
+ expect "^29.7.0"
+ graceful-fs "^4.2.9"
+ jest-diff "^29.7.0"
+ jest-get-type "^29.6.3"
+ jest-matcher-utils "^29.7.0"
+ jest-message-util "^29.7.0"
+ jest-util "^29.7.0"
natural-compare "^1.4.0"
- pretty-format "^26.6.2"
- semver "^7.3.2"
+ pretty-format "^29.7.0"
+ semver "^7.5.3"
-jest-util@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1"
- integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==
+jest-util@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
+ integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==
dependencies:
- "@jest/types" "^26.6.2"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
chalk "^4.0.0"
- graceful-fs "^4.2.4"
- is-ci "^2.0.0"
- micromatch "^4.0.2"
+ ci-info "^3.2.0"
+ graceful-fs "^4.2.9"
+ picomatch "^2.2.3"
-jest-validate@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec"
- integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==
+jest-validate@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c"
+ integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==
dependencies:
- "@jest/types" "^26.6.2"
- camelcase "^6.0.0"
+ "@jest/types" "^29.6.3"
+ camelcase "^6.2.0"
chalk "^4.0.0"
- jest-get-type "^26.3.0"
+ jest-get-type "^29.6.3"
leven "^3.1.0"
- pretty-format "^26.6.2"
+ pretty-format "^29.7.0"
-jest-watcher@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975"
- integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==
+jest-watcher@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2"
+ integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==
dependencies:
- "@jest/test-result" "^26.6.2"
- "@jest/types" "^26.6.2"
+ "@jest/test-result" "^29.7.0"
+ "@jest/types" "^29.6.3"
"@types/node" "*"
ansi-escapes "^4.2.1"
chalk "^4.0.0"
- jest-util "^26.6.2"
+ emittery "^0.13.1"
+ jest-util "^29.7.0"
string-length "^4.0.1"
-jest-worker@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
- integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
+jest-worker@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a"
+ integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==
dependencies:
"@types/node" "*"
+ jest-util "^29.7.0"
merge-stream "^2.0.0"
- supports-color "^7.0.0"
+ supports-color "^8.0.0"
-jest@^26.0.0:
- version "26.6.3"
- resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef"
- integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==
+jest@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613"
+ integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==
dependencies:
- "@jest/core" "^26.6.3"
+ "@jest/core" "^29.7.0"
+ "@jest/types" "^29.6.3"
import-local "^3.0.2"
- jest-cli "^26.6.3"
+ jest-cli "^29.7.0"
js-tokens@^4.0.0:
version "4.0.0"
@@ -2599,56 +1965,22 @@ js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"
-jsbn@~0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
- integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
-
-jsdom@^16.4.0:
- version "16.4.0"
- resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb"
- integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==
- dependencies:
- abab "^2.0.3"
- acorn "^7.1.1"
- acorn-globals "^6.0.0"
- cssom "^0.4.4"
- cssstyle "^2.2.0"
- data-urls "^2.0.0"
- decimal.js "^10.2.0"
- domexception "^2.0.1"
- escodegen "^1.14.1"
- html-encoding-sniffer "^2.0.1"
- is-potential-custom-element-name "^1.0.0"
- nwsapi "^2.2.0"
- parse5 "5.1.1"
- request "^2.88.2"
- request-promise-native "^1.0.8"
- saxes "^5.0.0"
- symbol-tree "^3.2.4"
- tough-cookie "^3.0.1"
- w3c-hr-time "^1.0.2"
- w3c-xmlserializer "^2.0.0"
- webidl-conversions "^6.1.0"
- whatwg-encoding "^1.0.5"
- whatwg-mimetype "^2.3.0"
- whatwg-url "^8.0.0"
- ws "^7.2.3"
- xml-name-validator "^3.0.0"
+js-yaml@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
+ integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+ dependencies:
+ argparse "^2.0.1"
jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
-json-fixer@^1.5.1:
- version "1.6.8"
- resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.6.8.tgz#4a1930af55ca0baa410c3a2cdf2b065ba87121ed"
- integrity sha512-VUI3GPVLpM/nYmM1tSuvd3kh36eWvoNO1SFveVQf5k9QJI3kfaoOPVbN7WbpRfvZqa2BFySyVuqSs57laYfIDQ==
- dependencies:
- "@babel/runtime" "^7.12.5"
- chalk "^4.1.0"
- pegjs "^0.10.0"
+json-buffer@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
+ integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
json-parse-even-better-errors@^2.3.0:
version "2.3.1"
@@ -2660,66 +1992,27 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
-json-schema@0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
- integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
-
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
- integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
+ integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
-json-stringify-safe@~5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
- integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+json5@^2.2.3:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
+ integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
-json5@^2.1.2:
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
- integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
+keyv@^4.5.4:
+ version "4.5.4"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
+ integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
dependencies:
- minimist "^1.2.5"
+ json-buffer "3.0.1"
-jsprim@^1.2.2:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
- integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
- dependencies:
- assert-plus "1.0.0"
- extsprintf "1.3.0"
- json-schema "0.2.3"
- verror "1.10.0"
-
-kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
- integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
- dependencies:
- is-buffer "^1.1.5"
-
-kind-of@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
- integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
- dependencies:
- is-buffer "^1.1.5"
-
-kind-of@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
- integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
-
-kind-of@^6.0.0, kind-of@^6.0.2:
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
- integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
-
-kleur@^3.0.3:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
- integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
+kleur@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
+ integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
leven@^3.1.0:
version "3.1.0"
@@ -2734,18 +2027,10 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"
-levn@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
- integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
- dependencies:
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
-
lines-and-columns@^1.1.6:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
- integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
+ integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
locate-path@^5.0.0:
version "5.0.0"
@@ -2754,15 +2039,24 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
-lodash.sortby@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
- integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
+locate-path@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
+ integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
+ dependencies:
+ p-locate "^5.0.0"
+
+lodash.merge@^4.6.2:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
-lodash@^4.11.2, lodash@^4.17.14, lodash@^4.17.19:
- version "4.17.20"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
- integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
+lru-cache@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
+ dependencies:
+ yallist "^3.0.2"
lru-cache@^6.0.0:
version "6.0.0"
@@ -2771,312 +2065,107 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
-make-dir@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
- integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
- dependencies:
- semver "^6.0.0"
-
-makeerror@1.0.x:
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
- integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=
+make-dir@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
+ integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==
dependencies:
- tmpl "1.0.x"
+ semver "^7.5.3"
-map-cache@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
- integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
-
-map-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
- integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+makeerror@1.0.12:
+ version "1.0.12"
+ resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a"
+ integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==
dependencies:
- object-visit "^1.0.0"
+ tmpl "1.0.5"
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
-micromatch@^3.1.4:
- version "3.1.10"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
- integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- braces "^2.3.1"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- extglob "^2.0.4"
- fragment-cache "^0.2.1"
- kind-of "^6.0.2"
- nanomatch "^1.2.9"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.2"
-
-micromatch@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
- integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
+micromatch@^4.0.4:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
+ integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
dependencies:
- braces "^3.0.1"
- picomatch "^2.0.5"
-
-mime-db@1.44.0:
- version "1.44.0"
- resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
- integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
-
-mime-types@^2.1.12, mime-types@~2.1.19:
- version "2.1.27"
- resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
- integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
- dependencies:
- mime-db "1.44.0"
+ braces "^3.0.2"
+ picomatch "^2.3.1"
mimic-fn@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-minimatch@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
- integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"
-minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
- integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
-
-mixin-deep@^1.2.0:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
- integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
- dependencies:
- for-in "^1.0.2"
- is-extendable "^1.0.1"
-
-mri@^1.1.5:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6"
- integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==
-
-ms@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
- integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+mri@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"
+ integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-multimatch@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
- integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
- dependencies:
- "@types/minimatch" "^3.0.3"
- array-differ "^3.0.0"
- array-union "^2.1.0"
- arrify "^2.0.1"
- minimatch "^3.0.4"
-
-mute-stream@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
- integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
-
-nanomatch@^1.2.9:
- version "1.2.13"
- resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
- integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- fragment-cache "^0.2.1"
- is-windows "^1.0.2"
- kind-of "^6.0.2"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
- integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
-
-nice-try@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
- integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
-
-node-fetch@^2.6.0:
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
- integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
+ integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
node-int64@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
- integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=
+ integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
-node-modules-regexp@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40"
- integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
-
-node-notifier@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620"
- integrity sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==
- dependencies:
- growly "^1.3.0"
- is-wsl "^2.2.0"
- semver "^7.3.2"
- shellwords "^0.1.1"
- uuid "^8.3.0"
- which "^2.0.2"
-
-normalize-package-data@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
- integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
- dependencies:
- hosted-git-info "^2.1.4"
- resolve "^1.10.0"
- semver "2 || 3 || 4 || 5"
- validate-npm-package-license "^3.0.1"
-
-normalize-path@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
- integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
- dependencies:
- remove-trailing-separator "^1.0.1"
+node-releases@^2.0.13:
+ version "2.0.13"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
+ integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
normalize-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
-npm-run-path@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
- integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
- dependencies:
- path-key "^2.0.0"
-
-npm-run-path@^4.0.0:
+npm-run-path@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
dependencies:
path-key "^3.0.0"
-nwsapi@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
- integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
-
-oauth-sign@~0.9.0:
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
- integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
-
-object-copy@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
- integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
- dependencies:
- copy-descriptor "^0.1.0"
- define-property "^0.2.5"
- kind-of "^3.0.3"
-
-object-visit@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
- integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
- dependencies:
- isobject "^3.0.0"
-
-object.pick@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
- integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
- dependencies:
- isobject "^3.0.1"
-
-once@^1.3.0, once@^1.3.1, once@^1.4.0:
+once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
- integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies:
wrappy "1"
-onetime@^5.1.0:
+onetime@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
dependencies:
mimic-fn "^2.1.0"
-opencollective-postinstall@^2.0.2:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
- integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
-
-optionator@^0.8.1:
- version "0.8.3"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
- integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
- dependencies:
- deep-is "~0.1.3"
- fast-levenshtein "~2.0.6"
- levn "~0.3.0"
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
- word-wrap "~1.2.3"
-
-optionator@^0.9.1:
- version "0.9.1"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
- integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
+optionator@^0.9.3:
+ version "0.9.3"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"
+ integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==
dependencies:
+ "@aashutoshrathi/word-wrap" "^1.2.3"
deep-is "^0.1.3"
fast-levenshtein "^2.0.6"
levn "^0.4.1"
prelude-ls "^1.2.1"
type-check "^0.4.0"
- word-wrap "^1.2.3"
-
-os-tmpdir@~1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
- integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
-
-p-each-series@^2.1.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a"
- integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==
-
-p-finally@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
- integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
p-limit@^2.2.0:
version "2.3.0"
@@ -3085,6 +2174,13 @@ p-limit@^2.2.0:
dependencies:
p-try "^2.0.0"
+p-limit@^3.0.2, p-limit@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
+ dependencies:
+ yocto-queue "^0.1.0"
+
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
@@ -3092,6 +2188,13 @@ p-locate@^4.1.0:
dependencies:
p-limit "^2.2.0"
+p-locate@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
+ integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
+ dependencies:
+ p-limit "^3.0.2"
+
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
@@ -3104,26 +2207,16 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
-parse-json@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646"
- integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==
+parse-json@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
+ integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
dependencies:
"@babel/code-frame" "^7.0.0"
error-ex "^1.3.1"
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
-parse5@5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178"
- integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==
-
-pascalcase@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
- integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
-
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -3132,54 +2225,42 @@ path-exists@^4.0.0:
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
- integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
-
-path-key@^2.0.0, path-key@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
- integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+ integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
path-key@^3.0.0, path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
-path-parse@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
-
-path-type@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
- integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
-pegjs@^0.10.0:
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd"
- integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=
+picocolors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
+ integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
-performance-now@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
- integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+picocolors@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
+ integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
-picomatch@^2.0.4, picomatch@^2.0.5:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
- integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
+picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
-pify@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f"
- integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
+picomatch@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
+ integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
-pirates@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87"
- integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==
- dependencies:
- node-modules-regexp "^1.0.0"
+pirates@^4.0.4:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9"
+ integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==
pkg-dir@^4.2.0:
version "4.2.0"
@@ -3188,199 +2269,65 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"
-please-upgrade-node@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
- integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
- dependencies:
- semver-compare "^1.0.0"
-
-posix-character-classes@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
- integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
-
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
-prelude-ls@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
- integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
-
-prettier@>=1.10:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
- integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
+prettier@^3.5.3:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5"
+ integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==
-pretty-format@^26.6.2:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
- integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
+pretty-format@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812"
+ integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==
dependencies:
- "@jest/types" "^26.6.2"
- ansi-regex "^5.0.0"
- ansi-styles "^4.0.0"
- react-is "^17.0.1"
+ "@jest/schemas" "^29.6.3"
+ ansi-styles "^5.0.0"
+ react-is "^18.0.0"
-pretty-quick@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.0.tgz#cb172e9086deb57455dea7c7e8f136cd0a4aef6c"
- integrity sha512-DtxIxksaUWCgPFN7E1ZZk4+Aav3CCuRdhrDSFZENb404sYMtuo9Zka823F+Mgeyt8Zt3bUiCjFzzWYE9LYqkmQ==
+pretty-quick@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-4.1.1.tgz#8a0c883e4beeb0eddbe7eda50d7b1251d4f72968"
+ integrity sha512-9Ud0l/CspNTmyIdYac9X7Inb3o8fuUsw+1zJFvCGn+at0t1UwUcUdo2RSZ41gcmfLv1fxgWQxWEfItR7CBwugg==
dependencies:
- chalk "^3.0.0"
- execa "^4.0.0"
- find-up "^4.1.0"
- ignore "^5.1.4"
- mri "^1.1.5"
- multimatch "^4.0.0"
-
-progress@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
- integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+ find-up "^5.0.0"
+ ignore "^7.0.3"
+ mri "^1.2.0"
+ picocolors "^1.1.1"
+ picomatch "^4.0.2"
+ tinyexec "^0.3.2"
+ tslib "^2.8.1"
prompts@^2.0.1:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7"
- integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
+ integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
dependencies:
kleur "^3.0.3"
sisteransi "^1.0.5"
-psl@^1.1.28:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
- integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
-
-pump@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
- integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
- dependencies:
- end-of-stream "^1.1.0"
- once "^1.3.1"
-
-punycode@^2.1.0, punycode@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
- integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
-
-qs@~6.5.2:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
- integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
-
-react-is@^17.0.1:
- version "17.0.1"
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339"
- integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==
-
-read-pkg-up@^7.0.1:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507"
- integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==
- dependencies:
- find-up "^4.1.0"
- read-pkg "^5.2.0"
- type-fest "^0.8.1"
-
-read-pkg@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc"
- integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==
- dependencies:
- "@types/normalize-package-data" "^2.4.0"
- normalize-package-data "^2.5.0"
- parse-json "^5.0.0"
- type-fest "^0.6.0"
-
-regenerator-runtime@^0.13.4:
- version "0.13.7"
- resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
- integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
-
-regex-not@^1.0.0, regex-not@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
- integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
- dependencies:
- extend-shallow "^3.0.2"
- safe-regex "^1.1.0"
-
-regexpp@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
- integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
-
-remove-trailing-separator@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
- integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
+punycode@^2.1.0:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
+ integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
-repeat-element@^1.1.2:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
- integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+pure-rand@^6.0.0:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7"
+ integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==
-repeat-string@^1.6.1:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
- integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
-
-request-promise-core@1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f"
- integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==
- dependencies:
- lodash "^4.17.19"
-
-request-promise-native@^1.0.8:
- version "1.0.9"
- resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28"
- integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==
- dependencies:
- request-promise-core "1.1.4"
- stealthy-require "^1.1.1"
- tough-cookie "^2.3.3"
-
-request@^2.88.2:
- version "2.88.2"
- resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
- integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
- dependencies:
- aws-sign2 "~0.7.0"
- aws4 "^1.8.0"
- caseless "~0.12.0"
- combined-stream "~1.0.6"
- extend "~3.0.2"
- forever-agent "~0.6.1"
- form-data "~2.3.2"
- har-validator "~5.1.3"
- http-signature "~1.2.0"
- is-typedarray "~1.0.0"
- isstream "~0.1.2"
- json-stringify-safe "~5.0.1"
- mime-types "~2.1.19"
- oauth-sign "~0.9.0"
- performance-now "^2.1.0"
- qs "~6.5.2"
- safe-buffer "^5.1.2"
- tough-cookie "~2.5.0"
- tunnel-agent "^0.6.0"
- uuid "^3.3.2"
+react-is@^18.0.0:
+ version "18.2.0"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
+ integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
- integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
-
-require-main-filename@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
- integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
+ integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
resolve-cwd@^3.0.0:
version "3.0.0"
@@ -3399,149 +2346,32 @@ resolve-from@^5.0.0:
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
-resolve-url@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
- integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
-
-resolve@^1.10.0, resolve@^1.18.1:
- version "1.19.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
- integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
- dependencies:
- is-core-module "^2.1.0"
- path-parse "^1.0.6"
-
-restore-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
- integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
- dependencies:
- onetime "^5.1.0"
- signal-exit "^3.0.2"
-
-ret@~0.1.10:
- version "0.1.15"
- resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
- integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
-
-rimraf@^3.0.0, rimraf@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
- integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
- dependencies:
- glob "^7.1.3"
-
-rsvp@^4.8.4:
- version "4.8.5"
- resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734"
- integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==
-
-run-async@^2.4.0:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
- integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
-
-rxjs@^6.6.0:
- version "6.6.3"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
- integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
- dependencies:
- tslib "^1.9.0"
-
-safe-buffer@^5.0.1, safe-buffer@^5.1.2:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
- integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
-
-safe-buffer@~5.1.1:
- version "5.1.2"
- resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
- integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+resolve.exports@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800"
+ integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==
-safe-regex@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
- integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+resolve@^1.20.0:
+ version "1.22.8"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
+ integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
dependencies:
- ret "~0.1.10"
+ is-core-module "^2.13.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
-"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
- integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
-
-sane@^4.0.3:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded"
- integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==
- dependencies:
- "@cnakazawa/watch" "^1.0.3"
- anymatch "^2.0.0"
- capture-exit "^2.0.0"
- exec-sh "^0.3.2"
- execa "^1.0.0"
- fb-watchman "^2.0.0"
- micromatch "^3.1.4"
- minimist "^1.1.1"
- walker "~1.0.5"
+semver@^6.3.0, semver@^6.3.1:
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
+ integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
-saxes@^5.0.0:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
- integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==
- dependencies:
- xmlchars "^2.2.0"
-
-semver-compare@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
- integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
-
-semver-regex@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
- integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
-
-"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0:
- version "5.7.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
- integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-
-semver@^6.0.0, semver@^6.3.0:
- version "6.3.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-
-semver@^7.2.1, semver@^7.3.2:
- version "7.3.4"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
- integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
+semver@^7.5.3, semver@^7.5.4:
+ version "7.5.4"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
+ integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
-set-blocking@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
- integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
-
-set-value@^2.0.0, set-value@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
- integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
- dependencies:
- extend-shallow "^2.0.1"
- is-extendable "^0.1.1"
- is-plain-object "^2.0.3"
- split-string "^3.0.1"
-
-shebang-command@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
- integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
- dependencies:
- shebang-regex "^1.0.0"
-
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
@@ -3549,25 +2379,15 @@ shebang-command@^2.0.0:
dependencies:
shebang-regex "^3.0.0"
-shebang-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
- integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
-
shebang-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
-shellwords@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
- integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
-
-signal-exit@^3.0.0, signal-exit@^3.0.2:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
- integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
+signal-exit@^3.0.3, signal-exit@^3.0.7:
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
+ integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
sisteransi@^1.0.5:
version "1.0.5"
@@ -3579,213 +2399,66 @@ slash@^3.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
-slice-ansi@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
- integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
- dependencies:
- ansi-styles "^3.2.0"
- astral-regex "^1.0.0"
- is-fullwidth-code-point "^2.0.0"
-
-snapdragon-node@^2.0.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
- integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
- dependencies:
- define-property "^1.0.0"
- isobject "^3.0.0"
- snapdragon-util "^3.0.1"
-
-snapdragon-util@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
- integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
- dependencies:
- kind-of "^3.2.0"
-
-snapdragon@^0.8.1:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
- integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
- dependencies:
- base "^0.11.1"
- debug "^2.2.0"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- map-cache "^0.2.2"
- source-map "^0.5.6"
- source-map-resolve "^0.5.0"
- use "^3.1.0"
-
-source-map-resolve@^0.5.0:
- version "0.5.3"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
- integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
- dependencies:
- atob "^2.1.2"
- decode-uri-component "^0.2.0"
- resolve-url "^0.2.1"
- source-map-url "^0.4.0"
- urix "^0.1.0"
-
-source-map-support@^0.5.6:
- version "0.5.19"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
- integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
+source-map-support@0.5.13:
+ version "0.5.13"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
+ integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map-url@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
- integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
-
-source-map@^0.5.0, source-map@^0.5.6:
- version "0.5.7"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
- integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
-
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+source-map@^0.6.0, source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
-source-map@^0.7.3:
- version "0.7.3"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
- integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
-
-spdx-correct@^3.0.0:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"
- integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==
- dependencies:
- spdx-expression-parse "^3.0.0"
- spdx-license-ids "^3.0.0"
-
-spdx-exceptions@^2.1.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d"
- integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==
-
-spdx-expression-parse@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679"
- integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==
- dependencies:
- spdx-exceptions "^2.1.0"
- spdx-license-ids "^3.0.0"
-
-spdx-license-ids@^3.0.0:
- version "3.0.7"
- resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65"
- integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==
-
-split-string@^3.0.1, split-string@^3.0.2:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
- integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
- dependencies:
- extend-shallow "^3.0.0"
-
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
- integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
-
-sshpk@^1.7.0:
- version "1.16.1"
- resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
- integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
- dependencies:
- asn1 "~0.2.3"
- assert-plus "^1.0.0"
- bcrypt-pbkdf "^1.0.0"
- dashdash "^1.12.0"
- ecc-jsbn "~0.1.1"
- getpass "^0.1.1"
- jsbn "~0.1.0"
- safer-buffer "^2.0.2"
- tweetnacl "~0.14.0"
-
-stack-utils@^2.0.2:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277"
- integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==
- dependencies:
- escape-string-regexp "^2.0.0"
+ integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
-static-extend@^0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
- integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+stack-utils@^2.0.3:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
+ integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
dependencies:
- define-property "^0.2.5"
- object-copy "^0.1.0"
-
-stealthy-require@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
- integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
+ escape-string-regexp "^2.0.0"
string-length@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1"
- integrity sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw==
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
+ integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==
dependencies:
char-regex "^1.0.2"
strip-ansi "^6.0.0"
-string-width@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
- integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
- dependencies:
- emoji-regex "^7.0.1"
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^5.1.0"
-
-string-width@^4.1.0, string-width@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
- integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.0"
+ strip-ansi "^6.0.1"
-strip-ansi@^5.1.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
- integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
- dependencies:
- ansi-regex "^4.1.0"
-
-strip-ansi@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
- integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
+strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
- ansi-regex "^5.0.0"
+ ansi-regex "^5.0.1"
strip-bom@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==
-strip-eof@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
- integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
-
strip-final-newline@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
-strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
+strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
@@ -3797,43 +2470,24 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
-supports-color@^7.0.0, supports-color@^7.1.0:
+supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
-supports-hyperlinks@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47"
- integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
+supports-color@^8.0.0:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
+ integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
dependencies:
has-flag "^4.0.0"
- supports-color "^7.0.0"
-
-symbol-tree@^3.2.4:
- version "3.2.4"
- resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
- integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
-
-table@^5.2.3:
- version "5.4.6"
- resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
- integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
- dependencies:
- ajv "^6.10.2"
- lodash "^4.17.14"
- slice-ansi "^2.1.0"
- string-width "^3.0.0"
-terminal-link@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994"
- integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==
- dependencies:
- ansi-escapes "^4.2.1"
- supports-hyperlinks "^2.0.0"
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
test-exclude@^6.0.0:
version "6.0.0"
@@ -3844,52 +2498,20 @@ test-exclude@^6.0.0:
glob "^7.1.4"
minimatch "^3.0.4"
-text-table@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
- integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
-
-throat@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b"
- integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==
-
-through@^2.3.6:
- version "2.3.8"
- resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
- integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
-
-tmp@^0.0.33:
- version "0.0.33"
- resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
- integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
- dependencies:
- os-tmpdir "~1.0.2"
+tinyexec@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2"
+ integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==
-tmpl@1.0.x:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
- integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
+tmpl@1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
+ integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
- integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
-
-to-object-path@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
- integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
- dependencies:
- kind-of "^3.0.2"
-
-to-regex-range@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
- integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
- dependencies:
- is-number "^3.0.0"
- repeat-string "^1.6.1"
+ integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
to-regex-range@^5.0.1:
version "5.0.1"
@@ -3898,56 +2520,10 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
-to-regex@^3.0.1, to-regex@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
- integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
- dependencies:
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- regex-not "^1.0.2"
- safe-regex "^1.1.0"
-
-tough-cookie@^2.3.3, tough-cookie@~2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
- integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
- dependencies:
- psl "^1.1.28"
- punycode "^2.1.1"
-
-tough-cookie@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2"
- integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==
- dependencies:
- ip-regex "^2.1.0"
- psl "^1.1.28"
- punycode "^2.1.1"
-
-tr46@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479"
- integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==
- dependencies:
- punycode "^2.1.1"
-
-tslib@^1.9.0:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
- integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
-tunnel-agent@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
- integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
- dependencies:
- safe-buffer "^5.0.1"
-
-tweetnacl@^0.14.3, tweetnacl@~0.14.0:
- version "0.14.5"
- resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
- integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+tslib@^2.8.1:
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
+ integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
@@ -3956,201 +2532,63 @@ type-check@^0.4.0, type-check@~0.4.0:
dependencies:
prelude-ls "^1.2.1"
-type-check@~0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
- integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
- dependencies:
- prelude-ls "~1.1.2"
-
type-detect@4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
-type-fest@^0.11.0:
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
- integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
-
-type-fest@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
- integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
-
-type-fest@^0.8.1:
- version "0.8.1"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
- integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
+type-fest@^0.21.3:
+ version "0.21.3"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
+ integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
-typedarray-to-buffer@^3.1.5:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
- integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
- dependencies:
- is-typedarray "^1.0.0"
-
-union-value@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
- integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
- dependencies:
- arr-union "^3.1.0"
- get-value "^2.0.6"
- is-extendable "^0.1.1"
- set-value "^2.0.1"
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
-unset-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
- integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+update-browserslist-db@^1.0.13:
+ version "1.0.13"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
+ integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==
dependencies:
- has-value "^0.3.1"
- isobject "^3.0.0"
+ escalade "^3.1.1"
+ picocolors "^1.0.0"
uri-js@^4.2.2:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"
- integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
+ integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
-urix@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
- integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
-
-use@^3.1.0:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
- integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
-
-uuid@^3.3.2:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
- integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
-
-uuid@^8.3.0:
- version "8.3.2"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
- integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
-
-v8-compile-cache@^2.0.3:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132"
- integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==
-
-v8-to-istanbul@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz#b4fe00e35649ef7785a9b7fcebcea05f37c332fc"
- integrity sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==
+v8-to-istanbul@^9.0.1:
+ version "9.1.3"
+ resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz#ea456604101cd18005ac2cae3cdd1aa058a6306b"
+ integrity sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==
dependencies:
+ "@jridgewell/trace-mapping" "^0.3.12"
"@types/istanbul-lib-coverage" "^2.0.1"
- convert-source-map "^1.6.0"
- source-map "^0.7.3"
-
-validate-npm-package-license@^3.0.1:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
- integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
- dependencies:
- spdx-correct "^3.0.0"
- spdx-expression-parse "^3.0.0"
+ convert-source-map "^2.0.0"
-verror@1.10.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
- integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
- dependencies:
- assert-plus "^1.0.0"
- core-util-is "1.0.2"
- extsprintf "^1.2.0"
-
-w3c-hr-time@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"
- integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==
- dependencies:
- browser-process-hrtime "^1.0.0"
-
-w3c-xmlserializer@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a"
- integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==
- dependencies:
- xml-name-validator "^3.0.0"
-
-walker@^1.0.7, walker@~1.0.5:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
- integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=
- dependencies:
- makeerror "1.0.x"
-
-webidl-conversions@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
- integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==
-
-webidl-conversions@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514"
- integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==
-
-whatwg-encoding@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"
- integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==
- dependencies:
- iconv-lite "0.4.24"
-
-whatwg-mimetype@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
- integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
-
-whatwg-url@^8.0.0:
- version "8.4.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837"
- integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==
- dependencies:
- lodash.sortby "^4.7.0"
- tr46 "^2.0.2"
- webidl-conversions "^6.1.0"
-
-which-module@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
- integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
-
-which-pm-runs@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
- integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
-
-which@^1.2.9:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
- integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+walker@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
+ integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==
dependencies:
- isexe "^2.0.0"
+ makeerror "1.0.12"
-which@^2.0.1, which@^2.0.2:
+which@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
-word-wrap@^1.2.3, word-wrap@~1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
- integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
-
-wrap-ansi@^6.2.0:
- version "6.2.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
- integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
+wrap-ansi@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
@@ -4159,69 +2597,50 @@ wrap-ansi@^6.2.0:
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
- integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
-write-file-atomic@^3.0.0:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
- integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
+write-file-atomic@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd"
+ integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==
dependencies:
imurmurhash "^0.1.4"
- is-typedarray "^1.0.0"
- signal-exit "^3.0.2"
- typedarray-to-buffer "^3.1.5"
-
-ws@^7.2.3:
- version "7.4.1"
- resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb"
- integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ==
-
-xml-name-validator@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
- integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
+ signal-exit "^3.0.7"
-xmlchars@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
- integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
+y18n@^5.0.5:
+ version "5.0.8"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
+ integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
-y18n@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
- integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
+yallist@^3.0.2:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
+ integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
-yaml@^1.10.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
- integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
-
-yargs-parser@^18.1.2:
- version "18.1.3"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
- integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
- dependencies:
- camelcase "^5.0.0"
- decamelize "^1.2.0"
+yargs-parser@^21.1.1:
+ version "21.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
+ integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
-yargs@^15.0.1, yargs@^15.4.1:
- version "15.4.1"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
- integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
+yargs@^17.3.1:
+ version "17.7.2"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
+ integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
dependencies:
- cliui "^6.0.0"
- decamelize "^1.2.0"
- find-up "^4.1.0"
- get-caller-file "^2.0.1"
+ cliui "^8.0.1"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
require-directory "^2.1.1"
- require-main-filename "^2.0.0"
- set-blocking "^2.0.0"
- string-width "^4.2.0"
- which-module "^2.0.0"
- y18n "^4.0.0"
- yargs-parser "^18.1.2"
+ string-width "^4.2.3"
+ y18n "^5.0.5"
+ yargs-parser "^21.1.1"
+
+yocto-queue@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==