comment-parser 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/browser/index.js +11 -6
- package/es6/parser/tokenizers/name.js +11 -6
- package/lib/parser/tokenizers/name.cjs +12 -6
- package/lib/parser/tokenizers/name.cjs.map +1 -1
- package/package.json +4 -5
- package/src/parser/tokenizers/name.ts +12 -8
- package/tests/unit/spec-name-tokenizer.spec.ts +94 -0
package/CHANGELOG.md
CHANGED
package/browser/index.js
CHANGED
|
@@ -264,13 +264,18 @@ var CommentParser = (function (exports) {
|
|
|
264
264
|
// look for the name starting in the line where {type} ends
|
|
265
265
|
let finalTypeLine = spec.source.reduce(typeEnd, 0);
|
|
266
266
|
let tokens;
|
|
267
|
-
|
|
267
|
+
if (spec.type) {
|
|
268
|
+
do {
|
|
269
|
+
({ tokens } = spec.source[finalTypeLine]);
|
|
270
|
+
if (tokens.description.trim()) {
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
finalTypeLine++;
|
|
274
|
+
} while (spec.source[finalTypeLine]);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
268
277
|
({ tokens } = spec.source[finalTypeLine]);
|
|
269
|
-
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
finalTypeLine++;
|
|
273
|
-
} while (spec.source[finalTypeLine]);
|
|
278
|
+
}
|
|
274
279
|
const source = tokens.description.trimStart();
|
|
275
280
|
const quotedGroups = source.split('"');
|
|
276
281
|
// if it starts with quoted group, assume it is a literal
|
|
@@ -10,13 +10,18 @@ export default function nameTokenizer() {
|
|
|
10
10
|
// look for the name starting in the line where {type} ends
|
|
11
11
|
let finalTypeLine = spec.source.reduce(typeEnd, 0);
|
|
12
12
|
let tokens;
|
|
13
|
-
|
|
13
|
+
if (spec.type) {
|
|
14
|
+
do {
|
|
15
|
+
({ tokens } = spec.source[finalTypeLine]);
|
|
16
|
+
if (tokens.description.trim()) {
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
finalTypeLine++;
|
|
20
|
+
} while (spec.source[finalTypeLine]);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
14
23
|
({ tokens } = spec.source[finalTypeLine]);
|
|
15
|
-
|
|
16
|
-
break;
|
|
17
|
-
}
|
|
18
|
-
finalTypeLine++;
|
|
19
|
-
} while (spec.source[finalTypeLine]);
|
|
24
|
+
}
|
|
20
25
|
const source = tokens.description.trimStart();
|
|
21
26
|
const quotedGroups = source.split('"');
|
|
22
27
|
// if it starts with quoted group, assume it is a literal
|
|
@@ -18,15 +18,21 @@ function nameTokenizer() {
|
|
|
18
18
|
// look for the name starting in the line where {type} ends
|
|
19
19
|
let finalTypeLine = spec.source.reduce(typeEnd, 0);
|
|
20
20
|
let tokens;
|
|
21
|
-
|
|
21
|
+
if (spec.type) {
|
|
22
|
+
do {
|
|
23
|
+
({
|
|
24
|
+
tokens
|
|
25
|
+
} = spec.source[finalTypeLine]);
|
|
26
|
+
if (tokens.description.trim()) {
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
finalTypeLine++;
|
|
30
|
+
} while (spec.source[finalTypeLine]);
|
|
31
|
+
} else {
|
|
22
32
|
({
|
|
23
33
|
tokens
|
|
24
34
|
} = spec.source[finalTypeLine]);
|
|
25
|
-
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
finalTypeLine++;
|
|
29
|
-
} while (spec.source[finalTypeLine]);
|
|
35
|
+
}
|
|
30
36
|
const source = tokens.description.trimStart();
|
|
31
37
|
const quotedGroups = source.split('"');
|
|
32
38
|
// if it starts with quoted group, assume it is a literal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name.cjs","names":["Object","defineProperty","exports","value","default","nameTokenizer","util_js_1","require","isQuoted","s","startsWith","endsWith","typeEnd","num","tokens","i","type","spec","finalTypeLine","source","reduce","description","trim","trimStart","quotedGroups","split","length","name","postName","splitSpace","slice","brackets","optional","defaultValue","ch","isSpace","problems","push","code","message","line","number","critical","nameToken","parts","undefined","join","test"],"sources":["name.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = nameTokenizer;\nconst util_js_1 = require(\"../../util.js\");\nconst isQuoted = (s) => s && s.startsWith('\"') && s.endsWith('\"');\n/**\n * Splits remaining `spec.lines[].tokens.description` into `name` and `descriptions` tokens,\n * and populates the `spec.name`\n */\nfunction nameTokenizer() {\n const typeEnd = (num, { tokens }, i) => tokens.type === '' ? num : i;\n return (spec) => {\n // look for the name starting in the line where {type} ends\n let finalTypeLine = spec.source.reduce(typeEnd, 0);\n let tokens;\n do {\n
|
|
1
|
+
{"version":3,"file":"name.cjs","names":["Object","defineProperty","exports","value","default","nameTokenizer","util_js_1","require","isQuoted","s","startsWith","endsWith","typeEnd","num","tokens","i","type","spec","finalTypeLine","source","reduce","description","trim","trimStart","quotedGroups","split","length","name","postName","splitSpace","slice","brackets","optional","defaultValue","ch","isSpace","problems","push","code","message","line","number","critical","nameToken","parts","undefined","join","test"],"sources":["name.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = nameTokenizer;\nconst util_js_1 = require(\"../../util.js\");\nconst isQuoted = (s) => s && s.startsWith('\"') && s.endsWith('\"');\n/**\n * Splits remaining `spec.lines[].tokens.description` into `name` and `descriptions` tokens,\n * and populates the `spec.name`\n */\nfunction nameTokenizer() {\n const typeEnd = (num, { tokens }, i) => tokens.type === '' ? num : i;\n return (spec) => {\n // look for the name starting in the line where {type} ends\n let finalTypeLine = spec.source.reduce(typeEnd, 0);\n let tokens;\n if (spec.type) {\n do {\n ({ tokens } = spec.source[finalTypeLine]);\n if (tokens.description.trim()) {\n break;\n }\n finalTypeLine++;\n } while (spec.source[finalTypeLine]);\n }\n else {\n ({ tokens } = spec.source[finalTypeLine]);\n }\n const source = tokens.description.trimStart();\n const quotedGroups = source.split('\"');\n // if it starts with quoted group, assume it is a literal\n if (quotedGroups.length > 1 &&\n quotedGroups[0] === '' &&\n quotedGroups.length % 2 === 1) {\n spec.name = quotedGroups[1];\n tokens.name = `\"${quotedGroups[1]}\"`;\n [tokens.postName, tokens.description] = (0, util_js_1.splitSpace)(source.slice(tokens.name.length));\n return spec;\n }\n let brackets = 0;\n let name = '';\n let optional = false;\n let defaultValue;\n // assume name is non-space string or anything wrapped into brackets\n for (const ch of source) {\n if (brackets === 0 && (0, util_js_1.isSpace)(ch))\n break;\n if (ch === '[')\n brackets++;\n if (ch === ']')\n brackets--;\n name += ch;\n }\n if (brackets !== 0) {\n spec.problems.push({\n code: 'spec:name:unpaired-brackets',\n message: 'unpaired brackets',\n line: spec.source[0].number,\n critical: true,\n });\n return spec;\n }\n const nameToken = name;\n if (name[0] === '[' && name[name.length - 1] === ']') {\n optional = true;\n name = name.slice(1, -1);\n const parts = name.split('=');\n name = parts[0].trim();\n if (parts[1] !== undefined)\n defaultValue = parts.slice(1).join('=').trim();\n if (name === '') {\n spec.problems.push({\n code: 'spec:name:empty-name',\n message: 'empty name',\n line: spec.source[0].number,\n critical: true,\n });\n return spec;\n }\n if (defaultValue === '') {\n spec.problems.push({\n code: 'spec:name:empty-default',\n message: 'empty default value',\n line: spec.source[0].number,\n critical: true,\n });\n return spec;\n }\n // has \"=\" and is not a string, except for \"=>\"\n if (!isQuoted(defaultValue) && /=(?!>)/.test(defaultValue)) {\n spec.problems.push({\n code: 'spec:name:invalid-default',\n message: 'invalid default value syntax',\n line: spec.source[0].number,\n critical: true,\n });\n return spec;\n }\n }\n spec.optional = optional;\n spec.name = name;\n tokens.name = nameToken;\n if (defaultValue !== undefined)\n spec.default = defaultValue;\n [tokens.postName, tokens.description] = (0, util_js_1.splitSpace)(source.slice(tokens.name.length));\n return spec;\n };\n}\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC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I,GAAGA,IAAI;IAChBb,MAAM,CAACa,IAAI,GAAGgB,SAAS;IACvB,IAAIV,YAAY,KAAKY,SAAS,EAC1B5B,IAAI,CAACb,OAAO,GAAG6B,YAAY;IAC/B,CAACnB,MAAM,CAACc,QAAQ,EAAEd,MAAM,CAACO,WAAW,CAAC,GAAG,CAAC,CAAC,EAAEf,SAAS,CAACuB,UAAU,EAAEV,MAAM,CAACW,KAAK,CAAChB,MAAM,CAACa,IAAI,CAACD,MAAM,CAAC,CAAC;IACnG,OAAOT,IAAI;EACf,CAAC;AACL","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comment-parser",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Generic JSDoc-like comment parser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -57,12 +57,11 @@
|
|
|
57
57
|
"pretest": "rimraf coverage; npm run build",
|
|
58
58
|
"test": "prettier --check src tests && jest --verbose",
|
|
59
59
|
"preversion": "npm run build",
|
|
60
|
-
"postversion": "git add . && git commit -m \"chore: release v$(node -p \"require('./package.json').version\")\"",
|
|
61
60
|
"prepare": "npm run build",
|
|
62
61
|
"prepublishOnly": "npm run build",
|
|
63
|
-
"release:add": "
|
|
64
|
-
"release:version": "git pull origin
|
|
65
|
-
"release:publish": "git pull origin
|
|
62
|
+
"release:add": "changeset",
|
|
63
|
+
"release:version": "git pull origin main && changeset version && npm install && git add . && git commit -m \"release v$(node -p \"require('./package.json').version\")\"",
|
|
64
|
+
"release:publish": "git pull origin main && changeset publish && git push --follow-tags"
|
|
66
65
|
},
|
|
67
66
|
"repository": {
|
|
68
67
|
"type": "git",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Spec, Line } from '../../primitives.js';
|
|
1
|
+
import { Spec, Line, Tokens } from '../../primitives.js';
|
|
2
2
|
import { splitSpace, isSpace } from '../../util.js';
|
|
3
3
|
import { Tokenizer } from './index.js';
|
|
4
4
|
|
|
@@ -16,14 +16,18 @@ export default function nameTokenizer(): Tokenizer {
|
|
|
16
16
|
// look for the name starting in the line where {type} ends
|
|
17
17
|
let finalTypeLine = spec.source.reduce(typeEnd, 0);
|
|
18
18
|
|
|
19
|
-
let tokens;
|
|
20
|
-
|
|
19
|
+
let tokens: Tokens;
|
|
20
|
+
if (spec.type) {
|
|
21
|
+
do {
|
|
22
|
+
({ tokens } = spec.source[finalTypeLine]);
|
|
23
|
+
if (tokens.description.trim()) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
finalTypeLine++;
|
|
27
|
+
} while (spec.source[finalTypeLine]);
|
|
28
|
+
} else {
|
|
21
29
|
({ tokens } = spec.source[finalTypeLine]);
|
|
22
|
-
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
finalTypeLine++;
|
|
26
|
-
} while (spec.source[finalTypeLine]);
|
|
30
|
+
}
|
|
27
31
|
|
|
28
32
|
const source = tokens.description.trimStart();
|
|
29
33
|
|
|
@@ -734,3 +734,97 @@ test('after multiline {type}', () => {
|
|
|
734
734
|
})
|
|
735
735
|
);
|
|
736
736
|
});
|
|
737
|
+
|
|
738
|
+
test('name on second line after type', () => {
|
|
739
|
+
const sourceIn = [
|
|
740
|
+
{
|
|
741
|
+
number: 0,
|
|
742
|
+
source: '...',
|
|
743
|
+
tokens: seedTokens({
|
|
744
|
+
tag: '@param',
|
|
745
|
+
postTag: ' ',
|
|
746
|
+
type: '{string}',
|
|
747
|
+
postType: '',
|
|
748
|
+
description: '',
|
|
749
|
+
}),
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
number: 1,
|
|
753
|
+
source: '...',
|
|
754
|
+
tokens: seedTokens({
|
|
755
|
+
description: 'foo The foo description.',
|
|
756
|
+
}),
|
|
757
|
+
},
|
|
758
|
+
];
|
|
759
|
+
|
|
760
|
+
const sourceOut = JSON.parse(JSON.stringify(sourceIn));
|
|
761
|
+
Object.assign(sourceOut[1].tokens, {
|
|
762
|
+
name: 'foo',
|
|
763
|
+
postName: ' ',
|
|
764
|
+
description: 'The foo description.',
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
expect(tokenize(seedSpec({ type: 'string', source: sourceIn }))).toEqual(
|
|
768
|
+
seedSpec({
|
|
769
|
+
type: 'string',
|
|
770
|
+
name: 'foo',
|
|
771
|
+
source: sourceOut,
|
|
772
|
+
})
|
|
773
|
+
);
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
test('no type - should not look for name on subsequent lines', () => {
|
|
777
|
+
const sourceIn = [
|
|
778
|
+
{
|
|
779
|
+
number: 0,
|
|
780
|
+
source: '...',
|
|
781
|
+
tokens: seedTokens({
|
|
782
|
+
tag: '@example',
|
|
783
|
+
postTag: '',
|
|
784
|
+
description: '',
|
|
785
|
+
}),
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
number: 1,
|
|
789
|
+
source: '...',
|
|
790
|
+
tokens: seedTokens({
|
|
791
|
+
description: 'const foo = bar()',
|
|
792
|
+
}),
|
|
793
|
+
},
|
|
794
|
+
];
|
|
795
|
+
|
|
796
|
+
expect(tokenize(seedSpec({ source: sourceIn }))).toEqual(
|
|
797
|
+
seedSpec({
|
|
798
|
+
name: '',
|
|
799
|
+
source: sourceIn,
|
|
800
|
+
})
|
|
801
|
+
);
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
test('no type with comment syntax - should not parse as name', () => {
|
|
805
|
+
const sourceIn = [
|
|
806
|
+
{
|
|
807
|
+
number: 0,
|
|
808
|
+
source: '...',
|
|
809
|
+
tokens: seedTokens({
|
|
810
|
+
tag: '@example',
|
|
811
|
+
postTag: '',
|
|
812
|
+
description: '',
|
|
813
|
+
}),
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
number: 1,
|
|
817
|
+
source: '...',
|
|
818
|
+
tokens: seedTokens({
|
|
819
|
+
description: '// Create something',
|
|
820
|
+
}),
|
|
821
|
+
},
|
|
822
|
+
];
|
|
823
|
+
|
|
824
|
+
expect(tokenize(seedSpec({ source: sourceIn }))).toEqual(
|
|
825
|
+
seedSpec({
|
|
826
|
+
name: '',
|
|
827
|
+
source: sourceIn,
|
|
828
|
+
})
|
|
829
|
+
);
|
|
830
|
+
});
|