Skip to content

Commit

Permalink
feat(jsr): support JSR (#2662)
Browse files Browse the repository at this point in the history
* feat(jsr): reduce slow types (#2369)

* feat(jsr): reduce slow types

* fix: use allow function

* chore: format code

* chore: denoify

* add `deno.json`

* add `jsr-dry-run` command for CI

* don't put `JSX` on `global`

* fix test settings for deno

* don't use `dynamicClass`

* don't declare `ExecutionContext` in `global`

* goodbye denoify

* exports `./middleware`

* exports `./helper`

* exports each helper and middleware

* remove the `awslambda` implementation which is not enough

* feat(jsr): remove helper.ts and middleware.ts (#2667)

* feat(jsr): remove helper.ts and middleware.ts

* fix: fix test

* dont' use `SuperClass`

Co-authored-by: Taku Amano <[email protected]>

* feat(jsr): delete `mod.ts` (#2669)

* rename `deno.json` to `jsr.json`

* lint

* remove slow type in lambda adapter

* fixed runtime test for deno

* export all utils

* add a GitHub action to publish the package to JSR

* fixed declaring `ContextVariableMap`

* fixed the type error

* include `jsr.json` in `jsr.json`

* update `jsr.json`

---------

Co-authored-by: Shotaro Nakamura <[email protected]>
Co-authored-by: Taku Amano <[email protected]>
  • Loading branch information
3 people authored May 24, 2024
1 parent cd667e5 commit 1b2a4c0
Show file tree
Hide file tree
Showing 216 changed files with 1,065 additions and 15,671 deletions.
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

- [ ] Add tests
- [ ] Run tests
- [ ] `bun denoify` to generate files for Deno
- [ ] `bun run format:fix && bun run lint:fix` to format the code
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,15 @@ jobs:
- run: bun run build
- run: bun run test

denoify:
name: "Checking if you've done denoify"
jsr-dry-run:
name: "Checking if it's valid for JSR"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: oven-sh/setup-bun@v1
- uses: denoland/setup-deno@v1
with:
bun-version: '1.0.25'
- run: bun install
- run: |
bun run denoify
if [[ `git status --porcelain` ]]; then
exit 1
fi
deno-version: v1.x
- run: deno publish --dry-run

deno:
name: 'Deno'
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ci

on: [push]

jobs:
deno:
name: publish-to-jsr
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Install deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Publish to JSR
run: deno run -A jsr:@david/[email protected]
Binary file modified bun.lockb
Binary file not shown.
21 changes: 0 additions & 21 deletions deno_dist/LICENSE

This file was deleted.

92 changes: 0 additions & 92 deletions deno_dist/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions deno_dist/adapter/deno/conninfo.ts

This file was deleted.

24 changes: 0 additions & 24 deletions deno_dist/adapter/deno/deno.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions deno_dist/adapter/deno/index.ts

This file was deleted.

32 changes: 0 additions & 32 deletions deno_dist/adapter/deno/serve-static.ts

This file was deleted.

27 changes: 0 additions & 27 deletions deno_dist/adapter/deno/ssg.ts

This file was deleted.

30 changes: 0 additions & 30 deletions deno_dist/adapter/deno/websocket.ts

This file was deleted.

17 changes: 0 additions & 17 deletions deno_dist/adapter/netlify/handler.ts

This file was deleted.

1 change: 0 additions & 1 deletion deno_dist/adapter/netlify/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions deno_dist/adapter/netlify/mod.ts

This file was deleted.

Loading

0 comments on commit 1b2a4c0

Please sign in to comment.