core
core copied to clipboard
fix: verify commit msg.
When I try to make vue core a submodule of my project:
git submodule add https://github.com/vuejs/core.git
do something and git commit:
git commit -am "docs: add comments."
it will throw error:
➜ core git:(heads/v3.4.21) ✗ git commit -am "docs: add comments."
✔ Preparing lint-staged...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...
> @3.4.21 check /Volumes/work_data/Web_data/Web_project/code/Vue3/source/core
> tsc --incremental --noEmit
node:fs:453
return binding.readFileUtf8(path, stringToFlags(options.flag));
^
Error: ENOTDIR: not a directory, open '/Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/.git/COMMIT_EDITMSG'
at readFileSync (node:fs:453:20)
at file:///Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/scripts/verify-commit.js:7:13
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:113:12) {
errno: -20,
code: 'ENOTDIR',
syscall: 'open',
path: '/Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/.git/COMMIT_EDITMSG'
}
Size Report
Bundles
| File | Size | Gzip | Brotli |
|---|---|---|---|
| runtime-dom.global.prod.js | 90.5 kB | 34.4 kB | 31 kB |
| vue.global.prod.js | 148 kB | 53.7 kB | 47.9 kB |
Usages
| Name | Size | Gzip | Brotli |
|---|---|---|---|
| createApp | 50.7 kB | 19.8 kB | 18.1 kB |
| createSSRApp | 54.1 kB | 21.1 kB | 19.3 kB |
| defineCustomElement | 53 kB | 20.6 kB | 18.7 kB |
| overall | 64.4 kB | 24.8 kB | 22.5 kB |
I don't think it's necessary to add this check given our current repository setup. It could create more work for the Vue.js maintainers without providing clear benefits for us. Plus, future maintainers might not even understand the purpose of these lines.
Since you're making Vue a submodule of your project, I believe you can address this in your own repository without needing to merge this change back to the upstream.
Thanks anyway! I learned a lot from this PR.