Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pure comment annotation to Graph.contextParse #3981

Commits on Mar 2, 2021

  1. Move pure comment annotation to Graph.contextParse

    If a plugin calls `PluginContext.parse` method to parse the AST of the module
    rollup ignored the `PURE` annotations. This commit fixes the issue by moving
    the annotation functionality to a central location - the `contextParse` method.
    
    Resolves rollup#3979
    Yannay Livneh committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    b899701 View commit details
    Browse the repository at this point in the history
  2. Remove unused import

    Yannay Livneh committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    1b78532 View commit details
    Browse the repository at this point in the history
  3. Add test call-marked-pure-with-plugin-parse-ast

    Yannay Livneh committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    1c599c8 View commit details
    Browse the repository at this point in the history
  4. Improv test call-marked-pure-with-plugin-parse-ast

    Use the `onComment` feautre. This expands the coverage.
    Yannay Livneh committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    2ba2a46 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2021

  1. Change type CommentDescription -> acorn.Comment

    This change eliminates needless mapping between the types.
    Yannay Livneh committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    43edcca View commit details
    Browse the repository at this point in the history
  2. Rename annotations in acron.Node

    When parsing the JS code we add attributes to acorn.Node for later use:
    * annotations: acorn.Commnet - the comment that defined the annotation
    * annotatedPure: boolean - declares this node as pure call/new expression
    
    This commit puts all these attributes under one name: `_rollupAnnotations` with
    a strong type.
    
    Thus we clarify that these attributes are for internal use only and decrease
    the change of ever coliding with internal/future attributes of `acorn.Node`.
    Yannay Livneh committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    698d2c9 View commit details
    Browse the repository at this point in the history
  3. Remove '_rollupAnnotations' key from Node.keys

    Yannay Livneh committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    dc93f2e View commit details
    Browse the repository at this point in the history
  4. Remove dead code

    Yannay Livneh committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    d4e3db5 View commit details
    Browse the repository at this point in the history