Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Pnpm as package manager and other improvements #1507

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

hunshamar
Copy link
Contributor

@hunshamar hunshamar commented Feb 18, 2025

Background

Pnpm has better monorepo support over npm and improves performance, disk usage, and dependency resolution.

Introduction of pnpm in this project highlighted some issues which are also resolved in this pr.

Solution

  • Replace npm with pnpm as package manger
  • Update CI pipelines and docker to use pnpm
    • Update docker to install from frozen lockfile, in stead to ensures that dependencies are installed exactly as specified, avoiding unexpected version updates
  • Fix dependency cycle where spor-react-icons imports spor-package, which again imports spor-react-icons
  • Update docs to use pnpm
  • Install correct npm-packages in apps/packages in monorepo. Previously many packages were used from node_modules without being locally installed in project
  • Replace package install from npm-feed with direct "workspace*"-installs to improve local development
  • Replace inline commands for tsup with tsup.config.ts-files for better readability and maintainability
  • Use nodemon to enable hot reload for changes in spor-design-tokens, so you dont need to manually rebuild.

@hunshamar hunshamar requested review from ithen15 and a team as code owners February 18, 2025 09:11
@hunshamar hunshamar requested review from Cmoen11, leiferikbjorkli, cibietici, alicemacl, mtdyrli, mcklien and Siljeelisestrm and removed request for a team February 18, 2025 09:11
Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 78d67c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@vygruppen/spor-icon-react-native Minor
@vygruppen/spor-design-tokens Minor
@vygruppen/spor-icon-react Minor
@vygruppen/spor-loader Minor
@vygruppen/spor-react Minor
@vygruppen/spor-icon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@leiferikbjorkli leiferikbjorkli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rått! Før denne merges så er det fint om du tar en gjennomgang av PRen med web-techleads og andre Spor-interesserte. For at vi andre kan lære litt og at vi kan snakke om hvordan dette vil påvirke de andre løsningene vi har. 🙂

@hunshamar
Copy link
Contributor Author

Rått! Før denne merges så er det fint om du tar en gjennomgang av PRen med web-techleads og andre Spor-interesserte. For at vi andre kan lære litt og at vi kan snakke om hvordan dette vil påvirke de andre løsningene vi har. 🙂

Enig!
Snakket litt med Christian og, og vi ble enige om å ta det opp på neste websync-møte.

@hunshamar hunshamar changed the title Build: Pnpm as package manager and other fixes Build: Pnpm as package manager and other improvements Feb 18, 2025
```

### Develop

To develop all apps and packages, run the following command:

```
npm run dev
pnpm dev
```

This will start all apps and packages in development mode. You can then visit the following URLs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mener det er en codesandbox seksjon i denne readme, kan du fjerne den også?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants