Skip to content

Commit

Permalink
fix: Test and code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pigri committed Mar 15, 2024
1 parent 336e075 commit 95bf388
Show file tree
Hide file tree
Showing 10 changed files with 334 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ dist
.pnp.*

# cloudflare
wrangler.toml
.wrangler
.idea
lib/
Expand Down
3 changes: 1 addition & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cf-n8n-proxy",
"name": "cf-worker-hash-example",
"scripts": {
"dev": "wrangler dev"
},
Expand All @@ -14,7 +14,6 @@
"wrangler": "3.34.2"
},
"dependencies": {
"cf-workers-hash": "github:pigri/cf-workers-hash",
"itty-fetcher": "0.9.4",
"itty-router": "4.2.1"
},
Expand Down
2 changes: 1 addition & 1 deletion example/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hasher } from '../../src';
import { hasher } from '../../dist';

export default {
async fetch(request: Request) {
Expand Down
9 changes: 9 additions & 0 deletions example/wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name = "cf-worker-hash-example"
main = "src/index.ts"
compatibility_date = "2024-03-04"
compatibility_flags = [ "nodejs_compat", "nodejs_als"]
workers_dev = true
#logpush = true

[vars]
ENVIRONMENT = "dev"
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testEnvironment: "miniflare",
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cf-workers-hash",
"version": "0.0.1",
"version": "0.0.3",
"description": "A simple hash function for Cloudflare Workers",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -30,6 +30,7 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"jest": "29.7.0",
"jest-environment-miniflare": "^2.14.2",
"pnpm": "latest",
"prettier": "3.2.5",
"ts-jest": "29.1.2",
Expand Down
Loading

0 comments on commit 95bf388

Please sign in to comment.