Skip to content

Commit 761449e

Browse files
authored
Merge pull request #154 from tkskto/develop
v0.4.1
2 parents ef379f0 + 5c1dfca commit 761449e

File tree

10 files changed

+1157
-1027
lines changed

10 files changed

+1157
-1027
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 0.4.1
4+
5+
### Chores
6+
7+
- \#153 update dependency `vue-eslint-parser` to v8.2.0
8+
- \#138 update dependency `ws` to v8.5.0
9+
10+
### Fixes
11+
12+
- update Vue.js logo to SVG.
13+
314
## 0.4.0
415

516
### enhancement

package-lock.json

Lines changed: 1112 additions & 1001 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tkskto/vue-component-analyzer",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Analyze dependency tree for Vue.js SFC (Single File Component)",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
@@ -47,34 +47,34 @@
4747
"dependencies": {
4848
"commander": "8.3.0",
4949
"ejs": "3.1.6",
50-
"express": "4.17.1",
50+
"express": "4.17.3",
5151
"globby": "11.0.4",
5252
"mkdirp": "1.0.4",
5353
"opener": "1.5.2",
54-
"vue-eslint-parser": "8.0.1",
55-
"ws": "8.3.0"
54+
"vue-eslint-parser": "8.2.0",
55+
"ws": "8.5.0"
5656
},
5757
"devDependencies": {
58-
"@mitsue/eslint-config": "4.0.1",
58+
"@mitsue/eslint-config": "4.1.0",
5959
"@rollup/plugin-commonjs": "21.0.1",
6060
"@rollup/plugin-json": "4.1.0",
61-
"@rollup/plugin-node-resolve": "13.0.6",
61+
"@rollup/plugin-node-resolve": "13.1.3",
6262
"@rollup/plugin-typescript": "8.3.0",
6363
"@types/ejs": "3.1.0",
64-
"@types/express": "4.17.12",
64+
"@types/express": "4.17.13",
6565
"@types/mkdirp": "1.0.2",
66-
"@types/mocha": "9.0.0",
66+
"@types/mocha": "9.1.0",
6767
"@types/node": "16.11.11",
6868
"@types/opener": "1.4.0",
69-
"@types/ws": "8.2.1",
70-
"@typescript-eslint/eslint-plugin": "4.33.0",
71-
"@typescript-eslint/parser": "4.33.0",
72-
"eslint": "7.32.0",
69+
"@types/ws": "8.2.3",
70+
"@typescript-eslint/eslint-plugin": "5.12.0",
71+
"@typescript-eslint/parser": "5.12.0",
72+
"eslint": "8.9.0",
7373
"husky": "7.0.4",
74-
"lint-staged": "12.1.2",
75-
"mocha": "9.1.3",
74+
"lint-staged": "12.3.4",
75+
"mocha": "9.2.1",
7676
"nyc": "15.1.0",
77-
"rollup": "2.60.2",
77+
"rollup": "2.67.3",
7878
"rollup-plugin-license": "2.6.0",
7979
"rollup-plugin-terser": "7.0.2",
8080
"ts-mocha": "8.0.0",

src/client/ScreenCapture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const makeImage = (url: string): Promise<HTMLImageElement> => (
2525
export const makeSVG = async (app: HTMLDivElement, width: number, height: number): Promise<string> => {
2626
const clone = app.cloneNode(true) as HTMLDivElement;
2727

28-
const willRemoveElements = clone.querySelectorAll<HTMLImageElement>('img, script');
28+
const willRemoveElements = clone.querySelectorAll<HTMLImageElement>('img, script, svg');
2929

3030
willRemoveElements.forEach((element) => {
3131
if (element.parentElement) {

src/client/Seed.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class Seed {
1515

1616
private _count: number;
1717

18+
// eslint-disable-next-line no-use-before-define
1819
private _children: Seed[] = []; // imported modules from this file.
1920

2021
/**
@@ -64,7 +65,7 @@ export class Seed {
6465
let name = this._name;
6566

6667
if (this._name.endsWith('.vue')) {
67-
name = `<img class="icon" src="https://v3.vuejs.org/logo.png" alt="">${name}`;
68+
name = `<svg class="icon" viewBox="0 0 128 128" width="24" height="24"><use xlink:href="#logo"></use></svg>${name}`;
6869
} else if (this._name.endsWith('.js')) {
6970
name = `<img class="icon" src="https://raw.githubusercontent.com/voodootikigod/logo.js/master/js.png" alt="">${name}`;
7071
} else if (this._name.endsWith('.ts')) {

src/client/dialog/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,36 @@ class CustomDialog {
1818
}
1919
}
2020

21-
show = () => {
21+
show() {
2222
document.body.classList.add('-dialog-show');
2323
disableTabIndex('#dialog');
2424
}
2525

26-
close = () => {
26+
close() {
2727
document.body.classList.remove('-dialog-show');
2828
resetTabIndex();
2929
}
3030

31-
load = () => {
31+
load() {
3232
this.show();
3333

3434
if (this._contents) {
3535
this._contents.innerHTML = '<p>now loading...</p>';
3636
}
3737
}
3838

39-
complete = (html: string) => {
39+
complete(html: string) {
4040
if (this._contents) {
4141
this._contents.innerHTML = html;
4242
}
4343
}
4444

45-
showExportDialog = async () => {
45+
async showExportDialog() {
4646
this.load();
4747
const img = await capture();
4848
this._btnExport.href = img.src;
4949
this.complete(img.outerHTML);
50-
};
50+
}
5151
}
5252

5353
export const customDialog = new CustomDialog();

src/client/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class Model extends CustomEventDispatcher {
1515
public static EVENT = {
1616
DATA_UPDATE: 'dataUpdate',
1717
SETTING_CHANGED: 'settingChanged',
18-
}
18+
};
1919

2020
private _today: Date;
2121

src/client/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Renderer {
5959
}
6060

6161
this.render();
62-
}
62+
};
6363

6464
private renderLine(name: string, level: number, isLast: boolean): string {
6565
let line = ' ';

src/server/VueComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class VueComponent {
5353
this._importDeclaration = getImportDeclaration(esLintProgram.body);
5454
}
5555

56-
private getProps = (tokens: Token[]): string => {
56+
private getProps(tokens: Token[]): string {
5757
try {
5858
const propsDeclaration = JSON.parse(getDeclarationSyntax(tokens, 'props'));
5959

views/viewer.ejs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</main>
3737
<footer>
3838
<p>If you saw any problems, please let me know on <a href="https://github.com/tkskto/vue-component-analyzer/issues">github issue</a>.</p>
39+
<p>Vue.js logo is copy of <a href="https://vuejs.org/index.html">official Vue.js website</a>.</p>
3940
</footer>
4041
<div id="dialog" class="dialog">
4142
<div class="dialog-inner">
@@ -47,5 +48,11 @@
4748
</div>
4849
<div class="dialog-overlay"></div>
4950
</div>
51+
<svg class="logo" viewBox="0 0 128 128" width="24" height="24" data-v-5f26462c="">
52+
<symbol id="logo">
53+
<path fill="#42b883" d="M78.8,10L64,35.4L49.2,10H0l64,110l64-110C128,10,78.8,10,78.8,10z" data-v-5f26462c="" />
54+
<path fill="#35495e" d="M78.8,10L64,35.4L49.2,10H25.6L64,76l38.4-66H78.8z" data-v-5f26462c="" />
55+
</symbol>
56+
</svg>
5057
</body>
5158
</html>

0 commit comments

Comments
 (0)