Skip to content

Commit

Permalink
refactor: remove fetch! macro because useless and hard to read
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Dec 31, 2024
1 parent adae058 commit 4f8c26c
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 187 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
publish-js:
runs-on: 'ubuntu-latest'
runs-on: ubuntu-latest

permissions:
contents: read
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
npm publish --provenance --access public
publish-rust:
runs-on: 'ubuntu-latest'
runs-on: ubuntu-latest

permissions:
contents: write
Expand Down
83 changes: 0 additions & 83 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["wasm", "fetcher", "fetcher-macros"]
members = ["wasm", "fetcher"]

[workspace.package]
version = "0.1.2"
Expand Down
20 changes: 0 additions & 20 deletions fetcher-macros/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions fetcher-macros/examples/fetch.rs

This file was deleted.

64 changes: 0 additions & 64 deletions fetcher-macros/src/lib.rs

This file was deleted.

1 change: 0 additions & 1 deletion fetcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11"
http = "1.2"
url = "2.5"
fetcher-macros = { package = "literateink-fetcher-macros", version = "0.1", path = "../fetcher-macros" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion fetcher/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const defaultFetcher: Fetcher = async (req) => {
const status = response.status; // should be `u16`
const bytes = await response.arrayBuffer();

// Sicne Headers.entries() is not available in all environments
// Since `Headers.entries()` is not available in all environments
// we have to do this dirty hack to get all headers...
headers = (isHeaders(response.headers)
// Available in this environment
Expand Down

0 comments on commit 4f8c26c

Please sign in to comment.