feat: use pnpm #1789
No reviewers
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#1789
Loading…
Reference in New Issue
No description provided.
Delete Branch "dpschen/frontend:feature/feat-use-pnpm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Not sure about deployment.
I've never used pnpm but it looks quite promising!
If we switch to it, we should switch over completely - that also includes the dockerfile and the CI. We also need to update the developer docs.
I think the build image we use in CI also needs an upgrade.
b008e106d1
to0bcfbdbacb
0bcfbdbacb
to922badd4da
Seems fine to me. The only thing missing now is the pipeline image and likely the docker image itself too.
We'll either need to use an image from someone else or build one ourselves. @dpschen Do you know if there are any official docker images from pnpm?
I did find this: https://pnpm.io/cli/fetch#usage-scenario
That looks like we'll need to add a
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
to ourDockerfile
and also build a simple docker image with that so we can use pnpm in the pipeline without having to install it on every pipeline step.922badd4da
to361e0e22d5
We'll need to upgrade renovate as well because only the newer versions support pnpm.
Where can this be upgraded?
I'll need to do that on the server.
Just upgraded, renovate should now be able to handle pnpm dependencies.
361e0e22d5
to508604abfd
508604abfd
to4e7ff78d78
4e7ff78d78
tobe0b8c585f
be0b8c585f
tofa61a33659
Hi dpschen!
Thank you for creating a PR!
I've deployed the changes of this PR on a preview environment under this URL: https://1789-feature-feat-use-pnpm--vikunja-frontend-preview.netlify.app
You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.
Have a nice day!
fa61a33659
tof01d2bbb35
b46cb624e0
to10a9f4a8cc
10a9f4a8cc
to3748082fec
3748082fec
to9d9e149f4a
9d9e149f4a
toede85ad0dd
I finished this as far as I can.
For the caching issues I need some help.
@ -19,0 +15,4 @@
ENV PNPM_CACHE_FOLDER .cache/pnpm/
# pnpm fetch does require only lockfile
But we'll still need to copy all frontend files anyway?
Yes. This just makes that step cachable.
Copying everything over happens in line 28.
About the caching: Can you update the PR once renovate pinned the just-now merged pina dependency? Then we should have a rather stable state to experiment until the pipeline works.
Btw: very useful here: https://github.com/antfu/ni
ede85ad0dd
toe5d04c98da
I updated the PR with pinned pinia
@ -45,2 +46,2 @@
YARN_CACHE_FOLDER: .cache/yarn/
CYPRESS_CACHE_FOLDER: .cache/cypress/
PNPM_CACHE_FOLDER: .cache/pnpm
CYPRESS_CACHE_FOLDER: .cache/cypress
Does it work if you re-add the
/
at the end?Probably not:
https://docs.cypress.io/guides/references/advanced-installation#Binary-cache
If I remember correctly removing the
/
was already a test. I guess both works.Since the version without
/
is mentioned in the docs I kept that.My first guess was maybe caching
node_modules
in ci was the issue - cypress states in their docs this should not be done. Didn't work though.My next guess is maybe different chrome library locations between alpine and the cypress image so I'm reverting that change now.
Aaand that didn't work either.
I'm very tempted to just add a
cypress install
to the pipeline....That seems to work - I'd say let's just keep it that way.
@dpschen would you mind sending another PR to change the docs at https://kolaente.dev/vikunja/api/src/branch/main/docs/content/doc/development/development.md#frontend-requirements ?
WIP: feat: use pnpmto feat: use pnpm@ -18,1 +14,3 @@
fi && \
fi
ENV PNPM_CACHE_FOLDER .cache/pnpm/
This is the only place where there is now a final
/