Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsdoc-type-pratt-parser

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-type-pratt-parser - npm Package Versions

23
6

4.1.0

Diff

jsdoc-type-pratt-parser
published 4.0.0 •

Changelog

Source

4.0.0 (2023-03-15)

Features

  • allow square bracket property access (cc01ccf)
  • parse index signatures and mapped types (dd49463)
  • remove unneeded variadic property from ObjectFieldResult (20bf77d)
  • split KeyValueResult in different types for objects and other uses (6b388d3)

BREAKING CHANGES

  • ObjectResult no longer contains KeyValueResult, but uses the new types ObjectFieldResult and JsdocObjectFieldResult.

For mode typescript this basically means a simple rename of type JsdocTypeKeyValue to JsdocTypeObjectField: input: { key: string } before:

{
  "type": "JsdocTypeObject",
  "meta": {
    "separator": "comma"
  },
  "elements": [
    {
      "type": "JsdocTypeKeyValue",
      "key": "key",
      "right": {
        "type": "JsdocTypeName",
        "value": "string"
      },
      "optional": false,
      "readonly": false,
      "variadic": false,
      "meta": {
        "hasLeftSideExpression": false
      }
    }
  ]
}

after:

{
  "type": "JsdocTypeObject",
  "meta": {
    "separator": "comma"
  },
  "elements": [
    {
      "type": "JsdocTypeObjectField",
      "key": "key",
      "right": {
        "type": "JsdocTypeName",
        "value": "string"
      },
      "optional": false,
      "readonly": false,
      "variadic": false,
      "meta": {
        "quote": undefined
      }
    }
  ]
}

for jsdoc mode the JsdocTypeKeyValue can now be either JsdocTypeObjectField or JsdocTypeJsdocObjectField: input: { Array<string>: string } before:

{
  "type": "JsdocTypeObject",
  "meta": {
    "separator": "comma"
  },
  "elements": [
    {
      "type": "JsdocTypeKeyValue",
      "left": {
        "type": "JsdocTypeGeneric",
        "left": {
          "type": "JsdocTypeName",
          "value": "Array"
        },
        "elements": [
          {
            "type": "JsdocTypeName",
            "value": "string"
          }
        ],
        "meta": {
          "brackets": "angle",
          "dot": false
        }
      },
      "right": {
        "type": "JsdocTypeName",
        "value": "string"
      },
      "meta": {
        "hasLeftSideExpression": true
      }
    }
  ]
}

after:

{
  "type": "JsdocTypeObject",
  "meta": {
    "separator": "comma"
  },
  "elements": [
    {
      "type": "JsdocTypeJsdocObjectField",
      "left": {
        "type": "JsdocTypeGeneric",
        "left": {
          "type": "JsdocTypeName",
          "value": "Array"
        },
        "elements": [
          {
            "type": "JsdocTypeName",
            "value": "string"
          }
        ],
        "meta": {
          "brackets": "angle",
          "dot": false
        }
      },
      "right": {
        "type": "JsdocTypeName",
        "value": "string"
      }
    }
  ]
}
jsdoc-type-pratt-parser
published 3.2.0-dev.3 •

Changelog

Source

3.2.0-dev.3 (2023-03-13)

Features

  • allow square bracket property access (e069109)
jsdoc-type-pratt-parser
published 3.2.0-dev.2 •

Changelog

Source

3.2.0-dev.2 (2023-03-13)

Features

  • parse index signatures and mapped types (4373e01)
jsdoc-type-pratt-parser
published 3.2.0-dev.1 •

Changelog

Source

3.2.0-dev.1 (2023-03-13)

Features

  • remove unneeded variadic property from ObjectFieldResult (d392f93)
  • split KeyValueResult in different types for objects and other uses (aa6c495)
jsdoc-type-pratt-parser
published 3.1.0 •

Changelog

Source

3.1.0 (2022-05-19)

Bug Fixes

Features

  • allow 'new' as a keyword for arrow functions (5ab04e7)
  • allow new as a function keyword (58ace96)
  • allow typed args parameter for functions (b538628)
jsdoc-type-pratt-parser
published 3.0.1 •

Changelog

Source

3.0.1 (2022-04-19)

Bug Fixes

  • ObjectParslet: accept linebreaks (99d4bae)
jsdoc-type-pratt-parser
published 3.0.0 •

Changelog

Source

3.0.0 (2022-04-19)

Bug Fixes

  • Lexer: use new lexer interface (03ed15e)

Features

  • Lexer has a readonly state (13ec065)

BREAKING CHANGES

  • the advance function of the lexer does not change the internal state of the object, but does instead return a new Lexer object. The getters token(), peek() and previous() have been replaced with readonly properties current, next, previous.
  • the API of the Parser class has changed. It can't parse multiple expressions anymore, but needs to be instantiated for each expression. The expression is passed to the constructor. The current lexer can be accessed via the property lexer.
jsdoc-type-pratt-parser
published 2.2.5 •

Changelog

Source

2.2.5 (2022-03-13)

Bug Fixes

  • ObjectParslet: support trailing comma or semicolon (58b057a)
jsdoc-type-pratt-parser
published 2.2.4 •

Changelog

Source

2.2.4 (2022-03-11)

Bug Fixes

23
6
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc