Files
MetonaSqlark/rollup.config.js
T
thzxx d544501e1c
CI / test (18.x) (push) Failing after 5m11s
CI / test (20.x) (push) Failing after 5m8s
CI / test (22.x) (push) Successful in 9m58s
CI / test (24.x) (push) Successful in 9m56s
release: v0.3.2 — 质量加固 + SQL扩展 + 表达式 + 并发同步
v0.2.6 质量加固:
- 修复 AriaEngine 二级索引 SSTable 互相覆盖(命名空间隔离)
- 修复 LSM 多版本读取顺序错误 + MergeIterator 取最新来源
- 重写 LZ4 压缩器(往返一致性 + 缓冲区溢出)
- sstableCache LRU 上限 + 预加载兜底(BufferPool 配置生效)
- 修复 React/Vue 集成 import type 运行时 bug + exports 子路径
- 新增 38 个测试(LZ4往返/Crypto/集成), 删除伪测试

v0.3.0 SQL 功能扩展:
- 多语句 parseAll + 事务语句 BEGIN/COMMIT/ROLLBACK
- INSERT INTO ... SELECT + UNION/UNION ALL + EXISTS 关联子查询
- CREATE/DROP INDEX 五引擎实现 + 别名 WHERE 修复
- benchmark 页面 + 36 个新测试

v0.3.1 表达式与性能:
- CASE WHEN 表达式(SELECT 列/WHERE/聚合)
- JOIN + 关联子查询逐行绑定
- WAL 批量组提交(写放大 O(N)→O(1))
- 修复 pending frozen 可见性 + flush 缓存竞争

v0.3.2 并发:
- CASE WHEN 用于 WHERE/聚合 + JOIN 哈希连接
- 多标签页同步(multiTabSync + BroadcastChannel)
- IndexedDB schema 持久化(reopen 后表结构恢复)
- 修复 where-matcher 顶层 $not
- 修复 CJS 产物 .js 被 ESM 解析(exports 空) — .cjs 后缀 + exports 修正
- 836 测试 / 44 套件 / 81.0% 覆盖率
2026-08-08 10:41:30 +08:00

109 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';
import serve from 'rollup-plugin-serve';
import livereload from 'rollup-plugin-livereload';
const isDev = process.env.ROLLUP_WATCH;
const isProd = process.env.NODE_ENV === 'production';
const basePlugins = [
resolve(),
commonjs(),
typescript({
tsconfig: './tsconfig.json',
declaration: false,
}),
];
const devPlugins = isDev ? [
serve({
open: true,
contentBase: ['site', 'dist'],
port: 3001,
}),
livereload({
watch: ['src', 'site'],
}),
] : [];
export default [
// UMD development (always built)
{
input: 'src/index.ts',
output: {
file: 'dist/metona-sqlark.js',
format: 'umd',
name: 'MetonaSqlark',
exports: 'named',
sourcemap: true,
},
// react/vue 为 peer dependencyintegrations 子路径),不打包
external: ['react', 'vue'],
plugins: [...basePlugins, ...devPlugins],
},
// Only build all formats in production
...(isDev ? [] : [
// ES Module
{
input: 'src/index.ts',
output: {
file: 'dist/metona-sqlark.esm.js',
format: 'es',
exports: 'named',
sourcemap: true,
},
external: ['react', 'vue'],
plugins: basePlugins,
},
// CommonJS.cjs 后缀:package.json 为 type:module.js 会被 Node 按 ESM 解析)
{
input: 'src/index.ts',
output: {
file: 'dist/metona-sqlark.cjs',
format: 'cjs',
exports: 'named',
sourcemap: true,
},
external: ['react', 'vue'],
plugins: basePlugins,
},
// UMD minified
{
input: 'src/index.ts',
output: {
file: 'dist/metona-sqlark.min.js',
format: 'umd',
name: 'MetonaSqlark',
exports: 'named',
sourcemap: false,
},
external: ['react', 'vue'],
plugins: [
...basePlugins,
terser({
compress: {
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log', 'console.warn'],
passes: 2,
},
format: { comments: false },
mangle: { toplevel: true },
}),
],
},
// TypeScript declarations bundle
{
input: 'src/index.ts',
output: {
file: 'dist/metona-sqlark.d.ts',
format: 'es',
},
plugins: [dts()],
},
]),
];