Skip to content

Commit

Permalink
Merge branch 'zwave-js:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
TSHAdmin authored Oct 17, 2023
2 parents 980cf11 + 88bdd47 commit dfeedac
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # This should be LTS
node-version: [20.x] # This should be LTS

steps:
- name: Checkout code
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # This should be LTS
node-version: [20.x] # This should be LTS

steps:
- name: Checkout code
Expand Down
10 changes: 1 addition & 9 deletions ava.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ export default {
extensions: {
ts: "module",
},
nodeArguments: [
"--no-warnings",
"--experimental-loader",
"./src/maintenance/ts-loader.mjs",
"-r",
"esbuild-register",
"--experimental-specifier-resolution=node",
"--experimental-vm-modules",
],
nodeArguments: ["--no-warnings", "--experimental-vm-modules"],
files: ["src/**/*.test.ts", "test/**/*.ts"],
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
"module": "build/worker.js",
"scripts": {
"check": "tsc -p tsconfig.build.json --noEmit && tsc -p src/maintenance/tsconfig.json --noEmit",
"ts": "yarn node --experimental-loader ./src/maintenance/ts-loader.mjs -r esbuild-register",
"build": "esbuild --bundle --format=esm --platform=browser --sourcemap --outdir=build src/worker.ts",
"clean": "rm -rf build",
"lint": "eslint .",
"test:ci": "ava",
"test:ci": "NODE_OPTIONS='--loader=tsx' ava",
"test": "yarn test:ci --watch",
"dev": "miniflare",
"build:index": "yarn ts src/maintenance/generateIndex.ts",
"upload": "yarn ts src/maintenance/upload.ts"
"build:index": "yarn tsx src/maintenance/generateIndex.ts",
"upload": "yarn tsx src/maintenance/upload.ts"
},
"dependencies": {
"itty-durable": "^1.2.0",
Expand Down Expand Up @@ -55,6 +54,7 @@
"miniflare": "~2.11.0",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.1.1",
"tsx": "^3.13.0",
"typescript": "~4.7.4",
"wrangler": "^2.1.4",
"zod-to-json-schema": "^3.17.1"
Expand Down
4 changes: 4 additions & 0 deletions src/maintenance/generateIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import path from "path-browserify";
import { generateIndex } from "../lib/config";
import { NodeFS } from "./nodeFS";

import { dirname } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));

const configDir = path.join(__dirname, "../../firmwares");

void (async () => {
Expand Down
4 changes: 4 additions & 0 deletions src/maintenance/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import type { ConfigIndexEntry } from "../lib/config";
import type { UploadPayload } from "../lib/uploadSchema";
import { NodeFS } from "./nodeFS";

import { dirname } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));

const configDir = path.join(__dirname, "../../firmwares");
const MAX_FILES_PER_REQUEST = 50; // limited by no. of subrequests in Cloudflare Workers
const baseURL = process.env.BASE_URL;
Expand Down
Loading

0 comments on commit dfeedac

Please sign in to comment.