@weapp-sqlite/sqljs 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,8 +7,11 @@ import initSqlJs from '@weapp-sqlite/sqljs/full'
|
|
|
7
7
|
// 或 import initSqlJs from '@weapp-sqlite/sqljs/lite'
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
- `full`
|
|
11
|
-
- `lite`
|
|
10
|
+
- `full` 包装官方 `sql.js@1.14.2`,保持 FTS3、normalize 与贡献扩展函数,是本包的默认完整能力基线。
|
|
11
|
+
- `lite` 基于同一 sql.js 版本重新编译,固定 SQLite 3.49.1 与 Emscripten 5.0.0,保留普通表、索引、事务、触发器、CTE、JSON1、ALTER、参数绑定、BLOB 和数据库导入导出;明确移除 FTS3、SQLite normalized SQL(`getNormalizedSQL()`)和 sql.js 贡献的数学/字符串/聚合函数(例如 `reverse()`)。
|
|
12
|
+
|
|
13
|
+
`full` 与 `lite` 生成的数据库文件使用相同的 SQLite 文件格式,可以互相导入导出;如果数据库包含 FTS3 虚表,`lite` 不能执行该虚表相关 SQL。`lite` 主要用于降低 WASM 包体积,不应默认视为查询性能更高的版本。普通 `LIKE`/`GLOB`、事务和迁移不受这些裁剪影响。
|
|
14
|
+
|
|
12
15
|
- `@weapp-sqlite/sqljs/node` 仅供构建期解析 full/lite 的 WASM 文件名与绝对路径。
|
|
13
16
|
|
|
14
17
|
lite 的来源、版本、哈希与许可证会复制到发布包。普通消费者构建不依赖 Docker 或 Emscripten。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-sqlite/sqljs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "weapp-sqlite 的 full 与 lite sql.js WASM 引擎资源",
|
|
6
6
|
"author": "weapp-sqlite contributors",
|
|
7
7
|
"license": "MIT",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"node": "^20.19.0 || >=22.12.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
57
|
+
"@weapp-sqlite/wasm": "0.1.1",
|
|
58
|
+
"sql.js": "1.14.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/sql.js": "^1.4.11"
|