diff --git a/.husky/pre-commit b/.husky/pre-commit index aacd883b..7083da50 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,8 @@ pnpm run lint pnpm run check + +if [[ ! -z $(cat package.json | grep 'link:') ]]; then + echo "Some packages are linked to local files!" + exit 1 +fi + diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index c3f32ccf..60f2508d 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -9,6 +9,7 @@ android { apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" dependencies { + implementation project(':capacitor-community-safe-area') implementation project(':capacitor-app') implementation project(':capacitor-keyboard') implementation project(':nostr-signer-capacitor-plugin') diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 40d983ab..89572353 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -2,6 +2,9 @@ include ':capacitor-android' project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@7.2.0_@capacitor+core@7.2.0/node_modules/@capacitor/android/capacitor') +include ':capacitor-community-safe-area' +project(':capacitor-community-safe-area').projectDir = new File('../node_modules/.pnpm/@capacitor-community+safe-area@7.0.0-alpha.1_@capacitor+core@7.2.0/node_modules/@capacitor-community/safe-area/android') + include ':capacitor-app' project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/app/android') diff --git a/build-in-production.sh b/build-in-production.sh index 0d3c9e96..b0700b2d 100755 --- a/build-in-production.sh +++ b/build-in-production.sh @@ -6,11 +6,8 @@ git describe --tags --abbrev=0 export VITE_BUILD_VERSION=$RENDER_GIT_COMMIT export VITE_BUILD_HASH=$RENDER_GIT_COMMIT -# Remove link overrides -node remove-pnpm-overrides.js package.json - -# When CI=true as it is on render.com, removing link overrides breaks the lockfile -pnpm i --no-frozen-lockfile +# Install dependencies +pnpm i # Rebuild sharp pnpm rebuild diff --git a/ios/App/Podfile b/ios/App/Podfile index ded1dc90..397e79d9 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -11,6 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods pod 'Capacitor', :path => '../../node_modules/.pnpm/@capacitor+ios@7.2.0_@capacitor+core@7.2.0/node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/.pnpm/@capacitor+ios@7.2.0_@capacitor+core@7.2.0/node_modules/@capacitor/ios' + pod 'CapacitorCommunitySafeArea', :path => '../../node_modules/.pnpm/@capacitor-community+safe-area@7.0.0-alpha.1_@capacitor+core@7.2.0/node_modules/@capacitor-community/safe-area' pod 'CapacitorApp', :path => '../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/app' pod 'CapacitorKeyboard', :path => '../../node_modules/.pnpm/@capacitor+keyboard@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/keyboard' pod 'NostrSignerCapacitorPlugin', :path => '../../node_modules/.pnpm/nostr-signer-capacitor-plugin@0.0.4_@capacitor+core@7.2.0/node_modules/nostr-signer-capacitor-plugin' diff --git a/package.json b/package.json index 268a8547..3c04d233 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "devDependencies": { "@capacitor/assets": "^3.0.5", + "@eslint/js": "^9.26.0", "@sentry/cli": "^2.40.0", "@sveltejs/kit": "^2.5.27", "@sveltejs/vite-plugin-svelte": "^4.0.0", @@ -49,21 +50,22 @@ "@poppanator/sveltekit-svg": "^4.2.1", "@sentry/browser": "^8.35.0", "@sveltejs/adapter-static": "^3.0.4", + "@tiptap/core": "^2.12.0", "@types/qrcode": "^1.5.5", "@vite-pwa/assets-generator": "^0.2.6", "@vite-pwa/sveltekit": "^0.6.6", - "@welshman/app": "^0.2.5", - "@welshman/content": "^0.2.2", - "@welshman/dvm": "^0.2.0", - "@welshman/editor": "^0.2.4", - "@welshman/feeds": "^0.2.2", - "@welshman/lib": "^0.2.2", - "@welshman/net": "^0.2.3", - "@welshman/relay": "^0.2.0", - "@welshman/router": "^0.2.0", - "@welshman/signer": "^0.2.3", - "@welshman/store": "^0.2.0", - "@welshman/util": "^0.2.3", + "@welshman/app": "^0.3.0", + "@welshman/content": "^0.3.0", + "@welshman/dvm": "^0.3.0", + "@welshman/editor": "^0.3.0", + "@welshman/feeds": "^0.3.0", + "@welshman/lib": "^0.3.0", + "@welshman/net": "^0.3.0", + "@welshman/relay": "^0.3.0", + "@welshman/router": "^0.3.0", + "@welshman/signer": "^0.3.0", + "@welshman/store": "^0.3.0", + "@welshman/util": "^0.3.0", "daisyui": "^4.12.10", "date-picker-svelte": "^2.13.0", "dotenv": "^16.4.5", @@ -74,23 +76,10 @@ "nostr-signer-capacitor-plugin": "^0.0.4", "nostr-tools": "^2.7.2", "prettier-plugin-tailwindcss": "^0.6.5", - "qrcode": "^1.5.4" + "qrcode": "^1.5.4", + "tippy.js": "^6.3.7" }, "pnpm": { - "overrides": { - "@welshman/lib": "link:../welshman/packages/lib", - "@welshman/util": "link:../welshman/packages/util", - "@welshman/app": "link:../welshman/packages/app", - "@welshman/content": "link:../welshman/packages/content", - "@welshman/dvm": "link:../welshman/packages/dvm", - "@welshman/feeds": "link:../welshman/packages/feeds", - "@welshman/net": "link:../welshman/packages/net", - "@welshman/relay": "link:../welshman/packages/relay", - "@welshman/router": "link:../welshman/packages/router", - "@welshman/signer": "link:../welshman/packages/signer", - "@welshman/store": "link:../welshman/packages/store", - "@welshman/editor": "link:../welshman/packages/editor" - }, "ignoredBuiltDependencies": [ "@sentry/cli", "esbuild" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98dac42c..9e08b8b5 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/remove-pnpm-overrides.js b/remove-pnpm-overrides.js deleted file mode 100644 index 4df007d7..00000000 --- a/remove-pnpm-overrides.js +++ /dev/null @@ -1,25 +0,0 @@ -// This script is necessary for installing stuff on a host, since our links don't exist there. - -import fs from "fs" - -const pkgName = process.argv[2] - -if (!pkgName?.endsWith("package.json")) { - console.log("File passed was not a package.json file") - process.exit(1) -} - -const pkg = JSON.parse(fs.readFileSync(pkgName, "utf8")) - -if (pkg.pnpm && pkg.pnpm.overrides) { - // Use $package notation to make sure we only get one copy of each welshman dependency - // TODO: move welshman to a single package to straighten all this out. - for (const k of Object.keys(pkg.pnpm.overrides)) { - pkg.pnpm.overrides[k] = '$' + k - } - - fs.writeFileSync(pkgName, JSON.stringify(pkg, null, 2) + "\n") - console.log("Removed pnpm.overrides from package.json") -} else { - console.log("No pnpm.overrides found in package.json") -}