chore(deps): use npm nostr-tools instead of JSR @nostr/tools

- Replace "npm:@jsr/nostr__tools" with "nostr-tools" to fix npm 404
- Update imports in NewEditProjectView and Vite configs
- Remove Vite aliases so resolution uses package exports
This commit is contained in:
Jose Olarte III
2026-03-09 20:25:20 +08:00
parent f3cf228b48
commit 7ae36ec361
9 changed files with 7889 additions and 220 deletions

View File

@@ -2438,7 +2438,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
resolve: { resolve: {
alias: { alias: {
'@': path.resolve(__dirname, 'src'), '@': path.resolve(__dirname, 'src'),
'@nostr/tools': path.resolve(__dirname, 'node_modules/@nostr/tools'), 'nostr-tools': path.resolve(__dirname, 'node_modules/nostr-tools'),
'path': path.resolve(__dirname, './src/utils/node-modules/path.js'), 'path': path.resolve(__dirname, './src/utils/node-modules/path.js'),
'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'), 'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'),
'crypto': path.resolve(__dirname, './src/utils/node-modules/crypto.js'), 'crypto': path.resolve(__dirname, './src/utils/node-modules/crypto.js'),
@@ -2447,7 +2447,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
}, },
optimizeDeps: { optimizeDeps: {
include: [ include: [
'@nostr/tools', 'nostr-tools',
'@jlongster/sql.js', '@jlongster/sql.js',
'absurd-sql', 'absurd-sql',
// ... additional dependencies // ... additional dependencies
@@ -2472,7 +2472,7 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
**Path Aliases**: **Path Aliases**:
- `@`: Points to `src/` directory - `@`: Points to `src/` directory
- `@nostr/tools`: Nostr tools library - `nostr-tools`: Nostr tools library
- `path`, `fs`, `crypto`: Node.js polyfills for browser - `path`, `fs`, `crypto`: Node.js polyfills for browser
### B.2 vite.config.web.mts ### B.2 vite.config.web.mts
@@ -2612,7 +2612,7 @@ export default defineConfig(async () => {
output: { output: {
manualChunks: { manualChunks: {
vendor: ["vue", "vue-router", "@vueuse/core"], vendor: ["vue", "vue-router", "@vueuse/core"],
crypto: ["@nostr/tools", "crypto-js"], crypto: ["nostr-tools", "crypto-js"],
ui: ["@fortawesome/vue-fontawesome"] ui: ["@fortawesome/vue-fontawesome"]
} }
} }

View File

@@ -38,13 +38,5 @@
{ {
"pkg": "@timesafari/daily-notification-plugin", "pkg": "@timesafari/daily-notification-plugin",
"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin" "classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"
},
{
"pkg": "SafeArea",
"classpath": "app.timesafari.safearea.SafeAreaPlugin"
},
{
"pkg": "SharedImage",
"classpath": "app.timesafari.sharedimage.SharedImagePlugin"
} }
] ]

8070
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -162,7 +162,7 @@
"@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/vue-fontawesome": "^3.0.6", "@fortawesome/vue-fontawesome": "^3.0.6",
"@jlongster/sql.js": "^1.6.7", "@jlongster/sql.js": "^1.6.7",
"@nostr/tools": "npm:@jsr/nostr__tools@^2.15.0", "nostr-tools": "^2.15.0",
"@peculiar/asn1-ecc": "^2.3.8", "@peculiar/asn1-ecc": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8", "@peculiar/asn1-schema": "^2.3.8",
"@pvermeer/dexie-encrypted-addon": "^3.0.0", "@pvermeer/dexie-encrypted-addon": "^3.0.0",

View File

@@ -276,7 +276,6 @@ const MIGRATIONS = [
ALTER TABLE settings ADD COLUMN reminderFastRolloverForTesting BOOLEAN DEFAULT FALSE; ALTER TABLE settings ADD COLUMN reminderFastRolloverForTesting BOOLEAN DEFAULT FALSE;
`, `,
}, },
]; ];
/** /**

View File

@@ -270,11 +270,11 @@
import "leaflet/dist/leaflet.css"; import "leaflet/dist/leaflet.css";
import { AxiosError, AxiosRequestHeaders } from "axios"; import { AxiosError, AxiosRequestHeaders } from "axios";
import { DateTime } from "luxon"; import { DateTime } from "luxon";
import { finalizeEvent } from "@nostr/tools"; import { finalizeEvent } from "nostr-tools";
import { import {
accountFromExtendedKey, accountFromExtendedKey,
extendedKeysFromSeedWords, extendedKeysFromSeedWords,
} from "@nostr/tools/nip06"; } from "nostr-tools/nip06";
import { Component, Vue } from "vue-facing-decorator"; import { Component, Vue } from "vue-facing-decorator";
import { LMap, LMarker, LTileLayer } from "@vue-leaflet/vue-leaflet"; import { LMap, LMarker, LTileLayer } from "@vue-leaflet/vue-leaflet";
import { RouteLocationNormalizedLoaded, Router } from "vue-router"; import { RouteLocationNormalizedLoaded, Router } from "vue-router";
@@ -326,7 +326,7 @@ import {
UnsignedEvent, UnsignedEvent,
VerifiedEvent, VerifiedEvent,
serializeEvent, serializeEvent,
} from "@nostr/tools"; } from "nostr-tools";
import { logger } from "../utils/logger"; import { logger } from "../utils/logger";

View File

@@ -91,8 +91,6 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
resolve: { resolve: {
alias: { alias: {
'@': path.resolve(__dirname, 'src'), '@': path.resolve(__dirname, 'src'),
'@nostr/tools': path.resolve(__dirname, 'node_modules/@nostr/tools'),
'@nostr/tools/nip06': path.resolve(__dirname, 'node_modules/@nostr/tools/nip06'),
...appConfig.aliasConfig, ...appConfig.aliasConfig,
'path': path.resolve(__dirname, './src/utils/node-modules/path.js'), 'path': path.resolve(__dirname, './src/utils/node-modules/path.js'),
'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'), 'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'),
@@ -102,8 +100,8 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
}, },
optimizeDeps: { optimizeDeps: {
include: [ include: [
'@nostr/tools', 'nostr-tools',
'@nostr/tools/nip06', 'nostr-tools/nip06',
'@jlongster/sql.js', '@jlongster/sql.js',
'absurd-sql', 'absurd-sql',
'absurd-sql/dist/indexeddb-main-thread', 'absurd-sql/dist/indexeddb-main-thread',

View File

@@ -105,7 +105,7 @@ export default defineConfig(async () => {
// Desktop can handle larger chunks // Desktop can handle larger chunks
manualChunks: { manualChunks: {
vendor: ["vue", "vue-router", "@vueuse/core"], vendor: ["vue", "vue-router", "@vueuse/core"],
crypto: ["@nostr/tools", "crypto-js"], crypto: ["nostr-tools", "crypto-js"],
ui: ["@fortawesome/vue-fontawesome"] ui: ["@fortawesome/vue-fontawesome"]
} }
} }

View File

@@ -105,8 +105,6 @@ export async function createOptimizedBuildConfig(mode: string): Promise<UserConf
resolve: { resolve: {
alias: { alias: {
'@': path.resolve(__dirname, 'src'), '@': path.resolve(__dirname, 'src'),
'@nostr/tools': path.resolve(__dirname, 'node_modules/@nostr/tools'),
'@nostr/tools/nip06': path.resolve(__dirname, 'node_modules/@nostr/tools/nip06'),
...appConfig.aliasConfig, ...appConfig.aliasConfig,
'path': path.resolve(__dirname, './src/utils/node-modules/path.js'), 'path': path.resolve(__dirname, './src/utils/node-modules/path.js'),
'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'), 'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'),
@@ -116,8 +114,8 @@ export async function createOptimizedBuildConfig(mode: string): Promise<UserConf
}, },
optimizeDeps: { optimizeDeps: {
include: [ include: [
'@nostr/tools', 'nostr-tools',
'@nostr/tools/nip06', 'nostr-tools/nip06',
'vue', 'vue',
'vue-router', 'vue-router',
'pinia', 'pinia',