From 80334d847909530999309be54994d9eb7482ce75 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 28 Jul 2021 06:36:36 +0800 Subject: [PATCH] fix: update `jsdoccomment` and `jsdoc-type-pratt-parser` - type parser update allows semi-colon as TypeScript object entry separator - jsdocomment update allows execution by older Node versions, e.g., within Atom (though `engines` still set at stricter value of `comment-parser`) --- package.json | 4 ++-- src/alignTransform.js | 12 ++++++++---- src/iterateJsdoc.js | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 6e9105e91..5715d600b 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "url": "http://gajus.com" }, "dependencies": { - "@es-joy/jsdoccomment": "0.10.3", + "@es-joy/jsdoccomment": "0.10.6", "comment-parser": "1.2.1", "debug": "^4.3.2", "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "^1.0.4", + "jsdoc-type-pratt-parser": "^1.1.1", "lodash": "^4.17.21", "regextras": "^0.8.0", "semver": "^7.3.5", diff --git a/src/alignTransform.js b/src/alignTransform.js index ae8bd2f11..c9f44dbc7 100644 --- a/src/alignTransform.js +++ b/src/alignTransform.js @@ -5,11 +5,15 @@ */ import { - Markers, -} from 'comment-parser/primitives'; -import { + + // `comment-parser/util` re-exports rewireSource, -} from 'comment-parser/util'; +} from '@es-joy/jsdoccomment'; +import { + + // `comment-parser/primitives` export + Markers, +} from 'comment-parser'; const zeroWidth = { name: 0, diff --git a/src/iterateJsdoc.js b/src/iterateJsdoc.js index e9fe5f949..fb5458746 100644 --- a/src/iterateJsdoc.js +++ b/src/iterateJsdoc.js @@ -1,13 +1,13 @@ import { getReducedASTNode, getJSDocComment, commentHandler, parseComment, + + // `comment-parser/util` re-exports + rewireSpecs, + seedTokens, } from '@es-joy/jsdoccomment'; import { stringify as commentStringify, } from 'comment-parser'; -import { - rewireSpecs, - seedTokens, -} from 'comment-parser/util'; import _ from 'lodash'; import jsdocUtils from './jsdocUtils';