Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 39 additions & 69 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ jobs:
script: |-
yarn install --frozen-lockfile --prefer-offline

- name: Lint @duckdb/duckdb-wasm
- name: Lint @motherduck/duckdb-wasm
uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
with:
script: |-
yarn workspace @duckdb/duckdb-wasm run lint
yarn workspace @motherduck/duckdb-wasm run lint

- name: Lint @duckdb/duckdb-wasm-shell
- name: Lint @motherduck/duckdb-wasm-shell
uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
with:
script: |-
yarn workspace @duckdb/duckdb-wasm-shell run lint
yarn workspace @motherduck/duckdb-wasm-shell run lint

- name: Lint @duckdb/benchmarks
uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
Expand Down Expand Up @@ -718,56 +718,43 @@ jobs:
./scripts/generate_uni.sh
./scripts/npm_version.sh

- name: Build @duckdb/duckdb-wasm
- name: Build @motherduck/duckdb-wasm
shell: bash
run: |
rm -rf ./packages/duckdb-wasm/dist/
yarn workspace @duckdb/duckdb-wasm build:release
yarn workspace @duckdb/duckdb-wasm docs
yarn workspace @motherduck/duckdb-wasm build:release
yarn workspace @motherduck/duckdb-wasm docs

- name: Build @duckdb/duckdb-wasm-shell
- name: Build @motherduck/duckdb-wasm-shell
shell: bash
run: |
rm -rf ./packages/duckdb-wasm-shell/dist/
yarn workspace @duckdb/duckdb-wasm-shell install:wasmpack
yarn workspace @duckdb/duckdb-wasm-shell build:release
yarn workspace @motherduck/duckdb-wasm-shell install:wasmpack
yarn workspace @motherduck/duckdb-wasm-shell build:release

- name: Build @duckdb/duckdb-wasm-app
- name: Build @motherduck/duckdb-wasm-app
shell: bash
run: |
rm -rf ./packages/duckdb-wasm-app/build/
yarn workspace @duckdb/duckdb-wasm-app build:release
yarn workspace @motherduck/duckdb-wasm-app build:release

- name: Test @duckdb/duckdb-wasm on Chrome
shell: bash
run: |
CHROME_BIN=`which google-chrome` yarn workspace @duckdb/duckdb-wasm test:chrome

# - name: Test @duckdb/duckdb-wasm on Firefox
# uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
# with:
# script: |-
# yarn workspace @duckdb/duckdb-wasm test:firefox

- name: Test @duckdb/duckdb-wasm on Node.js
shell: bash
run: |
yarn workspace @duckdb/duckdb-wasm test:node

- name: Coverage @duckdb/duckdb-wasm
shell: bash
run: |
CHROME_BIN=`which google-chrome` yarn workspace @duckdb/duckdb-wasm test:chrome:coverage
# - name: Test @motherduck/duckdb-wasm on Chrome
# shell: bash
# run: |
# CHROME_BIN=`which google-chrome` yarn workspace @motherduck/duckdb-wasm test:chrome

# - name: Test @motherduck/duckdb-wasm on Firefox
# uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
#
- name: Build examples
shell: bash
run: |
yarn install
yarn workspace @duckdb/duckdb-wasm-examples-bare-node test
yarn workspace @duckdb/duckdb-wasm-examples-bare-browser build
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-node build
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-node test
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-browser build
yarn workspace @motherduck/duckdb-wasm-examples-bare-node test
yarn workspace @motherduck/duckdb-wasm-examples-bare-browser build
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-node build
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-node test
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-browser build

- name: Package
shell: bash
Expand Down Expand Up @@ -1032,30 +1019,30 @@ jobs:
./scripts/generate_uni.sh
./scripts/npm_version.sh

- name: Build @duckdb/duckdb-wasm
- name: Build @motherduck/duckdb-wasm
shell: bash
run: |
rm -rf ./packages/duckdb-wasm/dist/
yarn workspace @duckdb/duckdb-wasm build:release
yarn workspace @duckdb/duckdb-wasm docs
yarn workspace @motherduck/duckdb-wasm build:release
yarn workspace @motherduck/duckdb-wasm docs

- name: Build @duckdb/duckdb-wasm-shell
- name: Build @motherduck/duckdb-wasm-shell
shell: bash
run: |
rm -rf ./packages/duckdb-wasm-shell/dist/
yarn workspace @duckdb/duckdb-wasm-shell install:wasmpack
yarn workspace @duckdb/duckdb-wasm-shell build:release
yarn workspace @motherduck/duckdb-wasm-shell install:wasmpack
yarn workspace @motherduck/duckdb-wasm-shell build:release

- name: Build @duckdb/duckdb-wasm-app
- name: Build @motherduck/duckdb-wasm-app
shell: bash
run: |
rm -rf ./packages/duckdb-wasm-app/build/
yarn workspace @duckdb/duckdb-wasm-app build:release
yarn workspace @motherduck/duckdb-wasm-app build:release

#- name: Coverage @duckdb/duckdb-wasm
#- name: Coverage @motherduck/duckdb-wasm
# shell: bash
# run: |
# CHROME_BIN=`which google-chrome` yarn workspace @duckdb/duckdb-wasm test:chrome:coverage
# CHROME_BIN=`which google-chrome` yarn workspace @motherduck/duckdb-wasm test:chrome:coverage

- name: Package
shell: bash
Expand All @@ -1070,39 +1057,22 @@ jobs:
run: |
./scripts/npm_measure_lib.sh

- name: Test @duckdb/duckdb-wasm on Chrome
shell: bash
run: |
CHROME_BIN=`which google-chrome` yarn workspace @duckdb/duckdb-wasm test:chrome

# - name: Test @duckdb/duckdb-wasm on Firefox
# - name: Test @motherduck/duckdb-wasm on Firefox
# uses: duckdb/duckdb-wasm-ci-env@f10a0954b7b2b98e8526e0f7bbcb10e614defcbd
# with:
# script: |-
# yarn workspace @duckdb/duckdb-wasm test:firefox

- name: Test @duckdb/duckdb-wasm on Node.js
shell: bash
run: |
yarn workspace @duckdb/duckdb-wasm test:node

- name: Deploy GitHub Page
if: github.ref == 'refs/heads/main'
run: |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git fetch origin gh-pages
./scripts/deploy_pages.sh
# yarn workspace @motherduck/duckdb-wasm test:firefox

- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
TAG: ${{ startsWith(github.head_ref, 'v') && 'latest' || 'next' }}
if: env.NODE_AUTH_TOKEN != null && github.ref == 'refs/heads/main'
if: env.NODE_AUTH_TOKEN != null && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/yl/20251017-patched-141')
run: |
echo "${TAG}"
./scripts/npm_publish_lib.sh
./scripts/npm_publish_shell.sh
./scripts/npm_publish_react.sh
# ./scripts/npm_publish_shell.sh
# ./scripts/npm_publish_react.sh

merge_reports:
name: Merge benchmark reports
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npm_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
VERSION: ${{ inputs.version }}
if: env.NODE_AUTH_TOKEN != null
run: |
npm dist-tag ls @duckdb/duckdb-wasm@"${VERSION}"
npm dist-tag add @duckdb/duckdb-wasm@"${VERSION}" "${TAG}"
npm dist-tag ls @duckdb/duckdb-wasm@"${VERSION}"
npm dist-tag ls @motherduck/duckdb-wasm@"${VERSION}"
npm dist-tag add @motherduck/duckdb-wasm@"${VERSION}" "${TAG}"
npm dist-tag ls @motherduck/duckdb-wasm@"${VERSION}"
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "submodules/duckdb"]
path = submodules/duckdb
url = https://github.com/duckdb/duckdb
url = https://github.com/motherduckdb/public-duckdb
update = rebase
[submodule "submodules/arrow"]
path = submodules/arrow
Expand Down
50 changes: 25 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -283,78 +283,78 @@ wasm_star: wasm_relsize wasm_relperf wasm_dev wasm_debug
# Build the duckdb library in debug mode
.PHONY: js_debug
js_debug: build/bootstrap yarn_install
yarn workspace @duckdb/duckdb-wasm build:debug
yarn workspace @motherduck/duckdb-wasm build:debug

# Build the duckdb library in release mode
.PHONY: js_release
js_release: yarn_install
yarn workspace @duckdb/duckdb-wasm build:release
yarn workspace @motherduck/duckdb-wasm build:release

# Build the duckdb docs
.PHONY: docs
docs: yarn_install
yarn workspace @duckdb/duckdb-wasm docs
yarn workspace @motherduck/duckdb-wasm docs

# Run the duckdb javascript tests
.PHONY: js_tests
js_tests: js_debug build/data
ifeq (${DUCKDB_WASM_LOADABLE_EXTENSIONS}, 1)
# FIXME: build also for node and restore those tests
yarn workspace @duckdb/duckdb-wasm test:chrome || echo "--- Parquet tests expected to fail!"
yarn workspace @motherduck/duckdb-wasm test:chrome || echo "--- Parquet tests expected to fail!"
else
yarn workspace @duckdb/duckdb-wasm test
yarn workspace @motherduck/duckdb-wasm test
endif

.PHONY: js_tests_release
js_tests_release: js_release
ifeq (${DUCKDB_WASM_LOADABLE_EXTENSIONS}, 1)
# FIXME: build also for node and restore those tests
yarn workspace @duckdb/duckdb-wasm test:chrome || echo "--- Parquet tests expected to fail!"
yarn workspace @motherduck/duckdb-wasm test:chrome || echo "--- Parquet tests expected to fail!"
else
yarn workspace @duckdb/duckdb-wasm test
yarn workspace @motherduck/duckdb-wasm test
endif

# Run the duckdb javascript tests in browser
.PHONY: js_tests_browser
js_tests_browser: js_debug build/data
yarn workspace @duckdb/duckdb-wasm test:chrome
yarn workspace @motherduck/duckdb-wasm test:chrome

# Run the duckdb javascript tests in browser
.PHONY: js_tests_browser_debug
js_tests_browser_debug: js_debug build/data
yarn workspace @duckdb/duckdb-wasm test:browser:debug
yarn workspace @motherduck/duckdb-wasm test:browser:debug

# Run the duckdb javascript tests on nodejs
.PHONY: js_tests_node
js_tests_node: js_debug build/data
yarn workspace @duckdb/duckdb-wasm test:node --filter=${JS_FILTER}
yarn workspace @motherduck/duckdb-wasm test:node --filter=${JS_FILTER}

.PHONY: js_tests_node_debug
js_tests_node_debug: js_debug build/data
yarn workspace @duckdb/duckdb-wasm test:node:debug --filter=${JS_FILTER}
yarn workspace @motherduck/duckdb-wasm test:node:debug --filter=${JS_FILTER}

wasmpack: yarn_install
yarn workspace @duckdb/duckdb-wasm-shell install:wasmpack
yarn workspace @motherduck/duckdb-wasm-shell install:wasmpack

.PHONY: shell
shell: build/bootstrap js_debug
yarn workspace @duckdb/duckdb-wasm-shell build:debug
yarn workspace @motherduck/duckdb-wasm-shell build:debug

.PHONY: shell_release
shell_release: js_release
yarn workspace @duckdb/duckdb-wasm-shell build:release
yarn workspace @motherduck/duckdb-wasm-shell build:release

.PHONY: app_start
app_start: yarn_install
yarn workspace @duckdb/duckdb-wasm-app start
yarn workspace @motherduck/duckdb-wasm-app start

.PHONY: app_start_corp
app_start_corp:
yarn workspace @duckdb/duckdb-wasm-app start:corp
yarn workspace @motherduck/duckdb-wasm-app start:corp

.PHONY: app
app: wasm wasmpack shell docs js_tests_release
yarn workspace @duckdb/duckdb-wasm-app build:release
yarn workspace @motherduck/duckdb-wasm-app build:release

build_loadable:
USE_GENERATED_EXPORTED_LIST=no DUCKDB_PLATFORM=wasm_${TARGET} DUCKDB_WASM_LOADABLE_EXTENSIONS=1 ./scripts/wasm_build_lib.sh relsize ${TARGET}
Expand All @@ -363,7 +363,7 @@ build_loadable_unsigned: build_loadable
# need to propagate the unsigned flag

serve_loadable_base: wasmpack shell docs
yarn workspace @duckdb/duckdb-wasm-app build:release
yarn workspace @motherduck/duckdb-wasm-app build:release
cp -r build/extension_repository packages/duckdb-wasm-app/build/release/.

.PHONY: serve_local
Expand All @@ -389,8 +389,8 @@ clang_format:
# JS formatting
.PHONY: eslint
eslint:
yarn workspace @duckdb/duckdb-wasm run lint
yarn workspace @duckdb/duckdb-wasm-shell run lint
yarn workspace @motherduck/duckdb-wasm run lint
yarn workspace @motherduck/duckdb-wasm-shell run lint
yarn workspace @duckdb/benchmarks run lint

# Install all yarn packages
Expand All @@ -401,11 +401,11 @@ yarn_install:

.PHONY: examples
examples: yarn_install
yarn workspace @duckdb/duckdb-wasm-examples-bare-node test
yarn workspace @duckdb/duckdb-wasm-examples-bare-browser build
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-node build
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-node test
yarn workspace @duckdb/duckdb-wasm-examples-esbuild-browser build
yarn workspace @motherduck/duckdb-wasm-examples-bare-node test
yarn workspace @motherduck/duckdb-wasm-examples-bare-browser build
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-node build
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-node test
yarn workspace @motherduck/duckdb-wasm-examples-esbuild-browser build

# ---------------------------------------------------------------------------
# Environment
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</div>

<div align="center">
<a href="https://www.npmjs.com/package/@duckdb/duckdb-wasm/v/latest">
<img src="https://img.shields.io/npm/v/@duckdb/duckdb-wasm?logo=npm" alt="duckdb-wasm package on NPM">
<a href="https://www.npmjs.com/package/@motherduck/duckdb-wasm/v/latest">
<img src="https://img.shields.io/npm/v/@motherduck/duckdb-wasm?logo=npm" alt="duckdb-wasm package on NPM">
</a>
<a href="https://github.com/duckdb/duckdb-wasm/actions">
<img src="https://github.com/duckdb/duckdb-wasm/actions/workflows/main.yml/badge.svg?branch=main" alt="Github Actions Badge">
Expand All @@ -20,8 +20,8 @@
<a href="https://github.com/duckdb/duckdb/releases/">
<img src="https://img.shields.io/github/v/release/duckdb/duckdb?color=brightgreen&display_name=tag&logo=duckdb&logoColor=white" alt="Latest DuckDB Release">
</a>
<a href="https://www.jsdelivr.com/package/npm/@duckdb/duckdb-wasm">
<img src="https://data.jsdelivr.com/v1/package/npm/@duckdb/duckdb-wasm/badge?style=rounded" alt="jsdeliver stats">
<a href="https://www.jsdelivr.com/package/npm/@motherduck/duckdb-wasm">
<img src="https://data.jsdelivr.com/v1/package/npm/@motherduck/duckdb-wasm/badge?style=rounded" alt="jsdeliver stats">
</a>
</div>
<h1></h1>
Expand Down Expand Up @@ -104,7 +104,7 @@ make serve
| Subproject | Description | Language |
| -------------------------------------------------------- | :------------- | :--------- |
| [duckdb_wasm](/lib) | Wasm Library | C++ |
| [@duckdb/duckdb-wasm](/packages/duckdb-wasm) | Typescript API | Typescript |
| [@duckdb/duckdb-wasm-shell](/packages/duckdb-wasm-shell) | SQL Shell | Rust |
| [@duckdb/duckdb-wasm-app](/packages/duckdb-wasm-app) | GitHub Page | Typescript |
| [@motherduck/duckdb-wasm](/packages/duckdb-wasm) | Typescript API | Typescript |
| [@motherduck/duckdb-wasm-shell](/packages/duckdb-wasm-shell) | SQL Shell | Rust |
| [@motherduck/duckdb-wasm-app](/packages/duckdb-wasm-app) | GitHub Page | Typescript |
| [@duckdb/react-duckdb](/packages/react-duckdb) | React Hooks | Typescript |
2 changes: 1 addition & 1 deletion examples/bare-browser/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import { createRequire } from 'module';

const require = createRequire(import.meta.url);
const DUCKDB_DIST = path.dirname(require.resolve('@duckdb/duckdb-wasm'));
const DUCKDB_DIST = path.dirname(require.resolve('@motherduck/duckdb-wasm'));

function printErr(err) {
if (err) return console.log(err);
Expand Down
4 changes: 2 additions & 2 deletions examples/bare-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"private": true,
"name": "@duckdb/duckdb-wasm-examples-bare-browser",
"name": "@motherduck/duckdb-wasm-examples-bare-browser",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@duckdb/duckdb-wasm": "file:../../packages/duckdb-wasm"
"@motherduck/duckdb-wasm": "file:../../packages/duckdb-wasm"
},
"devDependencies": {
"http-server": "^14.1.1"
Expand Down
Loading