Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 2bba3c1

Browse files
Add function signatures to metadata (#39)
1 parent ebd6cc6 commit 2bba3c1

19 files changed

+529
-236
lines changed

.github/workflows/ci-as-build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: ci-as-build
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
- ready_for_review
9+
jobs:
10+
get-dirs:
11+
name: Get Directories
12+
runs-on: ubuntu-latest
13+
outputs:
14+
dirs: ${{ steps.get-dirs.outputs.dirs }}
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Get subdirectories
19+
id: get-dirs
20+
# we need to build all the examples
21+
run: echo "dirs=$(ls -d examples/*/ | jq -Rsc 'split("\n")[:-1]' )" >> ${GITHUB_OUTPUT}
22+
23+
as-build:
24+
needs: get-dirs
25+
if: github.event_name == 'pull_request'
26+
name: Build
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }}
31+
defaults:
32+
run:
33+
working-directory: ${{ matrix.dir }}
34+
steps:
35+
- name: Checkout Source
36+
uses: actions/checkout@v4
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: ">=20"
41+
- name: Install dependencies
42+
working-directory: src/
43+
run: npm install
44+
- name: Establish link
45+
working-directory: src/
46+
run: npm link
47+
- name: Install additional dependencies
48+
run: npm install
49+
- name: Use linked source
50+
run: npm link @hypermode/functions-as
51+
- name: Build project
52+
run: npm run build

.github/workflows/ci-as-lint.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,25 @@ jobs:
3232
run:
3333
working-directory: ${{ matrix.dir }}
3434
steps:
35-
- uses: actions/checkout@v4
35+
- name: Checkout Source
36+
uses: actions/checkout@v4
3637
- name: Setup Node
3738
uses: actions/setup-node@v4
3839
with:
3940
node-version: ">=20"
40-
- name: Check Node and NPM versions
41-
run: |
42-
node --version
43-
npm --version
4441
- name: Install dependencies
42+
working-directory: src/
43+
run: npm install
44+
- name: Establish link
45+
if: ${{ matrix.dir != 'src/' }}
46+
working-directory: src/
47+
run: npm link
48+
- name: Install additional dependencies
49+
if: ${{ matrix.dir != 'src/' }}
4550
run: npm install
51+
- name: Use linked source
52+
if: ${{ matrix.dir != 'src/' }}
53+
run: npm link @hypermode/functions-as
4654
- name: Validate code is formatted
4755
run: npm run pretty:check
4856
- name: Valid code is linted

.github/workflows/ci-as-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
uses: actions/setup-node@v4
2121
with:
2222
node-version: ">=20"
23-
- name: Check Node and NPM versions
24-
run: |
25-
node --version
26-
npm --version
2723
- name: Install dependencies
2824
run: npm install
2925
- name: Run Unit Tests

examples/hmplugin1/package-lock.json

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/hmplugin1/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
},
2222
"devDependencies": {
2323
"@assemblyscript/wasi-shim": "^0.1.0",
24-
"@typescript-eslint/eslint-plugin": "^7.4.0",
25-
"@typescript-eslint/parser": "^7.4.0",
26-
"assemblyscript": "^0.27.25",
24+
"@typescript-eslint/eslint-plugin": "^7.5.0",
25+
"@typescript-eslint/parser": "^7.5.0",
26+
"assemblyscript": "^0.27.26",
2727
"assemblyscript-prettier": "^3.0.1",
2828
"eslint": "^8.57.0",
2929
"prettier": "^3.2.5",

src/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
{
1515
"files": ["./assembly/**/*.ts"],
1616
"parser": "./eslintParser.cjs"
17+
},
18+
{
19+
"files": ["./transform/**"],
20+
"env": {
21+
"node": true
22+
}
1723
}
1824
]
1925
}

src/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
transform/lib/

0 commit comments

Comments
 (0)