Skip to content

Commit 6913159

Browse files
committed
Merge branch 'main' into ian/reset
2 parents 7d0f3bb + 2bcb307 commit 6913159

25 files changed

+5334
-3918
lines changed

.github/workflows/node.js.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
1-
name: Run tests
1+
name: Test and lint
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
4+
cancel-in-progress: true
5+
26
on:
37
push:
4-
branches: ["main"]
8+
branches: [main]
59
pull_request:
6-
branches: ["main"]
10+
branches: ["**"]
11+
712
jobs:
8-
build:
13+
check:
14+
name: Test and lint
915
runs-on: ubuntu-latest
16+
timeout-minutes: 30
17+
1018
steps:
11-
- uses: actions/checkout@v4
12-
- name: Use Node.js
13-
uses: actions/setup-node@v4
19+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
20+
21+
- name: Node setup
22+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
1423
with:
15-
node-version: "18.x"
24+
cache-dependency-path: package.json
25+
node-version: "20.x"
1626
cache: "npm"
17-
- run: npm i
18-
- run: npm ci
19-
- run: cd example && npm i && cd ..
20-
- run: npm test
27+
28+
- name: Install and build
29+
run: |
30+
npm i
31+
npm run build
32+
- name: Publish package for testing branch
33+
run: npx pkg-pr-new publish
34+
- name: Test
35+
run: |
36+
npm run test
37+
npm run typecheck
38+
npm run lint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ node_modules
1414
frontend/package.json
1515
# npm pack output
1616
*.tgz
17+
*.tsbuildinfo

commonjs.json

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

convex.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"functions": "example/convex"
3+
}

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default [
88
ignores: [
99
"dist/**",
1010
"eslint.config.js",
11+
"vitest.config.ts",
1112
"**/_generated/",
1213
"node10stubs.mjs",
1314
],
@@ -19,7 +20,7 @@ export default [
1920

2021
parserOptions: {
2122
project: true,
22-
tsconfigRootDir: ".",
23+
tsconfigRootDir: import.meta.dirname,
2324
},
2425
},
2526
},

esm.json

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

example/convex/_generated/api.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export declare const components: {
107107
fnHandle: string;
108108
name: string;
109109
next?: Array<{ fnHandle: string; name: string }>;
110+
reset?: boolean;
110111
},
111112
{
112113
batchSize?: number;

example/convex/example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Migrations, MigrationStatus } from "@convex-dev/migrations";
1+
import { Migrations, type MigrationStatus } from "@convex-dev/migrations";
22
import { v } from "convex/values";
33
import { components, internal } from "./_generated/api.js";
4-
import { DataModel } from "./_generated/dataModel.js";
4+
import type { DataModel } from "./_generated/dataModel.js";
55
import { internalMutation, internalQuery } from "./_generated/server.js";
66

77
export const migrations = new Migrations<DataModel>(components.migrations);

0 commit comments

Comments
 (0)