vue icon indicating copy to clipboard operation
vue copied to clipboard

Update peer dependency version

Open RussCoder opened this issue 3 years ago • 9 comments

Hello! Thank you for the nice icons.

I have switched to npm 7 and it installs peer dependencies by default. So when I updated Vue to 3.0.11 I got a conflict with phosphor-vue's peer dependencies:

  "peerDependencies": {
    "vue": "^3.0.0 <3.0.3"
  },

Could you, please, change it to ^3.0.0 and make a new patch release? Right now I can run npm install only with --legacy-peer-deps (when there is no package-lock.json).

RussCoder avatar Apr 21 '21 17:04 RussCoder

Are there any plans to add vue 3 support?

Clex1o1 avatar Feb 08 '22 20:02 Clex1o1

Vue 3 is supported, but due to a bundler bug it's not currently tree-shakable. Check the vue3 branch for info, and npm install ***@***.*** to install. We'll update the peer dependency to be friendly to recent versions.

On Tue, Feb 8, 2022, 3:01 PM Clex1o1 @.***> wrote:

Are there any plans to add vue 3 support?

— Reply to this email directly, view it on GitHub https://github.com/phosphor-icons/phosphor-vue/issues/9#issuecomment-1033008754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGL6MDEGQOCR2SV6KUZUHU3U2FZB7ANCNFSM43KYV46A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rektdeckard avatar Feb 08 '22 22:02 rektdeckard

I am facing the same issue and since upgrading to the latest npm version I need to install my dependencies using npm install --force or at least npm install --legacy-peer-deps: https://stackoverflow.com/questions/66020820/npm-when-to-use-force-and-legacy-peer-deps

Otherwise following error occurs:

npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.0.0 <3.0.3" from [email protected]
npm ERR! node_modules/phosphor-vue
npm ERR!   dev phosphor-vue@"4.4.0" from the root project

Moreover, I am puzzled that the dependency of phosphor-vue to vue is listed in the devDependencies with "vue": "^3.2.26" and in peerDependencies with "vue": "^3.0.0 <3.0.3". It does not match up!

raphaelmenges avatar Apr 19 '22 07:04 raphaelmenges

@rektdeckard , @dnlsndr can you guys remove this restriction or accept my PR?

Lootjs avatar Jun 11 '22 04:06 Lootjs

I've merged the PR, @rektdeckard can you please deploy a new npm version?

dnlsndr avatar Jun 15 '22 06:06 dnlsndr

Any updates on this? Using --legacy-peer-deps all the time feels quite award 🥲

raphaelmenges avatar Jul 07 '22 07:07 raphaelmenges

Also waiting for this 😓

martinleo avatar Jul 16 '22 09:07 martinleo

As many people have requested this now, and Tobias seems to be AFK for the moment, I'll see to deploy a temporary npm package that you can use in the mean time

dnlsndr avatar Jul 16 '22 13:07 dnlsndr

Hi there, I just wanted to let you know that I am currently having a look into how we can fix the deployment pipeline for this repo. In the meantime, feel free to use my reimplementation of the phosphor-vue library for Vue 3 here.

Since my version holds a lot of changes compared to the phosphor-vue library, I didn't want to break anything by commiting these changes to mainline. Thus I created my own. Note: My library does NOT have a global install for your vue application. This means you can't just put in a app.use() in your main.ts. You'll need to import each icon as soon as you want to use it. The reasoning behind this, is that tree-shakers still often get confused with the icon rollup builds, and often just import the whole icon library at once if you use even one icon. This again bloats your application and increases page load-times n-fold. It's anyways an antipattern generally advised against.

dnlsndr avatar Aug 05 '22 06:08 dnlsndr

Hi there, I just wanted to let you know that I am currently having a look into how we can fix the deployment pipeline for this repo. In the meantime, feel free to use my reimplementation of the phosphor-vue library for Vue 3 here.

Since my version holds a lot of changes compared to the phosphor-vue library, I didn't want to break anything by commiting these changes to mainline. Thus I created my own. Note: My library does NOT have a global install for your vue application. This means you can't just put in a app.use() in your main.ts. You'll need to import each icon as soon as you want to use it. The reasoning behind this, is that tree-shakers still often get confused with the icon rollup builds, and often just import the whole icon library at once if you use even one icon. This again bloats your application and increases page load-times n-fold. It's anyways an antipattern generally advised against.

I liked your reimplementation just fine. It's better then use workarrounds

teseu avatar Jan 28 '23 00:01 teseu

Apologies to everyone here for leaving this project unmaintained and issues ignored. After a long, unintentional hiatus, I'm back at work on phosphor, and we have some plans for a new major release soon, across all libs and implementations:

  • More than 200 new icons, nearly complete as of writing this
  • Shipping assets and components using minified paths instead of basic shapes for ~30% bundle size reduction
  • Migrating to modern build tools (Vite)
  • Streamlining the update and deployment by using @phosphor-icons/core as source of truth for assets
  • Better tree-shaking support in places that need it (I.E. here)
  • Moving all libs under the @phosphor-icons org / namespace on NPM

I understand if many of you have moved permanently to @dnlsndr/vue-phosphor-icons, and I don't blame you! I'd love to upstream some of those improvements here as part of this work. But I wanted to let you know that I'm planning to revive this repo.

Have said it several times before here, but I'm not a Vue dev -- so I'm looking to appoint someone (@dnlsndr ?) to have write access to our NPM org, as well as permissions here, to keep things running. In the mean time, I have published the peer dependency fix in #25 under [email protected] / phosphor-vue@next.

Thanks everyone for the patience

rektdeckard avatar Jan 28 '23 08:01 rektdeckard