From cb73b143405880becb9ad055b1bd0d0e2f356fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Wed, 4 Sep 2024 21:36:31 +0200 Subject: [PATCH] chore: update versions (#24) --- package.json | 2 +- pnpm-lock.yaml | 15 ++++++++++++--- src/customize/nuxt.ts | 6 ++++-- src/versions.ts | 12 ++++++------ 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index be75cbd..f82746a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "kolorist": "^1.8.0", "magicast": "^0.3.4", "minimist": "^1.2.8", - "nypm": "^0.3.8", + "package-manager-detector": "^0.2.0", "prompts": "^2.4.2", "tsx": "^4.9.1", "typescript": "^5.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6a4e8f..618dd91 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,9 +50,9 @@ importers: minimist: specifier: ^1.2.8 version: 1.2.8 - nypm: - specifier: ^0.3.8 - version: 0.3.8 + package-manager-detector: + specifier: ^0.2.0 + version: 0.2.0 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -529,6 +529,7 @@ packages: '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -536,6 +537,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@humanwhocodes/retry@0.2.4': resolution: {integrity: sha512-Ttl/jHpxfS3st5sxwICYfk4pOH0WrLI1SpW283GgQL7sCWU7EHIOhX4b4fkIxr3tkfzwg8+FNojtzsIEE7Ecgg==} @@ -1601,6 +1603,7 @@ packages: glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -1676,6 +1679,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -2043,6 +2047,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4835,6 +4842,8 @@ snapshots: p-try@2.2.0: {} + package-manager-detector@0.2.0: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 diff --git a/src/customize/nuxt.ts b/src/customize/nuxt.ts index 8bba3a7..5ab1028 100644 --- a/src/customize/nuxt.ts +++ b/src/customize/nuxt.ts @@ -3,7 +3,7 @@ import path from 'node:path' import process from 'node:process' import { addNuxtModule } from 'magicast/helpers' import { generateCode, parseModule } from 'magicast' -import { detectPackageManager } from 'nypm' +import { detect } from 'package-manager-detector' import type { PackageJsonEntry, PromptsData } from '../types' import { preparePWAOptions } from '../pwa' import { MagicastViteOptions } from '../vite' @@ -89,7 +89,9 @@ export async function customize(prompts: PromptsData, v4: boolean) { // prepare package.json const pkg = JSON.parse(fs.readFileSync(path.join(outputRootPath, 'package.json'), 'utf-8')) - const pkgManager = await detectPackageManager(outputRootPath).then(res => res?.name || 'npm') + const pkgManager = await detect({ + cwd: outputRootPath, + }).then(res => res?.name || 'npm') // dependencies pkg.dependencies ??= {} diff --git a/src/versions.ts b/src/versions.ts index af41785..f6f09b7 100644 --- a/src/versions.ts +++ b/src/versions.ts @@ -1,10 +1,10 @@ export const WorkboxVersion = '^7.1.0' -export const VitePluginPWAVersion = '^0.20.1' -export const PWAAssetsVersion = '^0.2.4' -export const NuxtPWAModuleVersion = '^0.9.1' -export const SvelteKitPWAVersion = '^0.6.0' -export const RemixPWAVersion = '^0.1.0' +export const VitePluginPWAVersion = '^0.20.5' +export const PWAAssetsVersion = '^0.2.6' +export const NuxtPWAModuleVersion = '^0.10.5' +export const SvelteKitPWAVersion = '^0.6.5' +export const RemixPWAVersion = '^0.1.3' export const TypeScriptVersion = '^5.4.5' -export const VueTscVersion = '^2.0.16' +export const VueTscVersion = '^2.1.4' export const SharpVersion = '0.32.6' export const SharpIcoVersion = '0.1.5'