Skip to content

Commit 8a2c1ca

Browse files
committed
fix: resolve conflicts
2 parents b04d73d + b74d3ea commit 8a2c1ca

Some content is hidden

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

86 files changed

+1481
-355
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
IMPORTANT: Please use the following link to create a new issue:
33
4-
https://new-issue.vuejs.org/?repo=vuejs/vue-devtools
4+
https://new-issue.vuejs.org/?repo=vuejs/devtools
55
66
If your issue was not created using the app above, it will be closed immediately.
77
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- Thank you for contributing! -->
2+
3+
### Description
4+
5+
<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
6+
7+
### Additional context
8+
9+
<!-- e.g. is there anything you'd like reviewers to focus on? -->
10+
11+
---
12+
13+
### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->
14+
15+
- [ ] Bug fix
16+
- [ ] New Feature
17+
- [ ] Documentation update
18+
- [ ] Other
19+
20+
### Before submitting the PR, please make sure you do the following
21+
22+
- [ ] Read the [Contributing Guidelines](https://devtools.vuejs.org/guide/contributing.html).
23+
- [ ] Read the [Pull Request Guidelines](https://devtools.vuejs.org/guide/contributing.html#pull-request-guidelines) and follow the [Commit Convention](https://github.com/vuejs/devtools/blob/main/.github/commit-convention.md).
24+
- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
25+
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
26+
<!-- @TODO tests - [ ] Ideally, include relevant tests that fail without this PR but pass with it. -->

.github/commit-convention.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
<!-- prettier-ignore -->
10+
```js
11+
/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/
12+
```
13+
14+
#### Examples
15+
16+
Appears under "Features" header, `dev` subheader:
17+
18+
```
19+
feat(dev): add 'comments' option
20+
```
21+
22+
Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28:
23+
24+
```
25+
fix(dev): fix dev error
26+
27+
close #28
28+
```
29+
30+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
31+
32+
```
33+
perf(build): remove 'foo' option
34+
35+
BREAKING CHANGE: The 'foo' option has been removed.
36+
```
37+
38+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
39+
40+
```
41+
revert: feat(compiler): add 'comments' option
42+
43+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
44+
```
45+
46+
### Full Message Format
47+
48+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
49+
50+
```
51+
<type>(<scope>): <subject>
52+
<BLANK LINE>
53+
<body>
54+
<BLANK LINE>
55+
<footer>
56+
```
57+
58+
The **header** is mandatory and the **scope** of the header is optional.
59+
60+
### Revert
61+
62+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
63+
64+
### Type
65+
66+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
67+
68+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
69+
70+
### Scope
71+
72+
The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc...
73+
74+
### Subject
75+
76+
The subject contains a succinct description of the change:
77+
78+
- use the imperative, present tense: "change" not "changed" nor "changes"
79+
- don't capitalize the first letter
80+
- no dot (.) at the end
81+
82+
### Body
83+
84+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
85+
The body should include the motivation for the change and contrast this with previous behavior.
86+
87+
### Footer
88+
89+
The footer should contain any information about **Breaking Changes** and is also the place to
90+
reference GitHub issues that this commit **Closes**.
91+
92+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
.DS_Store
33
build
4+
/dist/*
45
*.zip
56
*.xpi
67
tests_output

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,37 @@
44

55
[Documentation](https://devtools.vuejs.org/)
66

7-
### License
7+
## Monorepo
8+
9+
|Package|Description|
10+
|-------|-----------|
11+
[api](./packages/api) | The public devtools API that can be installed in Vue plugins |
12+
[app-backend-api](./packages/app-backend-api) | Abstract API to link the Public API, the core and Vue handlers |
13+
[app-backend-core](./packages/app-backend-core) | The main logic injected in the page to interact with Vue apps |
14+
[app-backend-vue1](./packages/app-backend-vue1) | Decoupled handlers to support Vue 1 (soon) |
15+
[app-backend-vue2](./packages/app-backend-vue2) | Decoupled handlers to support Vue 2 |
16+
[app-backend-vue3](./packages/app-backend-vue3) | Decoupled handlers to support Vue 3 |
17+
[app-frontend](./packages/app-frontend) | Vue app displayed in the browser devtools pane |
18+
[shell-chrome](./packages/shell-chrome) | Chrome/Firefox extension |
19+
[shell-electron](./packages/shell-electron) | Electron standalone app |
20+
[shell-host](./packages/shell-host) | Development environment |
21+
[shell-dev-vue2](./packages/shell-dev-vue2) | Demo app for development (Vue 2) |
22+
[shell-dev-vue3](./packages/shell-dev-vue3) | Demo app for development (Vue 3) |
23+
24+
## Contributing
25+
26+
See the [Contributing guide](https://devtools.vuejs.org/guide/contributing.html).
27+
28+
## License
829

930
[MIT](http://opensource.org/licenses/MIT)
1031

1132
## Sponsors
1233

1334
[💚️ Become a Sponsor](https://github.com/sponsors/Akryum)
1435

15-
[![sponsors logos](https://guillaume-chau.info/sponsors.png)](https://guillaume-chau.info/sponsors)
36+
<p align="center">
37+
<a href="https://guillaume-chau.info/sponsors/" target="_blank">
38+
<img src='https://akryum.netlify.app/sponsors.svg'/>
39+
</a>
40+
</p>

docs/guide/contributing.md

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,76 @@
11
# Contributing
22

3+
Hi! We are really excited that you are interested in contributing to the Vue devtools. Before submitting your contribution, please make sure to take a moment and read through the following guide.
4+
5+
## Monorepo
6+
7+
The repository is a monorepo with several nested packages:
8+
9+
|Package|Description|
10+
|-------|-----------|
11+
[api](https://github.com/vuejs/devtools/tree/main/packages/api) | The public devtools API that can be installed in Vue plugins |
12+
[app-backend-api](https://github.com/vuejs/devtools/tree/main/packages/app-backend-api) | Abstract API to link the Public API, the core and Vue handlers |
13+
[app-backend-core](https://github.com/vuejs/devtools/tree/main/packages/app-backend-core) | The main logic injected in the page to interact with Vue apps |
14+
[app-backend-vue1](https://github.com/vuejs/devtools/tree/main/packages/app-backend-vue1) | Decoupled handlers to support Vue 1 (soon) |
15+
[app-backend-vue2](https://github.com/vuejs/devtools/tree/main/packages/app-backend-vue2) | Decoupled handlers to support Vue 2 |
16+
[app-backend-vue3](https://github.com/vuejs/devtools/tree/main/packages/app-backend-vue3) | Decoupled handlers to support Vue 3 |
17+
[app-frontend](https://github.com/vuejs/devtools/tree/main/packages/app-frontend) | Vue app displayed in the browser devtools pane |
18+
[shell-chrome](https://github.com/vuejs/devtools/tree/main/packages/shell-chrome) | Chrome/Firefox extension |
19+
[shell-electron](https://github.com/vuejs/devtools/tree/main/packages/shell-electron) | Electron standalone app |
20+
[shell-host](https://github.com/vuejs/devtools/tree/main/packages/shell-host) | Development environment |
21+
[shell-dev-vue2](https://github.com/vuejs/devtools/tree/main/packages/shell-dev-vue2) | Demo app for development (Vue 2) |
22+
[shell-dev-vue3](https://github.com/vuejs/devtools/tree/main/packages/shell-dev-vue3) | Demo app for development (Vue 3) |
23+
24+
325
## Development
426

527
1. Clone this repo
628
2. run `yarn install`
729
3. then run `yarn run build:watch` and `yarn run dev:vue3` in parallel
830
4. A plain shell with a test app will be available at [localhost:8090](http://localhost:8090/).
931

32+
## Pull Request Guidelines
33+
34+
Thank you for your code contribution! Before opening a PR, please make sure to read the following:
35+
36+
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch. For example: `feat/my-new-feature`.
37+
38+
- Please make sure that you allow maintainers to push changes to your branch when you create your PR.
39+
40+
- If adding a new feature:
41+
42+
<!-- @TODO Add accompanying test case.-->
43+
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
44+
45+
- If fixing bug:
46+
47+
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `fix: update entities encoding/decoding (fix #3899)`.
48+
- Provide a detailed description of the bug in the PR. Live demo preferred.
49+
<!-- @TODO - Add appropriate test coverage if applicable.-->
50+
51+
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
52+
53+
<!-- @TODO - Make sure tests pass!-->
54+
55+
- Commit messages must follow the [commit message convention](https://github.com/vuejs/devtools/blob/main/.github/commit-convention.md) so that changelogs can be automatically generated.
56+
57+
## Running tests
58+
59+
1. Run `yarn lint` to check code quality with ESLint.
60+
2. Run `yarn test` to run all tests. (@TODO)
61+
1062
## Testing as Chrome addon
1163

1264
This is useful when you want to build the extension with the source repo to get not-yet-released features.
1365

1466
1. Clone this repo
1567
2. `cd vue-devtools` the newly created folder
16-
2. run `yarn install`
17-
3. then run `yarn run build:watch` & `yarn run dev:chrome` in parallel
18-
4. Open the Chrome extension page (currently under `Menu` > `More Tools` > `Extensions`)
19-
5. Check "developer mode" on the top-right corner
20-
6. Click the "load unpacked" button on the left, and choose the folder: `vue-devtools/packages/shell-chrome/`
68+
3. run `yarn install`
69+
4. then run `yarn run build:watch` & `yarn run dev:chrome` in parallel
70+
5. Open the Chrome extension page (currently under `Menu` > `More Tools` > `Extensions`)
71+
6. Check "developer mode" on the top-right corner
72+
7. Click the "load unpacked" button on the left, and choose the folder: `vue-devtools/packages/shell-chrome/` (it will have an orange disk icon)
73+
8. Make sure you disable all other versions of the extension
2174

2275
## Testing as Firefox addon
2376

@@ -37,3 +90,10 @@ This is useful when you want to build the extension with the source repo to get
3790
3. run `yarn install`
3891
4. then run `yarn run build:watch` and `yarn run dev:chrome` in parallel
3992
5. run `yarn run:firefox`
93+
94+
## Docs development
95+
96+
1. Clone this repo
97+
2. `cd vue-devtools` the newly created folder
98+
3. run `yarn install`
99+
4. run `docs:dev`

docs/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ footer: MIT Licensed | Copyright © 2014-present Evan You, Guillaume Chau
1313

1414
[💚️ Become a Sponsor](https://github.com/sponsors/Akryum)
1515

16-
[![sponsors logos](https://guillaume-chau.info/sponsors.png)](https://guillaume-chau.info/sponsors)
16+
<p align="center">
17+
<a href="https://guillaume-chau.info/sponsors/" target="_blank">
18+
<img src='https://akryum.netlify.app/sponsors.svg'/>
19+
</a>
20+
</p>

docs/plugin/api-reference.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,14 @@ api.selectInspectorNode('test-inspector', 'some-node-id')
500500

501501
## Timeline
502502

503+
### now
504+
505+
Returns the current time with the maximum available precision.
506+
507+
```js
508+
api.now()
509+
```
510+
503511
### addTimelineLayer
504512

505513
Register a new timeline layer with this method. The options are:
@@ -539,7 +547,7 @@ Example:
539547
api.addTimelineEvent({
540548
layerId: 'test-layer',
541549
event: {
542-
time: Date.now(),
550+
time: api.now(),
543551
data: {
544552
info: 'window.keyup',
545553
key: event.key

docs/plugin/plugins-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ window.addEventListener('click', event => {
10121012
api.addTimelineEvent({
10131013
layerId: timelineLayerId,
10141014
event: {
1015-
time: Date.now(),
1015+
time: api.now(),
10161016
data: {
10171017
mouseX: event.clientX,
10181018
mouseY: event.clientY
@@ -1046,7 +1046,7 @@ const groupId = 'group-1'
10461046
devtoolsApi.addTimelineEvent({
10471047
layerId: timelineLayerId,
10481048
event: {
1049-
time: Date.now(),
1049+
time: api.now(),
10501050
data: {
10511051
label: 'group test'
10521052
},
@@ -1058,7 +1058,7 @@ devtoolsApi.addTimelineEvent({
10581058
devtoolsApi.addTimelineEvent({
10591059
layerId: timelineLayerId,
10601060
event: {
1061-
time: Date.now() + 10,
1061+
time: api.now() + 10,
10621062
data: {
10631063
label: 'group test (event 2)',
10641064
},
@@ -1070,7 +1070,7 @@ devtoolsApi.addTimelineEvent({
10701070
devtoolsApi.addTimelineEvent({
10711071
layerId: timelineLayerId,
10721072
event: {
1073-
time: Date.now() + 20,
1073+
time: api.now() + 20,
10741074
data: {
10751075
label: 'group test (event 3)',
10761076
},
@@ -1182,7 +1182,7 @@ export function setupDevtools (app, data) {
11821182
devtoolsApi.addTimelineEvent({
11831183
layerId: timelineLayerId,
11841184
event: {
1185-
time: Date.now(),
1185+
time: api.now(),
11861186
data: {
11871187
label
11881188
},
@@ -1196,7 +1196,7 @@ export function setupDevtools (app, data) {
11961196
devtoolsApi.addTimelineEvent({
11971197
layerId: timelineLayerId,
11981198
event: {
1199-
time: Date.now(),
1199+
time: api.now(),
12001200
data: {
12011201
label,
12021202
done: true

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-devtools",
3-
"version": "6.0.2",
3+
"version": "6.0.13",
44
"description": "devtools for Vue.js!",
55
"private": true,
66
"workspaces": [
@@ -11,6 +11,7 @@
1111
"dev:vue3": "concurrently \"cd packages/shell-dev-vue3 && yarn dev\" \"cd packages/shell-host && yarn dev\"",
1212
"dev:chrome": "cd packages/shell-chrome && webpack --watch",
1313
"dev:chrome:prod": "cd packages/shell-chrome && cross-env NODE_ENV=production webpack --watch",
14+
"dev:electron": "cd packages/shell-electron && npm run dev",
1415
"build": "lerna run build",
1516
"build:watch": "lerna run build --scope @vue-devtools/app-backend* --scope @vue-devtools/shared-* --scope @vue/devtools-api && lerna run build:watch --stream --no-sort --concurrency 99",
1617
"lint": "eslint --ext .js,.ts,.vue .",
@@ -20,7 +21,7 @@
2021
"release": "npm run test && node release.js && npm run build && npm run zip && npm run pub",
2122
"release:beta": "cross-env RELEASE_CHANNEL=beta npm run release && npm run sign:firefox",
2223
"pub": "npm run pub:electron && npm run pub:api",
23-
"pub:electron": "cd packages/shell-electron && npm publish --tag beta",
24+
"pub:electron": "cd packages/shell-electron && npm publish",
2425
"pub:api": "cd packages/api && npm publish",
2526
"test": "npm run lint && npm run test:types:front",
2627
"test:types:front": "tsc --noEmit",

packages/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/devtools-api",
3-
"version": "6.0.2",
3+
"version": "6.0.13",
44
"description": "Interact with the Vue devtools from the page",
55
"main": "lib/cjs/index.js",
66
"browser": "lib/esm/index.js",

packages/api/src/api/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface DevtoolsPluginApi<TSettings> {
1919
highlightElement (instance: ComponentInstance): void
2020
unhighlightElement (): void
2121
getSettings (pluginId?: string): TSettings
22+
now (): number
2223
/**
2324
* @private Not implemented yet
2425
*/

0 commit comments

Comments
 (0)