Skip to content

Commit a77fdea

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/signed-transactions-merge
2 parents 25f11a6 + 5383455 commit a77fdea

File tree

347 files changed

+16496
-16321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+16496
-16321
lines changed

.github/workflows/jumble.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Jumble CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, denoify]
66
pull_request:
77
branches: [main]
88

@@ -13,25 +13,23 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: pnpm/action-setup@v4
17-
with:
18-
version: 10.0.0
19-
- uses: actions/setup-node@v4
20-
with:
21-
node-version: "20.11.0"
22-
cache: "pnpm"
23-
cache-dependency-path: "./typescript/packages/pnpm-lock.yaml"
2416

25-
- name: Install Dependencies
26-
working-directory: ./typescript/packages
27-
run: pnpm install --frozen-lockfile
17+
- name: Setup Deno
18+
uses: denoland/setup-deno@v2
19+
with:
20+
deno-version: "2.2.2"
2821

2922
- name: Build
3023
working-directory: ./typescript/packages/jumble
31-
run: pnpm run build
24+
run: deno task build
3225
env:
3326
VITE_STORAGE_TYPE: "remote"
3427
TOOLSHED_API_URL: ${{ secrets.TOOLSHED_API_URL }}
28+
VITE_TOOLSHED_API_URL: ${{ secrets.TOOLSHED_API_URL }}
29+
30+
- name: Tarballify dist
31+
working-directory: ./typescript/packages/jumble
32+
run: tar -czvf dist.tar.gz dist
3533

3634
- uses: actions/upload-artifact@v4
3735
with:

.github/workflows/toolshed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Deno
3535
uses: denoland/setup-deno@v2
3636
with:
37-
deno-version: "2.1.9"
37+
deno-version: "2.2.2"
3838

3939
- name: Cache dependencies
4040
uses: actions/cache@v3

.github/workflows/ui-tests.yml

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: UI Tests
2-
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
2+
3+
# DISABLED until browser tests working again
4+
#on:
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# branches:
10+
# - main
911

1012
jobs:
1113
test:
@@ -14,30 +16,29 @@ jobs:
1416
matrix:
1517
node-version: [22]
1618
steps:
17-
- name: Install test dependencies
18-
run: |
19-
sudo apt update
20-
sudo apt-get install -y xvfb x11-xserver-utils
21-
- uses: actions/checkout@v4
22-
- name: Install pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
version: 10
26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: ${{ matrix.node-version }}
30-
cache-dependency-path: typescript/packages/pnpm-lock.yaml
31-
- name: Install dependencies
32-
run: |
33-
cd typescript/packages
34-
pnpm install
35-
- name: UI Tests
36-
run: |
37-
cd typescript/packages/common-iframe-sandbox
38-
pnpm test
39-
cd -
40-
cd typescript/packages/common-identity
41-
pnpm test
42-
cd -
43-
19+
- name: Install test dependencies
20+
run: |
21+
sudo apt update
22+
sudo apt-get install -y xvfb x11-xserver-utils
23+
- uses: actions/checkout@v4
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache-dependency-path: typescript/packages/pnpm-lock.yaml
33+
- name: Install dependencies
34+
run: |
35+
cd typescript/packages
36+
pnpm install
37+
- name: UI Tests
38+
run: |
39+
cd typescript/packages/common-iframe-sandbox
40+
pnpm test
41+
cd -
42+
cd typescript/packages/common-identity
43+
pnpm test
44+
cd -

.github/workflows/unit-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
defaults:
16+
run:
17+
working-directory: ./typescript/packages
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup Deno
21+
uses: denoland/setup-deno@v2
22+
with:
23+
deno-version: "2.2.2"
24+
- name: Cache dependencies
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.deno
29+
~/.cache/deno
30+
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.json') }}
31+
- name: Run tests
32+
working-directory: typescript/packages
33+
run: deno task test-all

.vscode/settings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
"deno.enable": true,
5-
"deno.enablePaths": ["typescript/packages/common-memory", "typescript/packages/toolshed"]
3+
"editor.defaultFormatter": "denoland.vscode-deno",
4+
"deno.enable": true
65
}

typescript/packages/.prettierignore

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "@commontools/builder",
3+
"exports": "./src/index.ts",
4+
"tasks": {
5+
"test": "deno test"
6+
}
7+
}

typescript/packages/common-builder/package.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

typescript/packages/common-builder/src/built-in.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createNodeFactory, lift } from "./module.js";
2-
import type { NodeFactory, Opaque, OpaqueRef } from "./types.js";
1+
import { createNodeFactory, lift } from "./module.ts";
2+
import type { NodeFactory, Opaque, OpaqueRef } from "./types.ts";
33

44
export const llm = createNodeFactory({
55
type: "ref",
@@ -65,14 +65,21 @@ export const navigateTo = createNodeFactory({
6565
// str`Hello, ${name}!`
6666
//
6767
// TODO: This should be a built-in module
68-
export function str(strings: TemplateStringsArray, ...values: any[]): OpaqueRef<string> {
68+
export function str(
69+
strings: TemplateStringsArray,
70+
...values: any[]
71+
): OpaqueRef<string> {
6972
const interpolatedString = ({
7073
strings,
7174
values,
7275
}: {
7376
strings: TemplateStringsArray;
7477
values: any[];
75-
}) => strings.reduce((result, str, i) => result + str + (i < values.length ? values[i] : ""), "");
78+
}) =>
79+
strings.reduce(
80+
(result, str, i) => result + str + (i < values.length ? values[i] : ""),
81+
"",
82+
);
7683

7784
return lift(interpolatedString)({ strings, values });
7885
}

typescript/packages/common-builder/src/index.ts

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
export { opaqueRef as cell, stream } from "./opaque-ref.js";
2-
export { $, event, select, Spell } from "./spell.js";
3-
export { byRef, compute, createNodeFactory, derive, handler, lift, render } from "./module.js";
1+
export { opaqueRef as cell, stream } from "./opaque-ref.ts";
2+
export { $, event, select, Spell } from "./spell.ts";
3+
export {
4+
byRef,
5+
compute,
6+
createNodeFactory,
7+
derive,
8+
handler,
9+
lift,
10+
render,
11+
} from "./module.ts";
412
export {
513
getTopFrame,
614
popFrame,
715
pushFrame,
816
pushFrameFromCause,
917
recipe,
1018
recipeFromFrame,
11-
} from "./recipe.js";
12-
export { fetchData, ifElse, llm, navigateTo, str, streamData } from "./built-in.js";
19+
} from "./recipe.ts";
20+
export {
21+
fetchData,
22+
ifElse,
23+
llm,
24+
navigateTo,
25+
str,
26+
streamData,
27+
} from "./built-in.ts";
1328
export {
1429
type Alias,
1530
type Frame,
@@ -42,7 +57,12 @@ export {
4257
unsafe_originalRecipe,
4358
unsafe_parentRecipe,
4459
type UnsafeBinding,
45-
} from "./types.js";
60+
} from "./types.ts";
4661

4762
// This should be a separate package, but for now it's easier to keep it here.
48-
export { createJsonSchema, deepEqual, getValueAtPath, setValueAtPath } from "./utils.js";
63+
export {
64+
createJsonSchema,
65+
deepEqual,
66+
getValueAtPath,
67+
setValueAtPath,
68+
} from "./utils.ts";

0 commit comments

Comments
 (0)