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
8 changes: 7 additions & 1 deletion .github/workflows/js-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ jobs:
if: runner.os == 'macOS'
run: brew install wabt; brew install make; printf '%s\n%s\n' "/usr/local/opt/make/libexec/gnubin" "$(cat $GITHUB_PATH)" > $GITHUB_PATH

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-05
override: true

- name: Install wasm-pack
run: cargo install wasm-pack
run: cargo install wasm-pack --version 0.13.1 --locked

- name: Setup Node
uses: actions/setup-node@v3
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/publish-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish dev snapshots

on:
workflow_dispatch:
push:
branches:
- librocco/main

concurrency:
group: publish-dev-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout vlcn-js
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
path: js

- name: Checkout typed-sql sibling
uses: actions/checkout@v4
with:
path: typed-sql
repository: vlcn-io/typed-sql

- name: Install wabt
run: sudo apt-get update && sudo apt-get install -y wabt

- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-05
override: true

- name: Setup Node and pnpm cache
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: js/pnpm-lock.yaml

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.9

- name: Configure registry auth
run: |
echo "//npm.codemyriad.io/:_authToken=${{ secrets.VERDACCIO_TOKEN }}" >> ~/.npmrc

- name: Build
working-directory: js
run: make

- name: Publish dev snapshots
working-directory: js
run: ./scripts/publish/publish.sh dev
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://npm.codemyriad.io/
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,19 @@ git clone --recurse-submodules git@github.com:vlcn-io/workspace.git

Running `make` in that directory will get you set up. Ensure you have the rust nightly toolchain installed and activated before running make.

## Fork publishing

The codemyriad fork publishes forked `@vlcn.io/*` packages to `https://npm.codemyriad.io/`.

Development snapshot publishes use the current repo commit SHA in the prerelease version, for example `0.2.2-dev.20260313.abcd1234`. Stable fork releases use an explicit `myriad.N` suffix, for example `0.2.2-myriad.1`.

From a fork checkout with `typed-sql` available as a sibling repo and registry auth configured outside the repo:

```bash
make
DRY_RUN=true ./scripts/publish/publish.sh dev
./scripts/publish/publish.sh dev
MYRIAD_N=1 ./scripts/publish/publish.sh myriad
```

The publish script refuses to reuse an existing `name@version`, which prevents the same version from being republished with different contents.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "0.0.0",
"packageManager": "pnpm@7.9.0",
"packageManager": "pnpm@9.15.9",
"engines": {
"node": ">=19",
"pnpm": ">=7"
Expand Down
3 changes: 3 additions & 0 deletions packages/crsqlite-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/browser/crsqlite"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"@vlcn.io/wa-sqlite": "workspace:*",
"@vlcn.io/xplat-api": "workspace:*",
Expand Down
3 changes: 3 additions & 0 deletions packages/logger-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/packages/logger-provider"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"winston": "^3.10.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/rx-tbl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/rx-tbl"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"@vlcn.io/xplat-api": "workspace:*"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/ws-browserdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/packages/ws-browserdb"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"@types/throttle-debounce": "^5.0.0",
"@vlcn.io/ws-client": "workspace:*",
Expand Down
3 changes: 3 additions & 0 deletions packages/ws-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/packages/ws-client"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"@types/throttle-debounce": "^5.0.0",
"@vlcn.io/ws-common": "workspace:*"
Expand Down
3 changes: 3 additions & 0 deletions packages/ws-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/packages/ws-client"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"lib0": "^0.2.73"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/ws-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/packages/ws-server"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"@types/better-sqlite3": "^7.6.8",
"@vlcn.io/crsqlite": "workspace:*",
Expand Down
3 changes: 3 additions & 0 deletions packages/xplat-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"url": "git@github.com:vlcn-io/js.git",
"directory": "https://github.com/vlcn-io/js/tree/main/js/xplat-api"
},
"publishConfig": {
"registry": "https://npm.codemyriad.io/"
},
"dependencies": {
"comlink": "^4.4.1"
}
Expand Down
22 changes: 22 additions & 0 deletions scripts/publish/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

# Configuration for publishing the codemyriad fork of vlcn-js.

REGISTRY_URL="${REGISTRY_URL:-https://npm.codemyriad.io/}"
DEV_DIST_TAG="${DEV_DIST_TAG:-dev}"
MYRIAD_DIST_TAG="${MYRIAD_DIST_TAG:-myriad}"

# Packages are ordered topologically so workspace protocol dependencies
# resolve to already-published versions during the run.
PUBLISH_PACKAGES=(
"@vlcn.io/xplat-api:packages/xplat-api"
"@vlcn.io/ws-common:packages/ws-common"
"@vlcn.io/wa-sqlite:deps/wa-sqlite"
"@vlcn.io/crsqlite:deps/cr-sqlite/core"
"@vlcn.io/logger-provider:packages/logger-provider"
"@vlcn.io/rx-tbl:packages/rx-tbl"
"@vlcn.io/ws-client:packages/ws-client"
"@vlcn.io/crsqlite-wasm:packages/crsqlite-wasm"
"@vlcn.io/ws-server:packages/ws-server"
"@vlcn.io/ws-browserdb:packages/ws-browserdb"
)
Loading
Loading