node-precinct
node-precinct copied to clipboard
added support for vue single file components
I realized vue sfc compiler v3 can also parse vue2 files which is enough to pull out dependencies from them, so I pinned the vue3 compiler as a dependency and that should fix the previous issue. I also merged latest changes to the PR
This pr relates to: https://github.com/pahen/madge/issues/122 and https://github.com/dependents/node-filing-cabinet/pull/111
@XhmikosR can we merge these PRs please?
ping @XhmikosR
resolved conflicts again
is there any chance to merge this PR, need vue support too @Havunen @XhmikosR
Sorry, I personally won't merge a PR that adds ~~45 MB~~ 49 MB to the deps. (https://packagephobia.com/result?p=detective-vue2)
It does not add that much, because it depends on the same deps as defined here to allow referencing them and npm will dedupe tthem. See https://github.com/dependents/node-precinct/blob/main/package.json#L43-L56 all the code is here: https://github.com/Havunen/detective-vue2/blob/main/index.js this is the only new dep: https://packagephobia.com/result?p=%40vue%2Fcompiler-sfc
One option is to not add a new package for detective-vue2 and implement this https://github.com/Havunen/detective-vue2/blob/main/index.js code directly here. I tried to follow the same coding pattern as used here
Node.js 14 is failing and I see + 25 packages (in this repo so both prod + dev).
Also, even if the size increase is 6.9 MB, it's not negligible, still.
@Havunen please cut a new detective-vue2 version with updated deps and rebase this. You are right that most deps should already be in our deps tree, so let's give this a go.
@XhmikosR I rebased the branch and also added 1 more test
@Havunen thanks. Can you please add tags to your repo and follow semver in the future?
I also submitted https://github.com/Havunen/detective-vue2/pull/1 which should be a major version bump probably, but feel free to adapt it to your needs.
Then we can land this and I'll cut a new minor release
Oh, also feel free to move the repo under the dependents org if you prefer.
I re-applied the change for v2 and invited you to the repository as a collaborator. I cannot move it to dependents organization. I can make you admin there and you can then move it
Thanks! I don't see the repo settings tab, unfortunately :/
If you delete your fork I can move the ownership to you and then you can move it to the org
Alright, I deleted my fork. Weird that it's not possible to do it in another way. I also added you to the org, maybe you can move the repo now?
Okay, it seems to work now. I initialized the transfer