Skip to content

Commit

Permalink
chore: update comment-parser and devDeps.
Browse files Browse the repository at this point in the history
Also:
- chore(TS): switch to NodeNext
  • Loading branch information
brettz9 committed Aug 4, 2023
1 parent 67653cc commit 462901e
Show file tree
Hide file tree
Showing 16 changed files with 1,053 additions and 844 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGES for `@es-joy/jsdoccomment`

## 0.40.0

- chore: update comment-parser and devDeps.
- chore(TS): switch to NodeNext

## 0.39.4

- fix: include type exports for full inlineTags (and line) property support on blocks and tags
Expand Down
12 changes: 6 additions & 6 deletions dist/commentParserToESTree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ export type JsdocBlock = {
* @param {import('./index.js').JsdocBlockWithInline} jsdoc
* @param {import('jsdoc-type-pratt-parser').ParseMode} mode
* @param {object} opts
* @param {boolean} [opts.throwOnTypeParsingErrors=false]
* @param {boolean} [opts.throwOnTypeParsingErrors]
* @returns {JsdocBlock}
*/
export function commentParserToESTree(jsdoc: import('./index.js').JsdocBlockWithInline, mode: import('jsdoc-type-pratt-parser').ParseMode, { throwOnTypeParsingErrors }?: {
throwOnTypeParsingErrors?: boolean | undefined;
}): JsdocBlock;
export namespace jsdocVisitorKeys {
const JsdocBlock: string[];
const JsdocDescriptionLine: never[];
const JsdocTypeLine: never[];
const JsdocTag: string[];
const JsdocInlineTag: never[];
let JsdocBlock: string[];
let JsdocDescriptionLine: never[];
let JsdocTypeLine: never[];
let JsdocTag: string[];
let JsdocInlineTag: never[];
}
//# sourceMappingURL=commentParserToESTree.d.ts.map
15 changes: 8 additions & 7 deletions dist/index.cjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const inlineTagToAST = ({
* @param {import('./index.js').JsdocBlockWithInline} jsdoc
* @param {import('jsdoc-type-pratt-parser').ParseMode} mode
* @param {object} opts
* @param {boolean} [opts.throwOnTypeParsingErrors=false]
* @param {boolean} [opts.throwOnTypeParsingErrors]
* @returns {JsdocBlock}
*/
const commentParserToESTree = (jsdoc, mode, {
Expand Down Expand Up @@ -602,11 +602,11 @@ const getTokenizers = ({
extra.match(/(\s*)([^\r]*)(\r)?/u);
}
if (optionalBrackets.test(name)) {
var _name$match, _name$match$groups;
var _name$match;
name =
/** @type {string} */
/** @type {RegExpMatchArray} */
(_name$match = name.match(optionalBrackets)) === null || _name$match === void 0 ? void 0 : (_name$match$groups = _name$match.groups) === null || _name$match$groups === void 0 ? void 0 : _name$match$groups.name;
(_name$match = name.match(optionalBrackets)) === null || _name$match === void 0 || (_name$match = _name$match.groups) === null || _name$match === void 0 ? void 0 : _name$match.name;
spec.optional = true;
} else {
spec.optional = false;
Expand Down Expand Up @@ -639,7 +639,7 @@ const getTokenizers = ({
/**
* Accepts a comment token and converts it into `comment-parser` AST.
* @param {{value: string}} commentNode
* @param {string} [indent=""] Whitespace
* @param {string} [indent] Whitespace
* @returns {import('./index.js').JsdocBlockWithInline}
*/
const parseComment = (commentNode, indent = '') => {
Expand All @@ -651,6 +651,7 @@ const parseComment = (commentNode, indent = '') => {
return parseInlineTags(block);
};

/* eslint-disable jsdoc/imports-as-dependencies -- https://github.com/gajus/eslint-plugin-jsdoc/issues/1114 */
/**
* Obtained originally from {@link https://github.com/eslint/eslint/blob/master/lib/util/source-code.js#L313}.
*
Expand Down Expand Up @@ -695,8 +696,8 @@ const isCommentToken = token => {
* @returns {import('@typescript-eslint/types').TSESTree.Decorator|undefined}
*/
const getDecorator = node => {
var _node$declaration, _node$declaration$dec, _node$decorators, _node$parent, _node$parent$decorato;
return (node === null || node === void 0 ? void 0 : (_node$declaration = node.declaration) === null || _node$declaration === void 0 ? void 0 : (_node$declaration$dec = _node$declaration.decorators) === null || _node$declaration$dec === void 0 ? void 0 : _node$declaration$dec[0]) || (node === null || node === void 0 ? void 0 : (_node$decorators = node.decorators) === null || _node$decorators === void 0 ? void 0 : _node$decorators[0]) || (node === null || node === void 0 ? void 0 : (_node$parent = node.parent) === null || _node$parent === void 0 ? void 0 : (_node$parent$decorato = _node$parent.decorators) === null || _node$parent$decorato === void 0 ? void 0 : _node$parent$decorato[0]);
var _node$declaration, _node$decorators, _node$parent;
return (node === null || node === void 0 || (_node$declaration = node.declaration) === null || _node$declaration === void 0 || (_node$declaration = _node$declaration.decorators) === null || _node$declaration === void 0 ? void 0 : _node$declaration[0]) || (node === null || node === void 0 || (_node$decorators = node.decorators) === null || _node$decorators === void 0 ? void 0 : _node$decorators[0]) || (node === null || node === void 0 || (_node$parent = node.parent) === null || _node$parent === void 0 || (_node$parent = _node$parent.decorators) === null || _node$parent === void 0 ? void 0 : _node$parent[0]);
};

/**
Expand Down Expand Up @@ -1137,7 +1138,7 @@ exports.jsdocVisitorKeys = jsdocVisitorKeys;
exports.parseComment = parseComment;
exports.toCamelCase = toCamelCase;
Object.keys(jsdocTypePrattParser).forEach(function (k) {
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
enumerable: true,
get: function () { return jsdocTypePrattParser[k]; }
});
Expand Down
2 changes: 1 addition & 1 deletion dist/jsdoccomment.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/parseComment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export const defaultNoNames: string[];
export function getTokenizers({ noTypes, noNames }?: {
noTypes?: string[] | undefined;
noNames?: string[] | undefined;
}): import("comment-parser/lib/parser/tokenizers/index.js").Tokenizer[];
}): import("../node_modules/comment-parser/es6/parser/tokenizers/index.js").Tokenizer[];
/**
* Accepts a comment token and converts it into `comment-parser` AST.
* @param {{value: string}} commentNode
* @param {string} [indent=""] Whitespace
* @param {string} [indent] Whitespace
* @returns {import('./index.js').JsdocBlockWithInline}
*/
export function parseComment(commentNode: {
Expand Down
2 changes: 1 addition & 1 deletion dist/parseComment.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/parseInlineTags.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@es-joy/jsdoccomment",
"version": "0.39.4",
"version": "0.40.0",
"author": "Brett Zamir <[email protected]>",
"contributors": [],
"description": "Maintained replacement for ESLint's deprecated SourceCode#getJSDocComment along with other jsdoc utilities",
Expand Down Expand Up @@ -55,45 +55,45 @@
"node": ">=16"
},
"dependencies": {
"comment-parser": "1.3.1",
"comment-parser": "1.4.0",
"esquery": "^1.5.0",
"jsdoc-type-pratt-parser": "~4.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/core": "^7.22.9",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/preset-env": "^7.21.5",
"@babel/preset-env": "^7.22.9",
"@brettz9/eslint-plugin": "^1.0.4",
"@rollup/plugin-babel": "^6.0.3",
"@types/chai": "^4.3.5",
"@types/eslint": "^8.37.0",
"@types/eslint": "^8.44.1",
"@types/esquery": "^1.5.0",
"@types/estraverse": "^5.1.2",
"@types/estree": "^1.0.1",
"@types/mocha": "^10.0.1",
"@typescript-eslint/types": "^5.59.6",
"c8": "^7.13.0",
"@typescript-eslint/types": "^6.2.1",
"c8": "^8.0.1",
"chai": "^4.3.7",
"eslint": "^8.41.0",
"eslint-config-ash-nazg": "34.13.0",
"eslint-config-standard": "^17.0.0",
"eslint": "^8.46.0",
"eslint-config-ash-nazg": "34.15.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-array-func": "^3.1.8",
"eslint-plugin-compat": "^4.1.4",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^44.2.4",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jsdoc": "^46.4.5",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-unicorn": "^47.0.0",
"espree": "^9.5.2",
"eslint-plugin-sonarjs": "^0.20.0",
"eslint-plugin-unicorn": "^48.0.1",
"espree": "^9.6.1",
"estraverse": "^5.3.0",
"mocha": "^10.2.0",
"rollup": "^3.23.0",
"typescript": "^5.0.4"
"rollup": "^3.27.2",
"typescript": "^5.1.6"
}
}
Loading

0 comments on commit 462901e

Please sign in to comment.