node-precinct icon indicating copy to clipboard operation
node-precinct copied to clipboard

added support for vue single file components

Open Havunen opened this issue 1 year ago • 4 comments

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

Havunen avatar Aug 29 '23 17:08 Havunen

This pr relates to: https://github.com/pahen/madge/issues/122 and https://github.com/dependents/node-filing-cabinet/pull/111

Havunen avatar Aug 29 '23 17:08 Havunen

@XhmikosR can we merge these PRs please?

Havunen avatar Sep 04 '23 14:09 Havunen

ping @XhmikosR

Havunen avatar Oct 18 '23 16:10 Havunen

resolved conflicts again

Havunen avatar Nov 28 '23 13:11 Havunen

is there any chance to merge this PR, need vue support too @Havunen @XhmikosR

tangtangtangtangtang avatar Mar 19 '24 11:03 tangtangtangtangtang

Sorry, I personally won't merge a PR that adds ~~45 MB~~ 49 MB to the deps. (https://packagephobia.com/result?p=detective-vue2)

XhmikosR avatar Apr 03 '24 07:04 XhmikosR

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

Havunen avatar Apr 04 '24 11:04 Havunen

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

Havunen avatar Apr 04 '24 11:04 Havunen

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.

XhmikosR avatar Apr 04 '24 18:04 XhmikosR

@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 avatar Apr 14 '24 06:04 XhmikosR

@XhmikosR I rebased the branch and also added 1 more test

Havunen avatar Apr 14 '24 08:04 Havunen

@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

XhmikosR avatar Apr 14 '24 11:04 XhmikosR

Oh, also feel free to move the repo under the dependents org if you prefer.

XhmikosR avatar Apr 14 '24 11:04 XhmikosR

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

Havunen avatar Apr 14 '24 19:04 Havunen

Thanks! I don't see the repo settings tab, unfortunately :/

XhmikosR avatar Apr 14 '24 19:04 XhmikosR

If you delete your fork I can move the ownership to you and then you can move it to the org

Havunen avatar Apr 14 '24 19:04 Havunen

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?

XhmikosR avatar Apr 14 '24 19:04 XhmikosR

Okay, it seems to work now. I initialized the transfer

Havunen avatar Apr 14 '24 19:04 Havunen