javascript: Rename "browser" packages to "wasm"

This commit is contained in:
Pekka Enberg
2025-09-29 07:46:30 +03:00
parent fda1b89540
commit 57c279e2b0
57 changed files with 360 additions and 1344 deletions

View File

@@ -27,13 +27,13 @@
]
},
"../../packages/browser": {
"name": "@tursodatabase/database-browser",
"name": "@tursodatabase/database-wasm",
"version": "0.1.5",
"extraneous": true,
"license": "MIT",
"dependencies": {
"@napi-rs/wasm-runtime": "^1.0.3",
"@tursodatabase/database-browser-common": "^0.1.5",
"@tursodatabase/database-wasm-common": "^0.1.5",
"@tursodatabase/database-common": "^0.1.5"
},
"devDependencies": {
@@ -45,7 +45,7 @@
}
},
"../../packages/browser-common": {
"name": "@tursodatabase/database-browser-common",
"name": "@tursodatabase/database-wasm-common",
"version": "0.1.5",
"extraneous": true,
"license": "MIT",
@@ -77,13 +77,13 @@
}
},
"../../sync/packages/browser": {
"name": "@tursodatabase/sync-browser",
"name": "@tursodatabase/sync-wasm",
"version": "0.1.5",
"extraneous": true,
"license": "MIT",
"dependencies": {
"@napi-rs/wasm-runtime": "^1.0.3",
"@tursodatabase/database-browser-common": "^0.1.5",
"@tursodatabase/database-wasm-common": "^0.1.5",
"@tursodatabase/database-common": "^0.1.5",
"@tursodatabase/sync-common": "^0.1.5"
},

View File

@@ -6,7 +6,7 @@ export default defineConfig({
},
resolve: {
alias: {
'@tursodatabase/database-wasm32-wasi': '../../turso.wasi-browser.js'
'@tursodatabase/database-wasm32-wasi': '../../turso.wasi-wasm.js'
},
},
server: {

View File

@@ -166,7 +166,7 @@
</main>
<script type="module">
import { connect } from "@tursodatabase/database-browser";
import { connect } from "@tursodatabase/database-wasm";
const db = await connect('data.db');
// --- Wire your DB here --------------------------------------------------
// Provide window.executeQuery = async (sql) => ({ columns: string[], rows: any[][] })

View File

@@ -9,19 +9,19 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@tursodatabase/database-browser": "../../packages/browser"
"@tursodatabase/database-wasm": "../../packages/browser"
},
"devDependencies": {
"vite": "^7.1.4"
}
},
"../../packages/browser": {
"name": "@tursodatabase/database-browser",
"name": "@tursodatabase/database-wasm",
"version": "0.1.5",
"license": "MIT",
"dependencies": {
"@napi-rs/wasm-runtime": "^1.0.3",
"@tursodatabase/database-browser-common": "^0.1.5",
"@tursodatabase/database-wasm-common": "^0.1.5",
"@tursodatabase/database-common": "^0.1.5"
},
"devDependencies": {
@@ -71,7 +71,7 @@
"linux"
]
},
"node_modules/@tursodatabase/database-browser": {
"node_modules/@tursodatabase/database-wasm": {
"resolved": "../../packages/browser",
"link": true
},

View File

@@ -14,6 +14,6 @@
"vite": "^7.1.4"
},
"dependencies": {
"@tursodatabase/database-browser": "../../browser"
"@tursodatabase/database-wasm": "../../browser"
}
}