Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bump syntax_tree from 5.3.0 to 6.0.0#33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
github-actions merged 1 commit intomainfromdependabot/bundler/syntax_tree-6.0.0
Feb 13, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabotdependabotbot commented on behalf ofgithubFeb 13, 2023

Bumpssyntax_tree from 5.3.0 to 6.0.0.

Changelog

Sourced fromsyntax_tree's changelog.

[6.0.0] - 2023-02-10

Added

  • SyntaxTree::BasicVisitor::visit_methods has been added to allow you to check multiple visit methods inside of a block. Therewas a method calledvisit_methods previously, but it was undocumented because it was meant as a private API. That method has been renamed tovalid_visit_methods.
  • rake sorbet:rbi has been added as a task within the repository to generate an RBI file corresponding to the nodes in the tree. This can be used to help aid consumers of Syntax Tree that are using Sorbet.
  • SyntaxTree::Reflection has been added to allow you to get information about the nodes in the tree. It is not required by default, since it takes a small amount of time to parsenode.rb and get all of the information.
  • SyntaxTree::Node#to_mermaid has been added to allow you to generate a Mermaid diagram of the node and its children. This is useful for debugging and understanding the structure of the tree.
  • SyntaxTree::Translation has been added as an experimental API to transform the Syntax Tree syntax tree into the syntax trees represented by the whitequark/parser and rubocop/rubocop-ast gems.
    • SyntaxTree::Translation.to_parser(node, buffer) will return aParser::AST::Node object.
    • SyntaxTree::Translation.to_rubocop_ast(node, buffer) will return aRuboCop::AST::Node object.
  • SyntaxTree::index andSyntaxTree::index_file have been added to allow you to get a list of all of the classes, modules, and methods defined in a given source string or file.
  • Various convenience methods have been added:
    • SyntaxTree::format_file - which calls format with the result of reading the file
    • SyntaxTree::format_node - which formats the node directly
    • SyntaxTree::parse_file - which calls parse with the result of reading the file
    • SyntaxTree::search_file - which calls search with the result of reading the file
    • SyntaxTree::Node#start_char - which is the same as callingnode.location.start_char
    • SyntaxTree::Node#end_char - which is the same as callingnode.location.end_char
  • SyntaxTree::Assoc nodes can now be formatted on their own without a parent hash node.
  • SyntaxTree::BlockVar#arg0? has been added to check if a single required block parameter is present and would potentially be expanded.
  • More experimental APIs have been added to theSyntaxTree::YARV module, including:
    • SyntaxTree::YARV::ControlFlowGraph
    • SyntaxTree::YARV::DataFlowGraph
    • SyntaxTree::YARV::SeaOfNodes

Changed

Major changes

  • BREAKING Updates toWithEnvironment:
    • TheWithEnvironment module has been renamed toWithScope.
    • Thecurrent_environment method has been renamed tocurrent_scope.
    • Thewith_current_environment method has been removed.
    • Previously scopes were always able to look up the tree, as in:a = 1; def foo; a = 2; end would see only a singlea variable. That has been corrected.
    • Previously accessing variables from inside of blocks that were not shadowed would mark them as being local to the block only. This has been correct.
  • BREAKING Lots of constants moved out ofSyntaxTree::Visitor to justSyntaxTree:
    • SyntaxTree::Visitor::FieldVisitor is nowSyntaxTree::FieldVisitor
    • SyntaxTree::Visitor::JSONVisitor is nowSyntaxTree::JSONVisitor
    • SyntaxTree::Visitor::MatchVisitor is nowSyntaxTree::MatchVisitor
    • SyntaxTree::Visitor::MutationVisitor is nowSyntaxTree::MutationVisitor
    • SyntaxTree::Visitor::PrettyPrintVisitor is nowSyntaxTree::PrettyPrintVisitor
  • BREAKING Lots of constants are now autoloaded instead of required by default. This is only particularly relevant if you are in a forking environment and want to preload constants before forking for better memory usage with copy-on-write.
  • BREAKING TheSyntaxTree::Statements#initialize method no longer accepts a parser as the first argument. It now mirrors the other nodes in that it accepts its children and location. As a result, Syntax Tree nodes are now marshalable (and therefore can be sent over DRb). Previously theStatements node was not able to be marshaled because it held a reference to the parser.

Minor changes

  • Many places where embedded documents (=begin to=end) were being treated as real comments have been fixed for formatting.
  • Dynamic symbols in keyword pattern matching now have better formatting.
  • Endless method definitions used to have aSyntaxTree::BodyStmt node that had any kind of node as itsstatements field. That has been corrected to be more consistent such that now going fromdef_node.bodystmt.statements always returns aSyntaxTree::Statements node, which is more consistent.

... (truncated)

Commits
  • 4dac90b Bump to version 6.0.0
  • cfc2979 Remove unused sections of rubocop config
  • 575ae3e No submodules needed
  • 0068978 Pinned variables should be treated as usages, not definitions
  • 7419218 Merge pull request#309 from ruby-syntax-tree/updates
  • 4a6fc77 WithEnvironment -> WithScope
  • 174cc6b Make environment break at boundaries
  • 1a20231 Use visit_methods {}
  • 0dd0276 More utility functions
  • 0cf3e85 Autoload a bunch of stuff
  • Additional commits viewable incompare view

Dependabot compatibility score

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


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [syntax_tree](https://github.com/kddnewton/syntax_tree) from 5.3.0 to 6.0.0.- [Release notes](https://github.com/kddnewton/syntax_tree/releases)- [Changelog](https://github.com/ruby-syntax-tree/syntax_tree/blob/main/CHANGELOG.md)- [Commits](ruby-syntax-tree/syntax_tree@v5.3.0...v6.0.0)---updated-dependencies:- dependency-name: syntax_tree  dependency-type: direct:production  update-type: version-update:semver-major...Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotbot added the dependenciesPull requests that update a dependency file labelFeb 13, 2023
@github-actionsgithub-actionsbot merged commitbe51a89 intomainFeb 13, 2023
@dependabotdependabotbot deleted the dependabot/bundler/syntax_tree-6.0.0 branchFebruary 13, 2023 20:10
@davidwessmandavidwessman mentioned this pull requestApr 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
dependenciesPull requests that update a dependency file
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

0 participants

[8]ページ先頭

©2009-2025 Movatter.jp