Skip to content

Commit 31a3820

Browse files
committed
Release 4.0.0-beta10
2 parents 2b63e8c + 6d8ba77 commit 31a3820

File tree

249 files changed

+18366
-7535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+18366
-7535
lines changed

.eslintignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
test/MethodParser.spec.js
22
test/issues.spec.js
3+
test/fake_node_modules
34
test/examples
5+
test/fixtures
46
test/tutorial
5-
jest.config.js
67
sample.js
8+
esm/

.eslintrc.yaml

+42-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,33 @@
22
root: true
33
env:
44
node: true
5+
parser: '@typescript-eslint/parser'
6+
plugins:
7+
- import
8+
- unused-imports
9+
- '@typescript-eslint'
510
extends:
611
- eslint:recommended
712
- airbnb-base
13+
- plugin:import/recommended
14+
- plugin:import/typescript
15+
- plugin:@typescript-eslint/recommended
16+
- plugin:security/recommended
817
parserOptions:
9-
ecmaVersion: 13
18+
ecmaVersion: 2019
1019
sourceType: module
1120
rules:
21+
'@typescript-eslint/ban-types': 'off'
22+
'@typescript-eslint/indent': 'off'
23+
'@typescript-eslint/explicit-function-return-type': 'off'
24+
'@typescript-eslint/explicit-member-accessibility': 'off'
25+
'@typescript-eslint/interface-name-prefix': 'off'
26+
'@typescript-eslint/no-empty-function': 'off'
27+
'@typescript-eslint/no-explicit-any': 'off'
28+
'@typescript-eslint/no-empty-interface': 'off'
29+
'@typescript-eslint/no-this-alias': 'off'
30+
'@typescript-eslint/no-unused-vars': 'off'
31+
'@typescript-eslint/no-var-requires': 'off'
1232
arrow-body-style: 'off'
1333
array-bracket-spacing:
1434
- error
@@ -24,9 +44,6 @@ rules:
2444
imports: never
2545
exports: never
2646
functions: never
27-
complexity:
28-
- error
29-
- max: 40
3047
class-methods-use-this: 'off'
3148
default-case: 'off'
3249
global-require: 'off'
@@ -35,15 +52,15 @@ rules:
3552
import/extensions:
3653
- 'error'
3754
- 'always'
38-
- ignorePackages: true
55+
- ignorePackages: false
3956
import/named: 'off'
4057
import/no-cycle: 'off'
4158
import/no-dynamic-require: 'off'
4259
import/no-extraneous-dependencies: 'off'
4360
import/no-named-as-default: 'off'
4461
import/no-named-as-default-member: 'off'
4562
import/no-unresolved:
46-
- 'error'
63+
- 'off'
4764
import/order: 'off'
4865
import/prefer-default-export: 'off'
4966
jest/expect-expect: 'off'
@@ -61,12 +78,13 @@ rules:
6178
no-use-before-define: 'off'
6279
no-restricted-syntax: 'off'
6380
no-shadow: 'off'
81+
no-trailing-spaces: 'error'
6482
no-useless-constructor: 'off'
6583
no-var: error
6684
max-classes-per-file: 'off'
6785
max-len:
6886
- error
69-
- code: 128
87+
- code: 148
7088
comments: 128
7189
tabWidth: 2
7290
ignoreUrls: true
@@ -126,6 +144,10 @@ rules:
126144
- error
127145
- single
128146
- avoidEscape: true
147+
security/detect-non-literal-fs-filename: 'off'
148+
security/detect-non-literal-regexp: 'off'
149+
security/detect-object-injection: 'off'
150+
security/detect-unsafe-regex: 'off'
129151
semi:
130152
- error
131153
- always
@@ -134,11 +156,22 @@ rules:
134156
- anonymous: never
135157
named: never
136158
asyncArrow: always
159+
unused-imports/no-unused-imports: 'error'
160+
unused-imports/no-unused-vars:
161+
- warn
162+
- vars: all
163+
varsIgnorePattern: '^_'
164+
args: after-used
165+
argsIgnorePattern: '^_'
137166
overrides:
167+
- files:
168+
- '**/*.d.ts'
169+
rules:
170+
import/extensions: 'off'
171+
max-len: 'off'
172+
unused-imports/no-unused-vars: 'off'
138173
- files:
139174
- '**/test/**'
140-
env:
141-
jest: true
142175
rules:
143176
max-len: 'off'
144177
indent: 'off'

.gitignore

+6-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ jspm_packages
4242
# CodeLineX
4343
.codeline/
4444

45-
# vscode
46-
.vscode/
47-
4845
# Nix
4946
.nix-node
5047

5148
# Archives
5249
*.tgz
50+
51+
*.odp
52+
*.pdf
53+
*.png
54+
esm/
55+
sample.js

.gitlab-ci.yml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
image: node:lts-alpine
22

3-
include:
4-
- template: SAST.gitlab-ci.yml
5-
63
stages:
74
- tests
85
- security
@@ -25,34 +22,30 @@ tests & coverage:
2522
stage: tests
2623
script:
2724
- yarn install
28-
- yarn test
25+
- yarn coverage
2926
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
3027
artifacts:
3128
paths:
3229
- coverage/
3330

3431
security audit:
3532
stage: security
36-
needs: &tests-jobs
33+
needs:
3734
- code quality
3835
- dependencies outdated
3936
- tests & coverage
4037
script:
4138
- yarn audit --level high --groups dependencies
4239

43-
sast:
44-
stage: security
45-
needs: *tests-jobs
46-
4740
pages:
4841
stage: publish
49-
needs: &security-jobs
42+
needs:
5043
- tests & coverage
5144
- security audit
5245
dependencies:
5346
- tests & coverage
5447
script:
55-
- mv coverage/lcov-report/ public/
48+
- mv coverage/ public/
5649
artifacts:
5750
paths:
5851
- public
@@ -65,21 +58,27 @@ pages:
6558

6659
package:
6760
stage: publish
68-
needs: *security-jobs
61+
needs:
62+
- security audit
6963
script:
64+
- yarn install
65+
- yarn build
7066
- yarn pack
7167
artifacts:
7268
paths:
7369
- ./*.tgz
7470

7571
publish:
7672
stage: publish
77-
needs: *security-jobs
73+
needs:
74+
- security audit
7875
only:
7976
- tags
8077
- triggers
8178
script:
8279
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
80+
- yarn install
81+
- yarn build
8382
- yarn publish
8483
environment:
8584
name: npm

.npmignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ test
22
coverage
33
.*
44
sample.js
5-
jest.config.js
5+
vitest.config.ts
66
result.json
7+
tsconfig.json
78
*.tgz
89
*.nix
910
*.yml
1011
*.yaml
12+
*.odp
13+
*.pdf
14+
*.png

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"fabiospampinato.vscode-todo-plus",
5+
"wayou.vscode-todo-highlight",
6+
"ZixuanChen.vitest-explorer"
7+
]
8+
}

.vscode/launch.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "pwa-node",
9+
"request": "launch",
10+
"name": "Debug Current Test File",
11+
"autoAttachChildProcesses": true,
12+
"skipFiles": [
13+
"<node_internals>/**",
14+
"**/node_modules/**",
15+
"**/coverage/**",
16+
"**/esm/**"
17+
],
18+
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
19+
"args": ["run", "${relativeFile}"],
20+
"smartStep": true,
21+
"console": "integratedTerminal"
22+
}
23+
]
24+
}

.vscode/settings.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"todo.file.exclude": [
3+
"**/esm/**",
4+
"**/.!(todo|todos|task|tasks)/**",
5+
"**/_output/**",
6+
"**/bower_components/**",
7+
"**/build/**",
8+
"**/dist/**",
9+
"**/venv/**",
10+
"**/node_modules/**",
11+
"**/out/**",
12+
"**/output/**",
13+
"**/release/**",
14+
"**/releases/**",
15+
"**/static/**",
16+
"**/target/**",
17+
"**/third_party/**",
18+
"**/vendor/**",
19+
"**/coverage/**"
20+
],
21+
"vitest.enable": true,
22+
"vitest.showFailMessages": true,
23+
"vitest.commandLine": "yarn test",
24+
"todo.embedded.exclude": [
25+
"**/esm/**",
26+
"**/coverage/**",
27+
"**/test/spec/issues*",
28+
"**/.*",
29+
"**/.*/**",
30+
"**/_output/**",
31+
"**/bower_components/**",
32+
"**/build/**",
33+
"**/dist/**",
34+
"**/venv/**",
35+
"**/node_modules/**",
36+
"**/out/**",
37+
"**/output/**",
38+
"**/release/**",
39+
"**/releases/**",
40+
"**/static/**",
41+
"**/target/**",
42+
"**/third_party/**",
43+
"**/vendor/**",
44+
"**/CHANGELOG",
45+
"**/CHANGELOG.*",
46+
"**/*.min.*",
47+
"**/*.map",
48+
"**/*.{3ds,3g2,3gp,7z,a,aac,adp,ai,aif,aiff,alz,ape,apk,ar,arj,asf,au,avi,bak,baml,bh,bin,bk,bmp,btif,bz2,bzip2,cab,caf,cgm,class,cmx,cpio,cr2,csv,cur,dat,dcm,deb,dex,djvu,dll,dmg,dng,doc,docm,docx,dot,dotm,dra,DS_Store,dsk,dts,dtshd,dvb,dwg,dxf,ecelp4800,ecelp7470,ecelp9600,egg,eol,eot,epub,exe,f4v,fbs,fh,fla,flac,fli,flv,fpx,fst,fvt,g3,gif,graffle,gz,gzip,h261,h263,h264,icns,ico,ief,img,ipa,iso,jar,jpeg,jpg,jpgv,jpm,jxr,key,ktx,lha,lib,lvp,lz,lzh,lzma,lzo,m3u,m4a,m4v,mar,mdi,mht,mid,midi,mj2,mka,mkv,mmr,mng,mobi,mov,movie,mp3,mp4,mp4a,mpeg,mpg,mpga,mxu,nef,npx,numbers,o,oga,ogg,ogv,otf,pages,pbm,pcx,pdb,pdf,pea,pgm,pic,png,pnm,pot,potm,potx,ppa,ppam,ppm,pps,ppsm,ppsx,ppt,pptm,pptx,psd,pya,pyc,pyo,pyv,qt,rar,ras,raw,resources,rgb,rip,rlc,rmf,rmvb,rtf,rz,s3m,s7z,scpt,sgi,shar,sil,sketch,slk,smv,so,sub,swf,tar,tbz,tbz2,tga,tgz,thmx,tif,tiff,tlz,ttc,ttf,txz,udf,uvh,uvi,uvm,uvp,uvs,uvu,viv,vob,war,wav,wax,wbmp,wdp,weba,webm,webp,whl,wim,wm,wma,wmv,wmx,woff,woff2,wvx,xbm,xif,xla,xlam,xls,xlsb,xlsm,xlsx,xlt,xltm,xltx,xm,xmind,xpi,xpm,xwd,xz,z,zip,zipx}"
49+
],
50+
"todo.embedded.providers.ag.args": "",
51+
"todo.embedded.providers.ag.regex": "(?:#|// @|//|/\\*+|<!--|--|\\* @|\\{!|\\{\\{!--|\\{\\{!) *(TODO|FIXME|FIX|BUG|UGLY|HACK|IDEA|REVIEW|DEBUG|OPTIMIZE)",
52+
"todo.embedded.providers.rg.regex": "(?:#|// @|//|/\\*+|<!--|--|\\* @|\\{!|\\{\\{!--|\\{\\{!) *(TODO|FIXME|FIX|BUG|UGLY|HACK|IDEA|REVIEW|DEBUG|OPTIMIZE)",
53+
"todo.embedded.providers.rg.args": "",
54+
"todo.embedded.provider": "javascript",
55+
"files.exclude": {
56+
"**/.directory": true,
57+
"**/esm": true,
58+
"**/node_modules": true
59+
}
60+
}

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## Vuedoc Parser 4.0.0-beta10
2+
3+
This release introduces Vuedoc Plugins and many other new features and
4+
improvements:
5+
6+
**New features**
7+
8+
- Introduce Vuedoc Plugins
9+
- Add support of Vue Mixins
10+
- Load imports automatically when needed
11+
- Add `options.resolver` used to resolve imports
12+
- Extensible Parsing with `options.composition`
13+
- Add `@vuedoc/parser/test-utils` for testing
14+
15+
**Improvements**
16+
17+
- Use `EventTarget` as base class for the main parser class. This help for a
18+
better events handling and useful for preventing event propagation.
19+
- Improve parsing of variable declarations
20+
- Improve parsing performance by reducing internal instances
21+
- Improve documentation by adding more examples
22+
23+
**Dependencies Changes***
24+
25+
- Upgrade to `@babel/[email protected]`
26+
127
## Vuedoc Parser 4.0.0-beta9
228

329
This release fixes an ESM import bug and upgrades to @babel/parser@7.18.9.

CONTRIBUTING.md

+17
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ Therefore:
3737
would have expected.
3838
* A detailed description of the behavior that you expect.
3939

40+
## Development Setup
41+
42+
1. [Install Nix Package Manager](https://nixos.org/manual/nix/stable/installation/installing-binary.html)
43+
44+
2. [Install `direnv` with your OS package manager](https://direnv.net/docs/installation.html#from-system-packages)
45+
46+
3. [Hook it `direnv` into your shell](https://direnv.net/docs/hook.html)
47+
48+
4. At the top-level of your project run:
49+
50+
```sh
51+
direnv allow
52+
```
53+
54+
> The next time your launch your terminal and enter the top-level of your
55+
> project, `direnv` will check for changes.
56+
4057
## Contribute
4158

4259
Contributions to Vuedoc Parser are welcome. Here is how you can contribute:

0 commit comments

Comments
 (0)