From 6ecdad6b214c22ab92bbc47428870a2328d55497 Mon Sep 17 00:00:00 2001 From: Tobias Frischmann Date: Sat, 19 Sep 2026 10:48:17 +0200 Subject: [PATCH] use pnpm 12 --- flake.lock | 6 +- flake.nix | 184 ++++++++++++++++++++++++++----------------------- package.json | 2 +- pnpm-lock.yaml | 101 +++++++++++++++++++++++++++ 4 files changed, 204 insertions(+), 89 deletions(-) diff --git a/flake.lock b/flake.lock index a2b5752..6cbc5c7 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1787135253, - "narHash": "sha256-RD2kNWCG+Bjo6h+JVjWVNntZs2GtRoeY2xHjts/FNkA=", + "lastModified": 1789684949, + "narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ffb3c9b700e759be2ef13237c9d8f953b32a1e46", + "rev": "e554fab72f81915600f3f449b786fd9af40439a5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ce40c7a..3595536 100644 --- a/flake.nix +++ b/flake.nix @@ -5,110 +5,124 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; - outputs = { self, nixpkgs }: + outputs = + { self, nixpkgs }: let system = "x86_64-linux"; version = "3.3.0"; - pnpm = pkgs.pnpm_11; + pnpm = pkgs.pnpm_12; pkgs = import nixpkgs { inherit system; }; - mkBackend = { enablePostgres ? false, enableSqlite ? false }: - assert (enablePostgres || enableSqlite) - || throw "taskline-backend: At least one database feature must be enabled (set enablePostgres = true or enableSqlite = true)."; - - pkgs.rustPlatform.buildRustPackage { - pname = "taskline-backend"; - inherit version; - - doCheck = false; - - src = pkgs.lib.fileset.toSource { - root = ./.; - fileset = pkgs.lib.fileset.unions [ - ./api - ./cli - ./rpi-checker - ./libs - ./Cargo.toml - ./Cargo.lock - ]; - }; - buildAndTestSubdir = "api"; + mkBackend = + { + enablePostgres ? false, + enableSqlite ? false, + }: + assert + (enablePostgres || enableSqlite) + || throw "taskline-backend: At least one database feature must be enabled (set enablePostgres = true or enableSqlite = true)."; + + pkgs.rustPlatform.buildRustPackage { + pname = "taskline-backend"; + inherit version; + + doCheck = false; + + src = pkgs.lib.fileset.toSource { + root = ./.; + fileset = pkgs.lib.fileset.unions [ + ./api + ./cli + ./rpi-checker + ./libs + ./Cargo.toml + ./Cargo.lock + ]; + }; + buildAndTestSubdir = "api"; - buildNoDefaultFeatures = true; + buildNoDefaultFeatures = true; - buildFeatures = - (pkgs.lib.optional enablePostgres "postgres") - ++ (pkgs.lib.optional enableSqlite "sqlite"); + buildFeatures = + (pkgs.lib.optional enablePostgres "postgres") ++ (pkgs.lib.optional enableSqlite "sqlite"); - cargoHash = "sha256-fHVgFyBhOz6LH+UB/C9I7PLF5CQZiEzOHD4Ms5jIC00="; + cargoHash = "sha256-fHVgFyBhOz6LH+UB/C9I7PLF5CQZiEzOHD4Ms5jIC00="; - nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = [ pkgs.openssl pkgs.cacert ]; - }; + nativeBuildInputs = [ pkgs.pkg-config ]; + buildInputs = [ + pkgs.openssl + pkgs.cacert + ]; + }; in { devShells.${system}.default = pkgs.mkShell { packages = [ - pkgs.pkg-config - pkgs.openssl - pkgs.sea-orm-cli - pkgs.cargo-nextest - ]; + pkgs.pkg-config + pkgs.openssl + pkgs.sea-orm-cli + pkgs.cargo-nextest + ]; }; packages.${system} = { frontend = pkgs.stdenv.mkDerivation (finalAttrs: { - pname = "taskline-frontend"; - inherit version; - - src = pkgs.lib.fileset.toSource { - root = ./.; - fileset = pkgs.lib.fileset.unions [ - ./app - ./i18n - ./public - ./server - ./.npmrc - ./.nuxtrc - ./nuxt.config.ts - ./package.json - ./pnpm-lock.yaml - ./pnpm-workspace.yaml - ]; - }; - - nativeBuildInputs = [ - pkgs.nodejs - pkgs.pnpmConfigHook - pnpm + pname = "taskline-frontend"; + inherit version; + + src = pkgs.lib.fileset.toSource { + root = ./.; + fileset = pkgs.lib.fileset.unions [ + ./app + ./i18n + ./public + ./server + ./.npmrc + ./.nuxtrc + ./nuxt.config.ts + ./package.json + ./pnpm-lock.yaml + ./pnpm-workspace.yaml ]; + }; + + nativeBuildInputs = [ + pkgs.nodejs + pkgs.pnpmConfigHook + pnpm + ]; + + pnpmDeps = pkgs.fetchPnpmDeps { + inherit (finalAttrs) pname version src; + inherit pnpm; + fetcherVersion = 4; + hash = "sha256-wjTLrQcrH4bzDKYqnYusgb2dT2JGL8gFfwVBrLafmsc="; + }; + + buildPhase = '' + runHook preBuild + export NUXT_TELEMETRY_DISABLED=1 + pnpm build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r .output/* $out/ + runHook postInstall + ''; + }); + + backend-postgres = mkBackend { + enablePostgres = true; + enableSqlite = false; + }; - pnpmDeps = pkgs.fetchPnpmDeps { - inherit (finalAttrs) pname version src; - inherit pnpm; - fetcherVersion = 4; - hash = "sha256-hlTOJkw0FEHnEsc4DaW3CmQHQV82BObQgh3cRD0BI0A="; - }; - - buildPhase = '' - runHook preBuild - export NUXT_TELEMETRY_DISABLED=1 - pnpm build - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out - cp -r .output/* $out/ - runHook postInstall - ''; - }); - - backend-postgres = mkBackend { enablePostgres = true; enableSqlite = false; }; - - backend-sqlite = mkBackend { enablePostgres = false; enableSqlite = true; }; + backend-sqlite = mkBackend { + enablePostgres = false; + enableSqlite = true; }; + }; }; } diff --git a/package.json b/package.json index cdaa34f..ff13dfd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "task-line", "private": true, "type": "module", - "packageManager": "pnpm@11.1.3", + "packageManager": "pnpm@12.3.4", "scripts": { "build": "nuxt build --dotenv .env.production", "dev": "nuxt dev", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 176e3ac..c0fc04b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,3 +1,104 @@ +--- +lockfileVersion: '9.0' + +importers: + + .: + configDependencies: {} + packageManagerDependencies: + pnpm: + specifier: 12.3.4 + version: 12.3.4 + +packages: + + '@pnpm/exe.darwin-arm64@12.3.4': + resolution: {integrity: sha512-PAyUol8T1+/+ViOiXAt51ECA+QnfXCqz6foL4bW+LsoX0NcVd5XVEM2mRQu+LV4oc7uRz9zf9U0P+XFfuQeDAw==} + cpu: [arm64] + os: [darwin] + + '@pnpm/exe.darwin-x64@12.3.4': + resolution: {integrity: sha512-fxP9JCk0Cdye+ePuj+GJJLMUMTqHGWRdb1dtv4How876uQ2ehxvenpgiYAir/ceO9PsYUZkFTtyZdx+rRu5QOA==} + cpu: [x64] + os: [darwin] + + '@pnpm/exe.linux-arm64-musl@12.3.4': + resolution: {integrity: sha512-FBOt0/7ye6O6q4AllVV5QMviB6qE6fqkeczV/+MDWQsmo+QJrlfsh6X7CpH/tClVpBZEyIbjpUoT8bNhCYBxEg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-arm64@12.3.4': + resolution: {integrity: sha512-t71AVA7LRqiKTyZ5xMYaZc2n5DfdpMbfokZuiIOXHBOM03ECnF0t4iYwaBDqJgVjlKYUOwaF/bRQajGNA4cJ4w==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-x64-musl@12.3.4': + resolution: {integrity: sha512-RPmk7Jb/aYaFvL2iyDN/AtMY+hUEsue732WmXpcuQ9tBpMnGyA5py7Z3+e+qmQaJ0zY/4ni9jJiyPBQHujmv6w==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-x64@12.3.4': + resolution: {integrity: sha512-2ZqOlSPkfwX1h5cR+FPiWf8+F+2hZT/3TvhUK5sigHqwaQCIiq8R7CGxhndKs63JtcLi2a1Qpo+wX/EoyfjyJQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.win32-arm64@12.3.4': + resolution: {integrity: sha512-ANyrHqyqco6SXBysUTRF74itDyyraea7IbFsKFdNXTjcFnfycTDx37EwuhdpPYFNSIh2JhUG4fByclsRfiHX7w==} + cpu: [arm64] + os: [win32] + + '@pnpm/exe.win32-x64@12.3.4': + resolution: {integrity: sha512-WH/KqBPY/hq2Tb7SgQltEZytimcjgKRaCRL/aM9CI0c67iKc5TVmHUhIiL3Ux9FB4bWn36i6XewUcScQI+zG8w==} + cpu: [x64] + os: [win32] + + pnpm@12.3.4: + resolution: {integrity: sha512-lhqkH7B32joEpEHZ+OFevAyW2o73ELLrZ7+e58sGEOq9SPH9hfUc/+c4RnhfoPh8VqOocqHYk/hEZ0G1zORUVw==} + engines: {node: '>=18.*'} + hasBin: true + +snapshots: + + '@pnpm/exe.darwin-arm64@12.3.4': + optional: true + + '@pnpm/exe.darwin-x64@12.3.4': + optional: true + + '@pnpm/exe.linux-arm64-musl@12.3.4': + optional: true + + '@pnpm/exe.linux-arm64@12.3.4': + optional: true + + '@pnpm/exe.linux-x64-musl@12.3.4': + optional: true + + '@pnpm/exe.linux-x64@12.3.4': + optional: true + + '@pnpm/exe.win32-arm64@12.3.4': + optional: true + + '@pnpm/exe.win32-x64@12.3.4': + optional: true + + pnpm@12.3.4: + optionalDependencies: + '@pnpm/exe.darwin-arm64': 12.3.4 + '@pnpm/exe.darwin-x64': 12.3.4 + '@pnpm/exe.linux-arm64': 12.3.4 + '@pnpm/exe.linux-arm64-musl': 12.3.4 + '@pnpm/exe.linux-x64': 12.3.4 + '@pnpm/exe.linux-x64-musl': 12.3.4 + '@pnpm/exe.win32-arm64': 12.3.4 + '@pnpm/exe.win32-x64': 12.3.4 + +--- lockfileVersion: '9.0' settings: -- 2.51.2